Stop Sequence
Definition
A stop sequence ends text generation upon occurrence of a specified character or token sequence.
A stop sequence is a specified character or token sequence upon whose generation text generation is terminated.
Simply explained
You agree on a stop signal. As soon as the model produces this sequence, the output ends.
Why it matters in practice
The term helps to select, develop, evaluate AI systems in a well-founded manner and realistically assess their technical risks.
Example from business
An application ends a model output before the marker that would announce the next dialogue part.
Limits and pitfalls
- Subword tokenization, unexpected occurrences, and invisible characters can cause premature or missing stops.
Origin & history
Generative APIs adopted stop markers from autoregressive decoders and structured text interfaces.
Use in mid-sized companies
- Possible example: An application ends a model output before the marker that would announce the next dialogue part.
Frequently asked questions
What does stop sequence mean?
A stop sequence is a predefined sequence of characters or tokens upon whose generation a text generation process is terminated. What should be considered? Subword tokenization, unexpected occurrences, and invisible characters can lead to premature or missing stopping.
Sources
- Generation strategies and stopping criteria · Hugging Face, Generation strategies and stopping criteria
Source checked on 10.10.2026. Editorial application examples are hypothetical; no evidence of real customer results.
Editorially reviewed on: