[Model] Add support for ModernBertForTokenClassification (#26340)

Signed-off-by: Antoine Recanati Le Goat <antoine.recanati@sancare.fr>
Signed-off-by: antrec <antoine.recanati@gmail.com>
Co-authored-by: Antoine Recanati Le Goat <antoine.recanati@sancare.fr>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
antrec
2025-10-07 14:29:19 +00:00
committed by GitHub
co-authored by Antoine Recanati Le Goat gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
parent 41f1cf38f2
commit 6f59beaf0b
5 changed files with 112 additions and 2 deletions
+4
View File
@@ -225,6 +225,10 @@ _CROSS_ENCODER_MODELS = {
"modernbert",
"ModernBertForSequenceClassification",
),
"ModernBertForTokenClassification": (
"modernbert",
"ModernBertForTokenClassification",
),
"RobertaForSequenceClassification": ("roberta", "RobertaForSequenceClassification"),
"XLMRobertaForSequenceClassification": (
"roberta",