eyad-silx commited on
Commit
ccabd08
·
verified ·
1 Parent(s): 489e7bd

Update modeling_quasar_long.py

Browse files
Files changed (1) hide show
  1. modeling_quasar_long.py +1 -1
modeling_quasar_long.py CHANGED
@@ -391,7 +391,7 @@ class QuasarLongRotaryEmbedding(nn.Module):
391
  cos = cos.to(dtype=x.dtype)
392
  sin = sin.to(dtype=x.dtype)
393
  if _quasar_long_safe_nope_enabled(self.config):
394
- cutoff = int(getattr(self.config, "nope_after_position", 512))
395
  nope_mask = (position_ids >= cutoff).unsqueeze(-1)
396
  if bool(nope_mask.any()):
397
  cos = torch.where(nope_mask, torch.ones_like(cos), cos)
 
391
  cos = cos.to(dtype=x.dtype)
392
  sin = sin.to(dtype=x.dtype)
393
  if _quasar_long_safe_nope_enabled(self.config):
394
+ cutoff = int(getattr(self.config, "nope_after_position", 100485))
395
  nope_mask = (position_ids >= cutoff).unsqueeze(-1)
396
  if bool(nope_mask.any()):
397
  cos = torch.where(nope_mask, torch.ones_like(cos), cos)