[CI] Detect and fail evals on when NaNs appear in logits (#50323)

Signed-off-by: Tyler Michael Smith <tlrmchlsmth@gmail.com>
Co-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
Tyler Michael Smith
2026-08-04 23:02:58 +00:00
committed by GitHub
co-authored by OpenAI Codex
parent 3756bf1e2b
commit 12292d94b2
6 changed files with 60 additions and 3 deletions
+7
View File
@@ -228,6 +228,7 @@ if TYPE_CHECKING:
VLLM_KV_CACHE_LAYOUT: Literal["NHD", "HND"] | None = None
VLLM_SSM_CONV_STATE_LAYOUT: Literal["SD", "DS"] | None = None
VLLM_COMPUTE_NANS_IN_LOGITS: bool = False
VLLM_RAISE_ON_LOGIT_NANS: bool = False
VLLM_ROCM_QUICK_REDUCE_QUANTIZATION: Literal[
"FP", "INT8", "INT6", "INT4", "INT3", "NONE"
] = "NONE"
@@ -1720,6 +1721,12 @@ environment_variables: dict[str, Callable[[], Any]] = {
# or bad hardware but it may add compute overhead.
"VLLM_COMPUTE_NANS_IN_LOGITS": lambda: bool(
int(os.getenv("VLLM_COMPUTE_NANS_IN_LOGITS", "0"))
or int(os.getenv("VLLM_RAISE_ON_LOGIT_NANS", "0"))
),
# Raise an exception when generated logits contain NaNs. Enabling this
# also enables the NaN computation required to detect them.
"VLLM_RAISE_ON_LOGIT_NANS": lambda: bool(
int(os.getenv("VLLM_RAISE_ON_LOGIT_NANS", "0"))
),
# Timeout (in seconds) for MooncakeConnector in PD disaggregated setup.
"VLLM_MOONCAKE_ABORT_REQUEST_TIMEOUT": lambda: int(