Download code/models/common/sampling/sampling_params.py from tt-hous/clef: direct link, hf CLI and curl.
- Browser
- Download file 731 Bytes
-
https://huggingface.co/tt-hous/clef/resolve/main/code/models/common/sampling/sampling_params.py
- Command line
-
hf download hf://tt-hous/clef/code/models/common/sampling/sampling_params.py
-
curl -L -o sampling_params.py https://huggingface.co/tt-hous/clef/resolve/main/code/models/common/sampling/sampling_params.py
731 Bytes
| # SPDX-FileCopyrightText: © 2026 Tenstorrent USA, Inc. | |
| # | |
| # SPDX-License-Identifier: Apache-2.0 | |
| from dataclasses import dataclass | |
| class SamplingParams: | |
| """ | |
| Used in Generator decode forward functions for greedy decoding / sampling on device. | |
| The same data class exists in vLLM at vllm/v1/worker/tt_model_runner.py. | |
| """ | |
| temperature: float | list[float] | |
| top_k: int | list[int] | |
| top_p: float | list[float] | |
| presence_penalty: float | list[float] = 0.0 | |
| frequency_penalty: float | list[float] = 0.0 | |
| repetition_penalty: float | list[float] = 1.0 | |
| seed: int | list[int] | None = None | |
| enable_log_probs: bool | list[bool] = False | |
| num_logprobs: int | list[int] = 0 | |