Skip to content

karpathy's minGPT on geohot's Tinygrad

License

Notifications You must be signed in to change notification settings

ziliangpeng/tinyGPT

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

You like karpathy? You like geohot? You love tinyGPT! ❤️

tinyGPT

tinyGPT is an attempt to port karpathy's minGPT to geohot's tinygrad. It serves a few purposes:

  • demonstrate API compatibility and diff between PyTorch and Tinygrad
  • Identify missing features/APIs in Tinygrad
  • Benchmark and compare performance

Library Installation and Test

If you want to import tinygpt into your project:

git clone https://github.com/ziliangpeng/tinyGPT.git
cd tinyGPT
pip install -e .

After that, you can run the demo project to see the result:

cd project/adder
python adder.py

tinygrad allows you to choose hardware via env vars: CLANG=1, CUDA=1, METAL=1.

And you can choose DEBUG= level for increasing amount of debug log. Refer to tinygrad for more env vars control.

License

MIT

About

karpathy's minGPT on geohot's Tinygrad

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 74.4%
  • Jupyter Notebook 25.6%