Skip to content

[II] Bound DeepSeek V4 sparse metadata to active context - #289

Closed
voipmonitor wants to merge 1 commit into
local-inference-lab:dev/infernal-invocationfrom
voipmonitor:agent/ii-dsv4-active-sparse-width
Closed

[II] Bound DeepSeek V4 sparse metadata to active context#289
voipmonitor wants to merge 1 commit into
local-inference-lab:dev/infernal-invocationfrom
voipmonitor:agent/ii-dsv4-active-sparse-width

Conversation

@voipmonitor

Copy link
Copy Markdown

Resulting behavior

DeepSeek V4 C128 sparse-attention metadata uses the number of complete compression records reachable by the active sequence length. The width remains power-of-two padded, has a 128-entry minimum, and cannot exceed the preallocated model-length capacity.

Technical reason

A partial 128-token compression group does not produce a selectable record. Deriving metadata width from a rounded sequence quotient can activate an extra index region that has no complete source record.

Compatibility

Buffer allocation remains sized from max_model_len. The change only narrows the active region used by a scheduler step; the alignment and capacity contracts are preserved.

Validation

  • Active-width boundary and capacity tests: passed.
  • Sparse metadata builder tests: passed.
  • Ruff check and format check: passed.
  • Integrated DS4F TP4/DCP1 qualification: C1 220.36 tok/s, C8 781.00 tok/s, 64k prefill 15,014 tok/s.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@voipmonitor, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 45 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9d9ee11c-0871-44be-8e9d-ffce13a6cbb1

📥 Commits

Reviewing files that changed from the base of the PR and between c8d04a5 and 91fd9f8.

📒 Files selected for processing (3)
  • tests/v1/attention/test_deepseek_v4_sparse_mla_metadata.py
  • vllm/models/deepseek_v4/sparse_mla.py
  • vllm/v1/attention/backends/mla/compressor_utils.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@voipmonitor

Copy link
Copy Markdown
Author

Superseded by #430 and the upstream capture-stability fix vllm-project/vllm#51318.

This pull request keeps a batch-dependent packed C128A row width. FULL CUDA graphs capture sparse-attention consumers with the preallocated capacity stride, so rows after row zero can be read from stale offsets when runtime context length changes. Pull request #430 restores a capacity-stable row layout while preserving the Infernal Invocation DCP mapping and includes CPU and SM120 CUDA regression coverage.

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.

1 participant