diff --git a/unsloth/models/loader.py b/unsloth/models/loader.py index 951fe6d228..9b7b1b02c5 100644 --- a/unsloth/models/loader.py +++ b/unsloth/models/loader.py @@ -1412,6 +1412,7 @@ class FastModel(FastBaseModel): if auto_model is None: if _num_labels is not None: from transformers import AutoModelForSequenceClassification + auto_model = AutoModelForSequenceClassification elif is_vlm: # Check if the model's auto_map supports the VLM auto class.