Skip to content
View as Markdown

tinker.types.SamplingParams

Generated from tinker 0.30.4 at commit 1e5777e. Source links point at that snapshot.

class tinker.types.SamplingParams(BaseModel)

Fields:

  • max_tokens (Optional[int]) – Maximum number of tokens to generate
  • seed (Optional[int]) – Random seed for reproducible generation
  • stop (Union[str, Sequence[str], Sequence[int], None]) – Stop sequences for generation. None keeps implicit EOS stopping; [] disables all stop tokens, including EOS, and generation continues until max_tokens.
  • temperature (float) – Sampling temperature
  • top_k (int) – Top-k sampling parameter (-1 for no limit)
  • top_p (float) – Nucleus sampling probability

Referenced by