MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / SamplingConfig

Class SamplingConfig

deepspeed/runtime/rollout/base.py:28–39  ·  view source on GitHub ↗

Sampling knobs that the trainer passes to ``generate`` each step. ``top_k <= 0`` disables top-k filtering.

Source from the content-addressed store, hash-verified

26
27@dataclass
28class 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

Calls

no outgoing calls