transformers
transformers copied to clipboard
fix AutoTP in deepspeed could not work for bloom
What does this PR do?
Fixes # (issue) fix AutoTP in deepspeed could not work for bloom
Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [ ] 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.
- [ ] Did you make sure to update the documentation with your changes? Here are the documentation guidelines, and here are tips on formatting docstrings.
- [ ] 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.
should work with https://github.com/microsoft/DeepSpeed/pull/3035
@sgugger please help review
@yao-matrix
The documentation is not available anymore as the PR was closed or merged.
Actually, just checked the modeling file and this function is only used in this class, so it would be cleaner to just make it a method. Could you update your PR in that direction?
@sgugger I see code like "from transformers.models.bloom.modeling_bloom import build_alibi_tensor" in petals, if we make this a method, the petals code needs to be changed as well. may happen to other repo that use bloom as well.
Ok so let's keep it as a function in that module. I'd still prefer a real method (that directly returns the result of the function) to setting a function attribute like this if you don't mind.
@sgugger update the PR.
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.