New version

This commit is contained in:
Daniel Han-Chen 2024-02-04 02:32:21 +11:00
commit 54802ecbb9
2 changed files with 7 additions and 7 deletions

View file

@ -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()

View file

@ -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