More Qwen3-VL

This commit is contained in:
Daniel Han 2025-10-22 05:12:09 -07:00
commit 8baf3009b0
3 changed files with 30 additions and 1 deletions

View file

@ -357,6 +357,14 @@ try:
except:
pass
# Skipping import of cpp extensions due to incompatible torch version
try:
from torchao import logger as torchao_logger
torchao_logger.addFilter(HideLoggingMessage("Skipping import"))
del torchao_logger
except:
pass
# Errors out on
# Some weights of Gemma3nForConditionalGeneration were not initialized from the model checkpoint
from transformers.modeling_utils import logger as transformers_logger

View file

@ -1208,7 +1208,8 @@ def CausalLM_fast_forward(fast_forward_inference):
# RuntimeError: Triton Error [HIP]: Code: 1, Messsage: invalid argument
RETURN_LOGITS = False
elif bsz*q_len <= 1024:
RETURN_LOGITS = True
# Uses 800MB more VRAM it seems than fused CE Loss
RETURN_LOGITS = False
if not RETURN_LOGITS and labels is not None:
n_items = kwargs.get("num_items_in_batch", None)

View file

@ -1032,6 +1032,26 @@ __INT_TO_FLOAT_MAPPER = \
"Qwen/Qwen3-VL-8B-Instruct",
"unsloth/Qwen3-VL-8B-Instruct-bnb-4bit",
),
"unsloth/Qwen3-VL-2B-Thinking-unsloth-bnb-4bit" : (
"unsloth/Qwen3-VL-2B-Thinking",
"Qwen/Qwen3-VL-2B-Thinking",
"unsloth/Qwen3-VL-2B-Thinking-bnb-4bit",
),
"unsloth/Qwen3-VL-2B-Thinking-unsloth-bnb-4bit" : (
"unsloth/Qwen3-VL-2B-Thinking",
"Qwen/Qwen3-VL-2B-Thinking",
"unsloth/Qwen3-VL-2B-Thinking-bnb-4bit",
),
"unsloth/Qwen3-VL-32B-Instruct-unsloth-bnb-4bit" : (
"unsloth/Qwen3-VL-32B-Instruct",
"Qwen/Qwen3-VL-32B-Instruct",
"unsloth/Qwen3-VL-32B-Instruct-bnb-4bit",
),
"unsloth/Qwen3-VL-32B-Instruct-unsloth-bnb-4bit" : (
"unsloth/Qwen3-VL-32B-Instruct",
"Qwen/Qwen3-VL-32B-Instruct",
"unsloth/Qwen3-VL-32B-Instruct-bnb-4bit",
),
}
INT_TO_FLOAT_MAPPER = {}