Skip to content

Commit

Permalink
fix qwen derived model check so it doesn't break qwen2
Browse files Browse the repository at this point in the history
  • Loading branch information
winglian committed Jan 22, 2024
1 parent 088fc7f commit aaaa51d
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions src/axolotl/utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,17 +142,12 @@ def normalize_config(cfg):
)

cfg.is_qwen_derived_model = (
(
hasattr(model_config, "model_type")
and model_config.model_type
in [
"qwen",
]
)
or cfg.is_qwen_derived_model
or "qwen" in cfg.base_model.lower()
or (cfg.model_type and "qwen" in cfg.model_type.lower())
)
hasattr(model_config, "model_type")
and model_config.model_type
in [
"qwen",
]
) or cfg.is_qwen_derived_model

if isinstance(cfg.learning_rate, str):
cfg.learning_rate = float(cfg.learning_rate)
Expand Down

0 comments on commit aaaa51d

Please sign in to comment.