Skip to content

Commit

Permalink
Merge branch 'main' into newptl_fix_validation_in_spellmapper
Browse files Browse the repository at this point in the history
  • Loading branch information
bene-ges committed Dec 9, 2023
2 parents 15c554c + c6cf276 commit 5e21342
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/nlp_language_modeling/convert_hf_llama_to_nemo.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ def load_config(llama_config):
nemo_config = OmegaConf.load(
os.path.join(os.path.dirname(__file__), '../../examples/nlp/language_modeling/conf/megatron_llama_config.yaml')
).model

if llama_config.get('rope_theta', None):
nemo_config['rotary_base'] = llama_config['rope_theta']
nemo_config.encoder_seq_length = llama_config['max_position_embeddings']
nemo_config.num_layers = int(llama_config['num_hidden_layers'])
nemo_config.hidden_size = llama_config['hidden_size']
Expand Down

0 comments on commit 5e21342

Please sign in to comment.