Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Update mapper.py

Daniel Hanf5bdfee1a303
diff --git a/unsloth/models/mapper.py b/unsloth/models/mapper.py
index b2f73aa6c2b..0ba03ce01c4 100644
--- a/unsloth/models/mapper.py
+++ b/unsloth/models/mapper.py
@@ -452,33 +452,45 @@ __INT_TO_FLOAT_MAPPER = \
"unsloth/Llama-3.1-Nemotron-70B-Instruct",
"nvidia/Llama-3.1-Nemotron-70B-Instruct-HF",
),
- "unsloth/Qwen2-VL-2B-Instruct-bnb-4bit" : (
+ "unsloth/Qwen2-VL-2B-Instruct-unsloth-bnb-4bit" : (
"unsloth/Qwen2-VL-2B-Instruct",
"Qwen/Qwen2-VL-2B-Instruct",
+ "unsloth/Qwen2-VL-2B-Instruct-bnb-4bit",
),
- "unsloth/Qwen2-VL-7B-Instruct-bnb-4bit" : (
+ "unsloth/Qwen2-VL-7B-Instruct-unsloth-bnb-4bit" : (
"unsloth/Qwen2-VL-7B-Instruct",
"Qwen/Qwen2-VL-7B-Instruct",
+ "unsloth/Qwen2-VL-7B-Instruct-bnb-4bit",
),
- "unsloth/Llama-3.2-11B-Vision-Instruct-bnb-4bit" : (
+ "unsloth/Qwen2-VL-72B-Instruct-unsloth-bnb-4bit" : (
+ "unsloth/Qwen2-VL-72B-Instruct",
+ "Qwen/Qwen2-VL-72B-Instruct",
+ "unsloth/Qwen2-VL-72B-Instruct-bnb-4bit",
+ ),
+ "unsloth/Llama-3.2-11B-Vision-Instruct-unsloth-bnb-4bit" : (
"unsloth/Llama-3.2-11B-Vision-Instruct",
"meta-llama/Llama-3.2-11B-Vision-Instruct",
+ "unsloth/Llama-3.2-11B-Vision-Instruct-bnb-4bit",
),
- "unsloth/Llama-3.2-90B-Vision-Instruct-bnb-4bit" : (
+ "unsloth/Llama-3.2-90B-Vision-Instruct-unsloth-bnb-4bit" : (
"unsloth/Llama-3.2-90B-Vision-Instruct",
"meta-llama/Llama-3.2-90B-Vision-Instruct",
+ "unsloth/Llama-3.2-90B-Vision-Instruct-bnb-4bit",
),
- "unsloth/Llama-3.2-11B-Vision-bnb-4bit" : (
+ "unsloth/Llama-3.2-11B-Vision-unsloth-bnb-4bit" : (
"unsloth/Llama-3.2-11B-Vision",
"meta-llama/Llama-3.2-11B-Vision",
+ "unsloth/Llama-3.2-11B-Vision-bnb-4bit",
),
- "unsloth/Llama-3.2-90B-Vision-bnb-4bit" : (
+ "unsloth/Llama-3.2-90B-Vision-unsloth-bnb-4bit" : (
"unsloth/Llama-3.2-90B-Vision",
"meta-llama/Llama-3.2-90B-Vision",
+ "unsloth/Llama-3.2-90B-Vision-bnb-4bit",
),
- "unsloth/Pixtral-12B-2409-bnb-4bit" : (
+ "unsloth/Pixtral-12B-2409-unsloth-bnb-4bit" : (
"unsloth/Pixtral-12B-2409",
"mistralai/Pixtral-12B-2409",
+ "unsloth/Pixtral-12B-2409-bnb-4bit",
),
"unsloth/Pixtral-12B-2409-Base-bnb-4bit" : (
"unsloth/Pixtral-12B-Base-2409",
@@ -500,6 +512,10 @@ __INT_TO_FLOAT_MAPPER = \
"unsloth/Llama-3.1-Tulu-3-70B",
"allenai/Llama-3.1-Tulu-3-70B",
),
+ "unsloth/QwQ-32B-Preview-bnb-4bit" : (
+ "unsloth/QwQ-32B-Preview",
+ "Qwen/QwQ-32B-Preview",
+ ),
}
INT_TO_FLOAT_MAPPER = {}
@@ -519,6 +535,14 @@ for key, values in __INT_TO_FLOAT_MAPPER.items():
MAP_TO_UNSLOTH_16bit[values[1]] = values[0]
MAP_TO_UNSLOTH_16bit[values[1].lower()] = values[0]
pass
+ elif len(values) == 3:
+ # Dynamic Unsloth quantization
+ if values[0].startswith("unsloth"):
+ MAP_TO_UNSLOTH_16bit[values[1]] = values[0]
+ MAP_TO_UNSLOTH_16bit[values[1].lower()] = values[0]
+ MAP_TO_UNSLOTH_16bit[values[2]] = values[0]
+ MAP_TO_UNSLOTH_16bit[values[2].lower()] = values[0]
+ pass
pass
# Get lowercased