PulseAugur
EN
LIVE 05:38:37

Qwen and Gemma tokenization differences impact coding vs. language tasks

A user on r/LocalLLaMA observed a significant difference in how Qwen 35B A3B and Gemma 26B A4B tokenize code. Qwen processed a 330-line HTML/JS code snippet into 1609 tokens, while Gemma tokenized the same input into 4258 tokens. This disparity may explain Qwen's perceived superiority in coding tasks and Gemma's strength in language processing, as Qwen appears to treat code as a distinct input type, whereas Gemma breaks it down similarly to natural language. The user also noted that for a shorter instruction document, the tokenization counts were nearly identical. AI

IMPACT Highlights how tokenization strategies can influence model performance on specific tasks like coding versus natural language.

RANK_REASON User observation and analysis of existing models, not a new release or research paper.

Read on r/LocalLLaMA →

AI-generated summary · Google Gemini · from 1 sources. How we write summaries →

Qwen and Gemma tokenization differences impact coding vs. language tasks

COVERAGE [1]

  1. r/LocalLLaMA TIER_1 English(EN) · /u/WhoRoger ·

    No wonder Qwen and Gemma are so different

    <!-- SC_OFF --><div class="md"><p>Pasted the same HTML/JS code (330 lines) into Qwen 35B A3B and Gemma 26B A4B.</p> <p>Qwen: tokenized the input to 1609 tokens</p> <p>Gemma: tokenized the input to 4258 tokens.</p> <p>Damn. I've never noticed this before and I haven't seen people …