Skip to content

Conversation

@younesbelkada
Copy link
Contributor

@younesbelkada younesbelkada commented Jun 10, 2022

I added an interactive generation script that works fine with the latest release of transformers
Tested on a JZ node and seems to work fine!
Based on a combination of @thomasw21 and @Narsil scripts

This code needs accelerate to be installed first in order to run properly

- remove eval
- remove pipeline & json from import
@thomasw21
Copy link
Member

Maybe I'm stupid, but it doesn't seem to use accelerate?

@younesbelkada
Copy link
Contributor Author

younesbelkada commented Jun 10, 2022

Using device_map="auto" when initializing the model enables the accelerate backend (at least that what I have understood from my discussions with @Narsil)

@younesbelkada
Copy link
Contributor Author

Then this flag will automatically distribute the model into the available GPUs only if accelerate is installed, and do the offloading

@stephenroller
Copy link

Nice. Nothing builds intuition for the models like interactive mode.

Copy link
Member

@thomasw21 thomasw21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't had the time to test it out myself, but I'm pretty sure you've tested things yourselves @younesbelkada, so approving. @Muennighoff might have something to say before merging :D

younesbelkada and others added 3 commits June 27, 2022 10:26
Co-authored-by: Niklas Muennighoff <n.muennighoff@gmail.com>
Co-authored-by: Niklas Muennighoff <n.muennighoff@gmail.com>
@younesbelkada
Copy link
Contributor Author

LGTM 🚀

Copy link
Collaborator

@Muennighoff Muennighoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm; nice!

@thomasw21 thomasw21 merged commit 9eec76b into bigscience-workshop:master Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants