Skip to content

Commit

Permalink
unsloth logs
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishekkrthakur committed Jun 13, 2024
1 parent 90ee73d commit 49a1285
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/autotrain/trainers/clm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,7 @@ def get_model(config, tokenizer):
)
model_type = model_config.model_type
unsloth_target_modules = None
logger.info(f"Unsloth available: {is_unsloth_available()}")
can_use_unloth = config.unsloth and is_unsloth_available() and config.trainer in ("default", "sft")
if model_type in ("llama", "mistral", "gemma", "qwen2"):
if config.target_modules.strip().lower() == "all-linear":
Expand All @@ -575,7 +576,7 @@ def get_model(config, tokenizer):
unsloth_target_modules = get_target_modules(config)
else:
can_use_unloth = False

logger.info(f"Can use unsloth: {can_use_unloth}")
if can_use_unloth:
from unsloth import FastLanguageModel

Expand Down

0 comments on commit 49a1285

Please sign in to comment.