Skip to content

[Bugfix][Qwen4Exp] Detect the FP8 PLE table from ModelOpt mixed-precision configs - #640

Open
Peuqui wants to merge 1 commit into
1CatAI:mainfrom
Peuqui:qwen4exp-ple-fp8-modelopt-mixed
Open

Peuqui wants to merge 1 commit into
1CatAI:mainfrom
Peuqui:qwen4exp-ple-fp8-modelopt-mixed

Conversation

@Peuqui

@Peuqui Peuqui commented Sep 15, 2026

Copy link
Copy Markdown

Purpose

nvidia/Qwen3.8-Flash-Next-NVFP4 stores its PLE table exactly like the other
Flash-Next NVFP4 exports: 129 FP8 E4M3 shards under
model.language_model.layers.1.ple.ple_embedding.ngram_embedding with one
weight_scale. It declares that table in the ModelOpt mixed-precision config
(quantized_layers[...ngram_embedding] = {"quant_algo": "FP8"}) and does not
set ple_embedding_dtype in text_config.

_get_ple_embedding_quant_method only recognises FP8 storage through
ple_embedding_dtype == "float8_e4m3fn" or an Fp8Config. For this checkpoint
it returns None, and on pre-Ampere cards, where the pinned-host PLE placement
is taken, the engine refuses to start:

NotImplementedError: Qwen4Exp pinned-host PLE requires FP8 checkpoint storage

The change adds a ModelOptMixedPrecisionConfig branch: if the table is not
excluded and its per-layer algorithm resolves to FP8, the existing
Qwen4ExpPLEFp8EmbeddingMethod is selected. The lookup goes through the
config's own is_layer_excluded and _resolve_quant_algo, which already map
between the checkpoint's model.language_model. and vLLM's language_model.model.
prefixes and are used the same way for MTP experts in mtp_fp8_experts.py.
Checkpoints that set ple_embedding_dtype or use Fp8Config take the same path
as before.

Not a duplicate: searched open and closed PRs and issues for "PLE FP8",
"ple_embedding_dtype", "ModelOptMixedPrecision PLE", "pinned-host PLE",
"Flash-Next nvidia". #553 concerns the MTP experts of the same checkpoint and
does not touch the PLE table.

Test Plan

.venv/bin/python -m pytest tests/models/qwen4_exp/test_ple.py
pre-commit run --files vllm/models/qwen4_exp/nvidia/ple_layer.py tests/models/qwen4_exp/test_ple.py
pre-commit run mypy-3.10 --hook-stage manual --files vllm/models/qwen4_exp/nvidia/ple_layer.py tests/models/qwen4_exp/test_ple.py

End to end with nvidia/Qwen3.8-Flash-Next-NVFP4 revision fc694b54 on 2x Quadro
RTX 8000 + 2x Tesla V100, TP2 x PP2, pinned-host PLE with a 6 GiB host budget.

Test Result

  • Tests: 59 passed, 3 skipped. The new test builds the config from a ModelOpt
    mixed-precision dict and checks both prefix spellings: FP8 table selects the
    FP8 embedding method, an unlisted table and an excluded table do not. Without
    the fix both parametrized cases fail.
  • pre-commit and mypy-3.10 pass.
  • Before: startup fails on the PLE stage with the NotImplementedError above.
  • After: the checkpoint loads straight from its Hugging Face snapshot, without
    editing its config, and serves; the same run is described in [Bugfix][Qwen4Exp] Allow checkpoint FP8 MTP experts under pipeline parallelism #639
    for FP8 MTP experts under pipeline parallelism, which this checkpoint needs as
    well for MTP on that topology.

These end-to-end runs were made on our fork (1Cat main 80c88e8 plus our open
PRs).

AI assistance (Claude) was used for this change and this description. I reviewed
every changed line and ran the tests and measurements above.


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.

🤖 Generated with Claude Code

…sion configs

nvidia/Qwen3.8-Flash-Next-NVFP4 declares its FP8 PLE table per layer in
the ModelOpt mixed-precision config and does not set
ple_embedding_dtype. The PLE embedding then got no quant method, and on
pre-Ampere cards the pinned-host placement refused to start ("requires
FP8 checkpoint storage"). Resolve the table's algorithm through the
mixed-precision config as well; the table layout is the same 129-shard
FP8 table with one weight_scale as in the other Flash-Next exports.

Co-authored-by: Claude
Signed-off-by: Peuqui <peuqui@github.com>
Peuqui pushed a commit to Peuqui/1Cat-vLLM that referenced this pull request Sep 16, 2026
The PR branch for 1Cat (qwen4exp-ple-tier-cascade-pr) needed a few changes;
the fork carries the same ones so both stay equal except for 1CatAI#640's hunk:

- The PLE offload worker drops an inherited VLLM_PP_LAYER_PARTITION with an
  upstream-ready comment (was an overlay note), plus a regression test that
  fails without the line.
- The store-card check and load use torch.accelerator.device_count() and
  torch.accelerator.synchronize(): 1Cat's pre-commit hook refuses new
  torch.cuda calls. Tests patch torch.accelerator accordingly.
- PLEPlacement's docstring names the disk tier; a test comment loses its
  German quote; ruff format on one test call.
- docs/design/qwen4exp_ple_tier_cascade.md: tiers, configuration, placement,
  per-step flow, validation and limits.

Checked: test_ple 87, test_ple_offload_worker 31, test_sm70_decode_graph 24
passed; boot of the PLE-Disk llama-swap entry on this code without errors,
store 1.0 GiB loaded in 24.7 s, probe 4/4 identical to the reference.

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Peuqui <peuqui@github.com>

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant