Skip to content

[Model] Add Flint (RecursiveSI/flint) - #62938

Merged
WoosukKwon merged 12 commits into
vllm-project:mainfrom
WoosukKwon:flint
Oct 22, 2026
Merged

WoosukKwon merged 12 commits into
vllm-project:mainfrom
WoosukKwon:flint

Conversation

@WoosukKwon

@WoosukKwon WoosukKwon commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Overview

Adds Recursive's Flint, a MoE model with 40B total and 2.5B active parameters, with day-0 support for both released checkpoints:

  • RecursiveSI/flint: BF16 safetensors;
  • RecursiveSI/flint-nvfp4-gguf: an NVFP4 GGUF, served weight-only (W4A16).

The model lives in vllm/models/flint/, together with Flint-specific kernels for small-batch decode on a single Blackwell GPU.

Claims

  • Architecture: 49 layers.

    • Attention: 35 layers use a 513-token sliding window with RoPE; 14 use full attention with no positional encoding. All layers use GQA (32 query / 4 KV heads, head dim 128), per-head Q/K RMSNorm and learned attention sinks.
    • MoE: 256 experts with sigmoid top-6 routing and renormalized weights, plus a shared expert. Layers 0–1 are dense.
    • Context: 262K tokens. The untied LM head produces FP32 logits.
  • NVFP4 GGUF:

    • Each 64-value superblock is 4 Γ— (UE4M3 scale + 16 E2M1 codes), with an FP32 scale per tensor (per expert for MoE weights). It is repacked losslessly at load into the ModelOpt NVFP4 layout and runs on the existing W4A16 kernels.
    • Config and tokenizer come from the BF16 repo (--hf-config-path, --tokenizer).
    • It loads by HF repo ID or local path, and needs gguf>=0.19.0.
  • Numerics: the kernels follow the reference implementation's rounding points.

    • FP32 fused add + RMSNorm, rounded once.
    • FP32 gate/up for the routed experts.
    • Exact SiLU after BF16 rounding for the shared expert.
    • FP32 RoPE table, BF16 router logits.
  • Speed: single-GPU (TP=1) forward time on GB200 with 100K tokens of context, from vllm bench forward.

    stock vLLM layers this PR
    NVFP4 decode, batch 1 4.81 ms 1.78 ms (2.7Γ—)
    NVFP4 decode, batch 8 8.24 ms 5.70 ms (1.45Γ—)
    NVFP4 prefill, 8K tokens 206.6 ms 144.6 ms (1.43Γ—)
    BF16 decode, batch 1 3.53 ms 2.34 ms (1.51Γ—)

    Served end to end, batch-1 NVFP4 decode at 100K context takes 2.06 ms per token (about 485 tokens/s).

  • Kernels:

    • fused Q/K norm + RoPE + KV-cache write (Triton);
    • small-batch MoE: a GEMV router with fused top-k, plus expert-indexed GEMVs, with FlashInfer's CuTe DSL W4A16 grouped GEMM for larger batches;
    • a small-batch NVFP4/BF16 dense GEMV (CuTe DSL) on the same packed weights;
    • norm and SiLU kernels with the reference's rounding;
    • CuTe DSL split-KV decode attention with sinks and sliding windows;
    • for up to 8 decode requests, a 7-kernel-per-layer path chained with programmatic dependent launch (346 kernels per forward instead of 1,096).
  • Fallback: other configurations use vLLM's standard layers: TP > 1, EP, and GPUs outside the SM100 family such as sm_120.

  • Serving: tool calling and reasoning use the existing glm47 parsers; see the recipe in recipes/models/RecursiveSI/flint.yaml.

Validation

Accuracy was measured on the development branch, which has the same model code as this PR, on one GB200 with the default sampling settings (temperature 1.0, top-p 0.95, top-k 20):

Eval BF16 NVFP4
GSM8K (1,319, chat, 16K max tokens) 0.950 0.950
GPQA-Diamond (198 Γ— 4) 0.721 0.696
MRCR (48 samples, up to 114K-token prompts; mean of 3 runs) 0.47 0.46
Tool-calling suite (19 cases Γ— 10 runs) 10/10 every case 10/10 every case
  • Logit agreement: prompt-logprob KL against an FP32 reference forward pass stays at the level of the stock-layer implementation: 0.21 / 0.04 / 0.11 for BF16 and 0.13 / 0.03 / 0.06 for NVFP4, over 2–6K-token prompts. The model is ill-conditioned in BF16; an independent BF16 implementation agrees with FP32 on only 90–96% of top-1 tokens. This KL criterion is therefore used instead of bitwise comparison.
  • Unit tests: tests/models/flint/ covers each kernel against a reference implementation, plus the GGUF repack. It runs in one new B200 CI step.
  • This PR's tree (one GB200, default settings, both checkpoints from their public HF repo IDs). Details are in the first comment.
    • GSM8K: NVFP4 0.947, BF16 0.954.
    • Tool-call suite: 10/10 on every case for both checkpoints.
    • Forward time matches the development branch: NVFP4 decode batch 1 1.78 ms, batch 8 5.70 ms, 8K prefill 144.4 ms; BF16 2.34 / 6.83 / 145.9 ms.
    • pytest tests/models/flint: 165 passed, 1 skipped.
pytest tests/models/flint
vllm serve RecursiveSI/flint-nvfp4-gguf --hf-config-path RecursiveSI/flint --tokenizer RecursiveSI/flint \
  --enable-auto-tool-choice --tool-call-parser glm47 --reasoning-parser glm47 --exclude-tools-when-tool-choice-none
python tests/evals/gsm8k/gsm8k_eval.py --port 8000 --use-chat-completions --max-tokens 16384
vllm bench forward --model RecursiveSI/flint-nvfp4-gguf --hf-config-path RecursiveSI/flint --tokenizer RecursiveSI/flint \
  --load-format auto --max-model-len 110000 --kv-len-jitter 0 --case d1=1*1@100000 --case d8=8*1@100000 --case p8k=8192@100000

