From ba4ee37fa4f9b0e991ce9a55a54d54946c7eb34f Mon Sep 17 00:00:00 2001 From: Lianmin Zheng Date: Tue, 26 Nov 2024 00:58:57 -0800 Subject: [PATCH] Update sampler.py to skip the success check (#2197) --- python/sglang/srt/layers/sampler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/sglang/srt/layers/sampler.py b/python/sglang/srt/layers/sampler.py index 9cc435ad8..d7db6036c 100644 --- a/python/sglang/srt/layers/sampler.py +++ b/python/sglang/srt/layers/sampler.py @@ -74,7 +74,7 @@ class Sampler(nn.Module): filter_apply_order="joint", ) - if not torch.all(success): + if self.use_nan_detectioin and not torch.all(success): logger.warning("Detected errors during sampling!") batch_next_token_ids = torch.zeros_like(batch_next_token_ids) elif global_server_args_dict["sampling_backend"] == "pytorch":