Skip to content

5080deploy: merge upstream #578, NVFP4 prefill dequant by bit placement (-32% TTFT at 64K, bit-identical) - #79

Open
gdevenyi wants to merge 5 commits into
5080/35-1080deploy-fixesfrom
5080/36-nvfp4-prefill-578
Open

gdevenyi wants to merge 5 commits into
5080/35-1080deploy-fixesfrom
5080/36-nvfp4-prefill-578

Conversation

@gdevenyi

@gdevenyi gdevenyi commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Stacked on #77. This merges upstream FlashML-org#578 at head e428b06. It changes the NVFP4 MoE prefill GEMM (the Triton grouped kernel, which is what prefill runs on sm_120 here):

  • it decodes e2m1/e4m3 by bit placement instead of a table gather;
  • it loads one contiguous activation tile per K step;
  • it adds an EVEN_K path.

Upstream reports bit-identical outputs.

Conflict: tests/kernels/test_e4m3_compat.py. Both sides add cases to _emit_all, and both are kept.

Measured (RTX 5080, Qwen3.8-Flash-Next-NVFP4, production config at 2224380), interleaved base/FlashML-org#578/base/FlashML-org#578, uncached prompts, time to first token:

prompt base with FlashML-org#578
4K 3.18 s* 2.21 s*
16K 11.39 / 11.40 s 9.08 / 7.79 s
64K 45.24 / 45.24 s 30.75 / 30.74 s (-32%)
decode tok/s, 4K/16K/64K 51.0 / 51.0 / 49.1-49.4 51.0-51.3 / 51.0 / 49.5

* Only the second round is shown at 4K, because each arm's first 4K request includes the server's first-prefill kernel compile.

Bit-identity: greedy fingerprints on 3 fixed prompts are identical (2 rounds), and 20 cold nonce prompts × 3 give 0/60 mismatches.

Tests:

  • test_nvfp4_backends.py, test_e4m3_compat.py, test_fused_copy.py: 38 passed.
  • Full not-slow suite (GPU): 3286 passed, only the 4 known environment failures.

Deployed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Bu6LgoxLR4wETqb7RPR2vt

YevheniiKotyrlo and others added 5 commits September 30, 2026 13:57
…tivations contiguously

The prefill grouped GEMM read each e2m1 code through a table gather and loaded the
activations at stride two for the even and odd k of a byte. On an RTX 3090 Ti at
Qwen3.8-Flash-Next's shapes (8192 tokens, 512 experts, top-10) that held it at
8.6 TFLOPS; placing the codes in fp16 bits and splitting one contiguous activation
tile in registers reaches ~50, with bit-identical output.
…t placement and load activations contiguously

# Conflicts:
#	tests/kernels/test_e4m3_compat.py
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.

2 participants