Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
verl
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ZhangXiaoyun
verl
Commits
bbda2e57
Unverified
Commit
bbda2e57
authored
Feb 25, 2025
by
Chi Zhang
Committed by
GitHub
Feb 25, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ppo] fix: fix minibatch size when n > 1 for megatron worker (#370)
parent
656accb0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletions
+2
-1
verl/single_controller/ray/base.py
+1
-1
verl/workers/megatron_workers.py
+1
-0
No files found.
verl/single_controller/ray/base.py
View file @
bbda2e57
...
...
@@ -333,7 +333,7 @@ class RayWorkerGroup(WorkerGroup):
return
ray
.
get
(
self
.
execute_all_async
(
method_name
,
*
args
,
**
kwargs
))
def
execute_all_async
(
self
,
method_name
:
str
,
*
args
,
**
kwargs
):
# Here, we assume that if all arguments in args and kwargs are lists, and their lengths match len(self._workers),
# Here, we assume that if all arguments in args and kwargs are lists, and their lengths match len(self._workers),
# we'll distribute each element in these lists to the corresponding worker
# print(f"execute_all_async: method {method_name}({args}, {kwargs})")
length
=
len
(
self
.
_workers
)
...
...
verl/workers/megatron_workers.py
View file @
bbda2e57
...
...
@@ -111,6 +111,7 @@ class ActorRolloutRefWorker(MegatronWorker):
# normalize config
if
self
.
_is_actor
and
self
.
_is_rollout
:
self
.
config
.
actor
.
ppo_mini_batch_size
*=
self
.
config
.
rollout
.
n
self
.
config
.
actor
.
ppo_mini_batch_size
//=
mpu
.
get_data_parallel_world_size
()
if
self
.
config
.
actor
.
get
(
'ppo_micro_batch_size'
,
None
):
self
.
config
.
actor
.
ppo_micro_batch_size
//=
mpu
.
get_data_parallel_world_size
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment