From 27ae5c335cba438e6198c4fdbabe9a0a85b329b4 Mon Sep 17 00:00:00 2001 From: Bhuvan Prakash <52481324+bhuvanprakash@users.noreply.github.com> Date: Sun, 30 Nov 2025 09:48:11 +0530 Subject: [PATCH] Fix: prevent load_in_fp8 kwarg from reaching Qwen3MoeForCausalLM constructor (Fix #3649) (#3654) * Fix: remove load_in_fp8 from kwargs to prevent Qwen3Moe init TypeError (Fix #3649) * [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> --- unsloth/models/vision.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/unsloth/models/vision.py b/unsloth/models/vision.py index 30d381c791..31901b1570 100644 --- a/unsloth/models/vision.py +++ b/unsloth/models/vision.py @@ -654,6 +654,8 @@ class FastBaseModel: raise_handler = RaiseUninitialized() if not fast_inference: + # Prevent load_in_fp8 from being forwarded into HF internal model loading + load_in_fp8 = kwargs.pop("load_in_fp8", None) model = auto_model.from_pretrained( model_name, device_map = device_map,