Repository navigation
feat(vllm): support per-token-head FP8 KV cache - #5028
Merged
Merged
Conversation
Contributor
Author
|
/ok to test 63133b0 |
guyueh1
reviewed
Nov 2, 2026
guyueh1
left a comment
Contributor
There was a problem hiding this comment.
Three suggestions on configuration, backend selection, and functional coverage.
Contributor
|
/ok to test 9ddf59a |
guyueh1
previously approved these changes
Nov 3, 2026
Contributor
Author
|
/ok to test e564cf4 |
guyueh1
previously approved these changes
Nov 3, 2026
rybakov
force-pushed
the
orybakov/fp8-per-token-head
branch
from
November 3, 2026 21:55
e564cf4 to
248629d
Compare
Signed-off-by: Oleg Rybakov <[email protected]>
Signed-off-by: Oleg Rybakov <[email protected]>
Signed-off-by: Oleg Rybakov <[email protected]>
Signed-off-by: Oleg Rybakov <[email protected]>
rybakov
force-pushed
the
orybakov/fp8-per-token-head
branch
from
November 4, 2026 01:44
248629d to
6c85d84
Compare
Signed-off-by: Oleg Rybakov <[email protected]>
Contributor
Author
|
/ok to test 1543159 |
yuki-97
reviewed
Nov 4, 2026
yuki-97
left a comment
Contributor
There was a problem hiding this comment.
Thanks for adding dynamic per-token-head FP8 KV-cache storage for vLLM rollouts.
The reported GB200 validation with Megatron TP sizes 1 and 2 makes the exercised refit and generation cases clear.
Scope: Configuration, cache-scale handling, documentation and integration coverage in #5028, at 1543159
Checked:
- Dynamic cache scales — the static scale patch and synchronization paths exclude the new format (
fp8.py:249). - Configuration validation — incompatible precision, ModelOpt
real_quantand explicitly incompatible attention backends fail early (config.py:283–299). - Integration coverage — the new cases require eight generated tokens and finite log probabilities (
test_vllm_generation.py:4444–4454).
Remaining comments are on:
- GB200 regression coverage with a recipe, metric checks and suite registration.
CI: Let's use CI:Lfast by default since it includes the end-to-end generation/refit test.
Generated by Codex
guyueh1
previously approved these changes
Nov 4, 2026
Signed-off-by: Oleg Rybakov <[email protected]>
Contributor
|
/ok to test 6a655ae |
guyueh1
approved these changes
Nov 4, 2026
yuki-97
approved these changes
Nov 5, 2026
yuki-97
enabled auto-merge (squash)
November 5, 2026 02:35
isomap
added a commit
to isomap/RL
that referenced
this pull request
Nov 5, 2026
Conflicts: - grpo.py: keep _validate_val_sampling and accept trtllm as main (NVIDIA-NeMo#4123) does. The TRT-LLM server picks the train or validation profile by temperature/top_p like the vLLM one, so the val_top_k rule applies to both; main's "val_top_k is not supported" check is dropped. - loss_input.py: keep the replay/non-replay split; pass main's (NVIDIA-NeMo#4973) reuse_logits_storage on the non-replay logprob call. - vllm/config.py: keep resolve_vllm_logprobs_mode and main's resolve_vllm_kv_cache_dtype (NVIDIA-NeMo#5028). - test_model_utils.py: keep both sides' new tests. - interfaces.py comment and test_setup_accepts_val_sampling_on_gym_path updated to the val_top_k rule. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Hayate Iso <[email protected]>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this PR do?
Add dynamic FP8 KV-cache storage for vLLM rollouts through
policy.generation.vllm_cfg.kv_cache_dtype=fp8_per_token_head. K and V receive independent scales per token and KV head at cache-write time; static policy KV-scale synchronization is skipped during refit.Require FP8 precision and a vLLM build supporting this cache dtype, and reject ModelOpt
real_quant. Raise an error for explicitly incompatible attention backends, includingattention_config.backend. Preserve user backend settings; when none is specified, let vLLM select or reject the backend.Usage
This configures rollout storage only. It does not change policy training attention or Mamba state caches.
Validation
Tested the updated source under
/lustre/fsw/portfolios/llmservice/users/orybakov/941/fp8-per-token-head-reviewon OCI with PyTorch 2.13.0+cu130 and vLLM 0.29.0.test_vllm_config.py,test_vllm_fp8_quantization.py,test_vllm_backend.py): 324 passed, Slurm job8559254.test_vllm_generation_with_megatron_trainingwithkv_cache_dtype=fp8_per_token_headfor Megatron tensor parallel sizes 1 and 2. The new cases explicitly select Triton, refit from Megatron, train, and check eight-token generation plus finite log probabilities before and after training.8562451on OCI GB200. UsesQwen/Qwen2.5-0.5Bwith Megatron tensor parallel sizes 1 and 2.git diff --checkpass.Pre checks