polish code

This commit is contained in:
feifeibear
2025-03-17 09:04:51 +00:00
parent 1e58e6ef82
commit d8b250607a
2 changed files with 13 additions and 11 deletions

View File

@@ -91,7 +91,6 @@ def rope_apply(x, freqs, num_heads):
x_out = torch.view_as_complex(x.to(torch.float64).reshape(
x.shape[0], x.shape[1], x.shape[2], -1, 2))
print(f"x_out.shape: {x_out.shape}, freqs.shape: {freqs.shape}")
x_out = torch.view_as_real(x_out * freqs).flatten(2)
return x_out.to(x.dtype)