ML syntax highlighter matches Shiki accuracy with the model inlined in the bundle

shuding · x · 2026-09-08

shuding shares an ML-based syntax highlighting approach benchmarked against Shiki (AST-based, the current gold standard), reporting weighted correctness across GitHub's top 25 languages. Trained on 50+ languages — and behaving reasonably on unseen ones — the model makes up 70% of the library, inlined directly into the bundle.

Related event: Vercel's gpu-lexer: A 27.5KB WebGPU Model for In-Browser Syntax Highlighting(7 posts)→

Original post →

More from coding & agent

coding & agent channel →