Details

  • Changes to shared code:
    • registry entries (model, config, test registry);
    • one docs row;
    • docker/Dockerfile: installs gguf>=0.19.0 in the vllm-openai image, so the NVFP4 GGUF checkpoint loads out of the box.
    • maybe_override_with_speculators: skips speculators detection for a single local file, so a .gguf path can be passed as --model.
  • No torch.compile: the model runs eagerly, and decode runs under CUDA graphs.
  • Rust frontend: not supported yet for this recipe. It rejects --exclude-tools-when-tool-choice-none, --hf-config-path and --tokenizer; the recipe sets VLLM_USE_RUST_FRONTEND=0.
  • Known limitations: prefill for short prompts is CPU-bound by eager kernel launches. Batch-1 decode time varies by a few percent between processes; this is GPU state, not configuration.
  • Not a duplicate: no other open or closed vLLM PR or issue covers Flint.
  • AI assistance: Claude Code was used to write the implementation, kernels and tests, and to run the benchmarks and evals. I reviewed the changes.

Pull Request Checklist
  • I used vLLM's /pr-checklist skill. (Mandatory for agents, optional for humans).

  • AI assistance was used during the creation of this PR.

  • Design Fit: Minimizes impact on core components, reuses existing functionality, and justifies added complexity.

  • Testing and Validation: Validates the change and ensures any added tests are meaningful and reliable, with CI coverage or documented CI resource constraints and validation performed outside CI.

  • Code Quality and Style: Keeps code and comments clear and concise, and updates relevant documentation and examples.

  • Pull Request Contents: Includes a brief summary and relevant links, supports claims with evidence, explains root causes and implementation trade-offs, and follows the contributing guide.

πŸ€– Generated with Claude Code

Add Recursive's Flint MoE (40B total, 2.5B active; 35 sliding-window +
14 full-attention layers with learned sinks; 256 experts, sigmoid top-6
plus a shared expert) for both released checkpoints: BF16 safetensors
(RecursiveSI/flint) and an NVFP4 GGUF (RecursiveSI/flint-nvfp4-gguf),
which is repacked losslessly to the ModelOpt layout and run W4A16.

The model lives in vllm/models/flint/ with Flint-specific kernels for
small-batch decode on a single Blackwell GPU (fused Q/K norm + RoPE + KV
write, GEMV MoE and dense kernels, CuTe DSL decode attention with sinks
and sliding windows, and a 7-kernel PDL-chained decode path). Other
configurations use vLLM's standard layers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Woosuk Kwon <woosuk@inferact.ai>
@mergify

mergify Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Documentation preview: https://vllm--62938.org.readthedocs.build/en/62938/

@mergify mergify Bot added documentation Improvements or additions to documentation ci/build new-model Requests to new models labels Oct 21, 2026
@WoosukKwon

Copy link
Copy Markdown
Collaborator Author

Validation on this PR's tree (db02bc9f0f): one GB200, default settings (VLLM_USE_RUST_FRONTEND and VLLM_USE_V2_MODEL_RUNNER unset), both checkpoints served from their public HF repo IDs with no token.

Check NVFP4 (RecursiveSI/flint-nvfp4-gguf) BF16 (RecursiveSI/flint)
GSM8K (1,319, chat, 16K max tokens) 0.951 0.952
Tool-call suite (19 cases Γ— 10 runs) 10/10 every case 10/10 every case
Forward, decode batch 1 @ 100K 1.78 ms 2.34 ms
Forward, decode batch 8 @ 100K 5.70 ms 6.83 ms
Forward, prefill 8K @ 100K 144.8 ms 146.2 ms
  • Reference (development branch): GSM8K 0.950 / 0.950. Forward: NVFP4 1.78 / 5.70 / 144.6 ms, BF16 2.34 / 6.84 / 146.0 ms.
  • GSM8K errors: none of the 1,319 requests errored; 1 hit the 16K output-token limit.
  • Unit tests: pytest tests/models/flint gives 267 passed, 1 skipped (9.6 min on one GB200).
  • Dependencies: FlashInfer 0.7.2, torch 2.14.0+cu130, gguf 0.19.0.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork β€” automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@zflowai

zflowai commented Oct 21, 2026

Copy link
Copy Markdown

Thanks for the day-0 support! We brought Flint NVFP4 up on a single RTX 5090 (sm_120) with vllm/vllm-openai:flint (0.32.0rc1.dev348+ge7c846767) and hit two issues; both still reproduce against the current head of this PR (db02bc9).

1. _flint_kernels() has no arch gate, so sm_120 fails at load

It checks only TP=1 / quant type / EP, so on sm_120 it selects FlintNvfp4Experts, whose warmup goes through the CuTe-DSL grouped MoE (FlashInfer moe_utils, SM90/SM100 only):

