nowfound

AI · August 13, 2026

NanoRL – RL training for LLMs in ~1,800 lines

The smallest async RL trainer I could write: one loop that runs REINFORCE on CartPole on a laptop and async GRPO on a cluster (e.g. 8xH100 trainer, 8 vLLM workers, ran as a [SkyPilot job group](https://docs.skypilot.ai/en/latest/examples/job-groups.html) on k8s ). All without Ray or TRL or DeepSpeed etc., workers talk to the trainer over stdlib HTTP.

In plain words

NanoRL is a lightweight reinforcement learning trainer for large language models written in approximately 1,800 lines of code. It runs the same training loop on both laptops using REINFORCE and on GPU clusters using asynchronous GRPO, without requiring Ray, TRL, or DeepSpeed. Workers communicate with the trainer via standard HTTP. Designed to be forked and modified rather than used as a library, it implements REINFORCE, PPO, GRPO, and RLOO algorithms where only the advantage computation differs between them.

written from the facts on this page · September 2026

From the sources

One RL training loop that runs CartPole on a laptop and disaggregated async RLVR on a GPU cluster. About 1,800 lines across 7 files. No Ray, no TRL, no DeepSpeed. It's small enough to read in an afternoon, and it's meant to be forked, not imported. - alex000kim/nanoRL

One RL training loop that scales from a laptop CPU to a GPU cluster. No GPU required : the same disaggregated trainer/worker setup that runs on 16 GPUs runs as two pods on your laptop. ~2,200 lines across 7 files, no Ray, TRL or DeepSpeed. Like nanoGPT , a codebase to fork, not a library to import. loss = - ( advantage * logprob ). mean () # + PPO ratio clip, + optional KL REINFORCE, PPO, GRPO and RLOO differ only in how advantage(...) is computed ( algos.py ); sync vs async only in where batches come from. uv pip install torch gymnasium numpy transformers " datasets<4 " peft pyyaml python train.py --task cartpole --algo reinforce # ~10 s python train.py --config configs/cartpole_ppo.yaml #…from github.com

Does the same job

all alternatives →
  • IB
    I built a tiny LLM to demystify how language models workApr 2026 · github.com · ▲915

    Built a ~9M param LLM from scratch to understand how they actually work. Vanilla transformer, 60K synthetic conversations, ~130 lines of PyTorch. Trains in 5 min on a free Colab T4. The fish thinks the meaning of life is food. Fork it and swap the personality for your own character.

  • IR
  • TB
    Terminal-Bench-RL: Training long-horizon terminal agents with RL2025 · github.com · ▲125

    After training calculator agent via RL, I really wanted to go bigger! So I built RL infrastructure for training long-horizon terminal&#x2F;coding agents that scales from 2x A100s to 32x H100s (~$1M worth of compute!) Without any training, my 32B agent hit #19 on Terminal-Bench leaderboard, beating Stanford's Terminus-Qwen3-235B-A22! With training... well, too expensive, but I bet the results would be good! *What I did*: - Created a Claude Code-inspired agent (system msg + tools) - Built Docker-isolated GRPO training where each rollout gets its own container - Developed a multi-agent…

  • nanochatOct 2025 · ▲349

    Build your won ChatGPT for $100 on a single GPU

  • LF
    LeanRL: Fast PyTorch RL with Torch.compile and CUDA Graphs2024 · github.com · ▲53

    We're excited to announce that we've open-sourced LeanRL, a lightweight PyTorch reinforcement learning library that provides recipes for fast RL training using torch.compile and CUDA graphs. By leveraging these tools, we've achieved significant speed-ups compared to the original CleanRL implementations - up to 6x faster! Reinforcement learning is notoriously CPU-bound due to the high frequency of small CPU operations. PyTorch's powerful compiler can help alleviate these issues, but comes with its own costs. LeanRL addresses this challenge by providing simple recipes to accelerate your…

  • TV

More ai this month

the category →
  • I trained a 125M-parameter transformer to autocomplete piano performances in real time (~108 notes&#x2F;sec on an iPhone 15). The idea is basically GitHub Copilot or Tabnine, except instead of prompting it with code, you prompt it by playing a few notes on a MIDI piano. The model then continues what you played, entirely on-device. The app is free if anyone wants to try it. Happy to answer questions about the model, training, Core ML, or the many things that didn't work.

    AI · 17d ago · simedw.com

  • Astute585

    Automate your B2B brand going viral, with new media creators

    AI · 18d ago · company-app.joinastute.com

  • Grok Bot547

    AI teammates that you can give real work to

    AI · 25d ago · x.ai

  • Hey HN, Henry from Cactus here! We previously released Cactus Needle, a 14MB agentic LLM for tool call, device use, and structured extraction for phones, wearables, smart homes, small robots and microcontrollers. We got really great feedback here, and have now incorporated the suggestions to release Needle 2. The whole model is a single 14MB binary that runs a full session in 28MB of RAM; 45m parameters at 2bit compression. Needle hits 500 tokens&#x2F;sec decode speed on a Raspberry Pi 5, sits between 400-1,500 tokens&#x2F;sec on VR devices like Meta Quest 3S and Apple Vision Pro, and ranges…

    AI · 27d ago · cactuscompute.com

  • Turn website visitors into qualified pipeline

    AI · 19d ago · clarasdr.ai

  • Kane CLI446

    Natural language browser & mobile app tests from terminal

    AI · 24d ago · testmuai.com

Launched alongside, August 2026

the whole month →
  • TL

    Life & fun · 10d ago · louisabraham.github.io

  • Hey Noah641

    A proactive AI executive assistant for founders

    AI · Aug 2026 · heynoah.io

  • Let agents source clips from terabytes of your local video

    Work · 18d ago · clipto.com

  • SA

    Hello HN! I found that picking out plausible but diverse skin tones for my digital art and game development projects was kind of difficult, and I got curious about if there was a way to define a color space that made it easy. I've built a color picker and procedural generation algorithm based on the space as well as a bunch of other fun js features and demos throughout the page that use the equations. If you find it interesting, I have lots of explanations of how I built it and what properties the space has. The methodology might be a bit shaky, but hopefully the result is as helpful for…

    Life & fun · Aug 2026 · toneyalexander.github.io

  • AdAnt AI608

    Claude for viral, high-converting social ads

    AI · Aug 2026 · adant.ai

  • I trained a 125M-parameter transformer to autocomplete piano performances in real time (~108 notes&#x2F;sec on an iPhone 15). The idea is basically GitHub Copilot or Tabnine, except instead of prompting it with code, you prompt it by playing a few notes on a MIDI piano. The model then continues what you played, entirely on-device. The app is free if anyone wants to try it. Happy to answer questions about the model, training, Core ML, or the many things that didn't work.

    AI · 17d ago · simedw.com