BucketOfFish commited on
Commit
41127ee
1 Parent(s): 2380737

Another small fix

Browse files
Files changed (1) hide show
  1. modeling_phi.py +2 -1
modeling_phi.py CHANGED
@@ -417,7 +417,8 @@ class MHA(nn.Module):
417
  self.rotary_dim = rotary_dim if rotary_dim is not None else getattr(config, "rotary_dim", 0)
418
  if self.rotary_dim > 0:
419
  self.rotary_emb = RotaryEmbedding(
420
- d_rotary=math.ceil((rotary_dim // n_head) / 2), # d_rotary is half of d_head
 
421
  initial_cos_sin_cache_len=config.n_positions,
422
  )
423
 
 
417
  self.rotary_dim = rotary_dim if rotary_dim is not None else getattr(config, "rotary_dim", 0)
418
  if self.rotary_dim > 0:
419
  self.rotary_emb = RotaryEmbedding(
420
+ d_rotary=self.rotary_dim,
421
+ # d_rotary=math.ceil((rotary_dim // n_head) / 2), # d_rotary is half of d_head
422
  initial_cos_sin_cache_len=config.n_positions,
423
  )
424