Skip to content

Commit

Permalink
bump transformers for fsdp-grad-accum fix, remove patch (axolotl-ai-c…
Browse files Browse the repository at this point in the history
  • Loading branch information
winglian authored Nov 19, 2024
1 parent c07bd2f commit d9b71ed
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 108 deletions.
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
--extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/
packaging==23.2
peft==0.13.2
transformers==4.46.2
transformers==4.46.3
tokenizers>=0.20.1
bitsandbytes==0.44.1
accelerate==1.1.0
datasets==3.1.0
deepspeed==0.15.3
deepspeed==0.15.4
pydantic==2.6.3
addict
fire
Expand Down
83 changes: 0 additions & 83 deletions src/axolotl/monkeypatch/trainer_fsdp_grad_accum.py

This file was deleted.

8 changes: 0 additions & 8 deletions src/axolotl/utils/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
from transformers.utils import is_torch_bf16_gpu_available

from axolotl.core.trainer_builder import HFCausalTrainerBuilder, HFRLTrainerBuilder
from axolotl.monkeypatch.trainer_fsdp_grad_accum import (
patch_training_loop_for_fsdp_grad_accum,
)
from axolotl.utils.distributed import reduce_and_broadcast
from axolotl.utils.environment import check_cuda_p2p_ib_support
from axolotl.utils.samplers import MultipackBatchSampler, get_dataset_lengths
Expand Down Expand Up @@ -496,11 +493,6 @@ def prepare_opinionated_env(cfg):
def setup_trainer(
cfg, train_dataset, eval_dataset, model, tokenizer, processor, total_num_steps
):
if cfg.fsdp:
try:
patch_training_loop_for_fsdp_grad_accum()
except AssertionError:
pass
if cfg.rl in ["dpo", "ipo", "orpo", "kto", "simpo"]:
trainer_builder = HFRLTrainerBuilder(cfg, model[0], tokenizer, processor)
trainer_builder.model_ref = model[1]
Expand Down
15 changes: 0 additions & 15 deletions tests/e2e/patched/test_trainer_fsdp.py

This file was deleted.

0 comments on commit d9b71ed

Please sign in to comment.