ladderlore
请求新指南
  • 输入服务名称,例如 S3 或 IAM。

概念

Inference parameters

Settings you change at request time, such as temperature, that make answers steadier or more creative.

本课尚未翻译,暂以英文显示。

  • Temperature

    What it does
    Sets how random the word choice is.
    Effect
    Low: steady. High: creative.
  • Top-p

    What it does
    Keeps the likeliest words up to a share of the odds.
    Effect
    Lower: safer words.
  • Top-k

    What it does
    Keeps only the k likeliest words.
    Effect
    Lower: fewer choices.
  • Maximum output length

    What it does
    Caps the tokens in the reply.
    Effect
    Limits size and cost.
  • Stop sequences

    What it does
    Strings that end the reply.
    Effect
    Stops the model at a set point.
The five settings and what each does.

1 / 2

  • Temperature

    What it does
    Sets how random the word choice is.
    Effect
    Low: steady. High: creative.
  • Top-p

    What it does
    Keeps the likeliest words up to a share of the odds.
    Effect
    Lower: safer words.
  • Top-k

    What it does
    Keeps only the k likeliest words.
    Effect
    Lower: fewer choices.

2 / 2

  • Maximum output length

    What it does
    Caps the tokens in the reply.
    Effect
    Limits size and cost.
  • Stop sequences

    What it does
    Strings that end the reply.
    Effect
    Stops the model at a set point.
The five settings and what each does.
  • Consistent answers

    Low temperature, low top-p. For facts, extraction, support.

  • Creative answers

    High temperature, high top-p. For ideas, stories, slogans.

Which direction to move for steady or creative answers.

是什么

Inference parameters are settings you send with each request to a foundation model. They do not change the model. They change how it picks the next word, and how long the reply may be.

Temperature controls randomness. A low temperature gives steady, predictable answers, good for facts and extraction. A high temperature gives more varied, creative answers, good for brainstorming. Top-p and top-k also limit which words the model may pick: top-p keeps the most likely words whose chances add up to a set share, and top-k keeps only a fixed number of the most likely words. Lower values make answers safer and more repeatable.

是什么

Length settings control cost and size. Maximum output length caps how many tokens the reply can have. Stop sequences are strings that make the model stop when it writes them. The length of the input is limited by the model's context window.

要记住

  • Temperature: low is consistent and focused, high is creative and varied.
  • Top-p and top-k: lower values narrow the word choices, so answers become safer.
  • Maximum output length caps the tokens in a reply, which caps cost and shortens the wait.
  • Stop sequences end the reply when a chosen string appears.

要记住

  • Latency follows model size and the length of the input and the output. Temperature, top-p and top-k change variety, not speed.
  • Input length is limited by the context window. These settings act at request time and do not train the model.

考试中

  • “Make answers more consistent and less random” points to a lower temperature.
  • “Make answers more creative” points to a higher temperature.
  • “Limit how long and how costly each reply is” points to maximum output length.
  • “Replies are too slow” points to a smaller model or a shorter output, not a lower temperature.