Qwen vs. Gemma: Tokenizer Efficiency Explains Coding Performance Gap

WhoRoger · reddit · 2026-08-09

A developer found a massive discrepancy when feeding the same 330 lines of HTML/JS code to Qwen 35B and Gemma 26B: Qwen tokenized the input to 1,609 tokens, while Gemma produced 4,258 tokens.

This significant difference in tokenization efficiency helps explain why Qwen is regarded as better at coding, while Gemma leans towards language tasks. Qwen can process code more efficiently as a specific structure, whereas Gemma breaks it down into smaller pieces like regular language. The author wonders if retraining Gemma with a more efficient tokenizer could help bridge this gap.

Original post →

More from Models

Models channel →