LFM3-1.7B is designed for local agents, tool calling, structured outputs, and domain-specific fine-tuning. Use retrieval or search for knowledge-heavy tasks. It is not recommended for agentic coding or complex multi-step reasoning due to its small size.
LFM3 uses this ChatML format, generated from the checkpoint's chat template:
<|startoftext|><|im_start|>system
You are a helpful assistant trained by Liquid AI.<|im_end|>
<|im_start|>user
Explain how a heat pump works.<|im_end|>
<|im_start|>assistant
<think>
Use tokenizer.apply_chat_template() with add_generation_prompt=True to format messages automatically.
Reasoning is enabled by default. You can set enable_thinking=False to disable thinking traces, but this behavior can be inconsistent, especially for reasoning-heavy tasks.
Reasoning from turns before the latest user message is removed unless preserve_thinking=True.
Tool calling
Pass function schemas through tools=... to apply_chat_template(). The template formats tool definitions and results automatically. Generated calls use XML:
<tool_call>
<function=get_weather>
<parameter=city>
Paris
</parameter>
</function>
</tool_call>
Execute the call in your application. Add the parsed assistant call to history as a tool_calls entry, then append the result as a tool message. Keep passing the tool schemas on subsequent requests and preserve the assistant's content and reasoning from the current tool-use turn.
function.arguments must be a Python mapping. Decode JSON strings with json.loads() before applying the template.
Tool search
LFM3 supports deferred tools. Set defer_loading=True to keep tool definitions out of the prompt until your harness's search tool returns their names as tool_reference parts. The chat template then inserts their definitions into <additional_tools>.
Your harness implements and runs the search. Keep the full tools list, including deferred tools, on every request. In the system prompt, tell the model when to search:
You only have one tool right now: search_tools, which searches a catalog of many more tools. If none of your current tools can handle a request, call search_tools to find one, then call the tool it returns.
Works with vLLM, SGLang, and LFM3-compatible llama.cpp builds. For llama.cpp, use a GGUF with the current chat template or load it with --chat-template-file.
All models were served with vLLM in BF16 at their full context length: 262,144 tokens for LFM3-1.7B, Qwen3.5-4B, and Qwen3.5-9B, and 131,072 tokens for LFM2.5-2.6B, MiniCPM5-2B, and Gemma 4 E4B. Unless listed below, every eval uses temperature 0.6 and top_p 0.95, with no output limit other than the context length. The Average row is the unweighted mean of every score in the table.
BFCL V4: greedy decoding, up to 32,768 output tokens.
ToolSandbox: greedy decoding, up to 1,024 tokens per turn.
LiveClaw: OpenClaw agent, up to 8,192 tokens per turn.
Claw-Eval: greedy decoding, 3 trials per task.
BrowseComp-Plus: OpenClaw agent, greedy decoding, up to 8,192 tokens per turn.
WebArena-Verified: up to 40 steps.
MCP-Atlas: up to 256 turns.
EnterpriseOps-Gym and AutomationBench: up to 50 turns.
SWE-bench: OpenCode agent, up to 250 turns.
Terminal-Bench 2.1: OpenCode agent, up to 100 turns.
At 32K context, LFM3-1.7B prefills at least 2.5x faster and decodes at least 1.8x faster than every compared model on all three devices, while using the least memory.
All models run as Q4_0 GGUF files in llama.cpp with 32,768 tokens of context, batch size 1, 100 output tokens, and GPU offload. Prefill is the prompt processing speed and decode is the generation speed, both in tokens per second. LFM3-1.7B uses a llama.cpp build with LFM3 support, and the other models use llama.cpp release b11744.
iPhone 17 Pro: Apple A19 Pro, iOS app built on llama.cpp.
Memory: peak usage in GB (109 bytes). On AMD, it adds the host and GPU peaks from the same run, which can slightly overstate usage if the two peaks do not coincide. On Apple devices, the process footprint already includes Metal allocations.
Pre-training: two stages build LFM3-1.7B-Base on 22T tokens in total.
Main pre-training: compared with LFM2, the mix adds more scientific papers, repository-level code, math, and a wider range of knowledge sources.
Mid-training: the last 3.5T tokens use curated, higher-quality data with a larger share of agentic traces and tool calls. This stage also extends the context window to 256K tokens.
Post-training: four stages develop conversation, reasoning, and tool-use capabilities.
Supervised fine-tuning (SFT): 1.75T tokens across various tasks, including chat, reasoning, tool calling, and agentic traces.
Mixed reinforcement learning: many domains trained at once, from math and code to SQL and structured outputs. A length penalty in the reward keeps answers concise.
Multi-domain on-policy distillation (MOPD): six specialist RL teachers (code, math, tool use, long context, agentic work, and enterprise workflows) are distilled back into a single model.
Agentic RL: tasks from web browsing to office work are run inside real agent harnesses, preparing the model for deployment.
# custom terms: read the license before you download$ fw get LiquidAI/LFM3-1.7B
# manifest sha256 6f54cd8f0415… · 3.48 GB · 24 files$ fw verify ./LFM3-1.7B LiquidAI/LFM3-1.7B
Terms that come with these files. LFM 1.0: commercial use only for organisations under US$10M annual revenue. Keep a copy of the license with the files.
Custom license (custom).Read the license text first. Open this panel to show the commands once you accept its terms.
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
import os
os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com"
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("LiquidAI/LFM3-1.7B", revision="1da06bec6a819da10b54c67e5c90972b46d81871")
model = AutoModelForCausalLM.from_pretrained("LiquidAI/LFM3-1.7B", revision="1da06bec6a819da10b54c67e5c90972b46d81871", device_map="auto")