Skip to content

Commit

Permalink
qwen2vl get text config
Browse files Browse the repository at this point in the history
  • Loading branch information
bursteratom committed Dec 23, 2024
1 parent 6dc8820 commit f9a4bb8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/axolotl/utils/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ def get_module_class_from_name(module, name):

def check_model_config(cfg: DictDefault, model_config: Union[AutoConfig, DictDefault]):
if cfg.is_multimodal:
model_config = model_config.text_config
if hasattr(model_config, "text_config"):
model_config = model_config.text_config
elif hasattr(model_config, "get_text_config"):
model_config = model_config.get_text_config()

quant_config_exists = (
hasattr(model_config, "quantization_config")
Expand Down

0 comments on commit f9a4bb8

Please sign in to comment.