Modeling#
- class FlagEmbedding.finetune.reranker.decoder_only.base.CrossDecoderModel(base_model: PreTrainedModel, tokenizer: AutoTokenizer | None = None, train_batch_size: int = 4)[source]#
Model class for decoder only reranker.
- Parameters:
base_model (PreTrainedModel) – The underlying pre-trained model used for encoding and scoring input pairs.
tokenizer (AutoTokenizer, optional) – The tokenizer for encoding input text. Defaults to
None
.train_batch_size (int, optional) – The batch size to use. Defaults to
4
.