GPT2ForQuestionAnswering
What does this PR do?
Fixes # (issue)
Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [X] Did you read the contributor guideline, Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the forum? Please add a link to it if that's the case.
- [x] Did you make sure to update the documentation with your changes? Here are the documentation guidelines, and here are tips on formatting docstrings.
- [x] Did you write any new necessary tests?
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag members/contributors who may be interested in your PR.
@ArthurZucker @sgugger
The documentation is not available anymore as the PR was closed or merged.
@ArthurZucker @sgugger @younesbelkada The next one is ready for review.
This is a bit funny. The tests are fine, and it runs great on one of my 4x V100 machines. But on another machine, I get this funny error:
/home/jps/anaconda3/envs/scandeval/lib/python3.9/site-packages/transformers/trainer.py:375 /home/jps/anaconda3/envs/scandeval/lib/python3.9/site-packages/torch/nn/modules/module.py:1269 AttributeError: 'GPT2ForQuestionAnswering' object has no attribute 'model_parallel'
Any ideas? I though model_parallel was legacy and not needed. Should I add to be on the safe side? torch version is torch==1.13.1.
GPT2 is an old model so it might still be checking for model_parallel, which in this case has to be added! LMK if this fixes the issues
@ArthurZucker ready for review!
cc @younesbelkada since Arthur is on vacation.