Conversation
Execute the checkpoint's shared MTP head through the existing engine and scheduler. Verify up to four candidates, commit matching Conv/GDN states without target replay, and reclaim request resources on stop or failure. Reuse column-parallel vocabulary projection, Marlin FP8 packing and PagedCompiler draft capture. Bound recurrent rows independently from KV pages and make exact-prompt snapshots opt-in. Wire MTP through the CLI, benchmark and service entrypoints; retain three core MTP test modules. Validated NVIDIA A6000 TP1/TP2, graph recapture, forced acceptance lengths, real 27B FP8 batching/cancellation, and ordinary Qwen2 pre-transpose. Runtime support: InfiniTensor/InfiniCore#1565; graphs also require #1560.
This was referenced Sep 19, 2026
big-hip
marked this pull request as draft
September 19, 2026 13:22
Keep ordinary short-prefill dispatch, preserve live KV during graph recapture, and defer cleanup until a timed-out worker exits. Retain opt-in MTP acceleration features and cover ordinary projection, recapture, shutdown and remote-release contracts.
big-hip
marked this pull request as ready for review
September 19, 2026 15:57
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.
Summary
Add opt-in, text-only greedy decoding through the Qwen checkpoint's built-in MTP head. Verify 1–4 candidates using the existing scheduler and paged cache, and commit the matching Conv/GDN checkpoint without replaying the target model after rejection.
csrc/models/qwen3_5/, shared recurrent logic inqwen3_next, and request orchestration inllm/model_runner/mtp_runner.py.ColumnParallelLinearfor vocabulary projection, existing Marlin packing for E4M3 block weights, andPagedCompilerfor bounded draft graph capture.Motivation
The existing Qwen model path drops MTP weights and cannot use the checkpoint's head to reduce target-model decoding calls. Hybrid models also need Conv and GDN state committed at the accepted token boundary: rolling back attention KV alone is insufficient.
Speculation is opt-in; random sampling is explicitly rejected. Ordinary Qwen inference also uses vocabulary-parallel projection, corrected norm loading and the checkpoint-configured recurrent-state precision. These shared changes are reviewed separately from MTP acceptance correctness. The generic linear post-load fix ensures tied weights exist before packing and makes layout processing per-linear and repeatable.
Related runtime issue: InfiniTensor/InfiniCore#1565. Runtime PR: InfiniTensor/InfiniCore#1566.
Type of Change
feat— new feature / new modelfix— bug fixperf— performance improvement (no behavioral change)refactor— code restructuring without behavior changetest— adding or fixing tests onlydocs— documentation onlybuild/ci— build system or CI configurationchore— tooling, formatting, or other non-code changesTest Results of Involved Models on Supported Platforms (Please attach screenshots)
Ordinary-path follow-up (
86208ae1)stop().Follow-up conditions, raw measurements and reproduction
Saved test output, commands and measurement provenance
The image is a rendering of saved local test output, not a GitHub CI screenshot. Detailed logs, commands, fixture configuration and data provenance accompany it.
examples/test_infer.py;examples/bench.pytest/bench/test_benchmark.pyscripts/test_perf.pyFresh NVIDIA source build and project formatting checks passed. Integration used the matching Core runtime, including the separate graph-lifetime fix in InfiniTensor/InfiniCore#1560; it was not tested against the unmodified v0.2.9 release.
Benchmark / Performance Impact
The following are archived measurements before final PR cleanup, not new speed claims from the CLI smoke tests. They document the implemented path's benefit. The final branch was rechecked for real-model correctness/lifecycle; timings were not rebenchmarked during the concurrent source build.
2 × A6000 48 GiB over PCIe (no NVLink), TP2/PP1, dense single-MTP-layer Qwen3.8-27B-FP8, E4M3 128×128 weight blocks, BF16 activations, Marlin; 40 KV pages × 64 tokens; greedy; prefix reuse off. Ordinary baseline uses Decode graphs; K=2 MTP uses eager; both use eager Prompt Prefill. Two repetitions per prompt, including Python/scheduler time.
Generation rate is
sum(output_tokens - 1) / sum(wall_time - TTFT), excluding Prefill and loading. All 366 output tokens in those six runs matched their same-TP baseline. These small samples are not a production capacity estimate or a comparison against vLLM/A100.TP1 two-request draft batching improved 58.18 → 62.87 tok/s (+8.06%). TP2 draft batching did not reliably improve wall time and remains disabled; target verification is still batched.
Fresh TP2 service check: steady process memory 24,150 / 24,132 MiB; sampled whole-process peak 24,258 MiB per card.
nvidia-smisampling every 100 ms can miss short peaks. This is eager K=2; no new full-27B graph recapture memory claim. State and snapshot budgets are separate from allocator/process memory.Notes for Reviewers
The review scope is text-only greedy MTP on NVIDIA TP1/TP2, including the documented opt-in draft graphs and bounded exact-prompt snapshots. The ordinary-path follow-up is included in
86208ae1: ordinary short GDN Prefill retains chunked dispatch, graph recapture preserves live KV, and asynchronous shutdown retains in-flight resources on timeout. Vocabulary-parallel projection, corrected weight loading and checkpoint-configured FP32 recurrent state intentionally also affect ordinary Qwen inference; their behavior and memory implications are documented above. Existing-model numerical and lifecycle checks pass, but the validation does not establish unchanged performance for every model, PP/quantization configuration or vendor backend. Additional Qwen MoE checks cover configuration/remapping only, not full MoE inference.This PR is ready for review within that scope. Merge still requires maintainer review, upstream CI with the matching Core runtime, and resolution of the dependency/overlap order below.
InfiniLM-v0.2.9c, as requested for this contribution, rather thanmain.CI / ChatOps
Fork push CI (format) and Ruff passed at the current head
86208ae1: https://github.com/big-hip/InfiniLM/actions/runs/35451703600 and https://github.com/big-hip/InfiniLM/actions/runs/35451703133. The hardwarecijob was skipped in the fork push workflow; local GPU results are reported separately above.Please run
/retestwith the matching Core dependency after assembling the runtime changes. The manual hardware workflow normally checks out InfiniTensor/InfiniCore by branch; the new runtime branch currently lives on the contributor fork. A formatting-only green check is not hardware CI coverage. Fork PR workflows may also require maintainer approval.Checklist
Title, Branch, and Commits
feat(nvidia): …,fix(cuda/gemm): …).<type>/xxx-yyyy-zzzzwhere<type>matches the PR title's Conventional Commits type and words are joined with hyphens (seeCONTRIBUTING.md§Branches).CONTRIBUTING.md§Pull Requests).InfiniLM-v0.2.9c(270feb3e).fixup!/squash!/wipcommits remain.Scope and Design
CONTRIBUTING.md§Code/General).printf/std::cout/print(...)left behind, orTODOwithout an owner and issue link.General Code Hygiene (applies to all languages)
CONTRIBUTING.md§Code/General).CONTRIBUTING.md§Code/General).the `seqlens_k` tensor) (CONTRIBUTING.md§Code/General).CONTRIBUTING.md§Code/General).CONTRIBUTING.md§Code/General; §Python).C++ Specific (if C++ files changed)
CONTRIBUTING.md§C++).CONTRIBUTING.md§C++).new/delete; RAII / smart pointers / existing allocators are used.scripts/format.py.csrc/models/llama_legacy/.Python Specific (if Python files changed)
CONTRIBUTING.md§Python).CONTRIBUTING.md§Python).scripts/format.py.python/infinilm/auto_config.py.Testing
examples/test_infer.py), or specify the reason for skipping.examples/bench.py), or specify the reason for skipping.test/bench/test_benchmark.py), or specify the reason for skipping.python/infinilm/server/inference_server.py+scripts/test_perf.py), or specify the reason for skipping.Build, CI, and Tooling
/retestwas requested.Documentation
README.md,CONTRIBUTING.md, or inline docs updated when behavior, build flags, or developer workflow changed.Security and Safety
At the current head
86208ae1, upstream CI and Ruff reportaction_required; maintainer approval is required before their jobs run. Fork checks are reported separately above.