Before you fine-tune
Exhaust the cheaper levers first:- Verify that prompts use the model’s chat template
- Reset generation parameters using the prompting guide
- Use constrained decoding for strict JSON or grammar-bound outputs
- Improve tool descriptions and validate the native tool-use format
- Evaluate the right model size and deployment class with the use case evaluation guide
Recommended stack
LEAP Finetune is Liquid’s open-source training stack for the full customization loop:- SFT, LoRA, DPO, and GRPO
- Text, vision, and MoE model support
- Distributed training on local GPUs, SLURM, Kubernetes, or Modal
- Dataset formatting and validation
- GGUF export and quantization for deployment
Typical workflow
- Load a base model from Hugging Face. Start from the current LFM2.5 checkpoint for your target size.
- Prepare 500 to 5,000 task examples. Quality and distribution matter more than volume; match production inputs.
- Train with LoRA for the first pass. A 1.2B LoRA run can take minutes to tens of minutes on a single modern GPU.
- Evaluate on a held-out set that you froze before training.
- Iterate on data, prompts, and hyperparameters before scaling to larger runs.
Two rules that save the most pain
Train with the model’s own chat template. Useapply_chat_template and keep training formatting character-for-character identical to production.
For tool calling, train on the native Pythonic tool-call format. The migration guide explains how LFMs differ from OpenAI-style JSON tool calls and how to adapt parsers safely.