Fine-tuning longformer for Question Answering
I wish to fine-tune longformer for Question Answering. I've tried both pretrained triviaQA and squad huggingface longformer models:
- https://huggingface.co/allenai/longformer-large-4096-finetuned-triviaqa 
- https://huggingface.co/valhalla/longformer-base-4096-finetuned-squadv1

with kaggle data on tensorflow in this public notebook https://www.kaggle.com/code/sumeetsandhu/longformer-qa-train.

I get this error when training:
`ValueError: Shape mismatch: The shape of labels (received (1,)) should equal the shape of logits except for the last dimension (received (1024, 1)).`

According to documentation for both models:
- https://huggingface.co/docs/transformers/model_doc/longformer#transformers.TFLongformerForQuestionAnswering
- https://huggingface.co/docs/transformers/main/en/model_doc/longformer#transformers.LongformerForQuestionAnswering

the start_positions and end_positions input labels should be index numbers (not one-hot vectors).

What am I missing?
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.