Skip to content
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

Set device for local PyTorchGemmaLanguageModel #84

Closed
wants to merge 3 commits into from

Conversation

mkielo3
Copy link
Contributor

@mkielo3 mkielo3 commented Sep 22, 2024

Small change to allow user to specify a device for local LLMs. There doesn't seem to be a supported way to do this. Currently "pytorch_gemma_local.ipynb" defaults to cpu and runs in 19 seconds vs. 0.5 seconds on GPU. Apologies if I missed something.

@jagapiou jagapiou self-assigned this Sep 27, 2024
Copy link
Member

@jagapiou jagapiou left a comment

Choose a reason for hiding this comment

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

Hi thanks for the changes, looks good.

Just some minor changes please. And then please squash your commit on top of HEAD.

concordia/language_model/utils.py Show resolved Hide resolved
concordia/language_model/utils.py Show resolved Hide resolved
@jagapiou
Copy link
Member

jagapiou commented Oct 2, 2024

Thanks! You can ignore that failed internal check, this will go in no probs once internally approved.

copybara-service bot pushed a commit that referenced this pull request Oct 2, 2024
--
91a911d by mkielo3 <mkielo3@gatech.edu>:

Set device for local PyTorchGemmaLanguageModel

updated docstring

COPYBARA_INTEGRATE_REVIEW=#84 from mkielo3:main 89ed110
PiperOrigin-RevId: 681414971
Change-Id: I1bd9ef18404a2f4d9ea19868c91d3153d86a993d
@jagapiou
Copy link
Member

jagapiou commented Oct 2, 2024

merged in 8a0e489

@jagapiou jagapiou closed this Oct 2, 2024
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.

2 participants