File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1583,6 +1583,7 @@ def prepare_tensors(self):
1583
1583
1584
1584
low_freq_wavelen = old_context_len / low_freq_factor
1585
1585
high_freq_wavelen = old_context_len / high_freq_factor
1586
+ assert low_freq_wavelen != high_freq_wavelen
1586
1587
1587
1588
rope_factors = []
1588
1589
for freq in freqs :
@@ -1592,11 +1593,10 @@ def prepare_tensors(self):
1592
1593
elif wavelen > low_freq_wavelen :
1593
1594
rope_factors .append (factor )
1594
1595
else :
1595
- assert low_freq_wavelen != high_freq_wavelen
1596
1596
smooth = (old_context_len / wavelen - low_freq_factor ) / (high_freq_factor - low_freq_factor )
1597
1597
rope_factors .append (1 / ((1 - smooth ) / factor + smooth ))
1598
1598
1599
- self .gguf_writer .add_tensor (gguf . TENSOR_NAMES [ gguf .MODEL_TENSOR .ROPE_FREQS ] + ".weight" , np .array (rope_factors , dtype = np .float32 ))
1599
+ self .gguf_writer .add_tensor (self . format_tensor_name ( gguf .MODEL_TENSOR .ROPE_FREQS ) , np .array (rope_factors , dtype = np .float32 ))
1600
1600
1601
1601
super ().prepare_tensors ()
1602
1602
You can’t perform that action at this time.
0 commit comments