Support GRPO Training Recipe for Speech LLM#117
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a GRPO (Group Relative Policy Optimization) training/eval recipe for speech/audio-capable LLMs (Qwen2-Audio / Qwen2.5-Omni), including dataset adapters, reward functions, trainer implementation, and runnable example scripts.
Changes:
- Introduces a custom
GRPOTrainerimplementing rollout, reward computation, KL penalty, and GRPO loss. - Adds HuggingFace audio dataset wrapper + prompt templates + reward functions for
<answer>/<think>formatting. - Adds training and vLLM-based evaluation scripts plus an example recipe (DeepSpeed configs, README, helper scripts).
Reviewed changes
Copilot reviewed 10 out of 14 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| west/utils/rewards.py | Adds reward functions used for GRPO training. |
| west/utils/constants.py | Adds prompt templates and a template map. |
| west/trainer/grpo_trainer.py | Implements GRPO training loop on top of transformers.Trainer. |
| west/trainer/init.py | Package marker (currently empty). |
| west/dataset/hf_dataset.py | Adds HF dataset loader + collator for audio QA training/eval. |
| west/bin/train_grpo.py | Adds GRPO training entrypoint for Qwen audio/omni models. |
| west/bin/decode_mmsu.py | Adds vLLM-based MMSU decoding + accuracy reporting. |
| west/bin/decode_mmau.py | Adds vLLM-based MMAU decoding. |
| examples/grpo/scripts/download_mmau_test.sh | Adds helper to download MMAU test-mini audio set. |
| examples/grpo/run.sh | Adds end-to-end example runner (prepare/train/eval stages). |
| examples/grpo/requirements.txt | Adds example-specific Python dependencies. |
| examples/grpo/conf/ds_zero3.json | Adds DS ZeRO-3 config for the example. |
| examples/grpo/conf/ds_zero1.json | Adds DS ZeRO-1 config for the example. |
| examples/grpo/README.md | Documents the GRPO recipe and reported results. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Support Matrix
Models
Results