Conversation
Honor the explicit NVFP4 PLE dtype in mixed-precision checkpoints. Retain packed rows and block scales in device or pinned host storage, and decode selected rows before ETP reduction. Validate local shard coverage after all checkpoint streams finish. Cover streamed loading, numerical decoding, pinned prefetch, and CUDA graph replay in the existing PLE tests and H200 CI lane. Signed-off-by: Stefano Castagnetta <scastagnetta@nvidia.com>
stecasta
marked this pull request as ready for review
September 10, 2026 16:29
stecasta
requested review from
AndreasKaratzas,
DarkLight1337,
Harry-Chen,
khluu and
ywang96
as code owners
September 10, 2026 16:29
stecasta
marked this pull request as draft
September 10, 2026 16:31
stecasta
marked this pull request as ready for review
September 10, 2026 17:19
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
Enable the
local-inference-lab/Qwen3.8-Flash-Next-NVFP4checkpoint to run on 1x DGX Spark without CPU or disk PLE offloading. Its packed NVFP4 ngram table occupies 26.822 GiB and remains resident in CUDA memory. The PR's resident path was validated on one GB10 with a 4,096-token context, 2 GiB KV cache, and MTP disabled; model loading reported 97.47 GiB.Fixes #56272.
Support
ple_embedding_dtype="nvfp4"in Qwen4Exp ngram embeddings. The local-inference-lab checkpoint stores each logical 160-value row as 80 packed E2M1 bytes and 10 E4M3 block scales, with one FP32 global scale. Upstream currently selects an unquantized table for this explicit storage format inside a ModelOpt mixed-precision checkpoint.The change adds an embedding method to the existing device/pinned-host storage interface. Both paths keep packed weights and block scales in their original storage and decode only the requested rows. Lookup reuses the existing E2M1 decoder and produces activation-dtype rows before ETP reduction. The loader copies each checkpoint shard's overlap with the local ETP vocabulary range and validates coverage after all weight streams finish, along with the global scale, tensor shapes, and storage dtypes.
Related work was checked on September 10, 2026. #54882 and #55334 concern an FP8 PLE table inside a model with NVFP4 body weights. #53899 contains an older NVFP4 PLE implementation within offload work, but its mixed-precision dispatch does not select this checkpoint's explicit NVFP4 table. #42791 adds generic quantized vocabulary embeddings. This change targets the serialized split PLE layout through the storage interface merged in #54371.
AI assistance was used to develop and test this change.
Test Plan
Extend the existing PLE suite with streamed packed-weight/block-scale loading across ETP boundaries, missing row coverage, malformed storage/global scales, independent numerical decoding, compiled GPU lookup, CUDA graph replay with changing IDs, empty/padded inputs, and pinned-host prefetch. Add the NVFP4 cases to the existing H200 Qwen4Exp CI lane.
Test base:
b28c3e1568bfae930f61d4b24940e47528c85d4a, with the matching upstream precompiled CUDA wheel, Torch2.13.0+cu130, and FlashInfer0.6.18.post1. GPUs: one isolated RTX PRO 6000 Blackwell Max-Q and one DGX Spark / GB10. The Spark run used the published PR commite251861aab69d3eb438d1a76ddec036ae45cfd4c.Full-model text-generation validation used the pinned checkpoint above (image/video inputs disabled), a 4,096-token context, 512-token prefill chunks, four sequences, 2 GiB of KV cache, and full/piecewise CUDA graph capture sizes
[1, 2, 4]. The offline harness ran withPYTHONPATH=/opt/ngram/vllm:/run/ngram /opt/ngram/.venv/bin/python /run/ngram/model_smoke.pyon Max-Q andmodel_smoke_spark.pyon Spark. Spark usedengram_config={"cpu_offload":false}andcpu_offload_gb=0; Max-Q used pinned-host PLE storage. It checked selected rows from the complete table against an independent decoder, then four chat prompts and the first 32 canonical GSM8K test examples (temperature 0, thinking disabled, 768 output tokens).Test Result
The checkpoint uses preview architecture names. Validation normalizes them with
hf_overrides={"model_type":"qwen4_exp","architectures":["Qwen4ExpForConditionalGeneration"]}. PLE offload is disabled on Spark and enabled on Max-Q. It selectskernel_config={"linear_backend":"marlin"}because the automatic MXFP8 linear backend rejects the checkpoint's 96-output GDN projection. Real multi-GPU collectives and MTP have not been validated with this PR.Single-Spark reference measurements
Separate end-to-end measurements on September 10, 2026 compared the local-inference-lab checkpoint using its b12x runtime with the NVIDIA checkpoint using upstream vLLM plus disk PLE offload patches. These measurements provide context for fitting the checkpoints on one DGX Spark. They were collected independently of this PR and do not measure its performance impact.
Workload: 32,768 shared prefix tokens, 2,048 suffix tokens, and 256 output tokens; streaming chat, temperature 0, three warmups per cell, and concurrency 1/4/8 with 10/40/80 measured requests. Both runtimes used one GB10, TP1/PP1, a 40,960-token context limit, prefix caching, chunked prefill, and MTP with four draft tokens. Latency and TTFT are means; decode throughput is aggregate active decode throughput from AIPerf.
Each checkpoint completed all 130 measured requests with zero errors and zero preemptions. Every measured response contained 256 output tokens. Acceptance length is
1 + accepted_tokens / draft_steps, calculated from server counters.The local checkpoint's packed PLE payload is 26.822 GiB, held in b12x's resident managed CUDA weight storage with no explicit CPU or disk PLE offload; KV cache was 8 GiB FP8. The NVIDIA checkpoint's FP8 PLE payload is 47.684 GiB, served through disk-backed mmap and the OS page cache; KV cache was 10 GiB BF16. Quantization, backends, and prefix reuse also differ (27,216 versus 30,704 reused tokens per request), so this is a comparison of complete configurations. Each cell is a single run, and accuracy equivalence was not evaluated. Host swap activity was observed, so no swap-free claim is made.
Reference runtime revisions
aba94d396, b12x75ffee637.73029d424, with #54129 at50a061f79, #54882 atd4d703caf, #55513 at60ad959b6, and #56026 at4a365dee4.00ba1c5db; Torch2.13.0+cu130, FlashInfer0.6.18, NVIDIA driver580.95.05.