Back to the lesson libraryMECHANISM · 18 MIN
M27.3 CONNECT THE MECHANISM

Turn logits into a controlled generation procedure

A bot stuck repeating itself, JSON that won't parse, and a bug that won't reproduce with the same seed. All three are fixed after the model, where scores become tokens.

LESSON OVERVIEW18 min lesson

Lesson overview

A bot stuck repeating itself, JSON that won't parse, and a bug that won't reproduce with the same seed. All three are fixed after the model, where scores become tokens.

What you’ll explore

  • Explain how serving-time decoding controls (repetition penalties, logit bias, stop sequences, constraint masks, beam search, and seeded sampling) change which tokens are chosen without changing the model, and why the same seed can still give different outputs.
Suggest a correction

A precise note can make an explanation better.

Choose the scene and describe what needs attention. Download a feedback file to share through a channel you already use. This page does not send feedback or connect you with a reviewer.

The file includes this note, the scene title, and lesson metadata. Your saved progress and quiz responses are excluded. Download before leaving or reloading to keep your note.