# tinker.types.SamplingParams ## *class* [**tinker.types.SamplingParams**](https://github.com/thinking-machines-lab/tinker/blob/main/src/tinker/types/_pydantic_types/sampling_params.py#L6)(*[BaseModel](https://github.com/thinking-machines-lab/tinker/blob/main/src/tinker/_models.py#L88)*) **Fields:** - [**max_tokens**](https://github.com/thinking-machines-lab/tinker/blob/main/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/main/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/main/src/tinker/types/_pydantic_types/sampling_params.py#L13) (*Union\[str, Sequence[str], Sequence[int], None\]*) – Stop sequences for generation - [**temperature**](https://github.com/thinking-machines-lab/tinker/blob/main/src/tinker/types/_pydantic_types/sampling_params.py#L16) (*float*) – Sampling temperature - [**top_k**](https://github.com/thinking-machines-lab/tinker/blob/main/src/tinker/types/_pydantic_types/sampling_params.py#L19) (*int*) – Top-k sampling parameter (-1 for no limit) - [**top_p**](https://github.com/thinking-machines-lab/tinker/blob/main/src/tinker/types/_pydantic_types/sampling_params.py#L22) (*float*) – Nucleus sampling probability ## Referenced by - [SamplingClient.sample](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/samplingclient/#sample)