Skip to content

[Refactor] Clarify DeepSeek V4 metadata names for V4.1 - #38947

Merged
hnyls2002 merged 4 commits into
mainfrom
codex/dsv4-swa-metadata-name
Sep 10, 2026
Merged

hnyls2002 merged 4 commits into
mainfrom
codex/dsv4-swa-metadata-name

Conversation

@hnyls2002

@hnyls2002 hnyls2002 commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator
  • Clarify ratio-specific names before DeepSeek V4.1 ([Model] Add DeepSeek V4.1 support #38798): SWA uses c0_flashmla_metadata and c0_cnt; paged indexer metadata uses compressed_seq_lens, compressed_page_size, and max_compressed_seq_len.
  • Rename the request-state buffer accessor to get_request_state_buf_infos and the Python enum member to StateType.DSV4_REQUEST_STATE, preserving its "c128_state" wire value. Keep C128-specific index calculations and HiCache pool identifiers unchanged.
  • Update all affected CUDA/HIP, PD transport, and test references. Existing compression formulas, memory layouts, transfer indices, and graph replay behavior are unchanged.
  • Simplify related metadata and PD state comments while preserving layout and replay contracts.
  • Validation passed: pre-commit, refactor equivalence checks, and the DSV4 indexer, disaggregation wire, and attention tests.

CI States

Latest PR Test (Base): 🚫 Run #34537091029
Latest PR Test (Extra): ❌ Run #34537090862
Latest PR Test (AMD ROCm 10): ❌ Run #34537090927

@hnyls2002 hnyls2002 changed the title [Refactor] Rename DSV4 SWA metadata to c0_flashmla_metadata [Refactor] Clarify DeepSeek V4 metadata names for V4.1 Sep 10, 2026
@hnyls2002
hnyls2002 merged commit dc5f59c into main Sep 10, 2026
98 of 141 checks passed
@hnyls2002
hnyls2002 deleted the codex/dsv4-swa-metadata-name branch September 10, 2026 22:42
amd-danli103 added a commit to amd-danli103/sglang that referenced this pull request Sep 11, 2026
Three textual conflicts:

- deepseek_v4_backend_hip_radix.py: upstream (sgl-project#38947) replaced the
  get_swa_out_cache_loc / get_unified_swa_loc docstrings with one-line
  comments. This branch had only reworded them, so upstream wins and the
  reword leaves the diff.
- deepseek_v4_memory_pool.py: same PR renamed get_c128_state_buf_infos to
  get_request_state_buf_infos, which this branch had appended
  get_swa_state_coupling_infos in front of. Both kept, new name taken; the
  two call sites merged clean on upstream's side.
- swa_component.py: upstream commented the host_lru lookup in
  redistribute_on_node_split, which this branch had hoisted above the
  strict ring-page split. Nothing used it in between, so the hoist goes and
  upstream's placement stands.
mqhc2020 pushed a commit to mqhc2020/sglang that referenced this pull request Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant