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
{{ message }}
Repository navigation
Bug when load model for GRPO Training without PEFT #1894
# model = FastLanguageModel.get_peft_model(
# model,
# r = lora_rank, # Choose any number > 0 ! Suggested 8, 16, 32, 64, 128
# target_modules = [
# "q_proj", "k_proj", "v_proj", "o_proj",
# "gate_proj", "up_proj", "down_proj",
# ], # Remove QKVO if out of memory
# lora_alpha = lora_rank,
# use_gradient_checkpointing = "unsloth", # Enable long context finetuning
# random_state = 3407,
# )
then you get the LLMEngine should not be pickled! error when you train:
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
[<ipython-input-7-f0c0f43b49a3>](https://localhost:8080/#) in <cell line: 0>()
----> 1 trainer = GRPOTrainer(
2 model = model,
3 processing_class = tokenizer,
4 reward_funcs = [
5 xmlcount_reward_func,
13 frames
[/usr/local/lib/python3.11/dist-packages/vllm/engine/llm_engine.py](https://localhost:8080/#) in __reduce__(self)
500 # This is to ensure that the LLMEngine is not referenced in
501 # the closure used to initialize Ray worker actors
--> 502 raise RuntimeError("LLMEngine should not be pickled!")
503
504 def __del__(self):
RuntimeError: LLMEngine should not be pickled!
I am unsure what the fix is, if you point me in the right direction I am happy to investigate.
@Erland366 Is there any plan to add support for training? If not I think you should make it more clear that unsloth only works in combination with LoRA adaptors.
Activity
[-]GRPO Training cannot remove PEFT[/-][+]Bug when load model for GRPO Training without PEFT[/+]danielhanchen commentedon Mar 6, 2025
@Erland366 Could you check if vLLM works still if no LoRA adapters are added? I think you also had a PR on moving
load_loraoutside ofget_peft_modelErland366 commentedon Mar 9, 2025
Sorry for the very late reply. I finally able to get back into Unsloth stuff
I don't think you can train non-LoRA model using Unsloth in general. When I tested for inference, yes it works.
VanderpoelLiam commentedon Mar 12, 2025
@Erland366 Is there any plan to add support for training? If not I think you should make it more clear that unsloth only works in combination with LoRA adaptors.
li-aolong commentedon Mar 14, 2025
Is that indeed so? Only lora model with Unsloth?
qwerty3564 commentedon Mar 20, 2025
请问后续怎么样了,你能用unsloth训练非lora模型吗
cht619 commentedon Apr 22, 2025
@qwerty3564 好像不支持非lora啊
Merge main into xpu-explicit-bf16-agreement; take #14769's selected-d…
XPU: train an explicit bf16 load in bf16 under the fp16 idiom, and ma…