Skip to content

Commit

Permalink
Add openai-gelu in gated activation (NVIDIA#11293)
Browse files Browse the repository at this point in the history
  • Loading branch information
meatybobby authored Nov 15, 2024
1 parent ed244d9 commit 9c2ed1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nemo/export/trt_llm/converter/model_to_trt_llm_ckpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def convert_model_to_trt_llm_ckpt(
or nemo_model_config.get("layernorm_zero_centered_gamma", False),
"tp_size": training_tp_size,
"split_gated_activation": nemo_model_config.get("activation", "gelu")
in ["swiglu", "geglu", "fast-swiglu", "fast-geglu"]
in ["swiglu", "geglu", "fast-swiglu", "fast-geglu", "openai-gelu"]
and (decoder_type == "gptnext" or is_mcore),
"num_attention_heads": num_attention_heads,
"num_kv_heads": num_kv_heads,
Expand Down Expand Up @@ -336,7 +336,7 @@ def dist_model_to_trt_llm_ckpt(
"apply_layernorm_1p": nemo_model_config.get("normalization", "") == "layernorm1p",
"tp_size": tp_size,
"split_gated_activation": nemo_model_config.get("activation", "gelu")
in ["swiglu", "geglu", "fast-swiglu", "fast-geglu"],
in ["swiglu", "geglu", "fast-swiglu", "fast-geglu", "openai-gelu"],
"num_attention_heads": nemo_model_config["num_attention_heads"],
"num_kv_heads": nemo_model_config.get('num_query_groups', nemo_model_config['num_attention_heads']),
"convert_on_device": True,
Expand Down

0 comments on commit 9c2ed1e

Please sign in to comment.