File tree 3 files changed +14
-0
lines changed
3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,10 @@ class RemBertOnnxConfig(BertOnnxConfig):
171
171
DEFAULT_ONNX_OPSET = 11
172
172
173
173
174
+ class MegatronBertOnnxConfig (BertOnnxConfig ):
175
+ DEFAULT_ONNX_OPSET = 11
176
+
177
+
174
178
class DistilBertOnnxConfig (BertOnnxConfig ):
175
179
DEFAULT_ONNX_OPSET = 14 # now uses F.scaled_dot_product_attention by default for transformers>=4.46.0
176
180
Original file line number Diff line number Diff line change @@ -877,6 +877,15 @@ class TasksManager:
877
877
onnx = "MobileBertOnnxConfig" ,
878
878
tflite = "MobileBertTFLiteConfig" ,
879
879
),
880
+ "megatron-bert" : supported_tasks_mapping (
881
+ "feature-extraction" ,
882
+ "fill-mask" ,
883
+ "text-classification" ,
884
+ "multiple-choice" ,
885
+ "token-classification" ,
886
+ "question-answering" ,
887
+ onnx = "MegatronBertOnnxConfig" ,
888
+ ),
880
889
"mobilevit" : supported_tasks_mapping (
881
890
"feature-extraction" ,
882
891
"image-classification" ,
Original file line number Diff line number Diff line change 197
197
"hf-internal-testing/tiny-random-UniSpeechSatForXVector" : ["audio-xvector" ],
198
198
},
199
199
"audio-spectrogram-transformer" : "Ericwang/tiny-random-ast" ,
200
+ "megatron-bert" : "hf-internal-testing/tiny-random-MegatronBertModel" ,
200
201
# Disabled for now because some operator seems to not be supported by ONNX.
201
202
# "mctct": "hf-internal-testing/tiny-random-MCTCTModel",
202
203
"speech-to-text" : "hf-internal-testing/tiny-random-Speech2TextModel" ,
You can’t perform that action at this time.
0 commit comments