-
Notifications
You must be signed in to change notification settings - Fork 32.5k
Closed
Description
System Info
transformer v. 4.31.0'
Who can help?
Information
- The official example scripts
- My own modified scripts
Tasks
- An officially supported task in the
examplesfolder (such as GLUE/SQuAD, ...) - My own task or dataset (give details below)
Reproduction
I tried to load 'microsoft/deberta-v3-large' using AutoModelForMultipleChoice and TFAutoModelForMultipleChoice class. But I got error with TF* class.
from transformers import AutoModelForMultipleChoice
from transformers import TFAutoModelForMultipleChoice
deberta_v3_large = 'microsoft/deberta-v3-large'
# OK
torch_model = AutoModelForMultipleChoice.from_pretrained(deberta_v3_large)
# NOT OK
tf_model = TFAutoModelForMultipleChoice.from_pretrained(deberta_v3_large)Errro logs
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ in <module>:1 │
│ │
│ ❱ 1 tf_model = TFAutoModelForMultipleChoice.from_pretrained(deberta_v3_large) │
│ 2 │
│ │
│ /opt/conda/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py:496 in │
│ from_pretrained │
│ │
│ 493 │ │ │ return model_class.from_pretrained( │
│ 494 │ │ │ │ pretrained_model_name_or_path, *model_args, config=config, **hub_kwargs, │
│ 495 │ │ │ ) │
│ ❱ 496 │ │ raise ValueError( │
│ 497 │ │ │ f"Unrecognized configuration class {config.__class__} for this kind of AutoM │
│ 498 │ │ │ f"Model type should be one of {', '.join(c.__name__ for c in cls._model_mapp │
│ 499 │ │ ) │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ValueError: Unrecognized configuration class <class
'transformers.models.deberta_v2.configuration_deberta_v2.DebertaV2Config'> for this kind of AutoModel:
TFAutoModelForMultipleChoice.
Model type should be one of AlbertConfig, BertConfig, CamembertConfig, ConvBertConfig, DistilBertConfig,
ElectraConfig, FlaubertConfig, FunnelConfig, LongformerConfig, MobileBertConfig, MPNetConfig, RemBertConfig,
RobertaConfig, RobertaPreLayerNormConfig, RoFormerConfig, XLMConfig, XLMRobertaConfig, XLNetConfig.
Expected behavior
They should work in same manner!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels