diff --git a/pyproject.toml b/pyproject.toml index 8b24a52a6f..b538578fd5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,7 @@ triton = [ ] huggingface = [ - "unsloth_zoo>=2025.7.1", + "unsloth_zoo>=2025.7.2", "packaging", "tyro", "transformers>=4.51.3,!=4.47.0,!=4.52.0,!=4.52.1,!=4.52.2,!=4.52.3", @@ -381,7 +381,7 @@ colab-ampere-torch220 = [ "flash-attn>=2.6.3", ] colab-new = [ - "unsloth_zoo>=2025.7.1", + "unsloth_zoo>=2025.7.2", "packaging", "tyro", "transformers>=4.51.3,!=4.47.0,!=4.52.0,!=4.52.1,!=4.52.2,!=4.52.3", diff --git a/unsloth/__init__.py b/unsloth/__init__.py index 4da08da13d..e965b2959e 100644 --- a/unsloth/__init__.py +++ b/unsloth/__init__.py @@ -79,7 +79,7 @@ def get_device_count(): elif DEVICE_TYPE == "xpu": return torch.xpu.device_count() else: - return 0 + return 1 pass DEVICE_COUNT : int = get_device_count() diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.py index c6ff7b6260..5076c422c8 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.7.1" +__version__ = "2025.7.2" __all__ = [ "SUPPORTS_BFLOAT16", diff --git a/unsloth/models/llama.py b/unsloth/models/llama.py index db0e8843cf..8ccdeba353 100644 --- a/unsloth/models/llama.py +++ b/unsloth/models/llama.py @@ -796,7 +796,7 @@ def LlamaModel_fast_forward( # Ignore attention_mask if attention_mask is None: padding_mask = None - elif self.training and os.environ.get("UNSLOTH_KEEP_PADDING", "0") != '1': + elif self.training: attention_mask = None padding_mask = None else: