diff --git a/unsloth/models/loader.py b/unsloth/models/loader.py index e3fab290a0..d7eeb05aa2 100644 --- a/unsloth/models/loader.py +++ b/unsloth/models/loader.py @@ -488,7 +488,9 @@ class FastModel(FastBaseModel): old_model_name = model_name if not use_exact_model_name: + print("#", model_name, load_in_4bit) model_name = get_model_name(model_name, load_in_4bit) + print("#", model_name, load_in_4bit) # Check versions LATEST = '\nPlease use transformers via `pip install --no-deps git+https://github.com/huggingface/transformers.git`' diff --git a/unsloth/models/vision.py b/unsloth/models/vision.py index 5a990566a7..8799e01522 100644 --- a/unsloth/models/vision.py +++ b/unsloth/models/vision.py @@ -213,7 +213,7 @@ class FastBaseModel: logger.warning_once("Device does not support bfloat16. Will change to float16.") dtype = torch.float16 - assert(dtype == torch.float16 or dtype == torch.bfloat16 or dtype == torch.float32) + assert(dtype in (torch.float16, torch.bfloat16, torch.float32)) global FORCE_FLOAT32 os.environ["UNSLOTH_FORCE_FLOAT32"] = "0"