Fill-Mask
Transformers
PyTorch
Safetensors
English
nomic_bert
custom_code
zpn commited on
Commit
f3ce33a
1 Parent(s): fcebeef

Update modeling_hf_nomic_bert.py

Browse files
Files changed (1) hide show
  1. modeling_hf_nomic_bert.py +2 -0
modeling_hf_nomic_bert.py CHANGED
@@ -323,6 +323,8 @@ class NomicBertPreTrainedModel(PreTrainedModel):
323
  rotary_scaling_factor = kwargs.pop("rotary_scaling_factor", None)
324
  if rotary_scaling_factor:
325
  config.rotary_scaling_factor = rotary_scaling_factor
 
 
326
  if config.n_positions <= 0 and config.rotary_emb_fraction > 0:
327
  config.n_positions = 2048
328
  if num_labels:
 
323
  rotary_scaling_factor = kwargs.pop("rotary_scaling_factor", None)
324
  if rotary_scaling_factor:
325
  config.rotary_scaling_factor = rotary_scaling_factor
326
+ else:
327
+ config.rotary_scaling_factor = None
328
  if config.n_positions <= 0 and config.rotary_emb_fraction > 0:
329
  config.n_positions = 2048
330
  if num_labels: