diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.py index 5f35851443..617b8509d9 100644 --- a/unsloth/models/_utils.py +++ b/unsloth/models/_utils.py @@ -23,7 +23,7 @@ from platform import system as platform_system platform_system = platform_system() import math -__version__ = "2024.1" +__version__ = "2024.2" # Get Flash Attention v2 if Ampere (RTX 30xx, A100) major_version, minor_version = torch.cuda.get_device_capability() diff --git a/unsloth/models/llama.py b/unsloth/models/llama.py index 4d2b03a00f..296cbf51f5 100644 --- a/unsloth/models/llama.py +++ b/unsloth/models/llama.py @@ -514,7 +514,6 @@ def LlamaModel_fast_forward( # if 0 in attention_mask: # padding_mask = attention_mask # else: - print(attention_mask) padding_mask = None attention_mask = _prepare_4d_causal_attention_mask_for_sdpa( @@ -529,11 +528,12 @@ def LlamaModel_fast_forward( hidden_states = inputs_embeds if past_key_values is None and self.gradient_checkpointing and self.training: - if use_cache: - logger.warning_once( - "Unsloth: `use_cache=True` is incompatible with gradient checkpointing. Setting `use_cache=False`" - ) - use_cache = False + use_cache = False + # if use_cache: + # logger.warning_once( + # "Unsloth: `use_cache=True` is incompatible with gradient checkpointing. Setting `use_cache=False`" + # ) + # use_cache = False pass # decoder layers