Change top_k to be disabled with 0 (still accept -1 for now) (#17773)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
Harry Mellor
2025-05-09 10:01:49 +00:00
committed by GitHub
parent 5b2dcbf0b8
commit c6798baa9c
6 changed files with 14 additions and 13 deletions
+1 -1
View File
@@ -478,7 +478,7 @@ def test_sampler_mixed(seed: int, device: str):
sampling_params = SamplingParams(
temperature=random.random() + 0.1,
top_p=min(random.random() + 0.1, 1),
top_k=random.randint(0, 10) or -1,
top_k=random.randint(0, 10),
n=n,
presence_penalty=random.randint(0, 1),
)