AI Research Blog / Frontier Post-TrainingMiles v0.1 · RadixArk · 2026-09-09
Production RL Systems · Agentic Rollouts · Numerical Fidelity · Verified Coverage

대규모 RL의 병목은
손실함수보다 ‘루프 전체의 일치성’에 있다

Miles v0.1: Engineering Production-Level Post-Training at Frontier Scale

SOURCE · Miles v0.1: Production-Level Post-Training · 34 pages · arXiv:2609.08368v1
ROLLOUTFIDELITY GATETRAININGWEIGHT UPDATESGLang + AgentsTITO · R3 · BufferGRPO · PPO · OPDBroadcast · P2P · Deltatool-use · multi-turn · sandboxtokens · experts · stalenessprecision · memory · correctionversion · verify · resumeGENERATE → VERIFY WHAT ACTUALLY HAPPENED → UPDATE → RETURN EXACTLY THE NEW POLICY

Miles v0.1의 중심 주장은 단순하다. frontier-scale post-training에서는 “모델이 학습한다”보다 “rollout에서 실제로 일어난 계산을 trainer가 같은 것으로 이해한다”가 먼저 보장되어야 한다.

보고서는 SGLang 기반 rollout engine, Megatron-LM/FSDP trainer, 세 가지 weight synchronization transport를 한 루프로 묶고, full-parameter RL뿐 아니라 LoRA RL, on-policy distillation, supervised fine-tuning, true-on-policy alignment와 diffusion RL까지 같은 시스템 철학으로 확장한다. 설계원칙은 verified, clean, customizable이다.

Source boundary

이 글은 34페이지 전체와 Figure 1-5, Table 1-9를 검토해 재구성했다. 논문이 직접 측정한 값과 시스템 설계를 source fact로 다루고, 그 의미에 대한 해석은 별도로 표시한다. 단일 configuration에서 나온 수치를 일반적인 scaling law로 확대하지 않는다.

Reference model744B / A40B

GLM-5.2 total / active parameters

Hardware64 GB300

32 rollout + 32 training

Median step263 s

첫 30 measured steps

Prefix-cache hit96%

reference run의 multi-turn affinity

Part I · System Thesis

Post-training은 세 단계가 아니라 세 단계 사이의 계약이다

Rollout, training, weight update가 각각 빨라도 서로 다른 정책을 보고 있으면 RL objective 자체가 흔들린다.

Figure 1은 Miles를 Rollout → Training → Weight update의 순환으로 표현한다. prompt는 dataset의 한 task, trajectory는 그 task에 대한 한 attempt, group은 같은 prompt에서 나온 여러 trajectory의 묶음이다. GRPO처럼 group-relative objective를 사용하는 경우 같은 prompt의 trajectory들은 함께 생성되고 함께 소비되어야 한다.

PROMPT → TRAJECTORY GROUP → SGLANG ROLLOUT + ISOLATED ENVIRONMENT → BOUNDED DATA BUFFER → MEGATRON/FSDP TRAINER → WEIGHT SYNCHRONIZATION → UPDATED ROLLOUT POLICY

핵심은 이 세 단계가 lockstep으로 움직일 필요가 없다는 점이다. fully asynchronous mode에서는 rollout engine이 계속 trajectory를 생성하는 동안 trainer가 이미 완료된 group을 학습한다. latency-sensitive generation과 throughput-oriented training을 분리된 GPU pool에서 겹쳐 수행해 straggler가 전체 장비를 세워두는 시간을 줄인다.

그러나 asynchronous schedule은 새로운 문제를 만든다. rollout policy가 오래될 수 있고, evaluation 결과가 늦게 돌아올 수 있으며, generation이 trainer보다 빠르거나 느리면 buffer에서 backlog 또는 starvation이 생긴다. Miles는 이를 성능 최적화가 아니라 관측 가능한 state로 다룬다.

Part II · Rollout Fidelity

Agentic RL에서는 “같은 대화”가 아니라 “같은 token과 같은 expert”가 필요하다

cache locality, staleness, token exactness, expert routing은 모두 rollout fidelity의 다른 얼굴이다.

§2.1 · Session affinity

멀티턴 episode는 KV cache가 있는 engine으로 돌아간다

