stopsequence
A stop sequence is a string or sequence of tokens used to signal a language model to halt generation. It serves as a boundary marker to delimit outputs, prevent unwanted continuation, or separate sections in a multi-part response. Stop sequences can be defined as single strings or a list of acceptable endings, and they may operate at the character level or the token level depending on the system.
In practice, the generation process checks the produced text for any of the specified stop sequences. When
Common frameworks implement stop sequences differently. OpenAI's API uses a stop parameter that accepts one or
Limitations include non-deterministic hampering of content and the possibility that a stop signal may not be