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.

Add **kwargs

Daniel Han034a35f6d4d6
diff --git a/unsloth/models/gemma.py b/unsloth/models/gemma.py
index f22b358db8e..0009c631225 100644
--- a/unsloth/models/gemma.py
+++ b/unsloth/models/gemma.py
@@ -164,6 +164,7 @@ def GemmaModel_fast_forward_inference(
past_key_values,
position_ids,
attention_mask = None,
+ **kwargs,
):
out_weights = tuple(
torch.empty_like(
diff --git a/unsloth/models/gemma2.py b/unsloth/models/gemma2.py
index 234fc210007..7349800fc39 100644
--- a/unsloth/models/gemma2.py
+++ b/unsloth/models/gemma2.py
@@ -426,6 +426,7 @@ def Gemma2Model_fast_forward_inference(
past_key_values,
position_ids,
attention_mask = None,
+ **kwargs,
):
out_weights = tuple(
torch.empty_like(