modelscope / modelscope/ms-swift
HunyuanOCR GRPO failed
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 1.7k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 136
Description
Describe the bug
Thanks for your timely HunyuanOCR training support! I installed ms-swift from latest source, used your train.sh under examples/ and it worked fine. But when I changed sft \ to rlhf --rlhf_type grpo \, I got terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc. I tried my personal dataset, and the error persists.
Your hardware and system info
A800*8
CUDA 12.8
torch2.8
vllm nightly version
flash-attn 2.8.3
transformers 4.57.1.dev0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the train.sh script under examples/ and reproduce the GRPO variant in the reported A800, CUDA, PyTorch, vLLM, flash-attn, and Transformers environment. Compare it with the working SFT invocation and trace the std::bad_alloc failure; done means identifying a reproducible cause and documenting or implementing a verified fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100