milanm/AutoGrad-Engine
A complete GPT language model (training and inference) in ~600 lines of pure C#, zero dependencies
Implements automatic differentiation through a custom computation graph engine (`Value.cs`) to enable backpropagation, trainable via Adam optimizer on character-level sequences. Faithful C# port of Andrej Karpathy's educational microgpt.py that demonstrates transformer architecture (multi-head attention, position embeddings, residual connections) with numerical gradient verification matching PyTorch's `torch.autograd.gradcheck` methodology.
332 stars.
Stars
332
Forks
38
Language
C#
License
MIT
Category
Last pushed
Feb 14, 2026
Commits (30d)
0
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/llm-tools/milanm/AutoGrad-Engine"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Higher-rated alternatives
vixhal-baraiya/microgpt-c
The most atomic way to train and inference a GPT in pure, dependency-free C
LeeSinLiang/microGPT
Implementation of GPT from scratch. Design to be lightweight and easy to modify.
dubzdubz/microgpt-ts
A complete GPT built from scratch in TypeScript with zero dependencies
ssrhaso/microjpt
The most atomic way to train and run inference for a GPT in 100 lines of pure, dependency-free Julia.
biegehydra/NanoGptDotnet
A miniature large language model (LLM) that generates shakespeare like text written in C#....