multi-turn trajectory의 다음 turn은 앞선 context 대부분을 재사용한다. 다른 engine으로 보내면 전체 history를 다시 prefill해야 한다. Miles는 stable routing key로 session을 같은 engine, DP attention 사용 시 같은 DP rank에 붙이는 affinity를 사용한다. 새 session은 active request가 가장 적은 engine을 고른 뒤 lifetime 동안 고정된다.

session server가 활성화됐는데 routing key가 없으면 load-based fallback을 하지 않고 오류를 낸다. 조용한 성능저하를 허용하기보다 failure를 가시화하는 설계이다. Section 9 reference run에서 prefix-cache hit rate는 96%였다.

§2.2 · Fully asynchronous buffer

빠른 stage와 느린 stage 사이에 bounded buffer를 둔다

sample granularity는 trajectory 하나가 끝날 때마다 slot을 즉시 반환해 in-flight 수를 limit 근처에 유지한다. completed group은 bounded buffer에 들어가고, trainer는 완료된 group을 가져간다. buffer는 세 경우에 group을 버린다.

Drop reasonTypical caseCheckedAfterward
Generation gave upepisode가 collection timeout 초과On arrivalretry 또는 discard
User filter rejects모든 attempt가 같은 reward로 advantage signal 부재On arrivaldiscard
Weights too oldtrainer가 staleness limit을 넘어감On collectionretry 또는 discard

staleness는 현재 trainer weight version에서 group의 어느 token에든 등장한 가장 오래된 weight version을 뺀 값으로 정의한다. 의도적으로 보수적인 정의다. queue size, avg/max staleness, stale group count를 매 step 관측해 bottleneck이 rollout인지 trainer인지 판별한다.

§2.2.4 · Asynchronous evaluation

점수에도 “어느 weight를 평가했는가”라는 lineage가 필요하다

shared rollout engines, dedicated evaluation fleet, external checkpoint backend의 세 mode를 제공한다. snapshot-based mode는 evaluation을 training critical path 밖으로 보낼 수 있지만 snapshot export 자체는 collective이므로 trainer를 잠시 멈출 수 있다. 늦게 돌아온 score는 현재 step이 아니라 실제로 평가한 policy version에 귀속된다.

dedicated fleet는 각 engine이 expected version을 보유했는지 확인하고 mixed-version request fraction이 0인지 검증한다. evaluation 실패는 training을 중단하지 않고 skipped와 원인을 기록한다.

§2.3 · Agent environments

하나의 “agent API” 대신 세 nested plug-in layer를 둔다

LayerExternal connector responsibilityExamples in report
Agent functionagent-environment loopHarbor, NeMo Gym, OpenEnv
Generate functionloop + trajectory/token recordingHUD, Strands Agents, τ-bench
Rollout functiontaskset, grouping, rewards, batching까지Prime Intellect Verifiers
Sandbox providertask container 제공, connector layer와 독립AgentENV, Daytona, E2B, Modal

현재 connector와 sandbox integration은 experimental이고, session server는 screenshot을 아직 기록하지 못한다. computer-use connector는 따라서 generate-function layer에서 자체 trajectory를 기록한다.

§2.4 · Token-In-Token-Out

trainer가 메시지를 다시 tokenization하게 두지 않는다

multi-turn agent harness는 tool-call serialization, reasoning pruning, chat-template rendering 과정에서 token sequence를 바꿀 수 있다. 그러면 trainer는 실제 policy가 sampling한 적 없는 sequence에 대해 gradient를 계산한다. TITO session server는 첫 turn의 prompt token IDs, 이후 output IDs, rollout log-probabilities, routed experts를 checkpoint하고 다음 turn에서 suffix만 tokenize한다.

token exactness는 편의기능이 아니라 RL objective가 실제 trajectory를 가리키게 하는 전제조건이다. linear session은 tail만 확장해 하나의 training sequence를 만들고, branching session은 append-only tree를 유지해 Claude Code처럼 history를 fork/compact하는 harness를 수용한다.

replay matcher는 strict에서 loose까지 설정 가능하다. 지나치게 loose하면 서로 다른 tool call이 같은 visible text 때문에 합쳐져 trainer가 agent가 실제로 하지 않은 call을 학습할 수 있다. 그래서 strict setting이 safe default다.

