forked from verl-project/verl
-
Notifications
You must be signed in to change notification settings - Fork 5
[26.06] verl release: documentation updates #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
anisha-amd
wants to merge
9
commits into
amd-integration
Choose a base branch
from
docs/26.06
base: amd-integration
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
1f23474
[26.06] Documentation updates for verl
anisha-amd 4a63c2e
Merge branch 'amd-integration' into docs/26.06
anisha-amd 1b38b0f
Update amd-docs/examples/verl-async-examples.rst
anisha-amd 3808b38
Update amd-docs/examples/verl-async-examples.rst
anisha-amd 777914d
Update verl-async-examples.rst
anisha-amd 11a71ea
26.06 docs nomenclature update
anisha-amd dfa6ec0
Update conf.py
anisha-amd aba1d4a
Update verl-install.rst
anisha-amd ff54ccb
Update verl-install.rst
anisha-amd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| .. meta:: | ||
| :description: verl fully asynchronous examples | ||
| :keywords: verl, programming, ROCm, example, DAPO, GRPO, Megatron, FSDP2 | ||
|
|
||
| .. _run-a-fully-async-verl-example: | ||
|
|
||
| ******************************************************************** | ||
| Run fully asynchronous verl examples | ||
| ******************************************************************** | ||
|
|
||
| This guide shows how to run fully asynchronous verl examples on AMD GPUs with ROCm. | ||
| It covers preparing data and models, launching fully asynchronous GRPO training on a | ||
| vision-language model with Megatron, and running fully asynchronous DAPO math | ||
| reasoning training with FSDP2. | ||
|
|
||
| Megatron example | ||
| -------------------------------------------------------------------- | ||
|
|
||
| The `geo3k_qwen25vl_7b_megatron_4_4.sh <https://github.com/AMD-Ecosystem/verl/blob/main/verl/experimental/fully_async_policy/shell/geo3k_qwen25vl_7b_megatron_4_4.sh>`_ example launches fully asynchronous GRPO training for ``Qwen2.5-VL-7B-Instruct`` on the Geometry3k vision-math dataset using verl's fully asynchronous policy with the Megatron trainer configuration. | ||
|
|
||
| 1. Download `prepare_geo3k_qwen25vl_7b_megatron_4_4.sh <https://github.com/AMD-Ecosystem/verl/tree/amd-integration/verl/experimental/fully_async_policy/shell/data_model_preparation/prepare_geo3k_qwen25vl_7b_megatron_4_4.sh>`_ and run: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| export HF_TOKEN=your_token | ||
| # or: hf auth login | ||
| cd /workspace/verl | ||
| bash verl/experimental/fully_async_policy/shell/data_model_preparation/prepare_geo3k_qwen25vl_7b_megatron_4_4.sh | ||
|
|
||
| 2. Run the example: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| export HF_MODEL_PATH=${HOME}/models/Qwen2.5-VL-7B-Instruct | ||
| cd /workspace/verl | ||
| bash verl/experimental/fully_async_policy/shell/geo3k_qwen25vl_7b_megatron_4_4.sh | ||
|
|
||
| This example will take several hours to run. Once the example completes, the output should resemble the following: | ||
|
|
||
| .. image:: ../data/geo3k_qwen25vl_7b_megatron_4_4_complete.png | ||
| :alt: Expected terminal output after geo3k_qwen25vl_7b_megatron_4_4.sh completes | ||
|
|
||
| DAPO example | ||
| -------------------------------------------------------------------- | ||
|
|
||
| The `dapo_7b_math_fsdp2_4_4.sh <https://github.com/AMD-Ecosystem/verl/blob/main/verl/experimental/fully_async_policy/shell/dapo_7b_math_fsdp2_4_4.sh>`__ | ||
| example launches fully asynchronous DAPO reinforcement learning training using ``Qwen2.5-Math-7B`` on math reasoning tasks. | ||
|
|
||
| 1. Download `prepare_dapo_7b_math_fsdp2_4_4.sh <https://github.com/AMD-Ecosystem/verl/tree/amd-integration/verl/experimental/fully_async_policy/shell/data_model_preparation/prepare_dapo_7b_math_fsdp2_4_4.sh>`_ and run: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| export HF_TOKEN=your_token | ||
| # or: hf auth login | ||
| cd /workspace/verl | ||
| bash verl/experimental/fully_async_policy/shell/data_model_preparation/prepare_dapo_7b_math_fsdp2_4_4.sh | ||
|
|
||
| 2. Run the example: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| cd /workspace/verl | ||
| bash verl/experimental/fully_async_policy/shell/dapo_7b_math_fsdp2_4_4.sh | ||
|
|
||
| This example will take several hours to run. Once the example completes, the output should resemble the following: | ||
|
|
||
| .. image:: ../data/dapo_7b_math_fsdp2_4_4_complete.png | ||
| :alt: Expected terminal output after dapo_7b_math_fsdp2_4_4.sh completes | ||
|
|
||
| 3. If you encounter out of memory issues, reduce ``max_position_embeddings`` in the ``config.json`` to 4096: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| python -c " | ||
| import json, pathlib | ||
| config_path = pathlib.Path.home() / 'verl/models/Qwen2.5-Math-7B/config.json' | ||
| with open(config_path) as f: | ||
| config = json.load(f) | ||
| config['max_position_embeddings'] = 4096 | ||
| with open(config_path, 'w') as f: | ||
| json.dump(config, f, indent=2) | ||
| " | ||
|
|
||
| 4. Apply these changes as overrides in ``dapo_7b_math_fsdp2_4_4.sh``: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| # line 55: default uses * 2 | ||
| actor_ppo_max_token_len=$((max_prompt_length + max_response_length)) | ||
|
|
||
| # line 56: default uses * 3 | ||
| infer_ppo_max_token_len=$(((max_prompt_length + max_response_length) * 2)) | ||
|
|
||
| # line 61: default is fsdp_size=2 | ||
| fsdp_size=4 | ||
|
|
||
| # line 74: default is total_rollout_steps=$(((512*100))) | ||
| total_rollout_steps=$((100)) | ||
|
|
||
| # line 105: default is max_position_embeddings=32768 | ||
| +actor_rollout_ref.model.override_config.max_position_embeddings=4096 \ | ||
|
|
||
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| rocm-docs-core==1.32.0 | ||
| rocm-docs-core==1.37.0 |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.