Repository navigation
Conversation
Score fixed answer templates through the existing masked-diffusion sampler and indexed-logprob machinery. Reuse the structured diffusion gateway for Choice, Noul and Score requests without a duplicate API. Validate read parameters before execution and preserve normal generation and per-request slot isolation. Assisted-by: OpenAI Codex Signed-off-by: Alex Steiner <asteiner@nvidia.com>
5 of 6 tasks
pst2154
marked this pull request as ready for review
October 6, 2026 19:10
Owner
Author
|
Codex assisting @pst2154: this incorrectly targeted fork PR is superseded by vllm-project#60288, targeting upstream main. The branch and reviewed commit are preserved. Tracking: vllm-project#60283 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Add seeded, single-forward decision reads to the Nemotron masked-diffusion sampler, and reuse the existing structured diffusion gateway for Choice, Noul and Score requests.
This is the third part of the model-support stack: upstream vllm-project/vllm#58387, then sajadn/vllm#1, then this change. The base is
feat/nemotron-full-model-followup; this diff does not reintroduce the full model.structured_server.py --backend nemotronreuses the existing/v1/systemoneroute. This remains a separate example gateway, not a new native route invllm serve. No ordering heuristics are included.Duplicate-work searches on October 6, 2026 identified full-model PRs vllm-project#58387/vllm-project#48279, the existing gateway, and #59299. vllm-project#59299 currently adds native AR Choice reads and explicitly defers diffusion; this change supplies Nemotron's masked read primitive and adapts the existing example rather than duplicating that endpoint. #58429 targets Laya, not Nemotron.
Test Plan
Use the public
nvidia/Nemotron-Labs-Diffusion-8Bcheckpoint at revision16c67f0560b912e93e0cabb6e0c4f5c3086d95fcand a CUDA-capable editable vLLM installation. SetNEMOTRON_DLM_MODEL_PATHto its local snapshot.VLLM_USE_V2_MODEL_RUNNER=1 VLLM_GPU_SYNC_CHECK=error \ .venv/bin/python -m pytest \ tests/models/language/generation/test_nemotron_dllm.py \ --confcutdir=tests/models/language/generation \ -k 'read_only or invalid_reads or linear_spec_rejects' -vThe tests cover a seeded read mixed with normal generation, indexed low-probability candidates, fixed-token preservation, eager/compiled execution, and slot reuse. BF16 batch-versus-single probabilities are compared within 0.02 absolute probability, not bit-exact logits.
Follow the model guide to launch the raw server and gateway, then run:
Run the affected-file pre-commit hooks and validate the included OpenAPI schema.
Test Result
2+2with4..The HTTP checks establish API behavior, finite normalized scores and answer completeness, not benchmark accuracy or improved model quality. No end-to-end speedup is claimed. Previous full-model reference parity belongs to the predecessor PR, not a new quality evaluation of these decision reads.
Details and limitations
The sampler reuses staged writes, existing sampling state and
compute_topk_scores; no scheduler or model-runner changes. Seed/read flags reset when slots are reused. A graph boundary separates argmax from downstream gather/reductions because Inductor generated an undefined reduction temporary on SM100 in the mixed read/generation reproducer. This can add kernel launches; no acceleration claim is made.Native reads require greedy masked diffusion, the full engine canvas, and
max_tokens <= canvas_length. Linear speculation rejects read-only/indexed-score requests. The example supports text or JSON state, at most 64 questions and 26 alternatives, one compatible token per answer slot, and one deterministic sample. Thinking, images and multi-step reads are unsupported. Probabilities are uncalibrated model scores. RTX 6000 Pro was not validated.Codex assisted with implementation, tests, documentation and this description. The submitting human confirmed review of this diff before publication; validation results above were obtained with Codex assistance.
Essential Elements of an Effective PR Description Checklist
Tracking issue for the full three-part stack: vllm-project#60283