[Model] support modernbert (#16648)

Signed-off-by: 唯勤 <xsank.mz@alibaba-inc.com>
Co-authored-by: 唯勤 <xsank.mz@alibaba-inc.com>
This commit is contained in:
xsank
2025-04-16 05:30:15 -07:00
committed by GitHub
co-authored by 唯勤
parent e82ee40de3
commit ee378f3d49
4 changed files with 335 additions and 0 deletions
+3
View File
@@ -275,6 +275,9 @@ _CROSS_ENCODER_EXAMPLE_MODELS = {
"BertForSequenceClassification": _HfExamplesInfo("cross-encoder/ms-marco-MiniLM-L-6-v2"), # noqa: E501
"RobertaForSequenceClassification": _HfExamplesInfo("cross-encoder/quora-roberta-base"), # noqa: E501
"XLMRobertaForSequenceClassification": _HfExamplesInfo("BAAI/bge-reranker-v2-m3"), # noqa: E501
"ModernBertForSequenceClassification":
_HfExamplesInfo("Alibaba-NLP/gte-reranker-modernbert-base",
min_transformers_version="4.49"),
}
_MULTIMODAL_EXAMPLE_MODELS = {