From d0b92ea58bfa2822c6531cb2e9802f11b75ec5d6 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Thu, 23 May 2024 04:15:02 +1000 Subject: [PATCH] Mistral v3 (#514) * Update llama.py * offload * Update llama.py * Update llama.py * Update llama.py * Update llama.py * Update llama.py * Update llama.py * Update llama.py * continued pretraining trainer * Update trainer.py * Update trainer.py * Update trainer.py * Update trainer.py * is_bfloat16_supported * Update __init__.py * Update README.md * Update llama.py * is_bfloat16_supported * Update __init__.py * Mistral v3 --- unsloth/__init__.py | 1 + unsloth/models/mapper.py | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/unsloth/__init__.py b/unsloth/__init__.py index c8f4ca1041..d85eca003d 100644 --- a/unsloth/__init__.py +++ b/unsloth/__init__.py @@ -17,6 +17,7 @@ import importlib # Currently only supports 1 GPU, or else seg faults will occur. if "CUDA_VISIBLE_DEVICES" in os.environ: + os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" devices = os.environ["CUDA_VISIBLE_DEVICES"] # Check if there are multiple cuda devices set in env if not devices.isdigit(): diff --git a/unsloth/models/mapper.py b/unsloth/models/mapper.py index b4fbe57387..29896ef2bb 100644 --- a/unsloth/models/mapper.py +++ b/unsloth/models/mapper.py @@ -144,6 +144,14 @@ __INT_TO_FLOAT_MAPPER = \ "unsloth/Phi-3-mini-4k-instruct", "microsoft/Phi-3-mini-4k-instruct", ), + "unsloth/mistral-7b-v0.3-bnb-4bit" : ( + "unsloth/mistral-7b-v0.3", + "mistralai/Mistral-7B-v0.3", + ), + "unsloth/mistral-7b-instruct-v0.3-bnb-4bit" : ( + "unsloth/mistral-7b-instruct-v0.3", + "mistralai/Mistral-7B-Instruct-v0.3", + ), } INT_TO_FLOAT_MAPPER = {}