Karpathy's scalar micrograd in Ziglang
- Zig 96.1%
- Nix 3.9%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| src | ||
| .envrc | ||
| .gitignore | ||
| build.zig | ||
| build.zig.zon | ||
| default.nix | ||
| flake.lock | ||
| flake.nix | ||
| README.md | ||
micrograd.zig
Implementing Karpathy's micrograd with some help from 0xdeb7ef/microgradz.
Scalar only implementation, the nn.zig module implements Neuron, Layer and MLP to have comptime-known shapes, only the engine.zig module needs runtime-allocated memory.
Setup
Allow direnv
direnv allow
Build
zig build