// category · 9 tools · 8 open source
LLM Training & Fine Tuning Tools
Distributed training libraries, parameter efficient fine tuning methods and post training toolkits for adapting foundation models to new tasks and preferences.
Fine tune first, pretrain only if you must
Most teams never train a model from scratch. Adapting an existing open weight model with a few thousand good examples is far cheaper and usually gives better results for a specific task. Pretraining from scratch makes sense for learning how language models work, for research, or for organizations with large compute budgets. Our guide to training a small LLM from scratch shows what is realistic on one GPU, and how to fine tune an LLM locally covers the more common path.
The main tools and their current releases
Versions below were checked on PyPI on October 21, 2026:
- PEFT 0.21.2 from Hugging Face implements parameter efficient methods such as LoRA, which train small adapter matrices instead of every weight. See LoRA vs QLoRA for how adapter rank and memory trade off.
- TRL 1.16.0 provides post training methods, including supervised fine tuning and reinforcement learning trainers; GRPO vs PPO explains two of the most used algorithms.
- Unsloth 2026.10.7 focuses on faster, lower memory fine tuning on a single GPU.
- DeepSpeed 0.19.8 from Microsoft adds ZeRO memory sharding to ordinary PyTorch training code.
- Megatron Core 0.19.2 from NVIDIA splits very large models across many GPUs with tensor, pipeline, data, expert and context parallelism, according to the Megatron-LM README.
Picking the right level
The right tool depends on scale. On one consumer GPU, PEFT with QLoRA or Unsloth is usually enough to adapt a 7B to 14B model. With a few GPUs, DeepSpeed or PyTorch's own sharding lets you fine tune larger models fully. Pretraining at billions of parameters on a cluster is where Megatron-LM earns its complexity.
Two related techniques sit alongside fine tuning. Distillation trains a small model to imitate a larger one, and quantization shrinks a trained model for cheaper inference; LLM distillation vs quantization compares them, and fine tuning an LLM for code generation works through a concrete example. Each tool page below links to the official documentation and repository so you can confirm the current release before you start.
// guides
Guides to LLM training & fine tuning tools
Hardware Requirements to Fine Tune an LLM
Fine tune LLM hardware requirements in 2026: GPU memory by method and model size, how context length changes it, plus RAM, disk, Mac and free GPU options.
Torchtune vs Axolotl: Which Should You Use?
Axolotl for active YAML fine tunes; torchtune only for frozen recipes after its 2025 wind down. Compare status, features and when Unsloth fits better.
Torchtune vs Unsloth: Which Should You Use?
Torchtune vs Unsloth in 2026: pick Unsloth for new single GPU fine tunes. Torchtune is in maintenance mode after its 2025 wind down. How they differ.
How to Fine Tune an LLM with Reinforcement Learning
How to fine tune an LLM with reinforcement learning: when RL beats SFT, how to pick GRPO, DPO or PPO, write reward functions, and run a LoRA job in TRL or Unsloth.
How to Fine Tune an LLM for Code Generation
How to fine tune an LLM for code generation: pick a coder base model, build an instruction or FIM dataset, train a LoRA with TRL or Unsloth, test with pass@k.
How to Fine Tune an LLM Locally, Step by Step
Fine tune an LLM locally in 2026: VRAM needed per model size, Unsloth vs Axolotl vs mlx-lm, formatting custom data, training a LoRA and running it in Ollama.
How to Fine Tune an LLM with a Knowledge Graph
How to fine tune an LLM with a knowledge graph: turn triples into varied training text, teach the model to reason over graph paths, and test held out facts.
LLM Distillation vs Quantization: Key Differences
LLM distillation vs quantization: distillation trains a smaller student model, quantization stores the same weights in fewer bits. When to use each, or both.
Train a Small LLM From Scratch: nanoGPT and nanochat
Train a small LLM from scratch with nanoGPT or nanochat: our CPU test run, the nanoGPT speedrun, costs, datasets, compute math and when Megatron-LM fits.
GRPO vs PPO Explained: Which RL Method to Use?
GRPO vs PPO explained: how each trains LLMs with rewards, why GRPO drops the critic, what papers show on performance, where DPO fits, and which to use in 2026.
QLoRA vs LoRA vs DoRA: Which Fine Tuning Method?
QLoRA vs LoRA in 2026: QLoRA trains on a 4 bit base for about a quarter of the memory, LoRA keeps 16 bit for speed and fidelity. VRAM table, DoRA and settings.
How to Fine Tune an LLM Without a GPU
How to fine tune an LLM without a GPU, with our CPU test numbers for 135M and 0.5B models, LoRA settings that fit in RAM, and when a Mac or free notebook is better.
How to Fine Tune an LLM to Output JSON
How to fine tune an LLM to output JSON that matches your schema, with TRL and LoRA, a validated dataset, a parse rate test and constrained decoding as backup.
How to Fine Tune a Thinking LLM or Instruct Model
How to fine tune an LLM thinking or instruct model without breaking it: pick the right variant, format reasoning traces, keep 75% reasoning data, fix templates.
How to Fine Tune an LLM in Google Colab
How to fine tune an LLM in Google Colab for free: pick a model that fits the T4, run an Unsloth LoRA notebook, save to Google Drive, then export to GGUF for Ollama.
How to Fine Tune an LLM for a Classification Task
How to fine tune an LLM for a classification task: pick a classification head or label generation, train LoRA with PEFT, handle imbalance and score with macro F1.
Best LLM Pretraining Datasets in 2026 (Free and Open)
Best LLM pretraining datasets in 2026, with sizes and licenses checked: FineWeb-Edu for small models, DCLM and Dolma 3 at scale, Common Pile for clean data.
Google Colab vs Kaggle GPU: Which Free GPU Wins?
Google Colab vs Kaggle GPU compared on free hardware, weekly hours, session limits, idle timeouts, storage and paid plans, plus which to pick for fine tuning.
How to Fine Tune an LLM for LM Studio
Can you fine tune an LLM in LM Studio? Not inside the app. Train a LoRA with Unsloth or mlx-lm, export to GGUF, then import, test and serve it in LM Studio.
How to Use TensorFlow in Jupyter Notebook (2026)
How to use TensorFlow in Jupyter Notebook: venv, kernel, VS Code or JupyterLab, TensorBoard (now a separate install), GPU memory, and the import errors we hit.
SmolLM vs Llama: Which 3B Model Should You Run?
SmolLM vs Llama compared on benchmarks, licence, context, languages, memory and local setup, so you can choose between SmolLM3 and Llama 3.2 for your project.
SmolLM vs Gemma: Which Small Model to Use?
SmolLM vs Gemma compared on size, licence, context, languages, vision and audio, local setup and fine tuning, so you can pick the right small model in 2026.
How to Run Inkling 2 Small Locally
Can you run Inkling 2 Small locally? GGUF sizes from 172 GB, official GPU needs, the llama.cpp branch, vLLM and SGLang setups, MLX status and Apache license.
What Is MACaQ? Huawei's 4 Bit Quantizer Explained
What MACaQ quantization is, how Huawei's new 4 bit method works across text, image, video and audio models, what MACaQ-R adds for GGUF, and who should try it.