Current limit

TITO registration은 Qwen3, GLM, Nemotron, Kimi, MiniMax, DeepSeek, Inkling 계열을 중심으로 검증돼 있다. session server는 image/video input을 아직 전달하지 못하므로 vision-language model은 lower-level token-in/token-out path로 SGLang rollout engine을 직접 구동한다.

§2.5 · Rollout Routing Replay (R3)

MoE에서는 token뿐 아니라 expert assignment도 trajectory의 일부다

rollout과 trainer의 kernel·precision 차이가 MoE router의 top-k expert를 바꾸면 같은 token을 서로 다른 expert가 처리한다. R3는 rollout 시 expert assignment를 저장하고 trainer가 그대로 replay한다.

비용은 작지 않다. 32K-token sequence, 60 layers, k=8이면 routing tensor가 trajectory당 약 60 MB이다. dense model에는 의미가 없고, asynchronous RL에서는 다른 mismatch 원인이 커 효과가 제한될 수 있어 per-recipe choice로 둔다.

Part III · Training Numerics

낮은 precision은 속도 옵션이 아니라 rollout-training 공동계약이다

precision, memory, backend, objective를 분리해 선택하되 numerics가 trajectory fidelity를 깨지 않도록 검증한다.

FormatBlock / scaleModels testedMaturityHardware note
BF16AllBaselineA100 포함
FP8 blockwise128×128 / FP32Qwen3-4B, Qwen3-30B-A3B, DeepSeek-V4Generally availableHopper, Blackwell, MI350X/MI355X
MXFP81×32 / UE8M0Qwen3-30B-A3B, DeepSeek-V3.2BetaBlackwell
NVFP41×16 / E4M3 + FP32Qwen3-30B-A3BBetaBlackwell

Miles는 rollout과 training이 같은 weight를 같은 방식으로 quantize하도록 one low-precision path를 둔다. MXFP8와 NVFP4는 checkpoint conversion, trainer forward, SGLang rollout, live weight export의 네 단계에서 같은 quantization contract를 확인한다. MXFP8/NVFP4는 아직 Beta이며 모델별로 behavior가 다를 수 있음을 명시한다.

NVFP4의 dequantized backward는 backward GEMM을 BF16로 수행해 throughput을 gradient stability와 교환한다. four-over-six는 FP4 block을 4 또는 6에 맞춰 quantize해 error가 작은 쪽을 선택하므로 rollout과 training 양쪽에서 동일하게 활성화돼야 한다.

§3.2 · Memory efficiency

optimizer state를 GPU 밖으로 밀어내되 resume semantics까지 함께 정의한다

paused actor offload는 weights, gradients, optimizer state를 GPU 밖으로 옮긴다. Megatron path는 host RAM을 넘으면 node-local disk까지 사용할 수 있지만 FSDP path는 host memory만 지원한다. optimizer state streaming은 bucket별 state만 HBM에 올렸다가 update 후 내린다.

Qwen3-30B-A3B에서 optimizer streaming을 actor offload와 결합하면 offloading time이 24 s → 5.2 s, reload가 8.9 s → 1.3 s로 줄었다. 대신 parallel layout이 바뀌면 resume할 수 없고, streaming 없이 저장한 checkpoint를 streaming run으로 복원할 수 없으며 checkpoint save가 길어질 수 있다.

§3.3 · Backends

Megatron은 대규모 model parallelism, FSDP는 짧은 bring-up path

Megatron-LM

TP×PP×CP×EP×ETP와 DP를 조합하고 host RAM 밖 disk offload와 LoRA를 지원한다. large MoE와 multi-rack job의 practical default다.

PyTorch FSDP

Hugging Face directory를 그대로 읽고 data-parallel sharding 중심으로 동작한다. 새 architecture bring-up과 HF reference numerics 확인에 짧은 경로를 제공한다.

§3.4 · Objective correction

남아 있는 rollout-training mismatch는 importance ratio에서 다룬다

Miles는 GRPO, GSPO, REINFORCE++ 두 변형, PPO의 다섯 advantage estimator와 typed loss interface를 제공한다. 구조적 mismatch 일부는 TITO와 R3가 줄이지만, kernel·precision·batching 차이로 residual mismatch가 남는다.

