Systems session 1/4 · Quiz & review

Tokenizers and token budgets

10 questions, one correct answer each. The goal is to check whether you can reason in token space: what a tokenizer produces, what consumes the context window, and what must be measured rather than estimated.

1. What does a tokenizer do?

Show answer

B — The model operates on integer identifiers drawn from a fixed vocabulary. The tokenizer is the mapping between text and that sequence of identifiers, in both directions.

2. The same sentence gives 14 tokens with one tokenizer and 19 with another. What follows?

Show answer

C — Vocabularies and merge rules differ between model families. A count is only meaningful when the tokenizer that produced it is identified.

3. Which of these can be a single token?

Show answer

C — Subword vocabularies contain fragments, punctuation, whitespace-prefixed pieces and byte-level fallbacks, which is how unknown text is still encodable.

4. Which items must be included in a request token budget?

Show answer

C — The context window holds the whole rendered request, and the generated output has to fit as well. Omitting the reserved output is the most common budgeting error.

5. A request needs 7,000 input tokens and a 1,500-token answer, in a 8,000-token window. What happens?

Show answer

B — Input plus reserved output must fit in the same window. Here 8,500 exceeds 8,000, so either the input is reduced or the generation stops early.

6. Why does French prose usually cost more tokens than the equivalent English prose?

Show answer

B — Merge rules are learned from training data. Text that is under-represented in that data is split into smaller, more numerous pieces, often 15 to 30 percent more for French, though the exact figure depends on the tokenizer.

7. What is the correct use of a characters-per-token rule of thumb?

Show answer

C — The ratio varies with language, formatting and content type. It is useful for early sizing, but any check that gates or truncates a request must use the actual tokenizer.

8. Why must the tokenizer and the chat template be pinned to the same model revision?

Show answer

B — A revision can change the vocabulary, the special tokens or the template formatting. A mismatched pair still runs, which is what makes the failure hard to notice.

9. The budget is exceeded. What is the sound engineering response?

Show answer

B — Something is always dropped when the window overflows. Making the policy explicit turns an invisible, arbitrary loss into a reviewable design decision.

10. Which test set best exercises a tokenization pipeline?

Show answer

C — Failures concentrate at the edges: non-Latin scripts, byte-level fallbacks, template special tokens, and text cut in the middle of a multi-token character.

Scoring

Scoring: 8-10 correct — you can budget a request and defend the numbers; move on to the retrieval and context-assembly sessions. 5-7 correct — the concepts hold but the budget arithmetic is shaky; redo Lab B with a different request before continuing. Below 5 — re-read the key messages and repeat Lab A with your own text; the rest of the track assumes you reason in token space by default.

Learner course · Go to the exercises