verl vs megatron-lm
Two of the top projects in Training and fine-tuning, side by side: who leads on each score part and who each one suits, then setup, license, activity and what each review found.
verl
RL post-training library for LLMs with PPO, GRPO, FSDP and Megatron
megatron-lm
NVIDIA's library for training large transformer models across many GPUs
Verdict
Both score 89; verl ranks higher on stars, 24,445 to 18,614. Of the 4 score parts we measure for both, verl leads on 1, megatron-lm on 1 and 2 are even.
- Adoptionverl leads by 4 points, 92 to 88: close to even.
- FreshnessEven at 100.
- Maintenancemegatron-lm leads by 2 points, 79 to 77: close to even.
- Agent-readyEven at 85.
Pick verl if you are
ML engineers running RL post-training of LLMs on GPU clusters
- FSDP, FSDP2 and Megatron-LM training with vLLM, SGLang or HF rollout
- Covers PPO, GRPO, RLOO, ReMax and REINFORCE++, plus multi-turn tool-calling RL
Pick megatron-lm if you are
ML engineers and research teams pretraining LLMs on multi-GPU clusters
- Supports TP, PP, DP, EP and CP parallelism in one library
- Mixed precision from FP16 and BF16 down to FP8 and FP4
| What we compare | verl | megatron-lm |
|---|---|---|
| Score parts, out of 100 | ||
| Adoption | 92, widely used | 88, widely used |
| Freshness | 100, active | 100, active |
| Maintenance | 77, fair | 79, fair |
| Agent-ready | 85, ready | 85, ready |
| Facts from GitHub and the README | ||
| Stars | 24.4k | 18.6k |
| License | Apache-2.0 (permissive) | custom license (read the license) |
| Last commit | Dec 2026 | Dec 2026 |
| Last release | Dec 2026 | Nov 2026 |
| Language | Python | Python |
| Docker | Yes | Yes |
| GPU | Required | Required |
| arm64 or Apple Silicon | Not stated | Not stated |
verl
verl is the open-source implementation of the HybridFlow paper from ByteDance Seed. It runs reinforcement learning and supervised fine-tuning for LLMs, using FSDP, FSDP2 or Megatron-LM for training and vLLM, SGLang or HF Transformers for rollout generation. It covers PPO, GRPO, RLOO, ReMax and REINFORCE++ with verifiable or model-based rewards.
Who it is for: ML engineers running RL post-training of LLMs on GPU clusters
Strengths
- FSDP, FSDP2 and Megatron-LM training with vLLM, SGLang or HF rollout
- Covers PPO, GRPO, RLOO, ReMax and REINFORCE++, plus multi-turn tool-calling RL
- README states scaling to 671B models via expert parallelism, with LoRA RL to save memory
- Runs on NVIDIA, AMD and Huawei Ascend; Intel XPU via a plugin
Weaknesses
- Realistic runs need multiple GPUs; not a single-machine tool
- Fully async and one-step-off trainers moved to verl-recipe, pinned to v0.9.1
- Several algorithms (DAPO, GSPO, PRIME) live in the separate verl-recipe repository
- Inference engine versions matter; README warns vLLM 0.7.x has bugs causing OOMs
- GPU required
- Docker
- Needs PyTorch, vLLM or SGLang, Megatron-LM (optional)
- Models: Hugging Face Transformers, ModelScope, Qwen3.5, Qwen3, Qwen2.5
megatron-lm
Megatron Core is a PyTorch library of transformer building blocks with tensor, pipeline, data, expert and context parallelism, plus FP16, BF16, FP8 and FP4 mixed precision. The repo also ships Megatron-LM, a reference set of pre-configured training scripts, along with distributed checkpointing and post-training tools for quantization, distillation and pruning. Hugging Face checkpoint conversion lives in the separate Megatron Bridge project.
Who it is for: ML engineers and research teams pretraining LLMs on multi-GPU clusters
Strengths
- Supports TP, PP, DP, EP and CP parallelism in one library
- Mixed precision from FP16 and BF16 down to FP8 and FP4
- Distributed checkpointing with resharding, plus MoE and hybrid model support
- Published throughput benchmarks, e.g. DeepSeek-V3 on 256 GB300 GPUs
Weaknesses
- Aimed at multi-GPU clusters; no small-scale or CPU workflow described
- Source builds can run out of memory and need MAX_JOBS tuning
- HF checkpoint conversion is in Megatron Bridge, a separate repo for now
- License detected as NOASSERTION while the README badge says Apache
- GPU required
- Docker
- Needs PyTorch 2.6.0+, Python 3.12+, NVIDIA NGC PyTorch container (for source development)
- Models: DeepSeek-V3, Qwen3-235B-A22B, Nemotron 3 Ultra, DeepSeek-V4 (initial, dev branch)
More in Training and fine-tuning
Building with these?
We help teams pick an open-source AI stack and run it in production. Client work never changes a rank.
AI app development →Send a project brief (opens in a new tab)