verl’s lesson introduced its sync and async trainers; async and staleness treats the algorithmic side — what off-policy data does to the gradient and how labs correct for it. This lesson is the systems view: where the idle time in synchronous RL comes from, what each asynchronous design buys and costs, and how seven current frameworks implement the three mechanisms that matter — a staleness bound, weight synchronisation, and partial rollouts. Framework facts were checked against their default branches on 2026-12-02/03: verl 4525109 (0.10.0.dev; the fully-async recipe now lives in verl-recipe, pinned to verl v0.9.1), AReaL v2.1.1, slime v0.4.0, prime-rl v0.11.0, SkyRL 0.5.0, OpenRLHF v0.12.0, ROLL v0.4.0.
Where synchronous RL loses time
A synchronous step generates a batch of trajectories with the current weights, waits for all of them, trains, and syncs:
If decoding streams are not saturated, generation time is set by the maximum length, not the mean. For log-normal lengths with spread , the maximum of draws sits near , so with mean 1 and , , the slowest trajectory is about 12 times the mean (the NumPy run below measures 12.5). During that tail most decode streams are idle: the busy fraction of rollout capacity is roughly . Reasoning and agent workloads make this worse — response lengths span orders of magnitude, and agent trajectories add tool latency (next lesson).
There are only a few ways out:
- Overlap generation and training on disjoint GPUs: one-step-off (Noukhovitch et al.) trains batch while generating batch with weights one version old.
- Decouple completely (AReaL): rollout workers never wait; the trainer takes whatever has finished; a staleness bound keeps data from getting too old.
- Stop waiting for the tail: partial rollouts interrupt unfinished trajectories at a weight update and continue them later (Kimi k1.5’s token budget, AReaL’s interruptible generation), or over-sample and abort stragglers (verl’s
rollout.over_sample_rate).
The figure below runs a small discrete-event model of these options on one budget of 16 GPUs. It is a teaching model — constant per-stream decode speed, training cost linear in batch size — but its qualitative behaviour matches the published systems.
verl 레슨은 verl의 동기·비동기 trainer를 소개했고, 비동기와 staleness는 알고리즘 쪽 — off-policy 데이터가 gradient에 무슨 일을 하고 연구실들이 어떻게 보정하는지 — 를 다룬다. 이 레슨은 시스템 관점이다. 동기 RL의 유휴 시간이 어디서 오는지, 각 비동기 설계가 무엇을 얻고 무엇을 치르는지, 그리고 현재의 프레임워크 일곱 개가 중요한 세 메커니즘 — staleness 상한, 가중치 동기화, partial rollout — 을 어떻게 구현하는지 본다. 프레임워크 사실은 2026-12-02/03 기준 기본 브랜치와 대조했다. verl 4525109(0.10.0.dev, fully-async 레시피는 이제 verl v0.9.1에 고정된 verl-recipe에 있다), AReaL v2.1.1, slime v0.4.0, prime-rl v0.11.0, SkyRL 0.5.0, OpenRLHF v0.12.0, ROLL v0.4.0.
동기 RL은 어디서 시간을 잃는가
동기 스텝은 현재 가중치로 trajectory 개를 생성하고, 전부 끝나기를 기다린 뒤 학습하고 동기화한다.
decode stream이 포화되지 않았다면 생성 시간은 평균이 아니라 최대 길이가 정한다. 퍼짐 인 로그정규 길이에서 개 중 최댓값은 대략 근처에 있어, 평균 1, , 이면 가장 느린 trajectory가 평균의 약 12배다(아래 NumPy 실행은 12.5를 잰다). 그 꼬리 동안 decode stream 대부분이 논다. rollout 용량 중 바쁜 비율은 대략 다. 추론과 agent 작업은 이것을 더 악화시킨다. 응답 길이가 여러 자릿수에 걸치고, agent trajectory에는 tool 지연이 더해진다(다음 레슨).
빠져나갈 길은 몇 가지뿐이다.
- 생성과 학습을 겹친다(서로 다른 GPU에서). one-step-off(Noukhovitch et al.)는 한 버전 낡은 가중치로 배치 을 생성하면서 배치 를 학습한다.
- 완전히 분리한다(AReaL). rollout worker는 기다리지 않고, 학습기는 끝난 것을 가져가며, staleness 상한이 데이터가 너무 낡지 않게 한다.
- 꼬리를 기다리지 않는다. partial rollout은 가중치 업데이트 때 끝나지 않은 trajectory를 중단했다가 나중에 이어 간다(Kimi k1.5의 토큰 예산, AReaL의 interruptible generation). 또는 과다 샘플링 후 낙오자를 abort한다(verl의
rollout.over_sample_rate).
아래 그림은 GPU 16개라는 하나의 예산에서 이 선택지들을 작은 이산 사건 모델로 돌린다. 교육용 모델이다 — stream당 decode 속도는 일정하고 학습 비용은 배치 크기에 선형이다 — 하지만 정성적 동작은 발표된 시스템들과 맞는다.
The admission rule, and what it does not bound
Let be the trainer’s current version (number of completed updates), the trajectories consumed per update, the trajectories finished so far and those in flight. AReaL’s StalenessManager (and SkyRL’s copy of it) admits a new rollout only while
with = rollout.max_head_offpolicyness (default 0 = synchronous). Why this bounds staleness: a rollout admitted at version is among the first rollouts ever admitted. If rollouts are consumed roughly in admission order, it is consumed by update at the latest, so its lag . That proof has a hidden assumption — consumption in admission order — and two things break it: out-of-order completion (a long trajectory finishes after many short ones admitted later) and partial rollouts (a trajectory keeps running across updates). In the figure, untick partial rollout: the trainer must drain all in-flight work before each sync, lag never exceeds η, and the drain bubble costs throughput. Tick it: throughput jumps, the mean lag is still ≈ η, but the histogram grows a red tail beyond η — trajectories admitted long ago that were still running.
That is exactly why the systems differ in what they bound:
- Count-based admission (AReaL, SkyRL, verl’s fully-async recipe) bounds how much work exists per version; it does not bound one trajectory’s lifetime. SkyRL documents this honestly: over-stale groups are still trained and counted in
async/staleness_violation_count; dropping them is “not supported yet”. - Per-token version labels bound what is trained: prime-rl labels each token with the policy version that sampled it and masks tokens older than
orchestrator.max_staleness(default 8) from every loss term; AReaL’s optionalrollout.mask_stale_tokensdoes the same against η. - Per-trajectory age limits bound what is kept: verl’s V1 sampler evicts (
drop) or waits for (wait) prompt groups older thantrainer.v1.sampler.max_off_policy_threshold(default 8) model versions, counted from first generation; prime-rl’sstrict_stalenessdrops whole rollouts whose dispatch version is too old, because a fresh token still attends to KV computed by old weights.
Partial rollouts: abort-and-resume vs keep
At a weight update, an in-flight request can be handled in two ways:
| abort and resume | keep (pause in place) | |
|---|---|---|
| mechanism | abort, return partial tokens + log-probs, resubmit prompt + prefix with the remaining budget | freeze requests in the scheduler, swap weights, continue |
| prefix KV | recomputed by the new weights (extra prefill) | computed by the old weights (stale KV) |
| used by | verl V1 (FullyAsyncLLMServerClient retries aborted requests; prefix re-prefilled), AReaL (SGLang abort, then resubmit), slime --flush-cache-interval 1, ROLL RLVR | prime-rl (vLLM pause_generation(mode="keep")), SkyRL fully async (KEEP pause), OpenRLHF --train.partial_rollout_enable, slime --flush-cache-interval ≤ 0 (in place) |
Either way the trajectory is generated by several policy versions, and the recorded per-token log-probs are those of the version that sampled each token. This is why per-token rollout correction (previous lesson) is the natural partner: its ratio uses each token’s own behaviour probability. verl exposes the spread as training/off_policy/trajectory_spans/*; the legacy recipe as fully_async/partial/max_partial_span.
The sweep: η buys staleness, not speed
입장 규칙, 그리고 그것이 묶지 않는 것
학습기의 현재 버전(완료된 업데이트 수)을 , 업데이트당 소비하는 trajectory 수를 , 지금까지 끝난 trajectory 수를 , 진행 중인 것을 이라 하자. AReaL의 StalenessManager(그리고 그것을 옮긴 SkyRL)는 다음이 성립할 때만 새 rollout을 받는다.
여기서 = rollout.max_head_offpolicyness(기본 0 = 동기)다. 이것이 staleness를 묶는 이유: 버전 에서 들어온 rollout은 지금까지 들어온 처음 개 안에 있다. rollout이 대략 들어온 순서대로 소비된다면 늦어도 업데이트 에서 소비되므로 lag 다. 이 증명에는 숨은 가정 — 들어온 순서대로 소비 — 이 있고, 두 가지가 그것을 깬다. 순서가 뒤바뀐 완료(나중에 들어온 짧은 것들 뒤에 긴 trajectory가 끝난다)와 partial rollout(trajectory가 업데이트를 가로질러 계속 돈다)이다. 그림에서 partial rollout을 끄면 학습기는 동기화 전마다 진행 중인 작업을 모두 drain해야 하고, lag는 η를 넘지 않으며, drain 거품이 처리량을 깎는다. 켜면 처리량이 뛰고 평균 lag는 여전히 ≈ η이지만, 히스토그램에 η 너머의 빨간 꼬리가 자란다. 오래전에 들어와 아직 돌던 trajectory들이다.
시스템들이 무엇을 묶는지가 갈리는 이유가 바로 이것이다.
- 개수 기반 입장(AReaL, SkyRL, verl fully-async 레시피)은 버전당 존재하는 작업량을 묶을 뿐, trajectory 하나의 수명은 묶지 않는다. SkyRL은 이것을 솔직하게 문서화한다. 너무 낡은 group도 여전히 학습되고
async/staleness_violation_count로 세어지며, 버리는 기능은 “아직 지원하지 않는다”. - 토큰별 버전 라벨은 학습되는 것을 묶는다. prime-rl은 토큰마다 그것을 샘플한 정책 버전을 붙이고
orchestrator.max_staleness(기본 8)보다 낡은 토큰을 모든 손실 항에서 mask한다. AReaL의 선택 옵션rollout.mask_stale_tokens도 η에 대해 같은 일을 한다. - trajectory별 나이 제한은 남기는 것을 묶는다. verl V1 sampler는 첫 생성부터 센 모델 버전이
trainer.v1.sampler.max_off_policy_threshold(기본 8)를 넘은 prompt group을 버리거나(drop) 기다린다(wait). prime-rl의strict_staleness는 dispatch 버전이 너무 낡은 rollout을 통째로 버린다. 새 토큰도 옛 가중치가 계산한 KV를 attend하기 때문이다.
Partial rollout: abort 후 재개 vs keep
가중치 업데이트 때 진행 중인 요청은 두 방식으로 다룰 수 있다.
| abort 후 재개 | keep (제자리 일시정지) | |
|---|---|---|
| 방식 | abort하고 부분 토큰 + log-prob을 돌려받아, prompt + prefix를 남은 예산으로 다시 제출 | scheduler 안에서 요청을 얼리고 가중치를 바꾼 뒤 계속 |
| prefix KV | 새 가중치로 다시 계산(추가 prefill) | 옛 가중치로 계산된 것(stale KV) |
| 쓰는 곳 | verl V1(FullyAsyncLLMServerClient가 abort된 요청을 재시도, prefix를 다시 prefill), AReaL(SGLang abort 후 재제출), slime --flush-cache-interval 1, ROLL RLVR | prime-rl(vLLM pause_generation(mode="keep")), SkyRL fully async(KEEP pause), OpenRLHF --train.partial_rollout_enable, slime --flush-cache-interval ≤ 0(in place) |
어느 쪽이든 trajectory는 여러 정책 버전이 생성하고, 기록된 토큰별 log-prob은 각 토큰을 샘플한 버전의 것이다. 그래서 토큰 단위 rollout correction(이전 레슨)이 자연스러운 짝이다. 그 ratio 는 토큰마다 자기 behaviour 확률을 쓴다. verl은 이 퍼짐을 training/off_policy/trajectory_spans/*로, 레거시 레시피는 fully_async/partial/max_partial_span으로 보여 준다.
Sweep: η는 속도가 아니라 staleness를 산다
Two regimes show up as soon as you move the GPU split. While rollout is the bottleneck (few rollout GPUs), a larger η lets the rollout side run further ahead and fill the tail, so throughput rises with η. Once the trainer is the bottleneck, throughput is pinned at and extra η only adds lag. The verl recipe’s tuning advice says the same in operational terms: balance rollout and trainer resources first (watch rollouter/idle_ratio vs trainer/idle_ratio), keep staleness_threshold below 1. The slime docs give the analytic version of the ceiling: speedup for rollout, train and weight-update times — overlap can at best hide the shorter of the two phases.
What the systems actually do (Dec 2026)
| system | modes | staleness control | in-flight requests at a weight update | weight sync |
|---|---|---|---|---|
| verl V1 trainer (main) | trainer.v1.trainer_mode: sync, colocate_async, separate_async (+ optional hybrid replicas lent to rollout, enable_switch) | max_off_policy_threshold (8 versions, from first generation) with drop (evict + refill one prompt) or wait; prompts dispatched ahead = num_warmup_batches × train batch | abort → retry with retained tokens/log-probs, prefix re-prefilled | checkpoint engine; separate_async needs a non-naive backend (nccl, nixl, mooncake; others include delta_sharded); parameter_sync_step mini-batches per sync |
| verl fully_async_policy (verl-recipe, v0.9.1) | separate Rollouter / Trainer, streaming one sample at a time | staleness_threshold S: at most samples per sync window ( = trigger_parameter_sync_step, = require_batches) | partial_rollout: sleep/resume keeps partial samples; otherwise wait for active tasks | NCCL (checkpoint-engine style) |
| AReaL v2.1.1 | max_head_offpolicyness 0 = sync, >0 = async | admission rule above; optional mask_stale_tokens | always interruptible: abort, resubmit with prefix, tokens tagged with versions | weight_update_mode: xccl (bucketed NCCL, default), disk, awex |
| slime v0.4.0 | --colocate or disaggregated; fully-async rollout function | no hard bound — staleness is measured and logged; backpressure via --sglang-server-concurrency and the output queue | --flush-cache-interval: 1 = abort, flush, requeue; ≤0 = pause in place | NCCL (disaggregated), CUDA IPC (colocated), disk; --update-weight-mode delta |
| prime-rl v0.11.0 | always disaggregated, one step overlapped (TARGET_LAG = 1 dispatch gate) | per-token max_staleness (8) masks old tokens; strict_staleness drops whole rollouts | vLLM keep-mode pause; prefix cache salted per version | filesystem, nccl, modelexpress (NIXL) |
| SkyRL 0.5.0 | colocated sync, one-step-off example, trainer.fully_async.enabled | AReaL-style admission with max_staleness_steps (4); violations logged, not dropped | KEEP pause; clear_kv_cache_on_weight_sync off by default | CUDA IPC (colocated) / NCCL; delta via shared storage |
| OpenRLHF v0.12.0 | hybrid engine (sync) or --train.async_enable | queue backpressure: --train.async_queue_size (1) batches ahead | --train.partial_rollout_enable: vLLM keep-mode pause | vLLM weight-transfer API: IPC (hybrid) / NCCL |
| ROLL v0.4.0 | sync when colocated; async_generation_ratio > 0 when separated | groups older than the ratio (in steps) are aborted / dropped | RLVR: abort and resume with kept tokens; agentic: the turn is regenerated | CUDA IPC (colocated) / NCCL broadcast |
Reported speedups, with their setups: the verl V1 benchmark (Qwen3.5-35B-A3B, Megatron + vLLM, 4 nodes, 32k responses) took 22.79 h for 150 steps sync vs 14.72 h colocate_async and 14.10 h separate_async; the verl fully-async recipe reports 2.35–2.67× on 128 GPUs for Qwen2.5-Math-7B with staleness 0.5 and partial rollout; AReaL’s v0.3 blog reports 41.0 h → 14.8 h (1.5B, 16 nodes) and 57.7 h → 25.4 h (7B, 24 nodes) for 1000 PPO steps at unchanged AIME24; SkyRL measures 23–35% shorter steps for colocated partial rollouts on Qwen3-4B. None of these are comparable to each other: different models, lengths and baselines.
Weight sync arithmetic
A full sync moves bytes for BF16 parameters to every rollout replica; with a broadcast tree the trainer-side cost is roughly . For that is 64 GB — about 1.3 s at an assumed 50 GB/s effective bandwidth, 6.4 s at 10 GB/s (estimates). In a synchronous colocated loop this is pure stall; in an async loop it stalls in-flight decoding (keep mode) or forces an abort (abort mode), and in drain mode it is preceded by the tail. Three lines of work shrink it: bucketed, pipelined broadcast (AReaL’s 1 GB chunks, slime’s 512 MiB buffers, verl’s checkpoint engines in the style of Moonshot’s checkpoint-engine), delta sync (verl’s delta_sharded sends only changed elements; its doc reports ~1–3% of BF16 parameter bytes change per step and a 1.3–21× win over the full broadcast from 0.5B to 235B), and relay tiers that let rollouts pull weights without stalling the trainer (Laminar). Raise the sync cost in the sweep to see how quickly it eats the async gain in drain mode.
import numpy as np, heapq
N, C, B, ALPHA, T_SYNC, T_SWITCH = 16, 16, 256, 0.25, 0.3, 0.3 # GPUs, streams/GPU, batch, train cost, sync, switch
def lengths(sigma, n, seed=3):
return np.random.default_rng(seed).lognormal(-sigma**2 / 2, sigma, n) # mean 1
def makespan(lens, M, t0):
"""List-schedule jobs on M identical streams starting at t0; return (finish time, busy stream-time)."""
free = [t0] * M; heapq.heapify(free)
for l in lens:
heapq.heappush(free, heapq.heappop(free) + l)
return max(free), float(np.sum(lens))
def sim_sync(L, steps):
t, busy = 0.0, 0.0
for k in range(steps):
end, b = makespan(L[k*B:(k+1)*B], N*C, t); busy += b
t = end + T_SWITCH + ALPHA*B/N + T_SYNC
return dict(thr=steps*B/t, util=(busy/C + steps*ALPHA*B)/(N*t), lag=np.zeros(steps*B))
def sim_oneoff(L, steps, Gr):
Gt = N - Gr; gen_end, train_end, ready, busy = 0.0, 0.0, [0.0], 0.0
for k in range(steps):
start = max(gen_end, ready[max(0, k-1)]) # batch k uses weights v = k-1
gen_end, b = makespan(L[k*B:(k+1)*B], Gr*C, start); busy += b
train_end = max(gen_end, train_end) + ALPHA*B/Gt + T_SYNC
ready.append(train_end)
lag = np.r_[np.zeros(B), np.ones((steps-1)*B)]
return dict(thr=steps*B/train_end, util=(busy/C + steps*ALPHA*B)/(N*train_end), lag=lag)
def sim_async(L, steps, Gr, eta, partial):
"""AReaL-style admission: submit while running < M and accepted+running < (eta+v+1)*B."""
M, Gt = Gr*C, N - Gr
run, done, lags = [], [], [] # run: heap of (end - shift, start_version)
v = acc = i = 0; t = shift = busy = 0.0
trainer_free, state, paused_until, admit = 0.0, 'idle', 0.0, True
while v < steps:
if admit and t >= paused_until:
cap = min(M - len(run), (eta + v + 1)*B - (acc + len(run)))
for _ in range(max(0, cap)):
heapq.heappush(run, (t + L[i] - shift, v)); busy += L[i]; i += 1
cands = [run[0][0] + shift] if run else []
if state in ('train', 'sync'): cands.append(trainer_free)
if paused_until > t: cands.append(paused_until)
t = min(cands)
while run and run[0][0] + shift <= t + 1e-12:
done.append(heapq.heappop(run)); acc += 1
if state in ('train', 'sync') and t >= trainer_free:
state = 'need_sync' if state == 'train' else 'idle'
if state == 'need_sync':
if partial or not run:
if partial:
shift += T_SYNC # in-flight streams stall during the update
admit = True
paused_until = trainer_free = t + T_SYNC; state = 'sync'; v += 1
continue
admit = False # drain: stop admitting until in-flight work ends
if state == 'idle' and len(done) >= B:
batch, done = done[:B], done[B:]
lags += [v - r[1] for r in batch]
trainer_free, state = t + ALPHA*B/Gt, 'train'
T = trainer_free
return dict(thr=steps*B/T, util=(busy/C + steps*ALPHA*B)/(N*T), lag=np.array(lags))
steps, Gr = 24, 6
for sigma in [0.4, 1.0]:
L = lengths(sigma, B*(steps + 12))
rows = [('sync (colocated)', sim_sync(L, steps)), ('one-step-off', sim_oneoff(L, steps, Gr))]
for eta in [1, 2, 4]:
rows.append((f'async eta={eta} drain', sim_async(L, steps, Gr, eta, False)))
rows.append((f'async eta={eta} partial', sim_async(L, steps, Gr, eta, True)))
base = rows[0][1]['thr']
print(f'length tail sigma={sigma}: max/mean of 256 lengths ~ {np.mean([L[k*B:(k+1)*B].max() for k in range(steps)]):.1f}')
for name, r in rows:
print(f" {name:22s} thr {r['thr']:5.1f} ({r['thr']/base:4.2f}x) GPU util {r['util']:4.0%} "
f"lag mean {r['lag'].mean():4.2f} max {int(r['lag'].max())}")Read the two blocks of output. With a mild tail () everything is within ~10% because generation is short compared with training and asynchrony has little to hide. With a heavy tail (, slowest trajectory ≈ 12.5× the mean) synchronous training wastes most of its GPU time; one-step-off and drain-mode async recover the same 1.3×, because both still wait for the slowest trajectory before each update; only interrupting the tail (partial rollout) reaches the trainer-bound ceiling (2.5×) — and that is also the only configuration whose maximum lag exceeds η.
Fully async training with partial rollouts and an AReaL-style admission bound η = 2 shows some trajectories with first-token lag 6. Which explanation is right?
The bound limits the amount of work per version, and implies lag ≤ η only if rollouts are consumed in admission order. With partial rollouts a trajectory survives updates and completes late. Systems that need a hard guarantee add a per-token or per-trajectory rule: prime-rl’s token masking (max_staleness) or strict_staleness, AReaL’s mask_stale_tokens, verl V1’s max_off_policy_threshold with drop/wait.
Summary
- Synchronous RL waits for the slowest trajectory; with heavy-tailed lengths the slowest is an order of magnitude above the mean and most decode capacity idles.
- One-step-off and drain-mode async overlap training with generation but still wait for the tail before each sync; partial rollouts (abort-and-resume or keep) remove that wait.
- AReaL’s admission rule bounds work per version, not trajectory lifetime; hard guarantees need token masks (prime-rl, AReaL) or age-based drop/wait (verl V1).
- Once the trainer is the bottleneck, larger η adds staleness without throughput; balance GPUs first.
- Weight-sync cost scales with bytes; bucketed broadcast, delta sync and relay tiers attack it.
GPU 분할을 옮기자마자 두 영역이 드러난다. rollout이 병목인 동안(rollout GPU가 적을 때)에는 η가 클수록 rollout 쪽이 더 앞서 달려 꼬리를 메우므로 처리량이 η와 함께 오른다. 학습기가 병목이 되면 처리량은 에 고정되고 η를 더 줘도 lag만 늘어난다. verl 레시피의 튜닝 조언도 운영 언어로 같은 말을 한다. 먼저 rollout과 학습기 자원의 균형을 맞추고(rollouter/idle_ratio와 trainer/idle_ratio를 본다), staleness_threshold는 1 아래로 둔다. slime 문서는 상한의 분석적 형태를 준다. rollout·학습·가중치 업데이트 시간에 대해 속도 향상 — 겹치기는 기껏해야 두 단계 중 짧은 쪽을 숨길 뿐이다.
시스템들이 실제로 하는 일 (2026년 12월)
| 시스템 | 모드 | staleness 제어 | 가중치 업데이트 때 진행 중 요청 | 가중치 동기화 |
|---|---|---|---|---|
| verl V1 trainer (main) | trainer.v1.trainer_mode: sync, colocate_async, separate_async (+ 선택적으로 hybrid replica를 rollout에 빌려줌, enable_switch) | max_off_policy_threshold(첫 생성부터 8 버전)와 drop(버리고 prompt 하나 보충) 또는 wait; 미리 dispatch하는 prompt = num_warmup_batches × train batch | abort → 남긴 토큰/log-prob으로 재시도, prefix 다시 prefill | checkpoint engine; separate_async는 naive가 아닌 backend 필요(nccl, nixl, mooncake; 그 밖에 delta_sharded 등); 동기화당 parameter_sync_step개 mini-batch |
| verl fully_async_policy (verl-recipe, v0.9.1) | Rollouter / Trainer 분리, 샘플 하나씩 스트리밍 | staleness_threshold S: 동기화 구간당 최대 샘플( = trigger_parameter_sync_step, = require_batches) | partial_rollout: sleep/resume으로 부분 샘플 유지; 아니면 진행 중 작업을 기다림 | NCCL(checkpoint-engine 방식) |
| AReaL v2.1.1 | max_head_offpolicyness 0 = 동기, >0 = 비동기 | 위의 입장 규칙; 선택 옵션 mask_stale_tokens | 항상 interruptible: abort 후 prefix와 함께 재제출, 토큰에 버전 태그 | weight_update_mode: xccl(bucket NCCL, 기본), disk, awex |
| slime v0.4.0 | --colocate 또는 분리; fully-async rollout 함수 | 단단한 상한 없음 — staleness는 재고 기록만; --sglang-server-concurrency와 출력 큐로 backpressure | --flush-cache-interval: 1 = abort, flush, 재큐잉; ≤0 = 제자리 pause | NCCL(분리), CUDA IPC(colocate), disk; --update-weight-mode delta |
| prime-rl v0.11.0 | 항상 분리, 한 스텝 겹침(TARGET_LAG = 1 dispatch gate) | 토큰별 max_staleness(8)로 옛 토큰 mask; strict_staleness는 rollout 통째로 버림 | vLLM keep 모드 pause; prefix cache는 버전별 salt | filesystem, nccl, modelexpress(NIXL) |
| SkyRL 0.5.0 | colocate 동기, one-step-off 예제, trainer.fully_async.enabled | max_staleness_steps(4)의 AReaL식 입장; 위반은 기록만, 버리지 않음 | KEEP pause; clear_kv_cache_on_weight_sync 기본 꺼짐 | CUDA IPC(colocate) / NCCL; 공유 저장소를 통한 delta |
| OpenRLHF v0.12.0 | hybrid engine(동기) 또는 --train.async_enable | 큐 backpressure: --train.async_queue_size(1) 배치만큼 앞서감 | --train.partial_rollout_enable: vLLM keep 모드 pause | vLLM weight-transfer API: IPC(hybrid) / NCCL |
| ROLL v0.4.0 | colocate면 동기; 분리하면 async_generation_ratio > 0 | ratio(스텝)보다 낡은 group은 abort / 버림 | RLVR: 토큰을 남긴 채 abort 후 재개; agentic: 그 turn을 다시 생성 | CUDA IPC(colocate) / NCCL broadcast |
보고된 속도 향상과 그 설정: verl V1 벤치마크(Qwen3.5-35B-A3B, Megatron + vLLM, 4노드, 32k 응답)는 150 스텝에 sync 22.79시간, colocate_async 14.72시간, separate_async 14.10시간. verl fully-async 레시피는 Qwen2.5-Math-7B, GPU 128개, staleness 0.5 + partial rollout에서 2.35–2.67배. AReaL v0.3 블로그는 PPO 1000 스텝에 41.0시간 → 14.8시간(1.5B, 16노드), 57.7시간 → 25.4시간(7B, 24노드), AIME24는 그대로. SkyRL은 Qwen3-4B colocate partial rollout에서 스텝이 23–35% 짧아졌다고 잰다. 이 숫자들은 서로 비교할 수 없다. 모델, 길이, 기준선이 다 다르다.
가중치 동기화 산수
BF16 파라미터 개를 전부 동기화하면 rollout replica마다 바이트가 간다. broadcast tree를 쓰면 학습기 쪽 비용은 대략 다. 이면 64 GB — 유효 대역폭 50 GB/s로 가정하면 약 1.3초, 10 GB/s면 6.4초(추정치)다. 동기 colocate 루프에서 이것은 순수한 정지이고, 비동기 루프에서는 진행 중인 decode를 멈추거나(keep 모드) abort를 강요하며(abort 모드), drain 모드에서는 그 앞에 꼬리 대기가 붙는다. 이것을 줄이는 세 갈래가 있다. bucket으로 나눈 파이프라인 broadcast(AReaL의 1 GB chunk, slime의 512 MiB buffer, Moonshot checkpoint-engine 방식의 verl checkpoint engine), delta 동기화(verl의 delta_sharded는 바뀐 원소만 보낸다. 문서에 따르면 스텝당 BF16 파라미터 바이트의 약 1–3%만 바뀌고, 0.5B에서 235B까지 전체 broadcast보다 1.3–21배 빨랐다), 그리고 rollout이 학습기를 멈추지 않고 가중치를 가져가게 하는 relay 계층(Laminar)이다. sweep에서 동기화 비용을 올려 drain 모드의 비동기 이득이 얼마나 빨리 사라지는지 보자.
import numpy as np, heapq
N, C, B, ALPHA, T_SYNC, T_SWITCH = 16, 16, 256, 0.25, 0.3, 0.3 # GPUs, streams/GPU, batch, train cost, sync, switch
def lengths(sigma, n, seed=3):
return np.random.default_rng(seed).lognormal(-sigma**2 / 2, sigma, n) # mean 1
def makespan(lens, M, t0):
"""List-schedule jobs on M identical streams starting at t0; return (finish time, busy stream-time)."""
free = [t0] * M; heapq.heapify(free)
for l in lens:
heapq.heappush(free, heapq.heappop(free) + l)
return max(free), float(np.sum(lens))
def sim_sync(L, steps):
t, busy = 0.0, 0.0
for k in range(steps):
end, b = makespan(L[k*B:(k+1)*B], N*C, t); busy += b
t = end + T_SWITCH + ALPHA*B/N + T_SYNC
return dict(thr=steps*B/t, util=(busy/C + steps*ALPHA*B)/(N*t), lag=np.zeros(steps*B))
def sim_oneoff(L, steps, Gr):
Gt = N - Gr; gen_end, train_end, ready, busy = 0.0, 0.0, [0.0], 0.0
for k in range(steps):
start = max(gen_end, ready[max(0, k-1)]) # batch k uses weights v = k-1
gen_end, b = makespan(L[k*B:(k+1)*B], Gr*C, start); busy += b
train_end = max(gen_end, train_end) + ALPHA*B/Gt + T_SYNC
ready.append(train_end)
lag = np.r_[np.zeros(B), np.ones((steps-1)*B)]
return dict(thr=steps*B/train_end, util=(busy/C + steps*ALPHA*B)/(N*train_end), lag=lag)
def sim_async(L, steps, Gr, eta, partial):
"""AReaL-style admission: submit while running < M and accepted+running < (eta+v+1)*B."""
M, Gt = Gr*C, N - Gr
run, done, lags = [], [], [] # run: heap of (end - shift, start_version)
v = acc = i = 0; t = shift = busy = 0.0
trainer_free, state, paused_until, admit = 0.0, 'idle', 0.0, True
while v < steps:
if admit and t >= paused_until:
cap = min(M - len(run), (eta + v + 1)*B - (acc + len(run)))
for _ in range(max(0, cap)):
heapq.heappush(run, (t + L[i] - shift, v)); busy += L[i]; i += 1
cands = [run[0][0] + shift] if run else []
if state in ('train', 'sync'): cands.append(trainer_free)
if paused_until > t: cands.append(paused_until)
t = min(cands)
while run and run[0][0] + shift <= t + 1e-12:
done.append(heapq.heappop(run)); acc += 1
if state in ('train', 'sync') and t >= trainer_free:
state = 'need_sync' if state == 'train' else 'idle'
if state == 'need_sync':
if partial or not run:
if partial:
shift += T_SYNC # in-flight streams stall during the update
admit = True
paused_until = trainer_free = t + T_SYNC; state = 'sync'; v += 1
continue
admit = False # drain: stop admitting until in-flight work ends
if state == 'idle' and len(done) >= B:
batch, done = done[:B], done[B:]
lags += [v - r[1] for r in batch]
trainer_free, state = t + ALPHA*B/Gt, 'train'
T = trainer_free
return dict(thr=steps*B/T, util=(busy/C + steps*ALPHA*B)/(N*T), lag=np.array(lags))
steps, Gr = 24, 6
for sigma in [0.4, 1.0]:
L = lengths(sigma, B*(steps + 12))
rows = [('sync (colocated)', sim_sync(L, steps)), ('one-step-off', sim_oneoff(L, steps, Gr))]
for eta in [1, 2, 4]:
rows.append((f'async eta={eta} drain', sim_async(L, steps, Gr, eta, False)))
rows.append((f'async eta={eta} partial', sim_async(L, steps, Gr, eta, True)))
base = rows[0][1]['thr']
print(f'length tail sigma={sigma}: max/mean of 256 lengths ~ {np.mean([L[k*B:(k+1)*B].max() for k in range(steps)]):.1f}')
for name, r in rows:
print(f" {name:22s} thr {r['thr']:5.1f} ({r['thr']/base:4.2f}x) GPU util {r['util']:4.0%} "
f"lag mean {r['lag'].mean():4.2f} max {int(r['lag'].max())}")출력의 두 블록을 읽자. 꼬리가 약하면() 생성이 학습보다 짧아 비동기가 숨길 것이 적으므로 모두 ~10% 안에 있다. 꼬리가 무거우면(, 가장 느린 trajectory ≈ 평균의 12.5배) 동기 학습은 GPU 시간 대부분을 버린다. one-step-off와 drain 모드 비동기는 똑같이 1.3배를 되찾는데, 둘 다 업데이트 전에 여전히 가장 느린 trajectory를 기다리기 때문이다. 꼬리를 끊는 것(partial rollout)만이 학습기 병목 상한(2.5배)에 닿고 — 최대 lag가 η를 넘는 것도 이 구성뿐이다.
partial rollout과 AReaL식 입장 상한 η = 2로 fully async 학습을 하는데, 첫 토큰 lag가 6인 trajectory가 보인다. 맞는 설명은?
상한 는 버전당 작업량을 제한하고, rollout이 들어온 순서대로 소비될 때만 lag ≤ η를 함의한다. partial rollout에서는 trajectory가 업데이트를 넘어 살아남아 늦게 끝난다. 단단한 보장이 필요한 시스템은 토큰별 또는 trajectory별 규칙을 더한다. prime-rl의 토큰 masking(max_staleness)이나 strict_staleness, AReaL의 mask_stale_tokens, verl V1의 max_off_policy_threshold와 drop/wait.
정리
- 동기 RL은 가장 느린 trajectory를 기다린다. 길이 꼬리가 무거우면 가장 느린 것이 평균보다 한 자릿수 크고 decode 용량 대부분이 논다.
- one-step-off와 drain 모드 비동기는 학습과 생성을 겹치지만 동기화 전마다 여전히 꼬리를 기다린다. partial rollout(abort 후 재개 또는 keep)이 그 대기를 없앤다.
- AReaL의 입장 규칙 는 버전당 작업량을 묶지 trajectory 수명을 묶지 않는다. 단단한 보장에는 토큰 mask(prime-rl, AReaL)나 나이 기반 drop/wait(verl V1)가 필요하다.
- 학습기가 병목이면 큰 η는 처리량 없이 staleness만 더한다. GPU 균형을 먼저 맞추자.
- 가중치 동기화 비용은 바이트에 비례한다. bucket broadcast, delta 동기화, relay 계층이 이것을 공략한다.
더 읽을거리Further reading
- Fu et al., AReaL: A Large-Scale Asynchronous Reinforcement Learning System for Language Reasoning (arXiv 2505.24298) — 완전 비동기 RL, staleness 상한 η, interruptible rollout, decoupled PPO. 이 레슨의 입장 규칙의 출처.Fully asynchronous RL with a staleness bound η, interruptible rollouts and decoupled PPO; the source of the admission rule used here.
- verl docs, V1 Async Trainer (main @ 4525109) and Fully Async Policy recipe (verl-recipe, pinned to v0.9.1) — colocate_async / separate_async, max_off_policy_threshold, partial rollout client, 벤치마크 표. 레거시 레시피는 https://github.com/verl-project/verl-recipe/tree/main/fully_async_policycolocate_async / separate_async, max_off_policy_threshold, the partial-rollout client and benchmark tables. Legacy recipe at https://github.com/verl-project/verl-recipe/tree/main/fully_async_policy
- Noukhovitch et al., Asynchronous RLHF (ICLR 2025, arXiv 2410.18252) — 생성과 학습을 한 스텝 겹치는 one-step off-policy RLHF.One-step off-policy RLHF — generation and learning overlap by one step.
- Kimi Team, Kimi k1.5: Scaling Reinforcement Learning with LLMs (arXiv 2501.12599) — §2.6.2 partial rollout — 고정 토큰 예산을 넘는 trajectory를 저장해 다음 iteration에 이어 생성.§2.6.2 partial rollouts — trajectories beyond a fixed token budget are saved and continued in later iterations.
- prime-rl docs (algorithms.md, inference.md) and SkyRL fully-async tutorial (current main) — 토큰 단위 staleness masking(max_staleness), keep-mode pause, Little's law 기반 동시성 제어. SkyRL은 https://github.com/NovaSky-AI/SkyRLToken-level staleness masking (max_staleness), keep-mode pause, Little's-law concurrency control. SkyRL at https://github.com/NovaSky-AI/SkyRL
- slime docs (rollout-scheduling, rl-systems) and THUDM/slime v0.4.0 — fully-async rollout 함수, flush-cache-interval, partial rollout 재활용, 분석적 속도 상한.The fully-async rollout function, flush-cache-interval, recycled partial rollouts and an analytic speedup bound.
- Sheng et al., Laminar: A Scalable Asynchronous RL Post-Training Framework (arXiv 2510.12633) — relay worker 계층이 parameter service가 되어 rollout이 학습기를 멈추지 않고 새 가중치를 가져간다.A tier of relay workers acts as a parameter service so rollouts pull new weights without stalling the trainer.