[Model] Add support for BERT-like Chinese ERNIE pooling models (#36385)

Signed-off-by: whyiug <whyiug@hotmail.com>
Co-authored-by: wang.yuqi <yuqi.wang@daocloud.io>
This commit is contained in:
whyiug
2026-03-13 03:23:53 +00:00
committed by GitHub
co-authored by wang.yuqi
parent 10f08dedfa
commit 1ce13cf992
7 changed files with 317 additions and 3 deletions
+7
View File
@@ -552,6 +552,7 @@ _TEXT_GENERATION_EXAMPLE_MODELS = {
_EMBEDDING_EXAMPLE_MODELS = {
# [Text-only]
"BertModel": _HfExamplesInfo("BAAI/bge-base-en-v1.5"),
"ErnieModel": _HfExamplesInfo("shibing624/text2vec-base-chinese-sentence"),
"BertSpladeSparseEmbeddingModel": _HfExamplesInfo(
"naver/splade-v3",
hf_overrides={"architectures": ["BertSpladeSparseEmbeddingModel"]},
@@ -666,6 +667,9 @@ _REWARD_EXAMPLE_MODELS = {
_TOKEN_CLASSIFICATION_EXAMPLE_MODELS = {
"BertForTokenClassification": _HfExamplesInfo("boltuix/NeuroBERT-NER"),
"ErnieForTokenClassification": _HfExamplesInfo(
"gyr66/Ernie-3.0-base-chinese-finetuned-ner"
),
"ModernBertForTokenClassification": _HfExamplesInfo(
"disham993/electrical-ner-ModernBERT-base"
),
@@ -675,6 +679,9 @@ _SEQUENCE_CLASSIFICATION_EXAMPLE_MODELS = {
"BertForSequenceClassification": _HfExamplesInfo(
"cross-encoder/ms-marco-MiniLM-L-6-v2"
),
"ErnieForSequenceClassification": _HfExamplesInfo(
"Forrest20231206/ernie-3.0-base-zh-cls",
),
"GPT2ForSequenceClassification": _HfExamplesInfo(
"nie3e/sentiment-polish-gpt2-small"
),