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

Run generate example in ch06 optionally on GPU #352

Merged
merged 2 commits into from
Sep 13, 2024
Merged

Conversation

mix16atpitt
Copy link
Contributor

model.to("cuda")

model.to("cuda")
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@rasbt
Copy link
Owner

rasbt commented Sep 13, 2024

Thanks for the PR. Originally, I just had the notebook work on CPU because the model is small and it's quite fast. But yeah, I can see that some people want to move it to a GPU. I updated it to also move the data to the GPU device when the model parameters are on a GPU.

@rasbt rasbt changed the title model.to("cuda") Run generate example in ch06 optionally on GPU Sep 13, 2024
@rasbt rasbt reopened this Sep 13, 2024
@rasbt
Copy link
Owner

rasbt commented Sep 13, 2024

I reopened this because it may not be a bad thing to have GPU support in this example (because other readers might wonder about it, too)

@rasbt rasbt merged commit f77c376 into rasbt:main Sep 13, 2024
16 checks passed
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