From 5ee84d3c5207bd59faa53e19e60fa82e34961444 Mon Sep 17 00:00:00 2001 From: Frederik Gossen Date: Fri, 21 Aug 2026 10:14:52 -0400 Subject: [PATCH] [CI][Bugfix] Use a prompt that survives offload-resume rounding in mamba offload test (#53146) Signed-off-by: Frederik Gossen Co-authored-by: Claude --- .../v1/kv_connector/unit/test_offloading_connector.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/v1/kv_connector/unit/test_offloading_connector.py b/tests/v1/kv_connector/unit/test_offloading_connector.py index 5a6ea10a68..404478f783 100644 --- a/tests/v1/kv_connector/unit/test_offloading_connector.py +++ b/tests/v1/kv_connector/unit/test_offloading_connector.py @@ -574,7 +574,15 @@ def test_mamba_cpu_offload_boundary( ) _PROMPT_SIZE: int = block_size * 2 - _PROMPT_TEXT = "Hi. Give me a set of trivia questions and their answers " + # Cold prefill and offload-resume are not bit-exact (selective_scan_fn over + # the whole prompt vs selective_state_update for the recomputed token), so + # exact-text equality only holds while the rounding difference never flips a + # greedy argmax. Use a long, highly predictable prompt: it needs no "...." + # padding and keeps top-1 ahead of top-2 by >2.8 logprobs at every step. + _PROMPT_TEXT = ( + "The cat sat on the mat. The cat sat on the mat. The cat sat on the mat. " + "The cat sat on the mat. The cat sat on the mat. The cat sat on the mat. " + ) # build prompt ids to match prompt_size tokenizer = llm.get_tokenizer()