llamafactory vs nanochat
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.
llamafactory
Fine-tuning toolkit for 100+ LLMs with a CLI and Gradio web UI
nanochat
Minimal PyTorch codebase to train and chat with a small GPT-2-class LLM
Verdict
llamafactory ranks higher, 74 to 49. Of the 4 score parts we measure for both, llamafactory leads on 4, nanochat on none.
- Adoptionllamafactory leads by 30 points, 92 to 62: a wide gap.
- Freshnessllamafactory leads by 5 points, 100 to 95.
- Maintenancellamafactory leads by 36 points, 38 to 2: a wide gap.
- Agent-readyllamafactory leads by 40 points, 55 to 15: a wide gap.
Pick llamafactory if you are
Engineers fine-tuning open LLMs on their own GPUs, with or without code
- Broad method coverage: SFT, PPO, DPO, KTO, ORPO, LoRA, QLoRA via AQLM/AWQ/GPTQ/HQQ/EETQ
- Supports GaLore, BAdam, APOLLO, Muon, DoRA, PiSSA, plus Unsloth and Liger Kernel speedups
Pick nanochat if you are
Researchers and engineers learning or experimenting with end-to-end LLM training
- Covers tokenizer, pretraining, SFT, RL, eval and inference in one repo
- Single `--depth` dial sets all other hyperparameters automatically
| What we compare | llamafactory | nanochat |
|---|---|---|
| Score parts, out of 100 | ||
| Adoption | 92, widely used | 62, popular |
| Freshness | 100, active | 95, active |
| Maintenance | 38, patchy | 2, weak |
| Easy to run | Not scored for this kind | Not scored for this kind |
| Agent-ready | 55, partly | 15, none |
| Facts from GitHub and the README | ||
| Stars | 75.5k | 58.6k |
| License | Apache-2.0 (permissive) | MIT (permissive) |
| Last commit | Oct 2026 | Jul 2026 |
| Last release | May 2026 | None published |
| Language | Python | Python |
| Docker | Yes | No |
| GPU | Required | Required |
| arm64 or Apple Silicon | Mentioned | Mentioned |
llamafactory
LlamaFactory fine-tunes language and multimodal models through YAML-configured CLI runs or the LLaMA Board Gradio UI. It covers pre-training, SFT, reward modeling, PPO, DPO, KTO and ORPO, with full-tuning, freeze-tuning, LoRA and 2 to 8-bit QLoRA. Trained models can be served through an OpenAI-style API using vLLM or SGLang workers.
Who it is for: Engineers fine-tuning open LLMs on their own GPUs, with or without code
Strengths
- Broad method coverage: SFT, PPO, DPO, KTO, ORPO, LoRA, QLoRA via AQLM/AWQ/GPTQ/HQQ/EETQ
- Supports GaLore, BAdam, APOLLO, Muon, DoRA, PiSSA, plus Unsloth and Liger Kernel speedups
- Covers multimodal and audio models such as Qwen3-VL, LLaVA and Qwen2-Audio
- Runs on NVIDIA, AMD ROCm and Ascend NPU, with hosted Colab and PAI-DSW notebooks
Weaknesses
- Official documentation is marked WIP in the README
- No VRAM or RAM figures in the visible README; hardware requirements unknown here
- Web UI is for training and chat, not a production serving layer
- Many optional backends (vLLM, SGLang, Unsloth, KTransformers) add install complexity
- GPU required
- Docker + Compose
- Needs PyTorch, Hugging Face Transformers, Gradio, vLLM (optional), SGLang (optional)
- Models: LLaMA, LLaVA, Mistral, Mixtral-MoE, Qwen3
nanochat
nanochat covers tokenizer training, pretraining, SFT, RL, evaluation and a CLI chat interface in one small Python codebase. A single `--depth` setting derives width, heads, learning rate and training horizon, so one knob produces a compute-optimal model series. The reference speedrun trains a GPT-2-grade model in about 1.65 hours on an 8xH100 node per the leaderboard.
Who it is for: Researchers and engineers learning or experimenting with end-to-end LLM training
Strengths
- Covers tokenizer, pretraining, SFT, RL, eval and inference in one repo
- Single `--depth` dial sets all other hyperparameters automatically
- Public time-to-GPT-2 leaderboard with commits and CORE scores
- Same scripts run on one GPU via gradient accumulation, or on CPU/MPS
Weaknesses
- Reference speedrun needs an 8xH100 node, roughly $48 of rented compute
- Under 80GB VRAM requires manually lowering `--device-batch-size`
- CPU/MPS path only trains a tiny model with weak results
- Chat is CLI-only in the README; resulting model is small and hallucinates
- GPU required
- Needs PyTorch, uv, wandb
- Models: nanochat GPT (depth-scaled), bfloat16, float32, float16
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.