diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.py index 68e294f157..0acc8cd350 100644 --- a/unsloth/models/_utils.py +++ b/unsloth/models/_utils.py @@ -1209,7 +1209,7 @@ def patch_gradient_accumulation_fix(Trainer): "Unsloth: We fixed a gradient accumulation bug, "\ "but it seems like you don't have the latest transformers version!\n"\ "Please update transformers, TRL and unsloth via:\n"\ - '`pip install --upgrade --no-cache-dir unsloth git+https://github.com/huggingface/transformers.git git+https://github.com/huggingface/trl.git`' + '`pip install --upgrade --no-cache-dir --no-deps unsloth transformers git+https://github.com/huggingface/trl.git`' ) pass diff --git a/unsloth/tokenizer_utils.py b/unsloth/tokenizer_utils.py index 8806f1e743..c05485f902 100644 --- a/unsloth/tokenizer_utils.py +++ b/unsloth/tokenizer_utils.py @@ -975,7 +975,7 @@ def patch_sft_trainer_tokenizer(): " from packaging.version import Version\n"\ " if Version(transformers_version) <= Version('4.45.2'):\n"\ " print('**** Unsloth: Please use our fixed gradient_accumulation_steps by updating transformers, TRL and Unsloth!\\n'\\\n"\ - " '`pip install --upgrade --no-cache-dir unsloth git+https://github.com/huggingface/transformers.git git+https://github.com/huggingface/trl.git`')\n"\ + " '`pip install --upgrade --no-cache-dir --no-deps unsloth transformers git+https://github.com/huggingface/trl.git`')\n"\ "except:\n"\ " pass\n"\ "\n\n"