Replies: 1 comment
-
I think the problem is:
The model doesn't take token_type_ids as input. If you convert the model with
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I implemented "Question-Answering" using "deepset/bert-base-cased-squad2" model from Huggingface.
The code below works and produces the expected result.
However, if I change the huggingface model to 'mrm8488/longformer-base-4096-finetuned-squadv2', which is a Longformer model that takes input paragraphs up to 4096 tokens, I get the following error:
Caused by: ai.djl.engine.EngineException: Expected at most 3 argument(s) for operator 'forward', but received 4 argument(s). Declaration: forward(__torch__.transformers.models.longformer.modeling_longformer.LongformerForQuestionAnswering self, Tensor input_ids, Tensor attention_mask) -> Dict(str, Tensor)
How can I solve this problem? Any help is welcome.
Beta Was this translation helpful? Give feedback.
All reactions