Repository navigation
feat(models): add nvidia/Qwen3.8-Flash-Next-FP4-Local checkpoint support - #820
Open
chrisqianz wants to merge 1 commit into
Open
chrisqianz wants to merge 1 commit into
chrisqianz wants to merge 1 commit into
Conversation
KarrAcaRn
pushed a commit
to KarrAcaRn/FreeToken-ByAI
that referenced
this pull request
Oct 24, 2026
…lash-Next-FP4-Local checkpoint support Conflicts (next already carried its own NVFP4 PLE support, 0cac9b2/d8903110): - PLE table load: keep next's scan_ple_table (dtype-driven, shared by the disk and pinned backends, host admission); PR's ple_embedding_dtype-driven loader dropped (RadixArk ships ple_embedding_dtype "float8_e4m3fn", which it refused). A config saying nvfp4 over non-packed shards is refused. - PLE gather: next's kernel (shared e2m1_code_f32 decode), PR's API names (PinnedUVATable scale_tensor=, ple_gather_rows scale_ptr=); PR's GpuResidentTable packed oracle kept. - disk backend: packed tables fall back to pinned with a warning (PR) instead of next's NotImplementedError; packed-ness read from the shard headers. - expert banks: PR's CSF scale-pair path combined with next's TP slicing (the decoded scale is sliced) and the disk-tier skip pieces. Assisted-by: Claude Opus 5.5
KarrAcaRn
pushed a commit
to KarrAcaRn/FreeToken-ByAI
that referenced
this pull request
Oct 24, 2026
Assisted-by: Claude Opus 5.5
KarrAcaRn
pushed a commit
to KarrAcaRn/FreeToken-ByAI
that referenced
this pull request
Oct 24, 2026
forecast: next-speed counts the load peak before the online-fp8 savings; the --embed-weights host table is now subtracted there. nvfp4_banks: FlashML-org#820's CSF scale-pair path uses the disk tier's renumbered bank rows like the rest. Assisted-by: Claude Opus 5.5
This branch has not been deployed
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.
What
Adds loading and serving support for nvidia/Qwen3.8-Flash-Next-FP4-Local, a QAD
MIXED_PRECISIONModelOpt export of the already-supportedQwen4ExpForConditionalGenerationarchitecture. The existing NVFP4 release of the same family loads fine; this checkpoint differs in three on-disk encodings, each handled in the subsystem that owns it (no new mechanisms, no upstream behaviour change for other checkpoints):*.weight_scale.nvfp4_csf_fixed(U8) +*.weight_scale.nvfp4_csf_exceptions(U32) instead of plain e4m3 tensors.nvfp4_banks.pydecodes the slab layout (per-row base + 4-bit offsets, exceptions overwritten by exact e4m3 bytes) into the usualweight_scalepiece, CPU-side.nvfp4_expert_spec()auto-selects the CSF kind set when the index contains*.nvfp4_csf_fixed. Also adds the missing unsigned integer dtypes (U16/U32/U64) to_ST_DTYPEin the parallel expert loader.input_scaletensors in the last shard, so requiring them in the stream made the first finished piece wait for the last shard while ~65 GB piled up unread (the "Loading experts" bar froze at 93%). The CSF reader now takes weights and scales from the stream and fetches activation scales per shard itself, keeping the queue shallow.ple_embedding_dtype: nvfp4tables are packed e2m1 (80-byte rows for a 160-wide head) with per-16 e4m3 scales and a globalweight_scale_2scalar.load_ple_tableloads the packed rows + scale rows into two host banks; both PLE runtimes (CPU LUT inGpuResidentTable, Triton gather inPinnedUVATable) decode e2m1 inline, with bit-exact cross-oracle tests; the disk backend rejects packed tables with a clear error and the engine falls back to the pinned backend with a warning.Notes
weight_scale) already works via the storage aliases added by fix(qwen4_exp): read weights under the checkpoint's quant config #759; this PR contains no dense-path changes.Fixes #817
Tested
tests/models/qwen4_exp/+tests/layers/test_nvfp4_moe.py92 passed (CUDA-gated tests skipped;test_ple_diskneeds the_row_storeextension). Plustests/models/test_models_loader.py12 passed with fix(models): find index-only checkpoints that keep shards in a subdirectory #819.Ready in ~3 min from a cold start (~40 s expert build on a clean host), chat completions return tokens, radix cache hits reported.