A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 9, 10:00 UTC
Adding optional speculator tests for larger models (#32943)
Signed-off-by: shanjiaz <zsjwpianpian@gmail.com>
shanjiaz committed
Jan 29, 2026 at 03:54 UTC
5eeba80c7422c3e01d0dea424e663668950cd334
2 files changed
+45
-4
.buildkite/test-pipeline.yaml
+15
-1
@@ -362,7 +362,7 @@ steps:
362
- pytest -v -s v1/sample
363
- pytest -v -s v1/logits_processors
364
- pytest -v -s v1/worker
365
- - pytest -v -s v1/spec_decode
365
+ - pytest -v -s -m 'not slow_test' v1/spec_decode
366
- pytest -v -s -m 'not cpu_test' v1/kv_connector/unit
367
- pytest -v -s -m 'not cpu_test' v1/metrics
368
- pytest -v -s v1/test_oracle.py
@@ -1420,6 +1420,20 @@ steps:
1420
- TARGET_TEST_SUITE=A100 pytest basic_correctness/ -v -s -m 'distributed(num_gpus=2)'
1421
- pytest -v -s -x lora/test_mixtral.py
1422
1423
+- label: Acceptance Length Test (Large Models) # optional
1424
+ timeout_in_minutes: 120
1425
+ gpu: h100
1426
+ optional: true
1427
+ num_gpus: 1
1428
+ working_dir: "/vllm-workspace/tests"
1429
+ source_file_dependencies:
1430
+ - vllm/v1/spec_decode/
1431
+ - vllm/model_executor/models/mlp_speculator.py
1432
+ - tests/v1/spec_decode/test_acceptance_length.py
1433
+ commands:
1434
+ - export VLLM_ALLOW_INSECURE_SERIALIZATION=1
1435
+ - pytest -v -s v1/spec_decode/test_acceptance_length.py -m slow_test
1436
+
1437
- label: LM Eval Large Models # optional
1438
gpu: a100
1439
optional: true
tests/v1/spec_decode/test_acceptance_length.py
+30
-3
@@ -35,6 +35,10 @@ class Eagle3ModelConfig:
35
id: str = ""
36
# Backends that are incompatible with this model (will be skipped)
37
excluded_backends: set[AttentionBackendEnum] = field(default_factory=set)
38
+ # Pytest marks for this configuration (e.g., pytest.mark.optional)
39
+ marks: list = field(default_factory=list)
40
+ # Custom relative tolerance (defaults to DEFAULT_RTOL if None)
41
+ rtol: float | None = None
42
43
44
# Model configurations for EAGLE3 acceptance length tests.
@@ -65,6 +69,17 @@ EAGLE3_MODEL_CONFIGS = [
69
# FLASHINFER does not support ("sink setting not supported")
70
excluded_backends={AttentionBackendEnum.FLASHINFER},
71
),
72
+ Eagle3ModelConfig(
73
+ verifier="Qwen/Qwen3-VL-30B-A3B-Instruct-FP8",
74
+ drafter="nm-testing/Speculator-Qwen3-30B-MOE-VL-Eagle3",
75
+ expected_acceptance_length=1.35,
76
+ expected_acceptance_lengths_per_pos=[0.2900, 0.0620, 0.0115],
77
+ id="qwen3-30b-moe-vl-eagle3",
78
+ marks=[
79
+ pytest.mark.slow_test,
80
+ ],
81
+ rtol=0.15, # Higher tolerance due to small absolute values at position 2
82
+ ),
83
]
84
85
# Default test parameters
@@ -194,9 +209,16 @@ def extract_acceptance_metrics(metrics, num_spec_tokens: int) -> dict:
209
210
211
@large_gpu_mark(min_gb=40)
212
+@pytest.mark.skipif(
213
+ not current_platform.is_cuda(),
214
+ reason="This test is only supported on CUDA platform.",
215
+)
216
@pytest.mark.parametrize(
217
"model_config",
199
- [pytest.param(config, id=config.id) for config in EAGLE3_MODEL_CONFIGS],
218
+ [
219
+ pytest.param(config, id=config.id, marks=config.marks)
220
+ for config in EAGLE3_MODEL_CONFIGS
221
+ ],
222
)
223
@pytest.mark.parametrize("num_spec_tokens", [DEFAULT_NUM_SPEC_TOKENS])
224
@pytest.mark.parametrize("tp_size", get_tp_size_params())
@@ -251,6 +273,7 @@ def test_eagle3_acceptance_length(
273
274
rel_error = abs(actual_acceptance_length - expected) / expected
275
276
+ # Overall acceptance length always uses DEFAULT_RTOL
277
assert rel_error <= DEFAULT_RTOL, (
278
f"Acceptance length regression detected for {model_config.id}!\n"
279
f" Expected: {expected:.3f}\n"
@@ -261,18 +284,22 @@ def test_eagle3_acceptance_length(
284
)
285
286
if expected_per_pos and len(expected_per_pos) == len(actual_per_pos):
287
+ # Per-position checks use model-specific rtol if provided
288
+ rtol = (
289
+ model_config.rtol if model_config.rtol is not None else DEFAULT_RTOL
290
+ )
291
for pos, (actual, exp) in enumerate(
292
zip(actual_per_pos, expected_per_pos)
293
):
294
if exp > 0:
295
pos_rel_error = abs(actual - exp) / exp
269
- assert pos_rel_error <= DEFAULT_RTOL, (
296
+ assert pos_rel_error <= rtol, (
297
f"Per-position acceptance length regression at pos {pos} "
298
f"for {model_config.id}!\n"
299
f" Expected: {exp:.3f}\n"
300
f" Actual: {actual:.3f}\n"
301
f" Relative error: {pos_rel_error:.2%} "
275
- f"(tolerance: {DEFAULT_RTOL:.2%})"
302
+ f"(tolerance: {rtol:.2%})"
303
)
304
305
print(