Repository navigation
[Feature] Triton INT4 per-token-head KV cache quantization #40835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
tdoublep
merged 72 commits into
vllm-project:main
from
JartX:refactor/prefill-fastpath-per-token-head-v2
Jun 24, 2026
Merged
Changes from 62 commits
Commits
Show all changes
72 commits
Select commit
Hold shift + click to select a range
b8d7e34
precommit
JartX dfe2fa4
remove comment
JartX bd231d0
precommit
JartX dd11029
fix fast path
JartX 141be40
reduce comments
JartX 1efb4ff
fix scheduler
JartX dd0c0cc
fix fast path mistral
JartX ea38cc1
dtype
JartX 86b2d75
add guard
JartX 0450bc0
remove comments
JartX e5d73fc
Merge branch 'main' into refactor/prefill-fastpath-per-token-head
JartX d32d7dc
use FLASH_ATTN if available
JartX 006eee3
added window
JartX 63373bc
precommit
JartX 80fe133
is_flash_attn_varlen_func_available and mixed batch
JartX 1afdbc5
precommit
JartX 6672664
remove FA
JartX 98ce477
Merge branch 'main' into refactor/prefill-fastpath-per-token-head
JartX e89cfda
added mixed
JartX 3d69c3e
add per_token_head_attention kernel
JartX affc8b3
pre-commit
JartX 9425464
missing seq_lens_cpu and query
JartX e7ae0a1
working on kernel
JartX 090a7a8
working on kernel
JartX 1338413
precommit
JartX 7f4e7ec
precommit
JartX 724f341
prefill kernel
JartX 0e283d4
int8 wmma
JartX 55cac18
int8 wmma
JartX 24650f6
remove dead code
JartX 3e2116e
remove comment
JartX 11eed26
remove comment
JartX f8bb990
Merge branch 'main' into refactor/prefill-fastpath-per-token-head
JartX d485ea1
feat: INT4 / INT2 per-token-head KV cache quantization
JartX b3a14c6
refactor(triton_quant_kv): split packed_per_token_head.py
JartX 0c07c67
Merge branch 'main' into refactor/prefill-fastpath-per-token-head
JartX 320602f
Merge refactor/prefill-fastpath-per-token-head into int4-int2 v2 mirror
JartX 81ba439
fix(pth_attn_stage1): use other=0.0 on K/V loads
JartX 8325949
feat(pth_attn): extend decode/prefill kernels to INT4/INT2 packed modes
JartX 39f5ac0
perf(pth_attn): GQA-grouped packed decode kernel for INT4 / INT2
JartX a289666
Merge branch 'main' into refactor/prefill-fastpath-per-token-head-v2
JartX 03f0529
Merge branch 'main' into refactor/prefill-fastpath-per-token-head-v2
JartX 0039fcd
Merge remote-tracking branch 'origin/main' into refactor/prefill-fast…
JartX 27715b1
Merge remote-tracking branch 'origin/main' into refactor/prefill-fast…
JartX 3629cf0
Remove int2_per_token_head KV cache quantization mode
JartX 27a5a1b
Merge branch 'main' into refactor/prefill-fastpath-per-token-head-v2
JartX c838db1
Remove int8 WMMA/MFMA QK fast-path from per-token-head attention
JartX d2a4c37
Address mgoin's review on per-token-head KV cache
JartX 2eff7d8
Merge branch 'main' into refactor/prefill-fastpath-per-token-head-v2
JartX 3e3dcaf
Merge remote-tracking branch 'origin/main' into refactor/prefill-fast…
JartX 75c90b9
Merge branch 'main' into refactor/prefill-fastpath-per-token-head-v2
JartX d934e23
Merge branch 'main' into refactor/prefill-fastpath-per-token-head-v2
JartX a763450
Merge branch 'main' into refactor/prefill-fastpath-per-token-head-v2
JartX 4063939
[Attention] Replace KV-quant factory with explicit dispatch
JartX 0ab5f18
[Attention] Collapse per-token-head forward dispatch
JartX 986cbe7
[Attention] Consolidate INT4 KV-quant package into one module
JartX 158fba6
[Attention] Trim verbose docstrings and stale factory references
JartX 8bace36
[Attention] Fold _hadamard into int4_per_token_head
JartX 4abc52a
[Attention] Route INT8/FP8 per-token-head KV through unified_attention
JartX 184f28c
[Attention] Reuse the core per-token-head reshape kernel for INT8/FP8
JartX b6b0e89
[Attention] Restore the inline per-head scale padding comment
JartX dbb3fc8
Merge branch 'main' into refactor/prefill-fastpath-per-token-head-v2
JartX 6cfb19c
fix: INT8 per-token-head KV cache quantizer rounds to nearest
JartX 1c4c469
Merge branch 'main' into refactor/prefill-fastpath-per-token-head-v2
JartX 6858251
Merge branch 'main' into refactor/prefill-fastpath-per-token-head-v2
JartX 769c279
Address review: minimize per-token-head INT4 diff
JartX 6a5b2ef
Address review: revert device churn in per-token-head kernel tests
JartX c5cbc66
Merge branch 'main' into refactor/prefill-fastpath-per-token-head-v2
mergify[bot] 0e5749e
Fix per-token-head call-site signatures after main merge
JartX e1b12e3
Merge branch 'main' into refactor/prefill-fastpath-per-token-head-v2
JartX df5f0f6
Merge branch 'main' into refactor/prefill-fastpath-per-token-head-v2
JartX 46a7bb5
Merge branch 'main' into refactor/prefill-fastpath-per-token-head-v2
JartX File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How much does this increase the test time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switched int4 to Llama-3.2-1B-Instruct so it doesn't drag in the 8B anymore, now it's just one extra dtype on the existing param.I originally moved it up to keep it in line with int2 (which genuinely fell apart at 1B), but int4 should be fine on the small model. If logprobs end up too tight we'll bump just that case back to 8B