Fill-Mask
Transformers
PyTorch
Safetensors
English
nomic_bert
custom_code
zpn commited on
Commit
f173057
1 Parent(s): 47fb1ce

Update modeling_hf_nomic_bert.py

Browse files
Files changed (1) hide show
  1. modeling_hf_nomic_bert.py +1 -1
modeling_hf_nomic_bert.py CHANGED
@@ -732,7 +732,7 @@ class NomicBertAttention(nn.Module):
732
 
733
  self.rotary_emb_dim = self.head_dim * config.rotary_emb_fraction
734
  if self.rotary_emb_dim > 0:
735
- if config.rotary_scaling_factor:
736
  self.rotary_emb = NomicBertDynamicNTKRotaryEmbedding(
737
  dim=self.rotary_emb_dim,
738
  base=config.rotary_emb_base,
 
732
 
733
  self.rotary_emb_dim = self.head_dim * config.rotary_emb_fraction
734
  if self.rotary_emb_dim > 0:
735
+ if getattr(config, "rotary_scaling_factor", None):
736
  self.rotary_emb = NomicBertDynamicNTKRotaryEmbedding(
737
  dim=self.rotary_emb_dim,
738
  base=config.rotary_emb_base,