Skip to content

Commit 8474284

Browse files
lewtunelusenji
authored andcommitted
Remove next sentence prediction from supported ONNX tasks (huggingface#17276)
1 parent 7bc9905 commit 8474284

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/transformers/onnx/features.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
AutoModelForMaskedImageModeling,
4646
AutoModelForMaskedLM,
4747
AutoModelForMultipleChoice,
48-
AutoModelForNextSentencePrediction,
4948
AutoModelForQuestionAnswering,
5049
AutoModelForSeq2SeqLM,
5150
AutoModelForSequenceClassification,
@@ -57,7 +56,6 @@
5756
TFAutoModelForCausalLM,
5857
TFAutoModelForMaskedLM,
5958
TFAutoModelForMultipleChoice,
60-
TFAutoModelForNextSentencePrediction,
6159
TFAutoModelForQuestionAnswering,
6260
TFAutoModelForSeq2SeqLM,
6361
TFAutoModelForSequenceClassification,
@@ -112,7 +110,6 @@ class FeaturesManager:
112110
"question-answering": AutoModelForQuestionAnswering,
113111
"image-classification": AutoModelForImageClassification,
114112
"masked-im": AutoModelForMaskedImageModeling,
115-
"next-sentence-prediction": AutoModelForNextSentencePrediction,
116113
}
117114
if is_tf_available():
118115
_TASKS_TO_TF_AUTOMODELS = {
@@ -124,7 +121,6 @@ class FeaturesManager:
124121
"token-classification": TFAutoModelForTokenClassification,
125122
"multiple-choice": TFAutoModelForMultipleChoice,
126123
"question-answering": TFAutoModelForQuestionAnswering,
127-
"next-sentence-prediction": TFAutoModelForNextSentencePrediction,
128124
}
129125

130126
# Set of model topologies we support associated to the features supported by each topology and the factory
@@ -159,7 +155,6 @@ class FeaturesManager:
159155
"multiple-choice",
160156
"token-classification",
161157
"question-answering",
162-
"next-sentence-prediction",
163158
onnx_config_cls=BertOnnxConfig,
164159
),
165160
"big-bird": supported_features_mapping(
@@ -326,7 +321,6 @@ class FeaturesManager:
326321
"mobilebert": supported_features_mapping(
327322
"default",
328323
"masked-lm",
329-
"next-sentence-prediction",
330324
"sequence-classification",
331325
"multiple-choice",
332326
"token-classification",

0 commit comments

Comments
 (0)