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 open-sources gpu-lexer: a 27.5KB WebGPU model for syntax highlighting in the browser(9 posts)→

Original post →

More from coding & agent

coding & agent channel →