conv.

All stories
TechQuiet 87d · day 88

Microgpt in pure C achieves 10M tokens/sec on Apple M5

A dependency-free GPT implementation in C demonstrates character-level transformer training and inference at 10M tokens per second on Apple silicon.

What to know

  • Microgpt is a complete GPT implementation (training + inference + sampling) in pure C with zero external dependencies, fitting in a single file.
  • Achieves 10.1M tokens per second on Apple M5 Pro with NEON acceleration; 6.9M tok/sec on AMD Ryzen 5 with AVX2.
  • A 4,192-parameter model trained on 32k names generalizes better than memorizes, beating larger trigram models on unseen data.

“Training and inference use separate forward passes. gpt_forward stores activations for backprop; gpt_forward_infer is a specialised single-token path whose logits match it to within fp32 rounding.”

Vixhal Baraiya · GitHub repository

Vixhal Baraiya Developer

Microgpt in pure C achieves 10M tokens/sec on Apple M5
github.com

The record 1 articles and posts · last 30 days

  1. Microgpt in pure C hits 10M tps on Apple m5 press · HN Frontpage · dhorthy · 88d ago

What people are saying 11 voices from 1 site · verbatim