Skip to content

NVFP4 per-token recipe#2913

Draft
YigongQin wants to merge 9 commits intoNVIDIA:mainfrom
YigongQin:yigongq/pertoken-nvfp4-gemm
Draft

NVFP4 per-token recipe#2913
YigongQin wants to merge 9 commits intoNVIDIA:mainfrom
YigongQin:yigongq/pertoken-nvfp4-gemm

Conversation

@YigongQin
Copy link
Copy Markdown

@YigongQin YigongQin commented Apr 21, 2026

Description

Add NVFP4PerTokenBlockScaling recipe for MoE grouped GEMM forward pass with per-token global scaling.

Install cuDNN Frontend branch (required dependency)

pip install "git+https://github.com/YigongQin/cudnn-frontend.git@yigongq/pertoken-nvfp4-gemm#egg=nvidia-cudnn-frontend[cutedsl]"

If build fails due to multiple Python versions, try:

git clone -b yigongq/pertoken-nvfp4-gemm https://github.com/YigongQin/cudnn-frontend.git
cd cudnn-frontend
CUDAToolkit_ROOT=/path/to/cuda
CUDNN_PATH=$(python -c "import nvidia.cudnn; print(nvidia.cudnn.path[0])")
pip install -v .

Fixes # (issue)

Type of change

  • Documentation change (change only to the documentation, either a fix or a new content)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Infra/Build change
  • Code refactoring

Changes

Checklist:

  • I have read and followed the contributing guidelines
  • The functionality is complete
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Comment thread FLASHINFER_PERTOKEN_NVFP4_ANALYSIS.md Outdated
@@ -0,0 +1,316 @@
# FlashInfer Per-Token NVFP4 Quantization Analysis
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Those md files should not be part of this PR, right?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

yes, I will clean them up, currently there are drafts

@YigongQin YigongQin force-pushed the yigongq/pertoken-nvfp4-gemm branch from 893710f to e38ae1b Compare April 22, 2026 00:20
YigongQin and others added 7 commits April 22, 2026 14:08
Signed-off-by: YigongQin <qqqyyy1233@outlook.com>
Signed-off-by: YigongQin <qqqyyy1233@outlook.com>
Signed-off-by: YigongQin <qqqyyy1233@outlook.com>
Signed-off-by: YigongQin <qqqyyy1233@outlook.com>
for more information, see https://pre-commit.ci

Signed-off-by: YigongQin <qqqyyy1233@outlook.com>
Signed-off-by: YigongQin <qqqyyy1233@outlook.com>
for more information, see https://pre-commit.ci

Signed-off-by: YigongQin <qqqyyy1233@outlook.com>
@YigongQin YigongQin force-pushed the yigongq/pertoken-nvfp4-gemm branch from 8e902dd to 8a3a36d Compare April 22, 2026 21:08
YigongQin and others added 2 commits April 22, 2026 16:18
Signed-off-by: YigongQin <qqqyyy1233@outlook.com>
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