[sgl atom] Enable pcp in sglang atom in glm5.2#1680
Conversation
🏷️ CI GuideRuns automatically on every eligible PR before approval:
Heavy model tests:
|
| hidden_states.shape[1] == self.experts.hidden_size | ||
| ), f"Hidden states dimension {hidden_states.shape[1]} does not match expected {self.experts.hidden_size}" | ||
|
|
||
| if self._pcp_moe_merge_active(): |
There was a problem hiding this comment.
Maybe ATOM GLM5.2 need PCP all-gather?
faa2420 to
b77c59b
Compare
| @@ -40,6 +40,8 @@ class PluginConfig: | |||
| sglang_aiter_rank_id: int = 0 | |||
| sglang_dist_init_addr: Optional[str] = None | |||
| ) | ||
|
|
||
| pcp_size = get_pcp_world_size() | ||
| except Exception: |
| ) | ||
|
|
||
| pcp_size = get_pcp_world_size() | ||
| except Exception: |
| def _build_sparse_req_id_per_token_for_sglang( | ||
| forward_batch, | ||
| device: torch.device, | ||
| num_tokens: Optional[int] = None, |
| pcp_pad_len, | ||
| pcp_round_robin_query_indices, | ||
| ) | ||
| except Exception: |
There was a problem hiding this comment.
Import block is un-sorted or un-formatted
ATOM/atom/models/deepseek_v2.py
Lines 26 to 114 in b77c59b
There was a problem hiding this comment.
Import block is un-sorted or un-formatted
ATOM/atom/plugin/sglang/models/deepseek_mla_attention.py
Lines 186 to 194 in b77c59b
Route PCP MoE merge through an opaque custom op so dummy warmup cannot bake away runtime prefill and decode collectives.
| @@ -94,11 +94,14 @@ | |||
| # `_use_dual_stream` is True so torch.compile/Dynamo treats stream code as opaque. | |||
| from atom.model_ops import module_dispatch_ops as _module_dispatch_ops # noqa: F401 | |||
| if context is None or bool(getattr(context, "is_dummy_run", False)): | ||
| return False | ||
| return True |
There was a problem hiding this comment.
Motivation
Enable sgl atom pcp in glm5.2.Also can run in model based on deepseekv2 attention backend like deepseekv3.2.
Command
GLM5.2:
Acc
glm:
Performance
glm:
TP4:
PCP4 TP1: