You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Add 25 unit tests with numerical gradient checking (xUnit)
- Add GitHub Actions CI workflow (build + test)
- Fix double.Parse to use InvariantCulture (locale bug)
- Add test project to solution file
- Add .editorconfig, global.json, nuget.config
- Add badges, architecture diagram, and test section to README
- Add TestResults/ to .gitignore
A complete [GPT](https://en.wikipedia.org/wiki/Generative_pre-trained_transformer) language model — training and inference — in pure C# with zero dependencies.
4
8
5
9
Faithful port of [Andrej Karpathy's microgpt.py](https://gist.github.com/karpathy/8627fe009c40f57531cb18360106ce95).
@@ -22,6 +26,53 @@ It trains a tiny GPT model on a list of human names, then generates new ones tha
22
26
|`Tokenizer.cs`| Character-level tokenizer with `Encode()`/`Decode()`|
23
27
|`NeuralOps.cs`| Stateless neural-net building blocks: `Linear`, `Softmax`, `RMSNorm`|
24
28
|`Program.cs`| GPT model, training loop (`Train`), and generation (`Generate`) |
0 commit comments