Open
Conversation
…lcontext Some embedded GPUs like the NVIDIA Jetson nano are end of life already, and its version of pytorch is stuck on really old versions, 1.10.0, so there is no torch.amp.autocast() and contextlib nullcontext. Add a simple library helpers which mask out the ugliness from the main code, so to enable folks with these devices to keep tinkering with them. Signed-off-by: Luis Chamberlain <[email protected]>
Add simple wrappers for DDP to make it easy to make the code easily adaptable to run on old version fo pytorch, such as 1.10 where DDP did not exist. Examples of devices stuck on this are the NVIDIA Jetson nanos. Signed-off-by: Luis Chamberlain <[email protected]>
The last library helper we need to provide a wrapper for to enable NVIDIA Jetson Nano devices stuck on Pytorch 1.10 is for tiktoken. We can *try* to compile it but it just fail, even on older releases, and so let's just provide a helper which leverages the original gpt2 encoder.py and its respective encoder.json and vocab.bpe. To run on a Jetson nano, you can use the same exact instructions as used for the mackbook on the README.md, just use --device=cuda Signed-off-by: Luis Chamberlain <[email protected]>
gkielian
added a commit
to klei22/nanoGPT
that referenced
this pull request
Oct 3, 2025
…istics-features Add enhanced l2 norm statistics features
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With enthusiasm I got myself a Jetson Nano to try this repo out, only to my surprise I couldn't do anything with it as it was stuck on Pytorch 1.10 and the support for the device had EOL'd. So I decided it may be good to see if I could get it to work with the minimum amount of changes so the core code. This is what I've come up with. Granted the MFU is about mfu 0.02% ... my CPU gets better results (MFU 0.05%). However instead of leaving these EOL'd GPUs with no life to breathe -- this at least should help others experiment with a real small GPU.