[mypy][5/N] Support all typing on model executor (#4427)
This commit is contained in:
@@ -431,8 +431,8 @@ class Phi3SuScaledRotaryEmbedding(nn.Module):
|
||||
torch.full_like(positions, k)).long()
|
||||
idx = (torch.add(positions, long_prompt_offset)
|
||||
if long_prompt_offset is not None else positions)
|
||||
self.long_short_cos_sin_cache = self.long_short_cos_sin_cache.to(
|
||||
idx.device)
|
||||
self.long_short_cos_sin_cache: torch.Tensor = (
|
||||
self.long_short_cos_sin_cache.to(idx.device))
|
||||
idx = torch.add(idx, offsets) if offsets is not None else idx
|
||||
cos_sin = torch.index_select(self.long_short_cos_sin_cache, 0, idx)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user