---
id: pr-sglang-19122
repo: sgl-project/sglang
pr: 19122
title: '[3/n] deepseek_v2.py Refactor: Migrate MLA forward method in deepseek_v2.py'
author: Fridge003
date: '2026-02-27'
url: https://github.com/sgl-project/sglang/pull/19122
source_category: upstream-code
architectures:
- sm100
tags: []
techniques: []
hardware_features: []
kernel_types: []
languages: []
captured_at: '2026-05-16'
status: merged
merge_sha: 776709efe89390599302a244f6ab1626f02ba9ff
inclusion_reason: defer
changed_paths:
- python/sglang/srt/models/deepseek_common/attention_backend_handler.py
- python/sglang/srt/models/deepseek_common/attention_forward_methods/__init__.py
- python/sglang/srt/models/deepseek_common/attention_forward_methods/forward_methods.py
- python/sglang/srt/models/deepseek_common/attention_forward_methods/forward_mla.py
- python/sglang/srt/models/deepseek_common/attention_forward_methods/forward_mla_fused_rope_cpu.py
- python/sglang/srt/models/deepseek_common/attention_forward_methods/forward_mla_fused_rope_rocm.py
- python/sglang/srt/models/deepseek_v2.py
- test/srt/cpu/test_qkv_proj_with_rope.py
- test/srt/cpu/test_rope.py
artifact_dir: evidence/pull-bundles/sglang/gh-19122
head_ref_oid: e0ad07d5d8ea33aab6e2119fe38889578cf0f6b7
---
# [3/n] deepseek_v2.py Refactor: Migrate MLA forward method in deepseek_v2.py

- Repository: `sgl-project/sglang`
- PR: [19122](https://github.com/sgl-project/sglang/pull/19122)
- Decision: `defer`
- Reason: defer

## Changed Paths

- `python/sglang/srt/models/deepseek_common/attention_backend_handler.py`
- `python/sglang/srt/models/deepseek_common/attention_forward_methods/__init__.py`
- `python/sglang/srt/models/deepseek_common/attention_forward_methods/forward_methods.py`
- `python/sglang/srt/models/deepseek_common/attention_forward_methods/forward_mla.py`
- `python/sglang/srt/models/deepseek_common/attention_forward_methods/forward_mla_fused_rope_cpu.py`
- `python/sglang/srt/models/deepseek_common/attention_forward_methods/forward_mla_fused_rope_rocm.py`
- `python/sglang/srt/models/deepseek_v2.py`
- `test/srt/cpu/test_qkv_proj_with_rope.py`
- `test/srt/cpu/test_rope.py`

## Evidence Bundle

`evidence/pull-bundles/sglang/gh-19122`
