Vercel's Shu Ding ships a 27.5KB syntax highlighter with no language grammars

Vercel's gpu-lexer uses a 41,321-parameter browser model, trading grammar-level certainty for one small bundle across programming languages.

By · Published

Primary source: gpu-lexer

Why it matters

gpu-lexer shows how browser GPUs can replace large catalogs of language definitions with one compact model, opening a smaller deployment path for code previews and generated interfaces. Its uneven accuracy also draws a clear boundary between acceptable visual guesses and tooling that must understand code exactly.

A close-up view of a minimalist screen displaying abstract programming code with flowing, luminous syntax highlighting in blues, greens, and purples.

Shu Ding (@shuding), a designer and developer at Vercel, has published gpu-lexer through Vercel Labs, an experimental 27.5KB syntax highlighter that uses WebGPU and a small classification model instead of maintaining a separate grammar for every programming language.…

When you purchase through links in our articles, we may earn a small commission. This doesn’t affect our editorial independence.

Reader comments

Conversation for this story loads after sign-in.