// 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
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 in 2026
Fine tune an LLM locally, step by step: when it pays off, picking a base model, formatting data, Unsloth vs Axolotl vs TRL vs mlx-lm, training and GGUF export.
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 (nanochat, Megatron-LM)
Train a small LLM from scratch with nanochat, and learn when NVIDIA Megatron-LM fits: model sizes, budgets, datasets, compute math and multi GPU parallelism.
LoRA vs QLoRA vs DoRA: Which Fine Tuning Method?
QLoRA vs LoRA explained, plus DoRA and full fine tuning: how each works, real VRAM figures, quality tradeoffs, recommended settings, and when to choose which.
Best LLM Pretraining Dataset in 2026: Top Picks
The best LLM pretraining dataset depends on your goal. FineWeb-Edu for small models, DCLM-Baseline and Nemotron-CC for scale, Common Pile for licensed text.
GRPO vs PPO: How LLM RL Training Differs
GRPO vs PPO explained simply: how each trains LLMs with rewards, why GRPO drops the critic, what DAPO and Dr. GRPO changed, and when to pick GRPO, PPO or DPO.
How to Use TensorFlow in Jupyter Notebook
How to use TensorFlow in Jupyter Notebook: install it in a venv, register the kernel with ipykernel, pick it in JupyterLab or VS Code, and fix common errors.
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.
RTX 3090 BF16 at Full Rate: What It Means for AI
RTX 3090 BF16 runs at half rate, and a new Linux mod restores it on RTX 30 cards. What it speeds up for local LLMs, what it doesn't, the risks and setup.
How to Run DeepSeek V4.1 Flash Locally
Can you run DeepSeek V4.1 Flash locally? Real RAM, VRAM and disk needs by GGUF, Strata on one 12 GB GPU, the llama.cpp PR, vLLM, Ollama and DGX Spark.
Recursive Flint: Run the 40B Coding Model Locally
Recursive Flint is an Apache 2.0 coding model with 40B total and 2.5B active parameters. How to run Flint locally with Ollama, llama.cpp, rec or Unsloth.
How to Run Muse Spark Open Locally (816B MoE)
Can you run Muse Spark Open locally? Real memory needs by quant (GGUF, MLX, NVFP4), llama.cpp and MLX commands, Mac Studio setups, licence terms and limits.
How to Run LFM2.5 24B Locally
Run Liquid AI LFM2.5-24B-A2B locally with Ollama, llama.cpp or MLX: VRAM by quant, Q4_K_M sizes, Ollama 0.17.1 caveat, sampling settings and agent tips.
How to Run Qwen 3.6 Locally (VRAM + Setup)
Run Qwen 3.6 locally with Ollama, llama.cpp or LM Studio: pick 27B or 35B-A3B by VRAM, thinking mode, vision tips, MTP speedups and sampling settings.
How to Run Gemma 4 Locally (VRAM + Setup)
Run Gemma 4 locally with Ollama, llama.cpp or LM Studio: pick E2B, E4B, 12B, 26B-A4B or 31B by memory, thinking mode, vision tips and sampling settings.
How to Use Local LLM in VS Code
Wire a local LLM into VS Code with Ollama: official Chat extension, Continue.dev for tab complete, model picks by VRAM, and privacy tips for offline coding.
How to Quantize LLM Models
Practical how to quantize LLM models: llama.cpp convert then Q4_K_M, Hugging Face bitsandbytes 4 bit loads, Ollama GGUF import, and when to use each path.
How to Run Qwen 3.8 27B Locally (VRAM + Setup)
Run Qwen 3.8 27B locally with Ollama, llama.cpp, LM Studio or vLLM: which quant fits 8, 16 or 24 GB, setup commands, thinking controls and context memory.
How to Run gpt-oss Locally (20b and 120b)
Run gpt-oss locally with Ollama, LM Studio, llama.cpp or vLLM: memory needs for 20b and 120b, setup commands, reasoning effort, harmony format and fine tuning.
GGUF Quantization Explained: Pick the Right Quant
GGUF quantization explained in plain English: what Q4_K_M, Q8_0 and IQ quants mean, real bits per weight numbers, GGUF vs safetensors, and which file to pick.