Revert PR 4764 & 4813 related to R1 RoPE (#4959)

This commit is contained in:
Yuhong Guo
2025-04-01 11:56:58 +08:00
committed by GitHub
parent 1c63e79756
commit 87fafa0105
2 changed files with 0 additions and 13 deletions

View File

@@ -89,7 +89,6 @@ jobs:
docker exec ci_sglang pip uninstall sgl-kernel -y || true
docker exec -w /sglang-checkout/sgl-kernel ci_sglang bash -c "rm -f pyproject.toml && mv pyproject_rocm.toml pyproject.toml && python3 setup_rocm.py install"
docker exec ci_sglang pip install -e "python[dev_hip]"
docker exec ci_sglang pip install py-spy || true
docker exec -w / ci_sglang git clone https://github.com/merrymercy/human-eval.git
docker exec -w /human-eval ci_sglang pip install -e .

View File

@@ -651,18 +651,6 @@ class DeepseekScalingRotaryEmbedding(RotaryEmbedding):
query: torch.Tensor,
key: torch.Tensor,
offsets: Optional[torch.Tensor] = None,
) -> Tuple[torch.Tensor, torch.Tensor]:
if _is_cuda_available:
return self.forward_cuda(positions, query, key, offsets)
else:
return self.forward_native(positions, query, key, offsets)
def forward_native(
self,
positions: torch.Tensor,
query: torch.Tensor,
key: torch.Tensor,
offsets: Optional[torch.Tensor] = None,
) -> Tuple[torch.Tensor, torch.Tensor]:
"""PyTorch-native implementation equivalent to forward()."""
query_rot = query[..., : self.rotary_dim]