SamplingParams 是用于控制采样过程的一个配置类。它允许用户设置不同的参数来影响生成文本的方式
class SamplingParams:
def __init__(self,
temperature: float = 1.0,
top_p: float = 1.0,
top_k: int = 0,
repetition_penalty: float = 1.0,
max_tokens: int = 16,
stop: List[str] = None,
presence_penalty: float = 0.0,
frequency_penalty: float = 0.0,
use_beam_search: bool = False,