fix usp dependency

This commit is contained in:
Artiprocher
2025-03-25 19:26:24 +08:00
parent d0fed6ba72
commit 4e43d4d461
5 changed files with 29 additions and 15 deletions

View File

@@ -90,7 +90,6 @@ def rope_apply(x, freqs, num_heads):
x = rearrange(x, "b s (n d) -> b s n d", n=num_heads)
x_out = torch.view_as_complex(x.to(torch.float64).reshape(
x.shape[0], x.shape[1], x.shape[2], -1, 2))
x_out = torch.view_as_real(x_out * freqs).flatten(2)
return x_out.to(x.dtype)