Update modeling_hf_nomic_bert.py
Browse files
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
|
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,
|