# tinker.types.SamplingParams *Generated from tinker 0.30.4 at commit [`1e5777e`](https://github.com/thinking-machines-lab/tinker/tree/1e5777ef1e0bb2bae6d9b8d63a6144eec405377d). Source links point at that snapshot.* ## *class* [**tinker.types.SamplingParams**](https://github.com/thinking-machines-lab/tinker/blob/1e5777ef1e0bb2bae6d9b8d63a6144eec405377d/src/tinker/types/_pydantic_types/sampling_params.py#L6)(*[BaseModel](https://github.com/thinking-machines-lab/tinker/blob/1e5777ef1e0bb2bae6d9b8d63a6144eec405377d/src/tinker/_models.py#L88)*) **Fields:** - [**max_tokens**](https://github.com/thinking-machines-lab/tinker/blob/1e5777ef1e0bb2bae6d9b8d63a6144eec405377d/src/tinker/types/_pydantic_types/sampling_params.py#L7) (*Optional[int]*) – Maximum number of tokens to generate - [**seed**](https://github.com/thinking-machines-lab/tinker/blob/1e5777ef1e0bb2bae6d9b8d63a6144eec405377d/src/tinker/types/_pydantic_types/sampling_params.py#L10) (*Optional[int]*) – Random seed for reproducible generation - [**stop**](https://github.com/thinking-machines-lab/tinker/blob/1e5777ef1e0bb2bae6d9b8d63a6144eec405377d/src/tinker/types/_pydantic_types/sampling_params.py#L13) (*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**](https://github.com/thinking-machines-lab/tinker/blob/1e5777ef1e0bb2bae6d9b8d63a6144eec405377d/src/tinker/types/_pydantic_types/sampling_params.py#L18) (*float*) – Sampling temperature - [**top_k**](https://github.com/thinking-machines-lab/tinker/blob/1e5777ef1e0bb2bae6d9b8d63a6144eec405377d/src/tinker/types/_pydantic_types/sampling_params.py#L21) (*int*) – Top-k sampling parameter (-1 for no limit) - [**top_p**](https://github.com/thinking-machines-lab/tinker/blob/1e5777ef1e0bb2bae6d9b8d63a6144eec405377d/src/tinker/types/_pydantic_types/sampling_params.py#L24) (*float*) – Nucleus sampling probability ## Referenced by - [SamplingClient.sample](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/samplingclient/#sample)