Conversation
Co-authored-by: OpenAI Codex <codex@openai.com> Signed-off-by: Jonguk Cheong <jdal3031@snu.ac.kr>
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
Signed-off-by: Jonguk Cheong <jdal3031@snu.ac.kr>
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
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.
Purpose
Model Runner V2 currently applies DCP scaling when sizing every KV cache group's block table. This is correct for attention KV, which is sharded across DCP ranks, but Mamba state is replicated and retains its original block size.
With
max_model_len=512,block_size=16, and DCP=2, the worker allocates 16 Mamba entries while the scheduler can allocate 32. A valid 257-token request receives 17 Mamba blocks, writes its last block ID into the adjacent row, and then triggers a CUDA device-side assertion when Mamba selects column 16 from the 16-column row.Apply DCP scaling only to
AttentionSpec. Also reject staged block table writes that exceed the destination row before launching the fused writer.Test Plan
The PoC uses the real
KVCacheManagerallocation, fused GPU block table writer, block table gather, and Mamba state-index selection. It requires one CUDA GPU; the full DCP deployment requires at least two GPUs.PoC Script
Test Result
Before the fix:
With the corrected capacity:
On the patched branch, deliberately retaining the undersized 16-entry row instead raises
RuntimeError: Block table write for request 0, group 1 exceeds row capacity (17 > 16)before launching the GPU write. Existing GPU block table tests pass (2 passed).AI Assistance
OpenAI Codex was used to assist with investigation, implementation, testing, and PR preparation. The human submitter reviewed the changes and must be prepared to explain and defend them end-to-end.
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.