You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
args = ",\n".join(f"{' '*8}{key} = {value}" if value != inspect._empty else f"{' '*8}{key}" for key, value in args.items())
to fix patch_trl_tokenizer_processing_class.
Fixing patch_sft_trainer_tokenizer is a lot more work because huggingface/trl#2405 completely changed the structure of SFTTrainer.
Maybe use pip install git+https://github.com/huggingface/trl.git@e95f9fb74a3c3647b86f251b7e230ec51c64b72b instead of the latest version as the notebook suggests or if you want the latest version that works, pip install git+https://github.com/huggingface/trl.git@82d12eb75103821cd4af1978e99b1026a90ac67d.
Reacted by Kabster17, Sanskar Shrivastava and ZXisSpider
Activity
[-]GRPO - Unsloth SFT Trainer Issue[/-][+]RuntimeError: Unsloth: Please file a bug report! Error patching SFTTrainer[/+]shermansiu commentedon Feb 9, 2025
This may be related to huggingface/trl#2405. What's the version of
trlyou're using?shermansiu commentedon Feb 9, 2025
I think
unsloth/unsloth/tokenizer_utils.py
Line 931 in 2023b28
should be replaced with
to fix
patch_trl_tokenizer_processing_class.Fixing
patch_sft_trainer_tokenizeris a lot more work because huggingface/trl#2405 completely changed the structure of SFTTrainer.Maybe use
pip install git+https://github.com/huggingface/trl.git@e95f9fb74a3c3647b86f251b7e230ec51c64b72binstead of the latest version as the notebook suggests or if you want the latest version that works,pip install git+https://github.com/huggingface/trl.git@82d12eb75103821cd4af1978e99b1026a90ac67d.Kabster17 commentedon Feb 9, 2025
My trl version is as follows:
Name: trl
Version: 0.15.0.dev0
Summary: Train transformer language models with reinforcement learning.
Home-page: https://github.com/huggingface/trl
Author: Leandro von Werra
Author-email: [email protected]
License: Apache 2.0
Location: /home/kabster/anaconda3/envs/unsloth_env/lib/python3.11/site-packages
Requires: accelerate, datasets, rich, transformers
Required-by: unsloth, unsloth_zoo
Attempted the line changes in the tokenizer utils but it raised another error as shown below:
Kabster17 commentedon Feb 9, 2025
Ok got it sorted after uninstalling trl and re-installing as per your suggestion.
Thanks!
SanskarX10 commentedon Feb 13, 2025
Thanks this works
"Maybe use pip install git+https://github.com/huggingface/trl.git@e95f9fb74a3c3647b86f251b7e230ec51c64b72b instead of the latest version as the notebook suggests or if you want the latest version that works, pip install git+https://github.com/huggingface/trl.git@82d12eb75103821cd4af1978e99b1026a90ac67d."