Skip to main content
Back

RadixArk's Miles Stops Frontier RL Training Runs From Silently Collapsing

RadixArk open-sources Miles, an enterprise RL framework built on slime that tackles MoE training collapse, FP8 stability, and rollout throughput at frontier scale.

Pro

Repo, Full Access
  • RadixArk open-sourced Miles, an enterprise RL framework forked from slime for LLM and VLM post-training.
  • Unified BF16/FP8/MXFP8/NVFP4/INT4-QAT pipeline eliminates training-inference mismatch that causes MoE RL collapse.
  • Rollout Routing Replay (R3) records SGLang expert routing and replays it during training for bitwise alignment.
  • Speculative rollout with online SFT draft model delivers 25%+ throughput gains versus frozen draft.
  • Supports GRPO, GSPO, PPO, REINFORCE++ across DeepSeek, Qwen, Llama, GLM, MiniMax and agentic environments.
  • Built on SGLang, Megatron-LM, Ray and PyTorch; available via Docker or pip.

Reinforcement learning on frontier-scale language models has a dirty secret: the algorithms look clean on paper, but training runs collapse in production because the numerics between the training engine and the inference engine drift apart. A new open-source framework called Miles from RadixArk is going after that problem directly, and it is arriving with real production users behind it.

Miles is an enterprise-facing reinforcement learning framework for LLM and VLM post-training, forked from and co-evolving with slime. The project was announced by RadixArk, a team spun up by core developers in SGLang and its extended ecosystem (slime, AReaL). It has already collected over 2,000 GitHub stars and, according to the launch thread, powers RL workloads at Modal, Decagon, Nebius, IBM, Periodic Labs, and others on both NVIDIA and AMD hardware.

The mismatch that eats MoE training runs

The core pitch is about correctness under scale. When you sample rollouts from an inference engine and then compute gradients in a training engine, tiny numeric differences (kernel choices, quantization paths, expert routing in mixture-of-experts models) create off-policy bias that can silently destroy a run. Beyond deterministic inference with bitwise identical results, Miles supports true on-policy training via an infrastructure approach, eliminating the mismatch between training and inference to exactly 0 KL divergence using Flash Attention 3, DeepGEMM, batch invariant kernels from Thinking Machines Lab, and torch.compile, and aligning numeric operations between training and inference.

When exact alignment is not achievable, Miles falls back to algorithmic fixes: Truncated Importance Sampling and Masked Importance Sampling to keep gradient estimates unbiased despite off-policy drift.

How the stack fits together

Miles comprises four systems behind a small, pluggable trainer: SGLang for rollout, Megatron-LM for training, Ray for orchestration, and PyTorch as the common layer for models and numerics. That layering matters, because the framework does not try to hide the inference engine behind a generic abstraction. It leans directly on SGLang features like expert routing telemetry.

That direct coupling is what enables Rollout Routing Replay (R3), one of the more interesting recent additions. In MoE models, the router picks a different subset of experts for each token, and if the router picks differently at training time than at rollout time, you are effectively training a different model than the one that generated the data. R3 records those routing decisions during rollout and replays them during the training backward pass, keeping the expert selection bitwise identical.

Precision, all the way down

Miles ships an unusually aggressive low-precision stack. Out of the box, you get MoE-aware rollout/training alignment, a unified BF16/FP8/MXFP8/NVFP4/INT4-QAT pipeline, fast NCCL/RDMA weight sync, fault tolerance, and ready-to-run recipes for frontier models like DeepSeek V4, GLM 5.2, Qwen3.6, Kimi K2.6, and Nemotron 3 Ultra. The FP8 path is the first end-to-end implementation where both sampling and training use the same quantization logic, which the team argues is what finally stops FP8 RL runs from diverging on large MoE models.

The INT4 quantization-aware training pipeline is aimed at a specific pain point: 1TB-scale models that no longer fit on a single node in higher precision. The team reports that a full INT4 W4A16 QAT pipeline lets those models fit into single-machine VRAM on an H200, doubling rollout efficiency by cutting out cross-node communication while maintaining BF16-equivalent accuracy.

Throughput tricks worth stealing

Beyond correctness, Miles is stuffed with engineering wins that shorten the wall-clock of an RL step:

  • Speculative RL rollout. Miles performs online SFT on the draft model during RL instead of freezing it, avoids draft policy drift away from the target model, and achieves 25%+ rollout speedup versus frozen MTP, especially in later training stages.
  • Zero-copy weight sync. After each training step, weights are pushed to the rollout workers via CUDA IPC zero-copy mapping and bucketed flattening, which the team says cuts sync time roughly in half versus standard HTTP or RPC transfers.
  • Partial rollout and over-sampling. Long tails in multi-turn RL waste GPUs. Miles over-samples requests and recycles half-finished trajectories rather than blocking on the slowest one.
  • OOM survival. Miles includes graceful handling of benign OOMs via error propagation. The goal is to let large MoE jobs run closer to the hardware limit while staying stable.

What you can actually train

Miles has wide recipe support: GRPO, GSPO, PPO and REINFORCE++ for RL, plus SFT and on-policy distillation. It supports agentic environments, letting you train coding and computer-use agents through connectors for Harbor, HUD, NeMo Gym, OpenEnv, Verifiers and more, each plugging into the rollout layer that fits it, with task sandboxes on AgentENV, Daytona, E2B or Modal. The framework is unified across text and vision-language models, so a VLM multi-turn agent can be trained with the same rollout function pattern as an LLM.

Model coverage spans DeepSeek R1/V3/V3.2, Qwen 2 through 3, Llama 3 and 4, Gemma 2/3, GLM-4.5 through 4.7, MiniMax M2, plus Mistral, Mixtral, Phi and gpt-oss, or effectively anything SGLang and Megatron already support.

Getting started

Installation is either a Docker pull or a pip install from source, and a training run is a single Python entry point:

docker pull radixark/miles:latest
python train.py \
    --advantage-estimator grpo \
    --model-name qwen3-30b-a3b \
    --hf-checkpoint /path/to/qwen3-30b-a3b-hf \
    --rollout-batch-size 512 \
    --n-samples-per-prompt 8

The relationship with slime is worth understanding before you pick one. Miles is an RL post-training framework for large-scale models, built on slime by RadixArk. It stays closely aligned with slime's upstream development while extending it with enterprise-oriented features: deeper SGLang integration, operational tooling, deployment support, and optimizations for new models and hardware. Miles also adds a growing set of production features, including LoRA, TITO, and low-precision training. If your workload is a research prototype, slime may still be the leaner choice. If you are pushing an MoE model through a multi-week RL run and you cannot afford a silent collapse at day nine, Miles is the fork that has been hardened against exactly that failure mode.