Miles: A PyTorch-Native Stack for Large-Scale LLM RL Post-Training
Meta has released Miles, a PyTorch-native open-source stack designed for large-scale reinforcement learning post-training of large language models. It provides a framework for training stability, reproducibility, and scalability, building on existing technologies like torchtitan and Fairscale to support distributed RL workflows.
Background
- PyTorch is the most widely used open-source deep learning framework, maintained primarily by Meta (Facebook). It is the standard platform for training and running most major AI models, including LLMs like Meta's Llama series.
- "Post-training" (or RL post-training) refers to the stage after a large language model has been pre-trained on vast text data. It includes methods like Reinforcement Learning from Human Feedback (RLHF), which is what made ChatGPT so effective at following instructions — this is a critical, resource-intensive step.
- Miles is a new open-source software stack (set of tools/libraries) that aims to make this post-training step native to PyTorch, meaning it runs efficiently within PyTorch's existing ecosystem without relying on external frameworks (like DeepSpeed, used by Microsoft, or TRL from Hugging Face).
- The key challenge Miles addresses: performing RLHF on very large models (hundreds of billions of parameters) is notoriously hard to do at scale, requiring complex distributed computing tricks. Miles claims to simplify this dramatically while matching or beating the performance of existing specialized systems.
Max Weinbach says he had early access to OpenAI's new model GPT-5.6 Sol, calling it his favorite model by far. He highlights that it never gives up and will keep reasoning until it's done. OpenAI announced that GPT-5.6 Sol, along with Terra and Luna, will launch publicly on Thursday, with preview access expanding globally now.
Newer Claude models sometimes invent extra keys in tool call arguments, breaking validation in Pi's edit tool. The author suspects post-training for Claude Code's forgiving harness makes alternative schemas fail. This suggests closed RL training can degrade general tool-use reliability.
The author builds and trains a GPT-2 small model from scratch in JAX, starting from a basic bigram-style model and incrementally adding components like LayerNorm and Transformer blocks. Achieved a final loss of 3.418, beating their PyTorch version (3.538) and original GPT-2 small (3.499) on the same test dataset.
The author debugged a Flax NNX training loop where the loss was stuck at 10.82, indicating random guessing. By hashing the model parameters and comparing hashes across steps, they discovered the parameters weren't changing. The root cause was using @jax.jit instead of @nnx.jit, which is needed for proper in-place state propagation of parameter updates in NNX.
Building a JAX training loop for an LLM from scratch using Flax NNX and Optax. First validated the harness with a minimal "A-to-A" model (embedding then projection) before adding Transformer layers. Key challenges included fixing JAX's GPU memory default and slow data iteration by committing data to CPU memory.