Skip to content

[RFC]: FlashInfer NVFP4 KV serving on pre-SM100 GPUs #47684

Description

@lesj0610

Motivation.

This RFC tracks the work needed to make --kv-cache-dtype nvfp4 usable with FlashInfer on pre-SM100 GPUs, mainly Ampere/Hopper systems.

The practical target is serving large-context Qwen3.6 and Gemma 4 models with FlashInfer-backed NVFP4 KV cache without relying on the Blackwell-only path. This started from trying to serve those models on SM8x hardware, but I have tried to split the work into generic vLLM/FlashInfer pieces instead of model-specific patches.

vLLM already has Triton-based quantized KV cache paths such as TurboQuant 4bit and int4 per-head. The goal here is different: enable the FlashInfer CUDA path to use NVFP4 KV cache on pre-SM100 systems, so users can combine FlashInfer attention/dequantization support with the roughly 3x KV cache capacity benefit of NVFP4.

Proposed Change.

The work is split across several PRs:

PR Scope Status
#46963 Core pre-SM100 NVFP4 KV cache update path through FlashInfer slot-mapping append Ready for review
#46883 Consume FlashInfer workspace sizing in vLLM Ready for review
#47547 Allow Gemma4 to choose FlashInfer when FA4 is unavailable Ready for review
#46558 FlashInfer MM-prefix attention support Draft / included for dependency context
#47637 Qwen3-VL shape-specialized pos-embed JIT fix Draft / separate follow-up

Some PRs are still draft because I am trying not to add more ready-for-review PRs before the core pieces are triaged. They are included here for context and dependency tracking, not as a request to review everything at once.

The FlashInfer side has been split separately:

My current understanding of the review order is:

  1. [Core] Use FlashInfer workspace sizing helper #46883, because it wires FlashInfer workspace sizing into vLLM.
  2. [Core] Use FlashInfer for pre-SM100 NVFP4 KV cache updates #46963, because it is the core pre-SM100 NVFP4 KV cache update path and depends mainly on the FlashInfer slot-mapping append API.
  3. [Model] Allow Gemma4 to use FlashInfer when FA4 is unavailable #47547, so Gemma4 can actually select FlashInfer when FA4 is unavailable.
  4. [Bugfix][Attention] Enable FlashInfer mm-prefix attention #46558 and [Bugfix] Avoid shape-specialized Qwen3-VL pos-embed JIT #47637 as follow-up/context PRs, not blockers for the core path.

I would like feedback on whether this split and review order makes sense, and whether any scope or test coverage should be adjusted before deeper review.

Feedback Period.

At least one week, or until the relevant maintainers have had a chance to comment on the preferred review order and ownership.

CC List.

No response

Any Other Things.

The main local validation target is RTX 3090 / SM86. I have been testing the path with Qwen3.6 and Gemma 4 style workloads using --kv-cache-dtype nvfp4. The detailed capacity, MRCR, and serving benchmark tables are in #46963.

I do not have H100/Hopper hardware locally, so the Hopper side is not hardware-verified by me yet. The intent is still generic pre-SM100 support, not an SM86-only path.

This is also not meant to replace the existing Triton-based quantized KV cache options. The changes are intended to keep the generic vLLM behavior intact while allowing FlashInfer-backed NVFP4 KV cache updates on pre-SM100 systems.

If the design, scope, or tests should be changed before review, I can update the PRs.

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions