From 50d4d727a0d38ab7600cf75b5b091904c292a424 Mon Sep 17 00:00:00 2001 From: Wing Lian Date: Thu, 16 Jan 2025 09:08:18 -0500 Subject: [PATCH] use wip branch for expected 4.48.1 --- requirements.txt | 2 +- src/axolotl/utils/models.py | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/requirements.txt b/requirements.txt index c9778bebf..11c04e73b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,7 +14,7 @@ packaging==23.2 peft==0.14.0 # transformers==4.48.1 -transformers @ git+https://github.com/huggingface/transformers.git@v4.48-release +transformers @ git+https://github.com/winglian/transformers.git@pre-v4.48.1 tokenizers>=0.21.0 accelerate==1.2.1 datasets==3.2.0 diff --git a/src/axolotl/utils/models.py b/src/axolotl/utils/models.py index d90d67407..a2684c65a 100644 --- a/src/axolotl/utils/models.py +++ b/src/axolotl/utils/models.py @@ -386,15 +386,15 @@ class ModelLoader: if self.cfg.flash_attention: self.patch_attention() - if self.cfg.model_config_type == "llama": - from axolotl.monkeypatch.trainer_grad_accum import ( # patch_forward_for_ga, - patch_flash_attention_forward, - patch_training_step_for_ga, - ) - - patch_flash_attention_forward() - # patch_forward_for_ga() - patch_training_step_for_ga() + # if self.cfg.model_config_type == "llama": + # from axolotl.monkeypatch.trainer_grad_accum import ( # patch_forward_for_ga, + # patch_flash_attention_forward, + # patch_training_step_for_ga, + # ) + # + # patch_flash_attention_forward() + # # patch_forward_for_ga() + # patch_training_step_for_ga() if self.cfg.sample_packing and self.cfg.s2_attention: raise ValueError(