Home Projects llm.c
llm.c
Cuda

llm.c

LLM training in simple, raw C/CUDA

by karpathy · GitHub
Top 5% most starred in the catalogue
Stars
Forks
License
Created
Last commit
Cuda
Language
MITCuda
View on GitHub
In plain words

Train AI models using simple C/CUDA code without needing large libraries.

From the README

Install
pip install -r requirements.txt
python dev/data/tinyshakespeare.py
python train_gpt2.py

Excerpts from the project README on GitHub. Copyright and licensing remain with the respective authors.

You maintain this project?

Claim its page: indexed whatever its rank, translated into six languages, and enriched with what you write yourself.

Claim this page →
llm.c — GitHub preview card
📈 Star history
30.9k30.5k
2026-07-122026-08-31
📈 Track llm.c

Get an email alert on its next release or when it starts trending — never miss the moment.

Free · no card · unsubscribe anytime
Get email alerts →
📄 About

LLM training in simple, raw C/CUDA

llm.c has 30.9k stars on GitHub. It has been forked 3.8k times. llm.c is written mainly in Cuda. It has been in active development since 2024. llm.c is available under the MIT license.

Frequently asked questions

What is llm.c?

LLM training in simple, raw C/CUDA

Is llm.c open source?

llm.c is an open-source project. It is released under the MIT license.

Is llm.c free?

Yes. llm.c is free and open source — you can use, modify and self-host it.

What license does llm.c use?

llm.c is available under the MIT license.

What language is llm.c written in?

llm.c is written mainly in Cuda.

🏅 Maintainer of this project?
olud.ai badge — llm.c

Add this live badge to your README — your GitHub stars and directory rank, refreshed daily.

[![olud.ai](https://olud.ai/badge.php?tool=karpathy-llm-c)](https://olud.ai/project/karpathy-llm-c.html)
More badge options →
🧬 Related projects