gpu-lexer author: trained on 50+ languages, model is ~70% of the 27.5KB bundle

shuding · x · 2026-09-08

gpu-lexer author Shu Ding shared more details: the model was trained on 50+ languages, behaves reasonably on languages outside the training set, and the model itself makes up roughly 70% of the library, inlined into the bundle.

Performance benefits come from WebGPU—especially on large sources—and it doesn't block the main thread. He cautions that highlighters have different pipelines and this project can't yet fully replace any of them.

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 →