Skip to content

Move client-supplied per-token RL tensors to GPU in get_rollout_data - #7

Merged
GavinZhu-GMI merged 1 commit into
mainfrom
fix/seam-rl-tensor-device
Jul 31, 2026
Merged

Move client-supplied per-token RL tensors to GPU in get_rollout_data#7
GavinZhu-GMI merged 1 commit into
mainfrom
fix/seam-rl-tensor-device

Conversation

@GavinZhu-GMI

Copy link
Copy Markdown
Owner

The native path computes log_probs/ref_log_probs/advantages/values/returns on-actor (already on device); the tinker seam ships them from the client as CPU tensors, and loss math crosses devices at ppo_kl = old_log_probs - log_probs (RuntimeError: cuda:1 vs cpu). Move them alongside tokens/loss_masks in get_rollout_data; no-op when already on device (native path unaffected).

Validated: GSM8K RL recipe end-to-end on the pooled backend (12 rounds, kl_sample_train 0.003-0.02 nats), plus 2 SFT + 2 RL mixed-tenant run; SFT gates unaffected.

…vantages/values/returns) to GPU in get_rollout_data; native path computes these on-actor, seam path ships them CPU and loss math crossed devices
@GavinZhu-GMI
GavinZhu-GMI merged commit db53d66 into main Jul 31, 2026
15 of 16 checks passed
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