transformers icon indicating copy to clipboard operation
transformers copied to clipboard

fix AutoTP in deepspeed could not work for bloom

Open sywangyi opened this issue 1 year ago • 5 comments

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.

sywangyi avatar Mar 16 '23 07:03 sywangyi

should work with https://github.com/microsoft/DeepSpeed/pull/3035

sywangyi avatar Mar 16 '23 07:03 sywangyi

@sgugger please help review

sywangyi avatar Mar 16 '23 07:03 sywangyi

@yao-matrix

sywangyi avatar Mar 16 '23 07:03 sywangyi

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 avatar Mar 16 '23 12:03 sgugger

@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.

sywangyi avatar Mar 17 '23 01:03 sywangyi

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 avatar Mar 17 '23 12:03 sgugger

@sgugger update the PR.

sywangyi avatar Mar 17 '23 13:03 sywangyi

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.