\[ r = \exp(\log \pi_{\text{train}} - \log \pi_{\text{rollout}}) \]

Truncated importance sampling은 기본 interval [0,2]에서 outlier ratio를 clamp해 gradient contribution을 약화하고, clip-or-pop은 interval 밖 token의 weight를 0으로 만들어 contribution을 제거한다. pre-clamp ratio, clipped fraction, mean absolute deviation \(|r-1|\)을 공통으로 보고한다.

Part IV · Weight Synchronization

frontier model에서는 “새 weight를 돌려보내는 시간” 자체가 training step의 일부다

broadcast, P2P, disk-delta는 같은 converted weights를 전달하지만 topology와 fleet width에 따라 경제성이 달라진다.

TransportTransfer pathApplicable when
Broadcast (default)NCCL broadcast to every rollout rankranks가 NCCL fabric 공유
Peer-to-peerRDMA writes directly into rollout-rank memorydirect rank-to-rank reachability
Disk-deltachanged bytes via shared storageshared fabric 부재 또는 transfer dominance
ModelNodes / sideBroadcastP2PChange
Qwen3-30B-A3B22.67 s2.16 s−19.1%
GLM-5 744B-A40B1658.30 s8.48 s−85.5%
Kimi K2 1T-A32B3253.28 s7.23 s−86.4%

Table 8의 H100 측정은 P2P의 이점이 model size 자체보다 fleet width와 함께 커짐을 보여준다. 반대로 single-node deployment에서는 host-side re-sharding과 pinned-memory staging 비용 때문에 P2P가 broadcast보다 최대 약 70% 느렸고, 그래서 broadcast가 default다.

P2P는 CPU-resident replica로 SGLang weight-loading function을 재사용해 target layout을 만들고, shared pinned buffer를 RDMA staging에 반복 사용한다. 현재 architecture mapping은 Qwen2/Qwen3 dense, Qwen3-MoE, GLM4-MoE, DeepSeek-V3/V3.2 계열에 제한된다.

disk-delta는 base checkpoint와 비교해 바뀐 raw bytes만 shared filesystem에 publish한다. XOR은 더 compact하지만 정확히 한 번, 선언된 base에만 적용해야 한다. overwrite는 더 크지만 idempotent하다. tensor checksum이 실패하거나 base version이 다르면 engine reload 전에 update를 중단한다.

weight sync는 전송 완료로 끝나지 않고 “어느 version이 실제 engine에 올라갔는가”를 검증하는 단계까지 포함한다. debug/CI용 opt-in check는 engine tensor를 random value로 채운 뒤 first update를 실행해 누락된 tensor가 silent pass하지 못하게 한다.

in-flight request는 abort, leave, retract 중 선택할 수 있으며 Megatron default는 retract다. session server를 쓸 때 abort는 token history가 끊기므로 startup에서 거부한다. FSDP는 항상 retract한다.

Part V · Beyond Full-Parameter RL

같은 loop를 LoRA, distillation, exact alignment, diffusion으로 재사용한다

Miles의 설계는 하나의 algorithm을 위한 monolith가 아니라 post-training primitive들의 조합이다.

§5.1 · LoRA RL

base model을 고정하고 adapter를 loop의 unit of work로 바꾼다

trainer는 adapter에만 gradient와 optimizer state를 유지하고 weight update도 adapter만 전달한다. colocated job은 IPC, disaggregated job은 NCCL broadcast로 serving-ready adapter를 보낸다. P2P와 disk-delta는 adapter transport에 사용하지 않는다.

지원 여부는 Megatron adapter, Miles name mapping/export, SGLang serving module의 세 구성요소가 맞아야 하므로 단순 module-name allowlist가 아니라 validated recipe로 관리한다. dense/MoE Qwen2.5, Qwen3, gpt-oss, Kimi K2.5, GLM-5/5.1/5.2, Qwen3.5/3.6, Inkling 등이 보고서에 포함된다. current LoRA training은 Megatron backend만 지원한다.

§5.2 · On-Policy Distillation

teacher가 쓴 문장을 모방하지 않고 student가 실제로 낸 token을 teacher가 채점한다

\[ \Delta_t = \log \pi_{\text{student}}(x_t) - \log \pi_{\text{teacher}}(x_t) \]

