Repository navigation
Description
Describe the bug
When fine-tuning Llama 3.1, FastLanguageModel.from_pretrained() does not download the model I really want to fine-tune. Instead, it downloads a model from an Unsloth collection and makes no mention this is actually happening.
In addition, the Unsloth model actually downloaded has the name converted to lower case for no good reason, which bypasses my pre-caching of the HF hub. This is a long wait if your Internet connection is not that good.
-
Environment Setup:
- OS: Ubuntu 24.04
- Python Version: 3.12.3
- Frameworks/Libraries: https://gist.github.com/FlorinAndrei/7859b1f7b962ffb521b687da7317a2e7
colab/ script - was this run incolabor as a script? Jupyter notebook on my PC
-
Dataset Details:
- Dataset Name: personal collection of data, not for public sharing
- Data Preprocessing Steps: applied Alpaca prompt, removed some columns
-
Model Details:
- Model ID:
meta-llama/Meta-Llama-3.1-8B-Instruct - Model Configuration: see Colab link
- Model ID:
-
Training Configuration:
-
Reproduction Steps:
- Minimal script to reproduce error: https://colab.research.google.com/drive/12TChzgpHtofvu6JF8dmvL6QgFe7n6tol?usp=sharing
- I cannot share the dataset, but replace it with Alpaca and it should be the same (the issue is not about the dataset)
-
Expected Behavior:
The code should download and fine-tune the modelmeta-llama/Meta-Llama-3.1-8B-Instructwhich is specifically indicated at the top. -
Actual Behavior:
Instead, the code downloads and usesmodels--unsloth--meta-llama-3.1-8b-instruct-unsloth-bnb-4bit, which is not the model I've expressly indicated. Worse, it makes no mention that the model was swapped behind my back.
On top of all that, I cannot find a model with this exact spelling on Hugging Face. Instead, I was able to find models--unsloth--Meta-Llama-3.1-8B-Instruct-unsloth-bnb-4bit which seems identical (same file sizes) but some initials are capitalized. I had this model pre-cached to save time, but Unsloth ignored it, and downloaded the same thing, and arbitrarily changed the spelling of the name.
In other words:
- it does not download the model I've requested
- it downloads a different model, and makes no mention that this is happening
- the model being downloaded has the spelling of the name changed for no good reason
- Additional notes:
Guys, I like Unsloth, but it's stuff like this that makes people lose their trust in your code.
Please make sure your code has a deterministic behavior. Please avoid making sneaky changes, without informing the user that you're doing that.
Activity
shimmyshimmer commentedon Apr 26, 2025
You did load_in_4bit=True which means you're doing qlora 4bit finetuning and so it will use the 4bit model.
Also, the reason why we do not directly download from Meta was purposely done because they require your information and request of access aka a HF token. If we enabled you to download Meta's actual model, it would just fail as it restricted. This was not 'sneaky' and it does download the model you designated because you wanted to do 4bit qlora finetuning.
Meta does not have any uploaded 4bit versions. We are the only ones who upload them.
If you want to use the exact model, you must have your token for Llama and have access to it. See here: https://docs.unsloth.ai/basics/errors-troubleshooting/unsloth-environment-flags
model, tokenizer = FastVisionModel.from_pretrained( "Qwen/Qwen2-VL-7B-Instruct", use_exact_model_name = True, )Scan baseline: re-review the seven unsloth-zoo sites 2026.11.3 moved (#…