fix: server crash when stop_token_ids contains null (#22175)

Signed-off-by: Krishnan Prashanth <kprashanth@nvidia.com>
This commit is contained in:
KrishnanPrash
2026-04-10 11:42:23 -07:00
committed by GitHub
parent 5cb4ea1d4d
commit a937ec31be
@@ -68,7 +68,8 @@ class SamplingParams:
self.max_new_tokens = max_new_tokens
self.stop_strs = stop
if stop_token_ids:
self.stop_token_ids = set(stop_token_ids)
filtered = {int(t) for t in stop_token_ids if t is not None}
self.stop_token_ids = filtered or None
else:
self.stop_token_ids = None
self.stop_regex_strs = stop_regex