이 one-sample reverse-KL estimate를 advantage에서 빼 dense token-level learning signal로 사용한다. task reward와 함께 쓸 수도 있고 reward를 0으로 두고 distillation만 할 수도 있다. top-K variant는 served teacher에서 지원한다.

Qwen3.5-35B-A3B documented run에서 held-out DAPO response length는 14,070 → 6,132 tokens, 약 56% 줄었다. accuracy는 84.0%→85.2%지만 standard error가 약 1.6p이므로 정확도 향상으로 주장하지 않고 “길이는 절반 이상 줄었고 정확도의 신뢰할 변화는 없었다”가 보고서의 정직한 결론이다.

§5.3 · True-on-policy alignment

importance correction 전에 log-probability 자체를 bitwise-identical하게 만든다

same attention kernel, batch-invariant matmul, deterministic inference/training, matched operator contract, rollout sequence rescoring을 조합해 supported configuration에서 sampled token log-probability difference를 정확히 0으로 만든다.

대가는 throughput이다. current main의 registered profile은 dense Qwen3 0.6B와 4B에 한정되고, guarantee는 sampled token의 log-probability에만 적용된다. full output distribution 전체의 일치를 주장하지 않으며 staleness도 별도 문제다.

§6 · Miles-Diffusion

같은 generate-train-update 구조를 image/video diffusion RL로 옮긴다

trajectory는 noise가 image/video가 되는 denoising step sequence다. sglang-diffusion이 intermediate state와 log-probability를 반환하고 FSDP2 trainer가 일부 step을 re-score한다. Flow-GRPO, DiffusionNFT, supervised fine-tuning을 같은 replaceable components 위에서 실행한다.

LTX-2.3 recipe에서 microgroup streaming/deserialization을 적용해 rollout time이 157.4→87.6 s, total step time이 321.9→252.1 s로 줄었다. deterministic mode와 per-parameter dtype control로 train-inference precision gap을 줄인다.

recipe evidence level을 Fully gated / Proxy gated / Verified / Not verified로 구분한다. current main에서 SD3.5와 LTX-2.3은 fully gated, multi-node Wan2.2는 proxy gated, Qwen-Image와 Cosmos 3는 verified, 두 Wan2.2 LoRA recipe는 not verified다.

Part VI · Verified Coverage

“지원한다”는 모델 이름 목록이 아니라 검증수준까지 포함한 주장이다

day-0 model support, multi-vendor hardware, CI gates, small typed interfaces가 production claim의 경계를 만든다.

Miles와 SGLang은 Kimi K3, DeepSeek-V4, GLM-5.2, Qwen3.8, Inkling, NVIDIA Nemotron 3 Ultra의 release-day support를 보고한다. Kimi K3와 2.4T-parameter Qwen3.8 MoE는 full-parameter가 아니라 LoRA recipe로 bring-up했으며 두 recipe는 당시 open PR 상태였다.

보고서는 “supported”가 모든 checkpoint에서 같은 수준의 evidence를 뜻하지 않는다고 명시한다. 어떤 model은 full-scale validated run, 어떤 것은 reduced-layer end-to-end CI, 어떤 것은 unit test 수준이다. source tree에 recipe가 존재한다는 사실과 production evidence를 동일시하지 않는 태도가 Miles의 중요한 설계철학이다.

hardware support는 NVIDIA A100부터 GB300까지, AMD Instinct MI300X·MI325·MI350X·MI355X까지 포함한다. Hopper와 Blackwell은 production hardware로 다루고, AMD는 translation layer가 아닌 native ROCm path를 사용한다. MI350 runner에서는 pull request마다 end-to-end training CI를 실행한다.

Checkpoint

architecture와 verified recipe가 있는가

GPU

필요 kernel과 memory topology를 지원하는가

Number format

BF16 / FP8 / MXFP8 / NVFP4의 hardware contract가 맞는가

코드 품질원칙은 “easy to read, easy to extend”이다. training driver가 pseudocode처럼 읽히도록 복잡성을 module 뒤로 숨기고, rollout function, data source, reward, loss, importance-ratio correction을 small typed interface로 교체한다. pre-commit과 CI는 formatting/import뿐 아니라 Miles-specific anti-pattern을 금지하고, training metrics의 historical drift까지 gate한다.

