Liquid AI Cookbook: Fine-Tuning LFMs with CPT, SFT, DPO and GRPO
Melvin Vivas · X post · 2026-08-11 · Open on X
Topics: Fine-tuning & Model Customization · Level: intermediate
Summary
Melvin Vivas recommends the Liquid AI cookbook as a strong, underrated resource for fine-tuning Liquid's LFM models. It covers text, vision, audio and encoder models. It also covers several training methods (CPT, SFT, DPO, GRPO) using Unsloth or Hugging Face TRL.
Key points
- The Liquid AI cookbook covers fine-tuning text, vision, audio and encoder models.
- Training methods covered: continued pretraining (CPT), supervised fine-tuning (SFT), DPO and GRPO.
- Examples use Unsloth or Hugging Face TRL to fine-tune LFM (Liquid Foundation Model) models.
Resources mentioned
- Liquid AI Cookbook · repo · github.com · free
Liquid AI's collection of fine-tuning examples for LFM models across modalities and training methods. - Liquid AI (@liquidai) on X · website · x.com · free
Liquid AI's family of efficient foundation models, used here as the example of a model you can run in the browser with ONNX.
Also in: Trying Liquid AI Decision Models (d1, d1 ultra) via API (Melvin Vivas on X · notes), Liquid RIPL: Low-Latency Inference Engine for LFMs (Melvin Vivas on X · notes), ONNX + Transformers.js: Run Models Like Liquid LFM in the Browser (Melvin Vivas on X · notes), Try Liquid AI's open d1-3B decision model in Colab (Melvin Vivas on X · notes) and 30 more - Unsloth · tool · unsloth.ai · free
Open-source library for fast, memory-efficient fine-tuning of open LLMs (LoRA/QLoRA) on a single GPU or in Colab.
Also in: 100-Iteration Autonomous Coding Loop with Local Qwen on an RTX 3090 (Melvin Vivas on X · notes), Prompting an Autonomous Agent Loop: Be Specific, Show Visible Progress (Melvin Vivas on X · notes), Running an Overnight 100-Iteration Agent Loop with a Local Qwen Model (Melvin Vivas on X · notes), Agent tasks: Unsloth fine-tuning, ComfyUI face swap, script writing (Melvin Vivas on X · notes) and 36 more - TRL (Hugging Face) · tool · github.com · free
Hugging Face's open-source library for post-training LLMs with SFT, DPO, GRPO and more.
Also in: Fine-Tune LFM2.5-350M with GRPO in TRL for Structured Outputs (Melvin Vivas on X · notes)
Try this
- Work through the Liquid AI cookbook to practise SFT, DPO or GRPO on a small LFM model.
- Fine-tune a small LFM model with SFT and then DPO using Unsloth or TRL, following the cookbook.
More in Fine-tuning & Model Customization
- Fine-Tune Muse Glimmer 30B for Free with Unsloth (incl. GRPO)
- Smoke-Testing LFM Fine-tuning with Codex and Liquid AI's LEAP
- Free JSONL Viewer for Inspecting Fine-tuning Datasets
- Loop engineering fits fine-tuning better than coding
- Small Local Models + Fine-Tuning Instead of More Compute (Liquid AI, LEAP)
- Evolution of Image LoRAs: Stable Diffusion → Flux → Krea 2