Skip to content

Commit

Permalink
more flexible OpenLM model config input
Browse files Browse the repository at this point in the history
  • Loading branch information
jmercat committed Jul 24, 2024
1 parent 1d6efab commit 97cd5d4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions open_lm/utils/transformers/hf_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ def __init__(self, config):
# This has to be done before init as it sets makes sure hf config is correct
if hasattr(config, "params"):
params = config.params
elif hasattr(config, "model"):
params = create_params(config)
else:
params = create_params(Namespace(**config.params_args_dict))
config.set_params(params)
Expand Down

0 comments on commit 97cd5d4

Please sign in to comment.