Skip to content

Fix evaluation script and update tutorials#2

Merged
kdada merged 2 commits into
areal-project:mainfrom
kdada:main
Feb 25, 2025
Merged

Fix evaluation script and update tutorials#2
kdada merged 2 commits into
areal-project:mainfrom
kdada:main

Conversation

@kdada

@kdada kdada commented Feb 25, 2025

Copy link
Copy Markdown
Collaborator

No description provided.

@kdada
kdada merged commit 2411852 into areal-project:main Feb 25, 2025
antoinegg1 pushed a commit that referenced this pull request Jul 7, 2025
Fix evaluation script and update tutorials
dhh1995 pushed a commit that referenced this pull request Oct 16, 2025
zhshgmail added a commit to HsiaoTsan/AReaL that referenced this pull request Nov 4, 2025
- Replace Python for loop with scatter_add_ for GPU performance
- Simplify advantage aggregation description in documentation
- All 18 GSPO tests pass with identical results

Addresses GitHub review comments areal-project#1 and areal-project#2.
garrett4wade pushed a commit that referenced this pull request Nov 4, 2025
* feat: implement GSPO (Group-level Sequential Policy Optimization)

Add GSPO support with sequence-level advantage computation instead of token-level.
This implementation includes:

- Add importance_sampling_level configuration ("token" for PPO, "sequence" for GSPO)
- Modify ppo_actor_loss_fn to compute advantages at sequence level for GSPO
- Add comprehensive tests for sequence-level importance sampling
- Add GSPO example with GSM8K dataset configuration
- Update weight_update_meta initialization and validation workflow
- Merge DAPO configs for better flexibility
- Update README with GSPO usage and configuration details

The key difference from standard PPO is that GSPO sums token-level advantages
within each sequence before computing the policy gradient, enabling more stable
sequence-level optimization.

* Address PR review comments

Changes:
- Add more assertions in unit tests for GSPO
- Fix GSPO packed sequences to use cu_seqlens for per-sequence ratios
- Fix GSPO gradient scaling bug by averaging instead of summing advantages
- Add GSPO algorithm description and implementation notes to documentation
- Add PPOActor configuration logging for reproducibility
- Simplify documentation by removing detailed implementation notes
- Update examples to reuse existing gsm8k_grpo.py with GSPO config
- Remove dedicated gsm8k_gspo.py script (not necessary)
- Remove unnecessary overlong penalty parameters from config

GSPO can be enabled with any PPO-like training by setting
importance_sampling_level: sequence in the configuration.

* Ajust code format to pass pipeline black formatter check.

* perf: vectorize GSPO 1D packed tensor computation and simplify docs

- Replace Python for loop with scatter_add_ for GPU performance
- Simplify advantage aggregation description in documentation
- All 18 GSPO tests pass with identical results

Addresses GitHub review comments #1 and #2.

* Ajust code format to pass pipeline black formatter check.

---------

Co-authored-by: bruceli_ed24 <bruce.li2@h-partners.com>
edbeeching pushed a commit to edbeeching/AReaL that referenced this pull request Mar 20, 2026
* docs: explain how to enable kernels in training

Co-authored-by: OpenAI Codex <codex@openai.com>

* docs: link Hugging Face kernels docs

Co-authored-by: OpenAI Codex <codex@openai.com>

* Apply suggestion from @lewtun

* refactor: share attn_impl validation

Co-authored-by: Codex <codex@openai.com>

* refactor: reuse transformers kernel validator

Co-authored-by: OpenAI Codex <codex@openai.com>

---------

Co-authored-by: OpenAI Codex <codex@openai.com>
leandermaben pushed a commit to leandermaben/AReaL that referenced this pull request Mar 24, 2026
…eal-project#501)

* feat: implement GSPO (Group-level Sequential Policy Optimization)

Add GSPO support with sequence-level advantage computation instead of token-level.
This implementation includes:

- Add importance_sampling_level configuration ("token" for PPO, "sequence" for GSPO)
- Modify ppo_actor_loss_fn to compute advantages at sequence level for GSPO
- Add comprehensive tests for sequence-level importance sampling
- Add GSPO example with GSM8K dataset configuration
- Update weight_update_meta initialization and validation workflow
- Merge DAPO configs for better flexibility
- Update README with GSPO usage and configuration details

The key difference from standard PPO is that GSPO sums token-level advantages
within each sequence before computing the policy gradient, enabling more stable
sequence-level optimization.

* Address PR review comments

Changes:
- Add more assertions in unit tests for GSPO
- Fix GSPO packed sequences to use cu_seqlens for per-sequence ratios
- Fix GSPO gradient scaling bug by averaging instead of summing advantages
- Add GSPO algorithm description and implementation notes to documentation
- Add PPOActor configuration logging for reproducibility
- Simplify documentation by removing detailed implementation notes
- Update examples to reuse existing gsm8k_grpo.py with GSPO config
- Remove dedicated gsm8k_gspo.py script (not necessary)
- Remove unnecessary overlong penalty parameters from config

GSPO can be enabled with any PPO-like training by setting
importance_sampling_level: sequence in the configuration.

* Ajust code format to pass pipeline black formatter check.

* perf: vectorize GSPO 1D packed tensor computation and simplify docs

- Replace Python for loop with scatter_add_ for GPU performance
- Simplify advantage aggregation description in documentation
- All 18 GSPO tests pass with identical results

Addresses GitHub review comments areal-project#1 and areal-project#2.

* Ajust code format to pass pipeline black formatter check.

---------

Co-authored-by: bruceli_ed24 <bruce.li2@h-partners.com>
SathyaGnanakumar pushed a commit to danielkiely/AReaL that referenced this pull request Apr 29, 2026
…eal-project#501)

* feat: implement GSPO (Group-level Sequential Policy Optimization)

Add GSPO support with sequence-level advantage computation instead of token-level.
This implementation includes:

- Add importance_sampling_level configuration ("token" for PPO, "sequence" for GSPO)
- Modify ppo_actor_loss_fn to compute advantages at sequence level for GSPO
- Add comprehensive tests for sequence-level importance sampling
- Add GSPO example with GSM8K dataset configuration
- Update weight_update_meta initialization and validation workflow
- Merge DAPO configs for better flexibility
- Update README with GSPO usage and configuration details

The key difference from standard PPO is that GSPO sums token-level advantages
within each sequence before computing the policy gradient, enabling more stable
sequence-level optimization.

* Address PR review comments

Changes:
- Add more assertions in unit tests for GSPO
- Fix GSPO packed sequences to use cu_seqlens for per-sequence ratios
- Fix GSPO gradient scaling bug by averaging instead of summing advantages
- Add GSPO algorithm description and implementation notes to documentation
- Add PPOActor configuration logging for reproducibility
- Simplify documentation by removing detailed implementation notes
- Update examples to reuse existing gsm8k_grpo.py with GSPO config
- Remove dedicated gsm8k_gspo.py script (not necessary)
- Remove unnecessary overlong penalty parameters from config

GSPO can be enabled with any PPO-like training by setting
importance_sampling_level: sequence in the configuration.

* Ajust code format to pass pipeline black formatter check.

* perf: vectorize GSPO 1D packed tensor computation and simplify docs

- Replace Python for loop with scatter_add_ for GPU performance
- Simplify advantage aggregation description in documentation
- All 18 GSPO tests pass with identical results

Addresses GitHub review comments #1 and areal-project#2.

* Ajust code format to pass pipeline black formatter check.

---------

Co-authored-by: bruceli_ed24 <bruce.li2@h-partners.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant