Skip to content

Max Tokens

A generation parameter: the maximum number of tokens a model may generate in its answer. It protects against endless generation and controls cost.

Why

  • to limit the length of the answer;
  • to fit within the context;
  • not to overpay for overly long answers.

A Nuance

If the limit is small, the answer breaks off mid-word. If it is large, the model may ramble on. It is tuned to the task.

See Also

← All Terms