No ONNX support for BERT models when token_type_ids
is not provided
#2062
Labels
bug
Something isn't working
token_type_ids
is not provided
#2062
System Info
Who can help?
@michaelbenayoun
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction (minimal, reproducible, runnable)
Expected behavior
I would expect for
optimum
to mirror thetransformers
behaviour wheretoken_type_ids
is set totorch.zeros(input_ids.shape, ...)
if it's not explicitly provided.See here for that implementation in
transformers
: https://github.com/huggingface/transformers/blob/4de1bdbf637fe6411c104c62ab385f660bfb1064/src/transformers/models/bert/modeling_bert.py#L1070-L1076This is preventing the following:
See also UKPLab/sentence-transformers#2983
The text was updated successfully, but these errors were encountered: