mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#2592
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/353
Author: @sergqwer
Created: 10/1/2026
Status: ❌ Closed
Base:
main← Head:pr/nvfp4-on-0.1.31📝 Commits (1)
78c5705NVFP4 routed experts: converter, pack, decode, prompt path, AVX-512 CPU rows📊 Changes
24 files changed (+2101 additions, -59 deletions)
View changed files
📝
CMakeLists.txt(+30 -3)➕
docs/NVFP4.md(+147 -0)📝
include/strata/artifact/gguf_reader.hpp(+4 -0)📝
include/strata/kernels/cpu/native_expert.hpp(+7 -0)➕
include/strata/kernels/cpu/nvfp4_avx512.hpp(+28 -0)📝
include/strata/kernels/iq_kernels.hpp(+8 -4)📝
include/strata/prefill/kernels.hpp(+1 -1)📝
include/strata/prefill/moe_mmq.hpp(+30 -4)📝
src/kernels/cpu/native_expert.cpp(+38 -3)➕
src/kernels/cpu/nvfp4_avx512.cpp(+186 -0)➕
src/kernels/cpu/nvfp4_avx512_parity.cpp(+320 -0)📝
src/kernels/cuda/iq_kernels.cu(+93 -14)➕
src/kernels/nvfp4_expert_gpu_parity.cpp(+107 -0)📝
src/prefill/kernels.cu(+9 -4)➕
src/prefill/mmq_nvfp4_parity.cpp(+350 -0)➕
src/prefill/mmq_nvfp4_w4a4.cu(+53 -0)➕
src/prefill/mmq_nvfp4_w4a8.cu(+24 -0)📝
src/prefill/moe_mmq.cu(+149 -9)📝
src/prefill/prefill.cpp(+56 -12)📝
src/program/generate.cpp(+6 -1)...and 4 more files
📄 Description
The rebase asked for in #292, for 0.1.33 as experimental. One commit on 0.1.31 (
9259cad).What changed against #292
STRATA_GU_FMTS/STRATA_D_FMTS/STRATA_MMVQ_FMTS), next to Q4_K/Q5_K/Q5_1/Q8_0. It goes through the samelaunch_*dispatch.dq_q8_0serves the Q8_0 token embedding as well; #292 had its own copy, which is gone.tools/iq_pack.py:expert_layout()gives NVFP4 blobs their 16-byte scale tail. An NVFP4 pack always writesexperts.bin, because the GGUF has no tails and so the in-place GGUF read does not apply.CMAKE_CUDA_ARCHITECTURES.src/prefill/mmq_nvfp4_w4a4.cuis the only unit built with12x->12xa, in its own static librarystrata_mmq_w4a4. It holds the FP4 x FP4 kernel, its FP4 activation quantizer and a probe, with their symbols renamed so they cannot fold with the plain-arch copies.strata.exefrom-DCMAKE_CUDA_ARCHITECTURES=120holds 55 sm_120 cubins and 1 sm_120a.STRATA_PREFILL_NVFP4=w4a4falls back to W4A8 with a note.mmq-instance-nvfp4.cuis no longer built.Checked on this rebase (RTX 5090, Windows)
nvfp4_expert_gpu_parity: decode experts 1.09-1.16%.nvfp4_avx512_parity: OK.mmq_nvfp4_parity: W4A8 0.53%, W4A4 8.6%. These are bit for bit the numbers of the old 120a-everywhere build.--expert-cachesize: identical tokens on a 24-token prompt and on an 8K prompt, both in W4A8 and in W4A4. Prefill on 8K is 4,231 tok/s in W4A8 and 4,583 in W4A4; decode is the same.--expert-cache autogives slightly different slot counts on 0.1.31 (8,498 against 8,472 on 0.1.29). That changes which misses the CPU pool computes. For NVFP4 the AVX-512 rows equal the GPU's only to a relative tolerance (other float summation order), not bit for bit. The identity gate should therefore compare NVFP4 at a fixed--expert-cache N.Not run here: Linux, AMD (HIP), sm_121.
🤖 Generated with Claude Code
https://claude.ai/code/session_01VZy1yKaDDiA8a7svdwaHio
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.