From 427656d89178e9e6c6062f8e0ebb7443cb098c60 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Wed, 10 Dec 2025 06:25:49 -0800 Subject: [PATCH] Gemma issue --- unsloth/models/_utils.py | 2 +- unsloth/trainer.py | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.py index b20ce25320..52aa6c19f3 100644 --- a/unsloth/models/_utils.py +++ b/unsloth/models/_utils.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "2025.12.3" +__version__ = "2025.12.4" __all__ = [ "SUPPORTS_BFLOAT16", diff --git a/unsloth/trainer.py b/unsloth/trainer.py index f3e09e990b..35edbb8af8 100644 --- a/unsloth/trainer.py +++ b/unsloth/trainer.py @@ -349,16 +349,12 @@ def _patch_sft_trainer_auto_packing(trl_module): if not blocked: if padding_free_requested: configure_padding_free(config_arg) - elif not is_unsupported_gemma and _should_auto_padding_free(config_arg): + elif _should_auto_padding_free(config_arg): configure_padding_free(config_arg) auto_padding_free_active = True logger.info( "Unsloth: Padding-free batching auto-enabled for SFTTrainer instance." ) - elif is_unsupported_gemma and _should_auto_padding_free(config_arg): - logger.info( - "Unsloth: Padding-free batching auto-disabled for Gemma 2 (requires flash attention)." - ) try: original_init(self, *args, **kwargs)