agent-distill-lfm3-1.7b-lora-think
reasoning agent LoRA
2 min readupdated
This experimental PEFT LoRA (a small adapter for fine-tuning a base model) adapter is built for multi-step on-device agent tasks. The model is based on LiquidAI/LFM3-1.7B (by davidoneil) and distilled from Qwen/Qwen3.8-27B-FP8 with native reasoning support. Compared to the base version, this adapter significantly improves function calling accuracy and almost entirely eliminates empty text responses instead of tool calls. It is useful for developers building compact local assistants capable of working with external APIs and tools.
Key features
- Trained on 2,559 execution-verified synthetic trajectories with zero overlap with BFCL tasks.
- Uses a native thinking mode (
enable_thinking=True) with an output limit of 512 tokens. - Supports function calling in XML format
with 100% parsing success on validation. - Designed for local execution on iPhone using the quantized
LiquidAI/LFM3-1.7B-MLX-4bitbase.
What you can do
- Integrate into a local MLX-based mobile AI agent for multi-step workflows.
- Use in bots and services where a compact LLM needs to reliably call external functions via an XML schema.
- Test distilled reasoning performance under strict on-device generation limits.
Example
Example of a tool call in the model's native XML format:
...
Read more
DetailsVerifier success rate: 85.0% (51/60) versus 56.7% (34/60) for the base model
Skipped mandatory tool calls: reduced from 23.4% to 0.6%
Training parameters: PEFT LoRA (bf16), r=16, alpha=32, 116 target modules
Licenses: LFM Open License v1.0 and Apache-2.0 (teacher model)










Comments