[Classification of single class model] endpoint not available for a finetuned DebertaV2ForSequenceClassification model #316
Replies: 3 comments
-
means you only have 1 class -> the above config.json is identical to rerankers. Loads reranker. Needs at least two trained classes to work with infinity. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the quick reply. So the classification layer is |
Beta Was this translation helpful? Give feedback.
-
|
Well, your model is a two class classifier, it bases |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
System Info
Running
infinityvia docker (michaelf34/infinity:latest) + using the REST API to call the modelInformation
Tasks
Reproduction
Which gives me:
The model's config looks like:
{ "_name_or_path": "microsoft/deberta-v2-xlarge", "architectures": [ "DebertaV2ForSequenceClassification" ], "attention_head_size": 64, "attention_probs_dropout_prob": 0.1, "conv_act": "gelu", "conv_kernel_size": 3, "hidden_act": "gelu", "hidden_dropout_prob": 0.1, "hidden_size": 1536, "id2label": { "0": "LABEL_0" }, "initializer_range": 0.02, "intermediate_size": 6144, "label2id": { "LABEL_0": 0 }, "layer_norm_eps": 1e-07, "max_position_embeddings": 512, "max_relative_positions": -1, "model_type": "deberta-v2", "norm_rel_ebd": "layer_norm", "num_attention_heads": 24, "num_hidden_layers": 24, "pad_token_id": 0, "pooler_dropout": 0, "pooler_hidden_act": "gelu", "pooler_hidden_size": 1536, "pos_att_type": [ "p2c", "c2p" ], "position_biased_input": false, "position_buckets": 256, "problem_type": "multi_label_classification", "relative_attention": true, "share_att_key": true, "torch_dtype": "float32", "transformers_version": "4.34.0", "type_vocab_size": 0, "vocab_size": 128100 }So it's specified that the model is for classification in the config.
Expected behavior
While the base deberta-v2 doesn't have a classification head, this checkpoint does and I finetuned it for classification.
So I was expecting the
/classifyendpoint to work in this case. Is there anything wrong with the config or is there a way to have Infinity run a deberta-v2 finetuned for sequence classification?Beta Was this translation helpful? Give feedback.
All reactions