mudler / mudler/vllm.cpp

fix(SPEC-DSPARK-BLOCK-SIZE-GUARD): upstream deleted the general DSpark k >= block_size refusal we still throw, and widened

Open
#2,657 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
423
Forks
53
Avg merge
20h 26m
Merged PRs (30d)
310

Description

Row: SPEC-DSPARK-BLOCK-SIZE-GUARD

Found by wave PORTQ-2 re-deriving PORT-NOW entry 55 of 5559679229..e126687a9a
(#2646). Upstream:
68ca6fd02c vllm#50869, "Remove bad startup assertion".
Previously read against this tree by #2524's sample and ranked first for value in
.agents/sync/2026-09-01-cdefd9d.md §13 item 1; re-verified at e24ec8bfd,
still holds.

The refusal upstream deleted is live here, and widened

include/vllm/config/speculative.h:364-375 throws when
num_speculative_tokens < dspark_block_size. This tree then WIDENED it: when the
draft config carries no dspark_block_size, src/vllm/entrypoints/model_loader.cpp:925-929
falls back to block_size:

  keys.block_floor = read_int("dspark_block_size");
  if (!keys.block_floor.has_value()) {
    keys.block_floor = read_int("block_size");  // the divergence, above
    keys.block_floor_key = "block_size";
  }

model_loader.cpp:868-878 records that NEITHER published Qwen3 draft carries
dspark_block_size, so the widened floor fires on checkpoints where upstream's
original never did. A configuration that starts on post-commit vLLM hard-fails
here.

The ordering hazard is real, and the naive read of it is wrong

Carry-over C9 (.agents/sync/2026-09-01-cdefd9d.md) warns that 5789897aa4
vllm#49969 ADDS this check and 68ca6fd02c / 51def7848a remove it, so
SHA-ordered porting installs a validation and then deletes it.

At the target head e126687a9a the general k >= dspark_block_size refusal
is gone, but a NARROWER one has replaced it: _validate_qwen3_omni_dspark
(vllm/config/speculative.py:145-179 @ e126687a9a) requires
num_speculative_tokens == block_size — equality, not >= — and it is gated on
_is_qwen3_omni_target, so it does not apply to a generic Qwen3 DSpark draft. It
reads block_size first and dspark_block_size second, which is this tree's own
fallback order.

So the work is delete the general refusal, not "delete the check". Whoever
takes this must read the target head rather than this commit alone.

Size

Roughly 200-250 lines, almost all deletions, over ~6 files: the refusal and the
dspark_block_size / block_size_key parameters on ResolveDspark
(include/vllm/config/speculative.h:341-343), DsparkDraftKeys::block_floor and
its read (src/vllm/entrypoints/model_loader.cpp:851-856,925-929),
tests/vllm/entrypoints/test_dspark_block_size_guard.cpp (which exists only for
this guard), three references in tests/vllm/config/test_speculative_dspark.cpp,
and the records the deletion invalidates: .agents/engine-matrix.md:206 and
.agents/specs/dspark-block-size-guard.md, whose §2 divergence argument is
exactly what the deletion retires.

The n_predict default and divisibility rules at speculative.h:350-362 are
untouched by the commit and must stay.

Open decision for the row

Whether to delete the widened-fallback machinery or merely disarm it. Upstream
deletes the whole read; keeping block_floor with no consumer would be dead code
under AGENTS.md §"Nothing lands dead".

Nothing was executed for this finding.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the target-head behavior in include/vllm/config/speculative.h and vllm/config/speculative.py before changing the general refusal. Trace ResolveDspark and DsparkDraftKeys through src/vllm/entrypoints/model_loader.cpp, then inspect tests/vllm/entrypoints/test_dspark_block_size_guard.cpp and tests/vllm/config/test_speculative_dspark.cpp. Done means the general refusal and its now-unused fallback machinery are removed while the n_predict, divisibility, and Qwen3-Omni rules remain, with the affected tests and agent records updated.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
ai-infra-agents, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.