From 06f9d1cbc76375494415b5256b915d3b45d5151f Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Fri, 15 Aug 2025 05:03:38 -0700 Subject: [PATCH] Nightly (#3169) * Fix mamba * Update loader.py * Update vision.py * Update loader.py * Filter vLLM standby logs (#3131) * filter vLLM standby logs * safeguard standby logger patch * Update unsloth/models/_utils.py * Update unsloth/models/_utils.py * Update unsloth/models/_utils.py --------- Co-authored-by: Daniel Han * Update loader.py * Add scaler * Update llama.py * Update _utils.py * Versioning * GPT OSS fix * GPT OSS fix * Update loader.py * Update vision.py * Update vision.py * Update loader.py * Update vision.py * Update vision.py * Update llama.py * Update llama.py * Update llama.py * Versioning * Update mapper.py --------- Co-authored-by: Datta Nimmaturi --- pyproject.toml | 4 ++-- unsloth/models/_utils.py | 2 +- unsloth/models/llama.py | 3 ++- unsloth/models/mapper.py | 10 ++++++++++ 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e563ba6fc5..6f6f225bde 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,7 @@ triton = [ ] huggingface = [ - "unsloth_zoo>=2025.8.4", + "unsloth_zoo>=2025.8.5", "packaging", "tyro", "transformers>=4.51.3,!=4.47.0,!=4.52.0,!=4.52.1,!=4.52.2,!=4.52.3,!=4.53.0", @@ -384,7 +384,7 @@ colab-ampere-torch220 = [ "flash-attn>=2.6.3", ] colab-new = [ - "unsloth_zoo>=2025.8.4", + "unsloth_zoo>=2025.8.5", "packaging", "tyro", "transformers>=4.51.3,!=4.47.0,!=4.52.0,!=4.52.1,!=4.52.2,!=4.52.3,!=4.53.0", diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.py index ab2694fde1..c84fd118e7 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.8.5" +__version__ = "2025.8.6" __all__ = [ "SUPPORTS_BFLOAT16", diff --git a/unsloth/models/llama.py b/unsloth/models/llama.py index ab7f4bfdde..ae03a685eb 100644 --- a/unsloth/models/llama.py +++ b/unsloth/models/llama.py @@ -701,8 +701,9 @@ def LlamaModel_fast_forward( # Fix out of bounds tokenization if hasattr(self, "max_seq_length"): if seq_length > self.max_seq_length: + shape = input_ids.shape if input_ids is not None else inputs_embeds.shape logger.warning_once( - f"Unsloth: Input IDs of length {seq_length} > the model's max sequence length of {self.max_seq_length}.\n"\ + f"Unsloth: Input IDs of shape {shape} with length {seq_length} > the model's max sequence length of {self.max_seq_length}.\n"\ "We shall truncate it ourselves. It's imperative if you correct this issue first." ) if input_ids is not None: diff --git a/unsloth/models/mapper.py b/unsloth/models/mapper.py index 829fe29583..e8fc55c2bd 100644 --- a/unsloth/models/mapper.py +++ b/unsloth/models/mapper.py @@ -941,6 +941,16 @@ __INT_TO_FLOAT_MAPPER = \ "Qwen/Qwen3-4B-Thinking-2507", "unsloth/Qwen3-4B-Thinking-2507-bnb-4bit", ), + "unsloth/gemma-3-270m-it-unsloth-bnb-4bit" : ( + "unsloth/gemma-3-270m-it", + "google/gemma-3-270m-it", + "unsloth/gemma-3-270m-it-bnb-4bit", + ), + "unsloth/gemma-3-270m-unsloth-bnb-4bit" : ( + "unsloth/gemma-3-270m", + "google/gemma-3-270m", + "unsloth/gemma-3-270m-bnb-4bit", + ), } INT_TO_FLOAT_MAPPER = {}