Can cross-entropy loss values be directly compared between models with different vocabulary sizes?

Quick Overview

Asks whether cross-entropy loss and perplexity can be compared between language models whose tokenizers have different vocabulary sizes. Tests whether you understand how tokenization sets the scale of per-token loss and how to normalize to a tokenizer-independent unit such as bits per byte.

Can cross-entropy loss values be directly compared between models with different vocabulary sizes?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

You are comparing two language models that use different tokenizers with different vocabulary sizes. Can their cross-entropy loss values be directly compared? ```hint What the average is over Think about what one token represents under each tokenizer, and what the reported loss is averaged over. ``` ```hint Find an invariant Look for a quantity that stays the same when you re-tokenize the same evaluation text. ``` ### What a Strong Answer Covers - A direct answer, with the reason tied to how each tokenizer segments the same text. - How vocabulary size shifts the scale of per-token loss, including the uniform-guess baseline. - A tokenizer-independent metric and how to compute it from per-token losses. - Whether perplexity has the same problem. - What else must be held fixed for the comparison to be fair. ### Follow-up Questions - Two models share a tokenizer, but one was evaluated with a longer context window. Is per-token loss comparable now, and what would you control? - Why are bits-per-byte values different on English text and on Chinese or Japanese text, and does that matter when comparing two models on the same text? - One tokenizer lowercases and normalizes Unicode before encoding. How does that affect the comparison? - Beyond bits per byte, how would you compare a byte-level model with a BPE model?

Overview: Asks whether cross-entropy loss and perplexity can be compared between language models whose tokenizers have different vocabulary sizes. Tests whether you understand how tokenization sets the scale of per-token loss and how to normalize to a tokenizer-independent unit such as bits per byte.

PracHub logo
General
Nov 25, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

You are comparing two language models that use different tokenizers with different vocabulary sizes. Can their cross-entropy loss values be directly compared?

What a Strong Answer Covers Guidance

  • A direct answer, with the reason tied to how each tokenizer segments the same text.
  • How vocabulary size shifts the scale of per-token loss, including the uniform-guess baseline.
  • A tokenizer-independent metric and how to compute it from per-token losses.
  • Whether perplexity has the same problem.
  • What else must be held fixed for the comparison to be fair.

Follow-up Questions Guidance

  • Two models share a tokenizer, but one was evaluated with a longer context window. Is per-token loss comparable now, and what would you control?
  • Why are bits-per-byte values different on English text and on Chinese or Japanese text, and does that matter when comparing two models on the same text?
  • One tokenizer lowercases and normalizes Unicode before encoding. How does that affect the comparison?
  • Beyond bits per byte, how would you compare a byte-level model with a BPE model?