이 보고서에서 production-ready의 의미는 기능 개수보다 검증 가능한 경계가 많다는 데 있다. 무엇이 정확히 맞는지, 어디까지 테스트됐는지, 어떤 조합은 아직 거부되는지를 코드가 명시한다.

Part VII · 744B Case Study

64 GB300에서 GLM-5.2 744B agentic RL을 동시에 생성하고 학습한다

보고서의 결론을 가장 잘 보여주는 부분은 single 100-step run의 end-to-end 시스템 측정이다.

SettingValue
ModelGLM-5.2, 744B total / A40B active
TaskTerminal-bench-2 terminal-use coding tasks
EnvironmentOpenEnv + one Daytona sandbox per episode
Hardware64 NVIDIA GB300 GPUs, 32 rollout / 32 training
Training parallelismTP 2 / PP 4 / CP 4 / EP 8
Inference8 DP-attention engines, DP 4, MTP enabled
PrecisionBF16 training; FP8 rollout weights and KV cache
Max session length65,536 tokens
Batch64 trajectories = 8 tasks × 8 attempts
ScheduleFully asynchronous

training 32 GPUs만으로 744B model을 fit하기 위해 optimizer state를 node-local disk에 stream한다. DP=4를 쓸 수 없는 parallel layout에서 rank당 optimizer share가 약 279 GB여서 선택이 아니라 필요조건이었다. terminal episode는 30 turns 또는 1시간에서 끝나고, reply당 최대 8,192 tokens를 허용한다.

up to 128 trajectories가 in-flight이고 training batch는 64다. generation과 training은 weight update 사이에서 겹쳐 실행된다. 실제로 약 90~100 request가 동시 generation 상태를 유지했고 prefix-cache hit rate는 96%였다.

Step time263 s

첫 30 measured step median. step 0 warm-up 1,042 s는 plot에서 clipped.

Train-inference KL0.0369

100 steps mean; 끝에서 초기수준 근처.

Raw reward0.438 → 0.556

9-step moving average observation.

Prefix cache96%

affinity가 later turn을 prefix holder로 반환.

reward의 0.438→0.556 상승은 improvement claim이 아니다. single run, single task distribution이므로 run-to-run variation을 분리할 수 없다고 저자들이 직접 제한한다. 이것이 보고서 전체의 verification 철학과도 일치한다.

What this case study establishes

이 case는 744B model을 32 training GPUs에 fit하고, 다른 32 GPUs에서 agentic rollout을 계속 생성하며, 263초 median step과 96% prefix-cache hit을 기록할 수 있음을 보여준다. 반면 이 한 번의 run만으로 Miles가 다른 model, task, cluster에서도 같은 efficiency나 reward behavior를 보인다고 결론낼 수는 없다.

최종적으로 Miles가 제시하는 production post-training의 기준은 빠른 rollout, 정확한 trajectory reconstruction, numerical contract, topology-aware weight transport, explicit verification level을 하나의 운영체계로 묶는 것이다.

References · Source Backbone

보고서와 핵심 구성요소

01
Miles v0.1: Production-Level Post-Training

RadixArk, September 2026. 본 글의 primary source.

02
Miles GitHub Repository

보고서가 제시한 open-source implementation.

03
Miles Documentation

fully async, agentic rollout, LoRA, OPD, P2P, diffusion 등 user/advanced guides.

04
slime

Miles가 clean design의 기반으로 명시한 LLM post-training framework.

05
SGLang

rollout serving stack과 agentic request routing의 핵심 기반.

06
Megatron-LM

large-scale training backend의 기반.

07
PyTorch FSDP

Hugging Face direct bring-up을 중시하는 두 번째 training backend.

08
No Token Left Behind: Token-In-Token-Out in Miles

TITO의 token-exact multi-turn trajectory 설계에 대한 companion report.

09
Updating 1T Parameters in Seconds — P2P Weight Transfer

distributed weight synchronization의 P2P path에 대한 companion report.

10
OPD Support in Miles

on-policy distillation path의 documented experiment.

11
Miles-Diffusion

image/video diffusion RL로 동일 architecture를 확장한 repository.

12
GLM-5.2 Terminal-Bench-2 Reference Run

64 GB300 end-to-end case study의 launch script.