Claude hand-writes a 984-param neural net for C syntax highlighting, 5x faster than Pygments
AlpinDale · x · 2026-11-04
AlpinDale had Claude Fable 5.1 write a neural network for C syntax highlighting entirely by hand — no training data, no training compute, all 984 non-zero weights generated directly by the model. Released on Hugging Face under Apache-2.0.
- Architecture: bidirectional recurrent per-character tagger, 6 forward + 2 backward layers + linear head, ReLU1 activations, float64
- Performance (188 KB C corpus, Apple M4 Pro): compiled kernel hits 88 ns/char (11.3M chars/s), 5x faster than Pygments CLexer and close to tree-sitter-c parse-only; the numpy reference is 200x slower
- Ships with a CSR interpreter mode and a plain C source you compile with cc -O3
Related event: Claude Hand-Writes 984-Parameter Neural Network for C Syntax Highlighting(2 posts)→
More from Fun
- Time to Post: why lower latency from thought to expression feels more authentic — signulll · 2026-11-04
- "You get dumber when you don't want to do something — also true for LLMs" — repligate · 2026-11-04
- AI-generated spy comedy short: diver and red parcel in a sea monster's jaws — Sharp_Ad2460 · 2026-11-04
- AI video recreates Star Wars: Obi-Wan and Luke stopped outside Mos Eisley — FreddyMartian · 2026-11-04
- 'My agent deleted it, but I don't believe that': an LLM take on Moore's paradox — jessyjli · 2026-11-04
- French blood bank hacked, samples heated to 110°C; joke skewers hospital IT security — bclavie · 2026-11-04