File "vllm/models/flint/ops/moe.py", line 900, in _repack
    moe_cute.warmup(
...
File "flashinfer/compilation_context.py", line 162, in get_nvcc_flags_list
RuntimeError: No supported CUDA architectures found for major versions [9, 10].

Gating it on arch makes sm_120 take the stock layers, as the docstring describes (plus from vllm.platforms import current_platform):

 def _flint_kernels(
     quant_config: QuantizationConfig | None, parallel: ParallelConfig | None = None
 ) -> bool:
     """Flint's kernels serve the BF16 and NVFP4 checkpoints on a single GPU
-    (TP=1, and for the MoE no EP/EPLB); other configurations use vLLM's stock
-    layers."""
+    (SM90/SM100, TP=1, and for the MoE no EP/EPLB); other configurations use
+    vLLM's stock layers."""
+    if not (
+        current_platform.is_device_capability_family(90)
+        or current_platform.is_device_capability_family(100)
+    ):
+        return False
     if get_tensor_model_parallel_world_size() != 1 or not (

With this, the 5090 runs MarlinNvFp4LinearKernel + MARLIN NvFp4 MoE + FlashInfer attention. Output is coherent and needle retrieval works at 6.5K/12K tokens (well past the 513-token window). We have not run GSM8K or other accuracy evals on this path. Measured with vllm bench serve (random dataset, ignore_eos):

in/out concurrency TTFT p50 TPOT output tok/s
1024/256 1 56 ms 3.61 ms 262
1024/256 32 218 ms 11.3 ms 2,572
1024/256 64 303 ms 20.4 ms 2,839
16384/256 1 657 ms 4.10 ms 150

Open question: the small-batch Triton decode MoE path (≀ DECODE_MAX_TOKENS) might also work on sm_120 (it relies on cvt.rn.bf16x2.e2m1x2), which could help batch-1 decode. We haven't tested that, so the gate above turns everything off for safety.

2. The flint image is missing gguf

Loading RecursiveSI/flint-nvfp4-gguf fails with ModuleNotFoundError: No module named 'gguf' from gguf_nvfp4.py:172. The PR description lists gguf 0.19.0 as a dependency, but it isn't installed in the image, and the test uses importorskip. Could it be added to the image, or the loader raise an error that says how to install it?

Minor: passing the .gguf file path itself as --model fails in maybe_override_with_speculators (it tries to parse it as JSON); passing the directory works.

@DataCraftsmanAU

Copy link
Copy Markdown

Tried this on sm_120 with the NVFP4 GGUF: serving on an RTX PRO 6000 Blackwell Workstation Edition, kernel tests on an RTX 5070 Ti.

_flint_kernels() checks TP, EP/EPLB and the quant config but not the device, so a single sm_120 GPU picks the Flint kernels, and the MoE path doesn't run there. With the module level SM100 skips removed, the flint tests give 8 failed, 235 passed on sm_120:

  • test_moe_matches_reference[7|64|600], test_decode_and_grouped_paths_agree[1|6], test_shared_expert_on_aux_stream[64]: RuntimeError: No supported CUDA architectures found for major versions [9, 10] (FlashInfer JIT)
  • test_bf16_decode_matches_trtllm[1|12]: The trtllm-gen batched GEMM cubin manifest contains no kernels runnable on sm120; this backend currently ships cubins for sm100, sm103 and sm107

Routing, dequant, the Triton decode GEMVs, qkv_fused and qk_norm_rope all pass on sm_120.

We gated it on the device:

 def _flint_kernels(quant_config, parallel=None) -> bool:
+    if not current_platform.is_device_capability_family(100):
+        return False
     if get_tensor_model_parallel_world_size() != 1 or not (

With that, sm_120 runs on the stock layers (Marlin W4A16 NVFP4, FlashInfer attention with sinks) and lands on Recursive's NVFP4 numbers: LiveCodeBench v6 82.2% on a 45 problem sample, SWE-bench Verified 80% on 50 tasks (mini-swe-agent, no network). The glm47 tool call and reasoning parsers worked as in the recipe. A finer gate could keep the Triton decode path on sm_120 if you want it there.

Test log, patch and setup: https://github.com/DataCraftsmanAU/flint-independent-eval (serving/sm120-kernel-tests.log)

- Use Flint's kernels only on SM100-family GPUs, where they are built and
  tested; other GPUs (e.g. sm_120) use vLLM's standard layers.
- Install gguf>=0.19.0 in the vllm-openai image so the NVFP4 GGUF
  checkpoint loads out of the box.
- Skip speculators detection for a single-file local model, so a .gguf
  path can be passed as --model.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Woosuk Kwon <woosuk@inferact.ai>
@WoosukKwon

Copy link
Copy Markdown
Collaborator Author

Thanks @zflowai and @DataCraftsmanAU for testing on sm_120 and for the detailed reports. Addressed in 826fd3f:

  1. Architecture gate. _flint_kernels() now returns False unless current_platform.is_device_capability_family(100). The Flint kernels are built and tested only on SM100 (the kernel tests already skip elsewhere), so sm_120 and other GPUs take vLLM's standard layers: Marlin W4A16 NVFP4 for linears and MoE, plus FlashInfer attention with sinks. This matches the patches you both used, and your LiveCodeBench, SWE-bench and needle results on that path are good to see. Keeping the Triton decode GEMVs on sm_120 with a finer gate is a reasonable follow-up; it needs its own accuracy and performance validation, so I'm leaving it out of this PR.
  2. gguf in the image. The vllm-openai Dockerfile now installs gguf>=0.19.0, alongside the other server extras, so the NVFP4 GGUF checkpoint loads out of the box; docker/versions.json is regenerated. Outside Docker, the loader already raises ImportError: ... (pip install 'gguf>=0.19.0').
  3. A .gguf file as --model. maybe_override_with_speculators now returns early for a single local file, since a single file has no speculators config, so --model /path/to/flint-nvfp4.gguf --hf-config-path RecursiveSI/flint --tokenizer RecursiveSI/flint resolves. A regression test is added in tests/transformers_utils/test_speculators_override.py.

Tests:

  • pytest tests/transformers_utils/test_speculators_override.py tests/models/flint/test_gguf_nvfp4.py: 24 passed, 1 skipped.
  • On GB200, the Flint kernels are still selected: NVFP4 forward, decode batch 1 / batch 8 at 100K context = 1.78 / 5.70 ms, unchanged.

WoosukKwon and others added 6 commits October 22, 2026 05:11
The CuTe DSL W4A16 tactic warmup applies to every weight-only NVFP4 model
on SM100, not just Flint, so it is proposed on its own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Woosuk Kwon <woosuk@inferact.ai>
… CI step

- FlintForCausalLM no longer implements MixtureOfExperts; it was only used
  for EPLB, which Flint does not support.
- Drop the unused head_dtype config field.
- Run all Flint tests in the B200 step and remove the CPU step.
- Recipe: drop VLLM_USE_RUST_FRONTEND=0 (the Python frontend is the default).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Woosuk Kwon <woosuk@inferact.ai>
- Reuse cute_primitives.mma in the decode attention kernel.
- combine_splits: num_warps (4 or 8) divides the GQA group, so every
  warp owns a head; drop the always-true guard.
- Single o_proj tail in the attention forward; the cache views are all
  None together, so check layer_slots only.
- RMSNorm: hidden size is always 2048, keep one num_warps.
- test_qkv_fused: m in {1, 2, 5, 8} (m is a runtime value).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Woosuk Kwon <woosuk@inferact.ai>
- Prepare the FlashInfer W4A16 expert layout with vLLM's existing CuTe DSL
  MoE helpers instead of a local copy.
- Drop the unused no-shared-expert paths.
- Merge the router GEMV and fused add+RMSNorm router kernels into one.
- Reuse the experts' router counter for the fused decode block.
- Drop a test covered by test_moe_matches_reference.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Woosuk Kwon <woosuk@inferact.ai>
- Move the NVFP4 row load and the warp/cluster reduction shared by the
  dense and expert GEMVs into cute_primitives.
- Share the expert GEMV compile boilerplate.
- Drop the untuned-shape and beyond-largest-tile GEMV fallbacks, the
  per-launch support check, max_m and the dequantize_rows row offset;
  the dequantize-GEMM threshold is one constant.
- Test the GEMVs on the tuned shapes and token tiles the model uses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Woosuk Kwon <woosuk@inferact.ai>
…v_fused

The BF16 GEMV no longer has an untuned-shape fallback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Woosuk Kwon <woosuk@inferact.ai>
@WoosukKwon

Copy link
Copy Markdown
Collaborator Author

Simplified the Flint code: βˆ’198 lines, now 7,534 added. No change in behavior or speed. Commits 4a1c5980a9..aed08d76a6.

  • GEMV: the row-load and reduction helpers that nvfp4_gemv and moe_gemv both had are now shared in cute_primitives. Removed the GEMV fallbacks for untuned shapes and tiles, which the model never reaches. One dequant-GEMM threshold replaces a per-shape table.
  • MoE:
    • Weight preparation now uses vLLM's FlashInfer CuTe DSL helpers (reorder_w13_to_w31_for_flashinfer_cutedsl, interleave_linear_and_gate, swizzle_blockscale); the prepared tensors are bitwise identical to before.
    • Removed the unreachable no-shared-expert paths.
    • The two router GEMV kernels are now one, with a FUSE_NORM flag.
  • Attention: uses cute_primitives.mma instead of a duplicate wrapper, has one o_proj tail, and drops some always-true guards.
  • Model, CI and recipe:
    • FlintForCausalLM no longer implements MixtureOfExperts; it was used only for EPLB, which Flint doesn't support.
    • Removed the unused head_dtype config field.
    • The Flint tests now run in one B200 step (the CPU step is removed).
    • The recipe no longer sets VLLM_USE_RUST_FRONTEND.
  • Tests: trimmed redundant cases.

Tried and rejected, each measured A/B on GB200:

Change Result
FlashInfer's public launch_w4a16_moe (unfused shared-expert add) NVFP4 decode at batch 8 is 1.7% slower
Drop the Triton NVFP4 GEMV MoE tier at 3–6 tokens Batch 3 is 9% slower and batch 4 7% slower
skinny_gemm for the BF16 dense GEMV BF16 decode at batch 4–16 is 2–6% slower

Validation on aed08d76a6 (one GB200, default settings, both checkpoints from their public HF repo IDs):

Check NVFP4 BF16
GSM8K (1,319) 0.947 0.954
Tool-call suite (19 cases Γ— 10 runs) 10/10 every case 10/10 every case
Forward, decode batch 1 / batch 8 / 8K prefill @ 100K 1.78 / 5.70 / 144.4 ms 2.34 / 6.83 / 145.9 ms
  • pytest tests/models/flint: 165 passed, 1 skipped.
  • The forward times match the earlier run.
  • GSM8K runs at temperature 1.0, so it varies by about Β±0.5 pp between runs; the MoE outputs are bitwise identical before and after the cleanup.

@WoosukKwon WoosukKwon added the ready ONLY add when PR is ready to merge/full CI is needed label Oct 22, 2026
@WoosukKwon

Copy link
Copy Markdown
Collaborator Author

/ci run

@github-actions

Copy link
Copy Markdown

βœ… Triggered Buildkite CI #96687 for commit 02f263ab8880.

cvt.rn.bf16x2.e2m1x2 needs PTX ISA 9.2 (ptxas >= 13.2). Images that run
Triton with an older system ptxas (e.g. CUDA 13.0) fail to assemble the
Triton MoE decode kernels. Use cvt.rn.f16x2.e2m1x2 there; E2M1 * E4M3 is
exact in FP16 too. Newer ptxas keeps the BF16 form, which is faster.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Woosuk Kwon <woosuk@inferact.ai>
@WoosukKwon

Copy link
Copy Markdown
Collaborator Author

CI fix (6d3d1dfd89): the Flint B200 step failed with ptxas error: Unexpected instruction types specified for 'cvt' in the Triton NVFP4 MoE decode kernels.

Cause. cvt.rn.bf16x2.e2m1x2 needs PTX ISA 9.2, which means ptxas 13.2 or newer. The CI image builds Triton from source, and that Triton uses the image's system ptxas from CUDA 13.0. The Triton wheel instead bundles a CUDA 13.3 ptxas-blackwell, which is why the tests passed locally. The CuTe DSL kernels use the same instruction but bring their own ptxas.

Fix. At import, moe.py checks which ptxas Triton will use for Blackwell (get_ptxas(100).version):

  • ptxas 13.2 or newer: the decode keeps the BF16 form, so speed and outputs are unchanged.
  • Older ptxas: it uses cvt.rn.f16x2.e2m1x2 and an FP16 multiply. Every E2M1 Γ— E4M3 product is exact in FP16 too. The exhaustive test_dequant_exact covers whichever form is active.

Validation (one GB200):

  • pytest tests/models/flint: 165 passed, 1 skipped, both with CI's CUDA 13.0 ptxas (TRITON_PTXAS_BLACKWELL_PATH, FP16 path) and with the default ptxas (BF16 path).
  • NVFP4 decode at batch 1/3/4/6, A/B on the same GPU: unchanged (within Β±0.05%).
  • An FP16-only version was 2–3% slower at batch 3–6, because widening FP16 to FP32 costs an instruction per element. That's why the BF16 path stays where ptxas supports it.

The other two failures are unrelated to this PR:

  • test_gptoss_mxfp4mxfp8_moe_flashinfer_cutlass: the server could not start (OSError: [Errno 98] Address already in use).
  • test_w4a16_machete_bfloat16_deterministic: a Machete nondeterminism check, which this PR does not touch.

@WoosukKwon

Copy link
Copy Markdown
Collaborator Author

/ci run

@github-actions

Copy link
Copy Markdown

βœ… Triggered Buildkite CI #96692 for commit 66d98fd4b498.

The model module imported FlashInfer's attention backend and the CuTe DSL
decode-attention kernel at module level, so the registry import test failed
on ROCm, which has neither. Import them where the model is built.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Woosuk Kwon <woosuk@inferact.ai>
@WoosukKwon

Copy link
Copy Markdown
Collaborator Author

AMD CI (fc3b190acf).

  • amd-mi355-basic-models-other: test_registry_imports[FlintForCausalLM] failed with ModuleNotFoundError: No module named 'flashinfer'. The Flint model imported FlashInfer's attention backend and the CuTe DSL decode-attention kernel at module level, and ROCm has neither. Both are now imported where the model is built, and only on the Flint-kernel path for the CuTe DSL kernel. Checked that vllm.models.flint.model imports with flashinfer and cutlass unavailable. On GB200: pytest tests/models/flint gives 165 passed, 1 skipped, and NVFP4 decode is unchanged (batch 1: 1.78 ms, batch 8: 5.71 ms).
  • amd-mi300-push-nixlconnector-pp-prefill-pd-accuracy: unrelated. Worker startup fails in deepseek-vl2-tiny's timm vision tower with RuntimeError: Tensor.item() cannot be called on meta tensors.

@WoosukKwon
WoosukKwon merged commit 899a168 into vllm-project:main Oct 22, 2026
8 of 9 checks passed
@WoosukKwon
WoosukKwon deleted the flint branch October 22, 2026 21:57
github-actions Bot added a commit to vllm-project/recipes that referenced this pull request Oct 23, 2026
vllm-project/vllm@main:recipes 87b804f09d69 β†’ 0bfeb8d0e367 [latest.vllm]
vllm-project/vllm@87b804f...0bfeb8d

Commits:
- vllm-project/vllm@899a1689e2a0 [Model] Add Recursive Flint (vllm-project/vllm#62938)

Recipes:
- RecursiveSI/flint (added): https://recipes.vllm.ai/RecursiveSI/flint

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions Bot added a commit to shantanusharma/recipes that referenced this pull request Oct 23, 2026
…mni@27fd77b48ccd

vllm-project/vllm@main:recipes 47e2b610bea1 β†’ 19c0e170d257 [latest.vllm]
vllm-project/vllm@47e2b61...19c0e17

Commits:
- vllm-project/vllm@544f182d9f0c [Doc] Kimi-K3: document the GB300 disaggregated specialized-decode points in the guide and command builder (vllm-project/vllm#63222)
- vllm-project/vllm@eff8a5689681 [Doc][Recipe] MiniMax-M3.1-Flash: add Hopper FP8 variant, Docker-only install (vllm-project/vllm#63244)
- vllm-project/vllm@d05b1c8305c9 [Doc][Recipe] Add MiniMax-M3.1-Flash recipe (vllm-project/vllm#63236)
- vllm-project/vllm@899a1689e2a0 [Model] Add Recursive Flint (vllm-project/vllm#62938)

Recipes:
- MiniMaxAI/MiniMax-M3.1-Flash (added): https://recipes.vllm.ai/MiniMaxAI/MiniMax-M3.1-Flash
- RecursiveSI/flint (added): https://recipes.vllm.ai/RecursiveSI/flint
- moonshotai/Kimi-K3 (modified): https://recipes.vllm.ai/moonshotai/Kimi-K3

vllm-project/vllm-omni@main:recipes 798fef99a33f β†’ 27fd77b48ccd [latest.vllm-omni]
vllm-project/vllm-omni@798fef9...27fd77b

Commits:
- vllm-project/vllm-omni@88c9ccd7ceb3 [Model] Add JoyAI duplex tool delegation (vllm-project/vllm-omni#9149)

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@justinchiu justinchiu mentioned this pull request Oct 27, 2026
6 tasks done
bantianyue pushed a commit to bantianyue/vllm that referenced this pull request Oct 28, 2026
Signed-off-by: Woosuk Kwon <woosuk@inferact.ai>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
asf0 added a commit to asf0/strix-vllm that referenced this pull request Nov 2, 2026
Flint (vllm-project#62938) ran only on NVIDIA: on ROCm it failed at start-up importing
FlashInfer, and with that bypassed it generated garbage. It also could not
feed a speculative draft.

- model.py: with any backend but FlashInfer, the fused q/k RMSNorm + RoPE
  kernel runs without its FlashInfer-layout cache write and the Attention
  layer writes the cache in the backend's own layout and dtype (int8 KV
  works) and runs attention with the sinks and sliding window. The
  FlashInfer path is unchanged.
- ops/norm.py: _rsqrt was the PTX rsqrt.approx.ftz.f32 by inline assembly,
  which is not an instruction on AMD and corrupted every RMSNorm (the model
  printed "also also also ..."). CUDA keeps it; elsewhere tl.math.rsqrt.
  rms_norm, fused_add_rms_norm and silu_and_mul match a torch reference
  exactly on gfx1151.
- ops/qk_norm_rope.py: heads fastest in the launch grid on ROCm. Tokens
  first, the programs running together read one head's columns of rows
  10 KiB apart, which camp on the same DRAM channels on gfx11 APUs: 5.58 ms
  (30 GB/s) at 8k tokens, 0.85 ms heads first, bit-identical output. CUDA
  keeps its order.
- model.py: FlintModel takes EagleModelMixin and records the residual
  stream after the layers the draft names (DFlash 2: target_layer_ids + 1
  = 6, 16, 27, 37, 47); FlintForCausalLM declares SupportsEagle3, so
  incoai/Flint-DFlash2 runs as a dflash draft. Verify batches go through
  the non-FlashInfer attention with sinks, as plain decode does.

HawkBearPig/flint-FP8-BF16 on gfx1151 with libstrix: greedy output follows
the checkpoint's reference generations (token ids it ships for four
prompts) - three of four in full, the fourth diverging where the model's
top two tokens are 0.08 nats apart.

With the DFlash 2 draft (int8 KV, 8 prompts, greedy, 256 tokens), output
tok/s at 1 request / 8 at once and mean tokens accepted per step:

  no draft   62.2 / 135.8
  2 tokens   69.3 / 138.1 (2.28)
  3 tokens   71.8 / 137.2 (2.67)
  5 tokens   52.0 / 137.0 (3.04)
  7 tokens   54.7 / 125.4 (3.27)

Every configuration matches the no-draft output except at near-ties (largest
baseline top-1/top-2 gap at a divergence 0.63 nats). A longer verify batch
reads more of the 256 experts per step than its extra accepted tokens pay
for. GSM8K (n = 250, greedy, 768 tokens), one request at a time: 196 without
the draft, 200 with 3 draft tokens; 12 / 16 discordant, McNemar p = 0.57.
asf0 added a commit to asf0/strix-vllm that referenced this pull request Nov 18, 2026
Flint (vllm-project#62938) ran only on NVIDIA: on ROCm it failed at start-up importing
FlashInfer, and with that bypassed it generated garbage. It also could not
feed a speculative draft.

- model.py: with any backend but FlashInfer, the fused q/k RMSNorm + RoPE
  kernel runs without its FlashInfer-layout cache write and the Attention
  layer writes the cache in the backend's own layout and dtype (int8 KV
  works) and runs attention with the sinks and sliding window. The
  FlashInfer path is unchanged.
- ops/norm.py: _rsqrt was the PTX rsqrt.approx.ftz.f32 by inline assembly,
  which is not an instruction on AMD and corrupted every RMSNorm (the model
  printed "also also also ..."). CUDA keeps it; elsewhere tl.math.rsqrt.
  rms_norm, fused_add_rms_norm and silu_and_mul match a torch reference
  exactly on gfx1151.
- ops/qk_norm_rope.py: heads fastest in the launch grid on ROCm. Tokens
  first, the programs running together read one head's columns of rows
  10 KiB apart, which camp on the same DRAM channels on gfx11 APUs: 5.58 ms
  (30 GB/s) at 8k tokens, 0.85 ms heads first, bit-identical output. CUDA
  keeps its order.
- model.py: FlintModel takes EagleModelMixin and records the residual
  stream after the layers the draft names (DFlash 2: target_layer_ids + 1
  = 6, 16, 27, 37, 47); FlintForCausalLM declares SupportsEagle3, so
  incoai/Flint-DFlash2 runs as a dflash draft. Verify batches go through
  the non-FlashInfer attention with sinks, as plain decode does.

HawkBearPig/flint-FP8-BF16 on gfx1151 with libstrix: greedy output follows
the checkpoint's reference generations (token ids it ships for four
prompts) - three of four in full, the fourth diverging where the model's
top two tokens are 0.08 nats apart.

With the DFlash 2 draft (int8 KV, 8 prompts, greedy, 256 tokens), output
tok/s at 1 request / 8 at once and mean tokens accepted per step:

  no draft   62.2 / 135.8
  2 tokens   69.3 / 138.1 (2.28)
  3 tokens   71.8 / 137.2 (2.67)
  5 tokens   52.0 / 137.0 (3.04)
  7 tokens   54.7 / 125.4 (3.27)

Every configuration matches the no-draft output except at near-ties (largest
baseline top-1/top-2 gap at a divergence 0.63 nats). A longer verify batch
reads more of the 256 experts per step than its extra accepted tokens pay
for. GSM8K (n = 250, greedy, 768 tokens), one request at a time: 196 without
the draft, 200 with 3 draft tokens; 12 / 16 discordant, McNemar p = 0.57.
asf0 added a commit to asf0/strix-vllm that referenced this pull request Nov 26, 2026
Flint (vllm-project#62938) ran only on NVIDIA: on ROCm it failed at start-up importing
FlashInfer, and with that bypassed it generated garbage. It also could not
feed a speculative draft.

- model.py: with any backend but FlashInfer, the fused q/k RMSNorm + RoPE
  kernel runs without its FlashInfer-layout cache write and the Attention
  layer writes the cache in the backend's own layout and dtype (int8 KV
  works) and runs attention with the sinks and sliding window. The
  FlashInfer path is unchanged.
- ops/norm.py: _rsqrt was the PTX rsqrt.approx.ftz.f32 by inline assembly,
  which is not an instruction on AMD and corrupted every RMSNorm (the model
  printed "also also also ..."). CUDA keeps it; elsewhere tl.math.rsqrt.
  rms_norm, fused_add_rms_norm and silu_and_mul match a torch reference
  exactly on gfx1151.
- ops/qk_norm_rope.py: heads fastest in the launch grid on ROCm. Tokens
  first, the programs running together read one head's columns of rows
  10 KiB apart, which camp on the same DRAM channels on gfx11 APUs: 5.58 ms
  (30 GB/s) at 8k tokens, 0.85 ms heads first, bit-identical output. CUDA
  keeps its order.
- model.py: FlintModel takes EagleModelMixin and records the residual
  stream after the layers the draft names (DFlash 2: target_layer_ids + 1
  = 6, 16, 27, 37, 47); FlintForCausalLM declares SupportsEagle3, so
  incoai/Flint-DFlash2 runs as a dflash draft. Verify batches go through
  the non-FlashInfer attention with sinks, as plain decode does.

HawkBearPig/flint-FP8-BF16 on gfx1151 with libstrix: greedy output follows
the checkpoint's reference generations (token ids it ships for four
prompts) - three of four in full, the fourth diverging where the model's
top two tokens are 0.08 nats apart.

With the DFlash 2 draft (int8 KV, 8 prompts, greedy, 256 tokens), output
tok/s at 1 request / 8 at once and mean tokens accepted per step:

  no draft   62.2 / 135.8
  2 tokens   69.3 / 138.1 (2.28)
  3 tokens   71.8 / 137.2 (2.67)
  5 tokens   52.0 / 137.0 (3.04)
  7 tokens   54.7 / 125.4 (3.27)

Every configuration matches the no-draft output except at near-ties (largest
baseline top-1/top-2 gap at a divergence 0.63 nats). A longer verify batch
reads more of the 256 experts per step than its extra accepted tokens pay
for. GSM8K (n = 250, greedy, 768 tokens), one request at a time: 196 without
the draft, 200 with 3 draft tokens; 12 / 16 discordant, McNemar p = 0.57.
asf0 added a commit to asf0/strix-vllm that referenced this pull request Nov 26, 2026
Flint (vllm-project#62938) ran only on NVIDIA: on ROCm it failed at start-up importing
FlashInfer, and with that bypassed it generated garbage. It also could not
feed a speculative draft.

- model.py: with any backend but FlashInfer, the fused q/k RMSNorm + RoPE
  kernel runs without its FlashInfer-layout cache write and the Attention
  layer writes the cache in the backend's own layout and dtype (int8 KV
  works) and runs attention with the sinks and sliding window. The
  FlashInfer path is unchanged.
- ops/norm.py: _rsqrt was the PTX rsqrt.approx.ftz.f32 by inline assembly,
  which is not an instruction on AMD and corrupted every RMSNorm (the model
  printed "also also also ..."). CUDA keeps it; elsewhere tl.math.rsqrt.
  rms_norm, fused_add_rms_norm and silu_and_mul match a torch reference
  exactly on gfx1151.
- ops/qk_norm_rope.py: heads fastest in the launch grid on ROCm. Tokens
  first, the programs running together read one head's columns of rows
  10 KiB apart, which camp on the same DRAM channels on gfx11 APUs: 5.58 ms
  (30 GB/s) at 8k tokens, 0.85 ms heads first, bit-identical output. CUDA
  keeps its order.
- model.py: FlintModel takes EagleModelMixin and records the residual
  stream after the layers the draft names (DFlash 2: target_layer_ids + 1
  = 6, 16, 27, 37, 47); FlintForCausalLM declares SupportsEagle3, so
  incoai/Flint-DFlash2 runs as a dflash draft. Verify batches go through
  the non-FlashInfer attention with sinks, as plain decode does.

HawkBearPig/flint-FP8-BF16 on gfx1151 with libstrix: greedy output follows
the checkpoint's reference generations (token ids it ships for four
prompts) - three of four in full, the fourth diverging where the model's
top two tokens are 0.08 nats apart.

With the DFlash 2 draft (int8 KV, 8 prompts, greedy, 256 tokens), output
tok/s at 1 request / 8 at once and mean tokens accepted per step:

  no draft   62.2 / 135.8
  2 tokens   69.3 / 138.1 (2.28)
  3 tokens   71.8 / 137.2 (2.67)
  5 tokens   52.0 / 137.0 (3.04)
  7 tokens   54.7 / 125.4 (3.27)

Every configuration matches the no-draft output except at near-ties (largest
baseline top-1/top-2 gap at a divergence 0.63 nats). A longer verify batch
reads more of the 256 experts per step than its extra accepted tokens pay
for. GSM8K (n = 250, greedy, 768 tokens), one request at a time: 196 without
the draft, 200 with 3 draft tokens; 12 / 16 discordant, McNemar p = 0.57.
asf0 added a commit to asf0/strix-vllm that referenced this pull request Nov 27, 2026
Flint (vllm-project#62938) ran only on NVIDIA: on ROCm it failed at start-up importing
FlashInfer, and with that bypassed it generated garbage. It also could not
feed a speculative draft.

- model.py: with any backend but FlashInfer, the fused q/k RMSNorm + RoPE
  kernel runs without its FlashInfer-layout cache write and the Attention
  layer writes the cache in the backend's own layout and dtype (int8 KV
  works) and runs attention with the sinks and sliding window. The
  FlashInfer path is unchanged.
- ops/norm.py: _rsqrt was the PTX rsqrt.approx.ftz.f32 by inline assembly,
  which is not an instruction on AMD and corrupted every RMSNorm (the model
  printed "also also also ..."). CUDA keeps it; elsewhere tl.math.rsqrt.
  rms_norm, fused_add_rms_norm and silu_and_mul match a torch reference
  exactly on gfx1151.
- ops/qk_norm_rope.py: heads fastest in the launch grid on ROCm. Tokens
  first, the programs running together read one head's columns of rows
  10 KiB apart, which camp on the same DRAM channels on gfx11 APUs: 5.58 ms
  (30 GB/s) at 8k tokens, 0.85 ms heads first, bit-identical output. CUDA
  keeps its order.
- model.py: FlintModel takes EagleModelMixin and records the residual
  stream after the layers the draft names (DFlash 2: target_layer_ids + 1
  = 6, 16, 27, 37, 47); FlintForCausalLM declares SupportsEagle3, so
  incoai/Flint-DFlash2 runs as a dflash draft. Verify batches go through
  the non-FlashInfer attention with sinks, as plain decode does.

HawkBearPig/flint-FP8-BF16 on gfx1151 with libstrix: greedy output follows
the checkpoint's reference generations (token ids it ships for four
prompts) - three of four in full, the fourth diverging where the model's
top two tokens are 0.08 nats apart.

With the DFlash 2 draft (int8 KV, 8 prompts, greedy, 256 tokens), output
tok/s at 1 request / 8 at once and mean tokens accepted per step:

  no draft   62.2 / 135.8
  2 tokens   69.3 / 138.1 (2.28)
  3 tokens   71.8 / 137.2 (2.67)
  5 tokens   52.0 / 137.0 (3.04)
  7 tokens   54.7 / 125.4 (3.27)

Every configuration matches the no-draft output except at near-ties (largest
baseline top-1/top-2 gap at a divergence 0.63 nats). A longer verify batch
reads more of the 256 experts per step than its extra accepted tokens pay
for. GSM8K (n = 250, greedy, 768 tokens), one request at a time: 196 without
the draft, 200 with 3 draft tokens; 12 / 16 discordant, McNemar p = 0.57.
asf0 added a commit to asf0/strix-vllm that referenced this pull request Nov 28, 2026
Flint (vllm-project#62938) ran only on NVIDIA: on ROCm it failed at start-up importing
FlashInfer, and with that bypassed it generated garbage. It also could not
feed a speculative draft.

- model.py: with any backend but FlashInfer, the fused q/k RMSNorm + RoPE
  kernel runs without its FlashInfer-layout cache write and the Attention
  layer writes the cache in the backend's own layout and dtype (int8 KV
  works) and runs attention with the sinks and sliding window. The
  FlashInfer path is unchanged.
- ops/norm.py: _rsqrt was the PTX rsqrt.approx.ftz.f32 by inline assembly,
  which is not an instruction on AMD and corrupted every RMSNorm (the model
  printed "also also also ..."). CUDA keeps it; elsewhere tl.math.rsqrt.
  rms_norm, fused_add_rms_norm and silu_and_mul match a torch reference
  exactly on gfx1151.
- ops/qk_norm_rope.py: heads fastest in the launch grid on ROCm. Tokens
  first, the programs running together read one head's columns of rows
  10 KiB apart, which camp on the same DRAM channels on gfx11 APUs: 5.58 ms
  (30 GB/s) at 8k tokens, 0.85 ms heads first, bit-identical output. CUDA
  keeps its order.
- model.py: FlintModel takes EagleModelMixin and records the residual
  stream after the layers the draft names (DFlash 2: target_layer_ids + 1
  = 6, 16, 27, 37, 47); FlintForCausalLM declares SupportsEagle3, so
  incoai/Flint-DFlash2 runs as a dflash draft. Verify batches go through
  the non-FlashInfer attention with sinks, as plain decode does.

HawkBearPig/flint-FP8-BF16 on gfx1151 with libstrix: greedy output follows
the checkpoint's reference generations (token ids it ships for four
prompts) - three of four in full, the fourth diverging where the model's
top two tokens are 0.08 nats apart.

With the DFlash 2 draft (int8 KV, 8 prompts, greedy, 256 tokens), output
tok/s at 1 request / 8 at once and mean tokens accepted per step:

  no draft   62.2 / 135.8
  2 tokens   69.3 / 138.1 (2.28)
  3 tokens   71.8 / 137.2 (2.67)
  5 tokens   52.0 / 137.0 (3.04)
  7 tokens   54.7 / 125.4 (3.27)

Every configuration matches the no-draft output except at near-ties (largest
baseline top-1/top-2 gap at a divergence 0.63 nats). A longer verify batch
reads more of the 256 experts per step than its extra accepted tokens pay
for. GSM8K (n = 250, greedy, 768 tokens), one request at a time: 196 without
the draft, 200 with 3 draft tokens; 12 / 16 discordant, McNemar p = 0.57.
asf0 added a commit to asf0/strix-vllm that referenced this pull request Nov 30, 2026
Flint (vllm-project#62938) ran only on NVIDIA: on ROCm it failed at start-up importing
FlashInfer, and with that bypassed it generated garbage. It also could not
feed a speculative draft.

- model.py: with any backend but FlashInfer, the fused q/k RMSNorm + RoPE
  kernel runs without its FlashInfer-layout cache write and the Attention
  layer writes the cache in the backend's own layout and dtype (int8 KV
  works) and runs attention with the sinks and sliding window. The
  FlashInfer path is unchanged.
- ops/norm.py: _rsqrt was the PTX rsqrt.approx.ftz.f32 by inline assembly,
  which is not an instruction on AMD and corrupted every RMSNorm (the model
  printed "also also also ..."). CUDA keeps it; elsewhere tl.math.rsqrt.
  rms_norm, fused_add_rms_norm and silu_and_mul match a torch reference
  exactly on gfx1151.
- ops/qk_norm_rope.py: heads fastest in the launch grid on ROCm. Tokens
  first, the programs running together read one head's columns of rows
  10 KiB apart, which camp on the same DRAM channels on gfx11 APUs: 5.58 ms
  (30 GB/s) at 8k tokens, 0.85 ms heads first, bit-identical output. CUDA
  keeps its order.
- model.py: FlintModel takes EagleModelMixin and records the residual
  stream after the layers the draft names (DFlash 2: target_layer_ids + 1
  = 6, 16, 27, 37, 47); FlintForCausalLM declares SupportsEagle3, so
  incoai/Flint-DFlash2 runs as a dflash draft. Verify batches go through
  the non-FlashInfer attention with sinks, as plain decode does.

HawkBearPig/flint-FP8-BF16 on gfx1151 with libstrix: greedy output follows
the checkpoint's reference generations (token ids it ships for four
prompts) - three of four in full, the fourth diverging where the model's
top two tokens are 0.08 nats apart.

With the DFlash 2 draft (int8 KV, 8 prompts, greedy, 256 tokens), output
tok/s at 1 request / 8 at once and mean tokens accepted per step:

  no draft   62.2 / 135.8
  2 tokens   69.3 / 138.1 (2.28)
  3 tokens   71.8 / 137.2 (2.67)
  5 tokens   52.0 / 137.0 (3.04)
  7 tokens   54.7 / 125.4 (3.27)

Every configuration matches the no-draft output except at near-ties (largest
baseline top-1/top-2 gap at a divergence 0.63 nats). A longer verify batch
reads more of the 256 experts per step than its extra accepted tokens pay
for. GSM8K (n = 250, greedy, 768 tokens), one request at a time: 196 without
the draft, 200 with 3 draft tokens; 12 / 16 discordant, McNemar p = 0.57.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/build documentation Improvements or additions to documentation new-model Requests to new models ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants