fix: tiny fix cli (#12744)

This commit is contained in:
Mick
2025-11-06 14:45:50 +08:00
committed by GitHub
parent 837b08eb2e
commit 73e9a2ef5c
8 changed files with 206 additions and 158 deletions

View File

@@ -777,6 +777,13 @@ class ServerArgs:
)
self.sp_degree = self.ulysses_degree = self.ring_degree = 1
if (
self.ring_degree is not None
and self.ring_degree > 1
and self.attention_backend != "fa3"
):
raise ValueError("Ring Attention is only supported for fa3 backend for now")
if self.sp_degree == -1:
# assume we leave all remaining gpus to sp
num_gpus_per_group = self.dp_size * self.tp_size