Skip to content

Commit

Permalink
Add support for NTK-by-Part Rotary Embedding & set correct rotary bas…
Browse files Browse the repository at this point in the history
…e for Llama-3.1 series
  • Loading branch information
Hzfinfdu committed Oct 25, 2024
1 parent 172cc2a commit a1feb3f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion transformer_lens/loading_from_pretrained.py
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,8 @@ def convert_hf_model_config(model_name: str, **kwargs):
"rotary_dim": 128,
"final_rms": True,
"gated_mlp": True,
"use_NTK_by_parts_rope": False,
"rotary_base": 500000.0,
"use_NTK_by_parts_rope": True,
"NTK_by_parts_low_freq_factor": 1.0,
"NTK_by_parts_high_freq_factor": 4.0,
"NTK_by_parts_factor": 8.0,
Expand Down

0 comments on commit a1feb3f

Please sign in to comment.