llm.c

GPT-2 training implemented in plain C and CUDA with no PyTorch dependency, by Andrej Karpathy.

Open SourceSelf HostedOffline CapableGPU Required
0.0 (0)

About

Training GPT-2 in roughly 1,000 lines of clean C is the whole point of llm.c, Andrej Karpathy's systems-level reimplementation of the LLM training loop with no PyTorch or Python dependency. The CPU reference in train_gpt2.c is readable end to end, while the CUDA path adds mixed precision, multi-GPU training over NCCL, and multi-node runs over MPI, with the maintainers measuring it about 7 percent faster than PyTorch Nightly on their benchmarks. The repository reproduces the 124M-parameter GPT-2, and repo discussions document scaled-up runs through the larger GPT-2 sizes on H100 nodes. Getting started means downloading a starter pack of tokenized data and pretrained weights, then compiling with make; meaningful training requires an NVIDIA GPU, though the CPU build runs on a laptop for study. The code is MIT licensed. Around 30,700 GitHub stars and a long list of ports to other languages reflect its role as the reference for understanding what deep learning frameworks actually do during LLM training, one matrix multiplication at a time.

Reviews (0)

Leave a Review

No reviews yet. Be the first to review!

Details

Price
Free
Platform
Local/Desktop
Difficulty
Advanced (4/5)
License
MIT
Added
Jul 29, 2026

Related Tools

Framework for generating synthetic data and AI feedback through composable LLM pipelines.

Open SourceSelf HostedOffline
Intermediate
0.0 (0)

Subject-driven fine-tuning technique for personalizing diffusion models.

Open SourceSelf HostedOfflineGPU 8GB+
Intermediate
0.0 (0)

Video model fine-tuning toolkit by Hugging Face Diffusers team.

Open SourceSelf HostedOfflineGPU 16GB+
Advanced
0.0 (0)

Efficient LLM quantization preserving important weight channels.

Open SourceSelf HostedOfflineGPU 8GB+
Intermediate
0.0 (0)

All-in-one Stable Diffusion fine-tuning tool with intuitive GUI.

Open SourceSelf HostedOfflineGPU 8GB+
Easy
0.0 (0)

No-code tool by Hugging Face for training ML models automatically.

Open SourceSelf HostedOfflineGPU 8GB+
Beginner
0.0 (0)
Browse all Model Training & Fine-Tuning tools