Skip to content

Stop Sequence

A string that causes the model to stop generating. For example, \<stop\> or ###.

Why

  • To clearly end the response at the right place;
  • To prevent the model from continuing to "talk";
  • To separate the response from format tags.

Example

In a chat format, the model generates a response until it outputs an end-of-message marker. Without a stop sequence, it may continue to generate dialogue.

See also

← All Terms