Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions tunix/rl/ppo/ppo_learner.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ def _generate_and_compute_advantage(
# "experiences".
completion_output = self.rl_cluster.generate(
prompts=training_input["prompts"],
micro_batch_size=self._rollout_micro_batch_size,
)
completion_ids = completion_output.tokens
prompt_ids = completion_output.left_padded_prompt_tokens
Expand All @@ -261,6 +262,7 @@ def _generate_and_compute_advantage(
completion_tokens=completion_ids,
pad_id=pad_value,
eos_id=eos_value,
micro_batch_size=self._compute_logps_micro_batch_size,
)
else:
ref_per_token_logps = None
Expand All @@ -272,6 +274,7 @@ def _generate_and_compute_advantage(
old_per_token_logps = self.rl_cluster.get_old_per_token_logps(
prompt_tokens=prompt_ids,
completion_tokens=completion_ids,
micro_batch_size=self._compute_logps_micro_batch_size,
)

# ===== Value computation ======
Expand Down