-
Notifications
You must be signed in to change notification settings - Fork 84
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
Notebook: ThunderFX tutorial #1524
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Great stuff, @kiya00! Notebooks like this are invaluable. I was asked for a notebook explaining more about ThunderFX just the other day. I made some comments using ReviewNB. I'm curious to hear your thoughts! They also propose changing some of the current UX to make the notebook easier to understand. |
40dc5f5
to
a82416e
Compare
Hi all, I modified it to a simple introduction of |
a82416e
to
14eedf9
Compare
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.
Updates look great, @kiya00! I thought the story was really straightforward and a great start to help practitioners learn about ThunderFX. I made some wording suggestions, and I have one question about the absolute difference in the model example.
It would be cool, but is not necessary, if we could include something interactive in the demo so that instead of relying on comparing output tensor discrepancies readers felt like they could compare the quality of the thunderfx compiled model vs. the eager model. Offering an interactive chat prompt is probably too computationally intensive, but maybe in the future we should think about an image generation model. (Doesn't have to be part of this PR.)
This XLA notebook uses stable diffusion, as an example:
https://github.com/pytorch/xla/blob/master/contrib/kaggle/pytorch-xla-2-0-on-kaggle.ipynb
and I think that's visually interesting. Again, something to consider for the future, not today.
This notebook may also be causing an error in the CI: |
Yes and it's strange that Torch nightly has no problem with it, Torch 2.4 does. I'll fix it tomorrow
That's good idea, we could have another notebook or maybe demos would be more appropriate to show using Thunder to run interactive chat and image generation model |
17d5082
to
9d2bb2e
Compare
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.
This is a great first notebook introducing ThunderFX. I made one last suggestion for you review, @kiya00, to explain the deviation between ThunderFX and PyTorch's default results.
Hi @mruberry , thanks for the review! I added the comment to explain t deviation |
Oh sorry, would you add it as a text cell, not a comment in the code? |
ah, sure, I got it wrong, let me add it in the text cell |
Before submitting
What does this PR do?
Add tutorial for thunder as torch.compile backend
cc @Borda @apaz-cli