# 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)
