unslothai / unsloth

Finetune Llama 3.1, Mistral, Phi & Gemma LLMs 2-5x faster with 80% less memory
https://unsloth.ai
Apache License 2.0
13.29k stars 874 forks source link

Mistral-7B-Instruct-v0.2 in Colab Notebook missing 4bit specification in filename list as well as saved adapter_config.json #125

Closed PlantBasedTendies closed 5 months ago

PlantBasedTendies commented 6 months ago

In the Mistral Colab notebook, Mistral 7b Instruct is missing the extension -bnb-4bit in the 4-bit model list:

# 4bit pre quantized models we support for 4x faster downloading + no OOMs.
fourbit_models = [
    "unsloth/mistral-7b-bnb-4bit",
    "unsloth/mistral-7b-instruct-v0.2",
    "unsloth/llama-2-7b-bnb-4bit",
    "unsloth/llama-2-13b-bnb-4bit",
    "unsloth/codellama-34b-bnb-4bit",
    "unsloth/tinyllama-bnb-4bit",
]

Additionally, when a Lora adapter_config.json file is saved, the "base_model_name_or_path" key incorrectly points to the filename without the -bnb-4bit extension, and thus should be updated to the following:

"base_model_name_or_path": "unsloth/mistral-7b-instruct-v0.2-bnb-4bit",

danielhanchen commented 6 months ago

@PlantBasedTendies Oh it's cause people were complaining it couldnt run due to transformers==4.36. Since tranformers just got updated to 4.37, I shall edit it all!

Thanks for the catch! Oh yep oops - luckily anyways I auto dispatch to the BNB version - but thats for catching that as well!

danielhanchen commented 6 months ago

Solved!! Thanks!