For the complete documentation index, see llms.txt. This page is also available as Markdown.

Parameters

Sampling parameters for the Parasail chat completions and text completions APIs.

Parasail supports all parameters that vLLM supports. These parameters control the randomness, diversity, and length of model outputs.

Sampling parameters

temperature (default: 1.0)

Controls randomness in token selection.

  • Higher values (>1.0) increase randomness.

  • Lower values (<1.0) make outputs more deterministic.

  • A value of 0 forces greedy decoding.

top_p (Nucleus Sampling) (default: 1.0)

Controls the probability mass of token selection.

  • Only considers tokens that sum up to top_p probability.

  • Lower values (for example, 0.9) limit token choices to more likely options.

  • Higher values (close to 1.0) allow a broader range of tokens.

top_k (default: -1, disabled)

Limits token selection to the top k most probable tokens.

  • Lower values (for example, top_k=50) make output more deterministic.

  • If -1, this setting is ignored.

  • Since top_k is not in the OpenAI spec, pass it in the extra_body field.

max_tokens (default: None)

Sets the maximum number of tokens to generate. Helps prevent excessively long responses.

repetition_penalty (default: 1.0)

Penalizes repeated tokens to avoid looping responses. Common values: 1.1 to 1.2.

presence_penalty (default: 0.0)

Increases the likelihood of introducing new tokens. Useful for making outputs more diverse.

frequency_penalty (default: 0.0)

Penalizes tokens that have appeared frequently. Helps prevent excessive repetition of common words.

seed (default: None)

Sets a fixed seed for reproducible results. Useful for debugging or deterministic sampling.

How parameters work together

  • Setting temperature=0 forces deterministic output (greedy decoding).

  • Using top_p and top_k together balances diversity and coherence.

  • repetition_penalty and presence_penalty help avoid repetitive loops.

Example

Next steps

Last updated