mudler / mudler/vllm.cpp

sixteen architectures never read device_token_ids and decode from token id 0 on the default CUDA arm

Open
#2,732 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: -

Owed under .agents/specs/eng-async-device-ids-refusal.md ## Owed O4.

Sixteen registered architectures never read ModelForwardInput::device_token_ids. On the default CUDA arm (async_device_mirror() is DEFAULT-ON, integrated parts included) each of them embeds a host array the asynchronous runner deliberately leaves stale, and token_ids_cpu is zero-initialised, so they decode from token id 0 at every step after the first.

The set

commandr, dots3_note, gemma, gemma2, gemma3, gemma4, glm4, granite, minicpm, minicpm3, muse_glimmer, olmo2, opt, phi, phi3, stablelm.

Each reaches <Model>::ForwardDevice(input.token_ids, ...) and never reads the device pointer.

Why no gate convicts them

A token gate cannot see this. The prefill agrees, the first token looks right, and every token after it is generated from 0 — at rc=0, with fluent output there is nothing to compare against. All five previously convicted architectures were caught by hardware runs, one at a time (#1305, #2496, #2544), never by a gate.

Current disposition

ENG-ASYNC-DEVICE-IDS-REFUSAL (#2710) makes them LOUD rather than wrong: each leaves ModelFactory::consumes_device_token_ids false, so ModelRegistry::Forward refuses a step whose host identifiers are stale and names the architecture and the missing capability. VT_ASYNC_DEVICE_MIRROR=0 remains the same-binary rollback that returns the host combine and makes the host identifiers authoritative again.

That is a refusal, not a fix. Each of the sixteen is owed by the row that ports it, and the repair is small and mechanical now that both arms of the seam exist:

  • the DEVICE arm, detail::DeviceTokenIdsScope — for a forward that already uploads its ids to a device buffer;
  • the HOST arm, ResolveHostTokenIds (include/vllm/model_executor/models/host_token_ids.h) — for a forward that gathers embedding rows on the host.

Then set consumes_device_token_ids = true beside that forward.

#2710 deliberately does not wire sixteen forwards it has no checkpoint to gate.

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

Start with .agents/specs/eng-async-device-ids-refusal.md, the sixteen named architecture forwards, and include/vllm/model_executor/models/host_token_ids.h. Trace each ModelForwardInput::device_token_ids use through ModelFactory::consumes_device_token_ids and ModelRegistry::Forward, choosing DeviceTokenIdsScope or ResolveHostTokenIds as appropriate. Done means all sixteen consume device token IDs and no longer trigger the refusal on the default CUDA arm.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.