Skip to content

Commit 76d4dd3

Browse files
committed
update automodel
1 parent ea38e0f commit 76d4dd3

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

FlagEmbedding/inference/auto_embedder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def from_finetuned(
3434
if model_name.startswith("checkpoint-"):
3535
model_name = os.path.basename(os.path.dirname(model_name_or_path))
3636

37-
if model_class is not None:
37+
if model_class is not None and model_class != 'auto':
3838
_model_class = EMBEDDER_CLASS_MAPPING[EmbedderModelClass(model_class)]
3939
if pooling_method is None:
4040
pooling_method = _model_class.DEFAULT_POOLING_METHOD

FlagEmbedding/inference/auto_reranker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def from_finetuned(
3030
if model_name.startswith("checkpoint-"):
3131
model_name = os.path.basename(os.path.dirname(model_name_or_path))
3232

33-
if model_class is not None:
33+
if model_class is not None and model_class != 'auto':
3434
_model_class = RERANKER_CLASS_MAPPING[RerankerModelClass(model_class)]
3535
if trust_remote_code is None:
3636
trust_remote_code = False

0 commit comments

Comments
 (0)