Add Qwen3.6 support (#5257)
* qwen3.6 unsloth studio support * Add qwen3.6 causal-conv1d detection * Update model_mappings.py moved qwen3.6-27B to thinking train on completion template * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
874e4605ef
commit
456a49a350
4 changed files with 23 additions and 0 deletions
|
|
@ -50,6 +50,8 @@ def _model_wants_causal_conv1d(model_name: str) -> bool:
|
|||
for key in (
|
||||
"qwen3.5",
|
||||
"qwen3_5",
|
||||
"qwen3.6",
|
||||
"qwen3_6",
|
||||
"qwen3-next",
|
||||
"qwen3_next",
|
||||
"nemotron_h",
|
||||
|
|
|
|||
|
|
@ -133,6 +133,22 @@ def test_causal_conv1d_fast_path_preserves_wheel_first_install_args(monkeypatch)
|
|||
)
|
||||
|
||||
|
||||
def test_causal_conv1d_fast_path_includes_qwen3_6_variants(monkeypatch):
|
||||
install_mock = mock.Mock(return_value = True)
|
||||
monkeypatch.setattr(worker, "_install_package_wheel_first", install_mock)
|
||||
|
||||
worker._ensure_causal_conv1d_fast_path(
|
||||
event_queue = [],
|
||||
model_name = "unsloth/Qwen3.6-4B",
|
||||
)
|
||||
worker._ensure_causal_conv1d_fast_path(
|
||||
event_queue = [],
|
||||
model_name = "unsloth/Qwen3_6-4B",
|
||||
)
|
||||
|
||||
assert install_mock.call_count == 2
|
||||
|
||||
|
||||
def test_mamba_ssm_path_preserves_wheel_first_install_args(monkeypatch):
|
||||
install_mock = mock.Mock(return_value = True)
|
||||
monkeypatch.setattr(worker, "_install_package_wheel_first", install_mock)
|
||||
|
|
|
|||
|
|
@ -364,6 +364,10 @@ TEMPLATE_TO_MODEL_MAPPER = {
|
|||
"unsloth/Qwen3-4B-Thinking-2507-bnb-4bit",
|
||||
"unsloth/Qwen3-30B-A3B-Thinking-2507",
|
||||
"Qwen/Qwen3-30B-A3B-Thinking-2507",
|
||||
"Qwen/Qwen3.6-35B-A3B",
|
||||
"unsloth/Qwen3.6-35B-A3B",
|
||||
"Qwen/Qwen3.6-27B",
|
||||
"unsloth/Qwen3.6-27B",
|
||||
),
|
||||
"qwen3.5": (
|
||||
"unsloth/Qwen3.5-0.8B",
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ TRANSFORMERS_5_MODEL_SUBSTRINGS: tuple[str, ...] = (
|
|||
TRANSFORMERS_550_MODEL_SUBSTRINGS: tuple[str, ...] = (
|
||||
"gemma-4", # Gemma-4 (E2B-it, E4B-it, 31B-it, 26B-A4B-it)
|
||||
"gemma4", # Gemma-4 alternate naming
|
||||
"qwen3.6",
|
||||
)
|
||||
|
||||
# Architecture classes / model_type values that require transformers 5.5.0.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue