AI & ML interests

Aligning LLMs to be helpful, honest, harmless, and huggy (H4)

Recent Activity

sergiopaniego 
posted an update 3 days ago
view post
Post
134
async RL in TRL is fast, and now it's stable!

sync RL training alternates between writing answers and learning from them, so part of the GPUs is always waiting. TRL's async trainer does both at the same time

on the same number of training steps you get:
> 5h on 16 GPUs instead of 20h on 8
> about the same reward at every step
> 2x the GPUs, but about half the GPU-hours

how it works and how to run it: trl-lib/async-grpo-stable
sergiopaniego 
posted an update 8 days ago
sergiopaniego 
posted an update 14 days ago
view post
Post
274
AsyncGRPOTrainer is now stable in TRL v1.18.0!

generation and training run at the same time on separate GPUs, instead of taking turns

we wrote up how to run it, what you can train with it and how it compares with GRPOTrainer: trl-lib/async-grpo-stable
sergiopaniego 
posted an update 17 days ago
view post
Post
6,905
New post-training example: SFT on agent traces with TRL

→ A large model works as a coding agent in OpenCode, run through OpenEnv
→ The tasks it solves become the training data
→ A 2B model goes from 5.5% to 34.4% on held-out tasks

About 500 traces get most of the gain. Five times more add only 3 to 4 points, so SFT gets the agent working and RL has to do the rest

Full guide, with the models, traces and every rollout open:
https://github.com/huggingface/trl/tree/main/examples/sft_agent_traces
  • 1 reply
·
sergiopaniego 
posted an update 24 days ago
view post
Post
4,782
TRL now supports MOPD (Multi-Teacher On-Policy Distillation) natively❗️

Many frontier open models use it. labs train one RL expert per domain and then distill them all into one model

Blog with what it is, who uses it and an experiment you can run on HF Jobs with one command

https://huggingface.co/blog/sergiopaniego/mopd-trl
loubnabnl 
posted an update 26 days ago
view post
Post
4,742
𝐈𝐧𝐭𝐫𝐨𝐝𝐮𝐜𝐢𝐧𝐠 🧬 𝐅𝐢𝐧𝐞𝐃𝐍𝐀: 𝐭𝐡𝐞 𝐛𝐞𝐬𝐭 𝐝𝐚𝐭𝐚𝐬𝐞𝐭 𝐭𝐨 𝐭𝐞𝐚𝐜𝐡 𝐚𝐧𝐲 𝐥𝐚𝐧𝐠𝐮𝐚𝐠𝐞 𝐦𝐨𝐝𝐞𝐥 𝐃𝐍𝐀.
Training Qwen3-14B on it produces Carbon-X, the strongest open model on DNA benchmarks, on par with GPT-6.1 Sol.

It contains:
- Midtraining: 300B+ tokens of genomic sequences, papers and web pages mixing DNA with text
- SFT: 200K samples, from variant effect prediction to sequence question answering
- RL: 98K prompts with verifiable rewards

Data, models and the full recipe are open.
HuggingFaceBio/FineDNA

Enjoy this late Halloween treat! 🎃
  • 5 replies
·
sergiopaniego 
posted an update 28 days ago
view post
Post
1,265
if you want to deep dive into how the new @MistralAI Large 4 was built, we sat down with the team to learn straight from them!

scaling, specialization, evals, cyber, sandboxing and why open weights matter

a really detailed look at what it takes to build and release an open frontier model, super recommended

https://www.youtube.com/watch?v=FczbSauVvjw
albertvillanova 
posted an update 29 days ago
view post
Post
503
Day-0 Mistral Large 4 support in TRL 🚀

- LoRA SFT of the 1T-A52B model on one 8xB300 node, on top of the FP8 checkpoint
- Experts split 8 ways with expert parallelism, everything else sharded with FSDP, all set at load time
- Assistant-only loss out of the box with its training chat template
- ~32.7k tokens per step in ~8 s

Script + Slurm launcher 👇
https://github.com/huggingface/trl/tree/main/examples/sft_mistral_large_4
https://huggingface.co/posts/sergiopaniego/408182860646834
sergiopaniego 
posted an update 29 days ago
sergiopaniego 
posted an update 30 days ago
sergiopaniego 
posted an update about 1 month ago
view post
Post
220
Last week we closed the Training Agents series IRL at the GitHub offices in SF

4 talks, a panel and audience Q&A. almost 2h on post-training agents with open models

> Learnings from enterprise RL (Govind Kamtamneni Microsoft)
> Environments and benchmarks in industry (Victor Barres Mercor)
> How to train your agents with Miles (Tao Lin RadixArk)
> Why we built OpenEnv Arena (Xiangyi Li BenchFlow)

Full recording + Slides

https://www.youtube.com/watch?v=CKFUx7COIwQ
sergiopaniego 
posted an update about 2 months ago
sergiopaniego 
posted an update about 2 months ago
view post
Post
366
Repo2RLEnv just shipped TaskSmith + 50 high quality RL envs generated from HF repos 🔨

TaskSmith is a specialized harness that turns a merged PR into a verified RL env

the envs come from HF repos (Transformers, TRL, PEFT, Accelerate, Diffusers), shipped as Harbor tasks you can eval or train on

> code: github.com/huggingface/Repo2RLEnv
> dataset: huggingface.co/datasets/FineEnvs/HF_ML_Tasksmith
sergiopaniego 
posted an update about 2 months ago
view post
Post
3,883
ThinkingBox from @microsoft is now available as an OpenEnv env (cc @tuhink 🤗 )!

> ThinkingBox is a sandbox for testing agents on business workflows. it simulates a customer, gives the agent MCP tools over a real database, and at the end checks what changed in that database instead of trusting the agent's last message

> ThinkingBox-Bench is the benchmark built on it: 507 tasks across retail, insurance, travel, banking and consulting

> the OpenEnv env runs each task as an episode in its own isolated backend and returns a pass/fail reward from those checks

https://huggingface.co/blog/microsoft/thinkingbox
sergiopaniego 
posted an update about 2 months ago
sergiopaniego 
posted an update 2 months ago
view post
Post
498
ICYMI, Async GRPO in TRL now supports LoRA and we wrote a looong blog testing it

> the adapter is a few megabytes, so the weight sync is a file instead of an NCCL transfer
> 3 HF Jobs: 1 trainer and 2 vLLM replicas
> the adapter travels through an HF Storage Bucket mounted in all 3 at the same path
> a proxy in front of the replicas routes each rollout to the one already holding its KV prefix

https://huggingface.co/blog/asyncgrpo-lora-hfjobs