Sampling knobs that the trainer passes to ``generate`` each step. ``top_k <= 0`` disables top-k filtering.
| 26 | |
| 27 | @dataclass |
| 28 | class SamplingConfig: |
| 29 | """Sampling knobs that the trainer passes to ``generate`` each step. |
| 30 | |
| 31 | ``top_k <= 0`` disables top-k filtering. |
| 32 | """ |
| 33 | |
| 34 | max_new_tokens: int |
| 35 | temperature: float = 1.0 |
| 36 | top_p: float = 1.0 |
| 37 | top_k: int = -1 |
| 38 | n_samples_per_prompt: int = 1 |
| 39 | continuous_batch_size: Optional[int] = None |
| 40 | |
| 41 | |
| 42 | @dataclass |
no outgoing calls