unsloth icon indicating copy to clipboard operation
unsloth copied to clipboard

How to make sure GRPOTrainer is patched when I subclass it

Open JackCai1206 opened this issue 5 days ago • 2 comments

In my original script, I subclass the GRPOTrainer for my usecase. I also have an input arg that controls when I want to use UnSloth. I would like to

  • call PatchFastRL optionally depending on an input arg
  • Make sure when arg is true, the subclassing is done with the patched GRPOTrainer

Right now, since I am not calling PatchFastRL at the beginning of the program, the subclassing is done with the original GRPOTrainer instead.

JackCai1206 avatar Feb 23 '25 04:02 JackCai1206