-
Notifications
You must be signed in to change notification settings - Fork 31.9k
BLOOM enhance alibi creation #17759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BLOOM enhance alibi creation #17759
Conversation
- deals better with padded batched input - avoid useless cpu/gpu communication when creating alibi Co-authored-by: justheuristic <justheuristic@gmail.com>
|
The documentation is not available anymore as the PR was closed or merged. |
Co-authored-by: justheuristic <justheuristic@gmail.com>
sgugger
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you elaborate on what's breaking? I see the alibi tensor is created at each forward pass and is now put on the same device as the hidden_states which actually seems clean!
It doesn't break model parallelism/offload as when you call each submodule with the alibi tensor as inputs, each submodule will place it on the right device before executing the forward. I checked the corresponding tests and they all pass on this branch.
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
|
Great thanks ! I think that you are right :) will merge it as soon as the lights are all green 🟢 |
|
It looks like a bad rebase happened, moved the PR at: #17866 |
What does this PR do?
Thanks to @justheuristic 's contribution alibi tensor is better created/communicated during the forward pass. The tests seem to pass but still stays as an experimental feature.
cc @justheuristic
This probably will break with accelerate offloading because when initialising alibi tensor we do it only once at the beginning of the forward pass with the device of the first hidden states. In the previous version we used to dynamically change alibi's
devicewhich was fine for accelerate offloading