Skip to content

Commit

Permalink
Finetune support use_fast_layer_norm (#8717)
Browse files Browse the repository at this point in the history
  • Loading branch information
tianhaodongbd authored Jul 8, 2024
1 parent bdd2287 commit e681019
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions llm/run_finetune.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ def main():
)

LlmMetaConfig.set_llm_config(model_config, training_args)
model_config.use_fast_layer_norm = model_args.use_fast_layer_norm

# Config for model using dropout, such as GPT.
if hasattr(model_config, "hidden_dropout_prob"):
Expand Down
4 changes: 4 additions & 0 deletions llm/utils/argument.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ class ModelArgument:
tokenizer_name_or_path: Optional[str] = field(
default=None, metadata={"help": "Pretrained tokenizer name or path if not the same as model_name"}
)
use_fast_layer_norm: bool = field(
default=False,
metadata={"help": "GPT3 model, use fast layernorm"},
)
fuse_attention_qkv: bool = field(
default=None,
metadata={"help": "whether to fuse attention qkv"},
Expand Down

0 comments on commit e681019

Please sign in to comment.