From 3cb0cd79ac8c8d6ab3c306eb6b76771a55fbaede Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Wed, 24 Jul 2024 14:05:31 -0700 Subject: [PATCH] Mistral --- unsloth/models/_utils.py | 4 ++-- unsloth/models/mapper.py | 11 +++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.py index 5a2e85997f..213cb5b0ae 100644 --- a/unsloth/models/_utils.py +++ b/unsloth/models/_utils.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "2024.7" +__version__ = "2024.8" __all__ = [ "prepare_model_for_kbit_training", @@ -336,7 +336,7 @@ def patch_tokenizer(model, tokenizer): possible_reserved_tokens = ( "<|reserved", # Llama-3 "<|placeholder", # Phi-3 - "[control", # Forgot where lol + "[control", # Mistral type models "", # Mistral Nemo "<|finetune_right_pad_id|>", # Llama-3.1 ) diff --git a/unsloth/models/mapper.py b/unsloth/models/mapper.py index fc13c94e84..462555f317 100644 --- a/unsloth/models/mapper.py +++ b/unsloth/models/mapper.py @@ -227,13 +227,20 @@ __INT_TO_FLOAT_MAPPER = \ "meta-llama/Meta-Llama-3.1-8B-Instruct", ), "unsloth/Meta-Llama-3.1-70B-bnb-4bit" : ( - "unsloth/Meta-Llama-3.1-70B", "meta-llama/Meta-Llama-3.1-70B", ), + "unsloth/Meta-Llama-3.1-405B-bnb-4bit" : ( + "meta-llama/Meta-Llama-3.1-405B", + ), + "unsloth/Meta-Llama-3.1-405B-Instruct-bnb-4bit" : ( + "meta-llama/Meta-Llama-3.1-405B-Instruct", + ), "unsloth/Meta-Llama-3.1-70B-Instruct-bnb-4bit" : ( - "unsloth/Meta-Llama-3.1-70B-Instruct", "meta-llama/Meta-Llama-3.1-70B-Instruct", ), + "unsloth/Mistral-Large-Instruct-2407-bnb-4bit" : ( + "mistralai/Mistral-Large-Instruct-2407", + ), } INT_TO_FLOAT_MAPPER = {}