Stop Sequence
Domain: LLM Concepts
šÆ Motivation
A stop sequence tells the model when to stop generating. Without it, the model might ramble on past the intended end.
š Concrete Example
Set stop=[ā\n\nā] - the model stops when it sees a double newline. Set stop=[END] - it stops at END. Useful for structured outputs where you want precise control.
š Analogy
A stop sign at the end of a road - it tells the driver exactly where to stop. Without it, they might keep driving past the destination. The stop sequence tells the model where to halt.