1.7B text model for local agents and specialized applications, with a 256K context window and native tool calling
← Back to Text ModelsLFM3-1.7B is Liquid AI’s text model for local agents and specialized applications, based on the new LFM3 tri-hybrid architecture. It is post-trained for agentic harnesses such as Hermes Agent, Pi, and OpenClaw, with a 256K-token context window. At 4-bit precision, it takes about 1 GB of memory, so it fits on any phone or laptop.
Post-trained for agent harnesses like Hermes Agent, Pi, and OpenClaw
256K Context
Long context for tool traces and multi-step workflows
Made to be Specialized
Adapt it to your domains, formats, and tools with single-GPU fine-tuning
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.
Quick Start
On Apple Silicon, use MLX-VLM 0.8.0 with the model’s MLX weights. The guide includes the current text, image, ASR, and speech-generation commands.
from transformers import pipelinegenerator = pipeline( "text-generation", model="LiquidAI/LFM3-1.7B", trust_remote_code=True,)messages = [{"role": "user", "content": "What is C. elegans?"}]output = generator( messages, do_sample=True, temperature=0.1, top_k=50, repetition_penalty=1.1, max_new_tokens=2048,)print(output[0]["generated_text"][-1]["content"])
To run it without the command line, use the Llama app.Requires llama.cpp 0.8.0 (b11960) or later. Add a quantization tag to pick a file.The recommended sampling parameters are stored in the GGUF, so no sampling flags are needed. For math and science, override them with --temp 1.0 --top-p 0.95 --top-k 20 --repeat-penalty 1.0.QAD Q4_0 checkpoint: the Q4_0 build in the GGUF repository is the Quantization-Aware Distillation (QAD) checkpoint, trained to recover the accuracy lost to Q4_0 quantization. The :Q4_0 tag selects it.
Follow the vLLM guide for the client request and output handling. The quickstart context budget is not the model’s maximum; leave room for reasoning and the final answer.
Use the configured CUDA image from the SGLang guide. Requires a build containing LFM3 support, verified at commit 47361c57. SGLang 0.5.23 does not run this example correctly. The launch command needs --trust-remote-code to load the checkpoint’s configuration and tokenizer.
Serves at http://localhost:8000/v1.Other platforms:On Linux, use the Docker image for your accelerator. For example, on NVIDIA with Docker and NVIDIA Container Toolkit configured:
Reasoning is enabled by default. You can set enable_thinking=False for direct answers, but the model may still emit reasoning or give inconsistent answers, particularly for reasoning-heavy tasks. We recommend leaving thinking on. Leave room for the reasoning in your token limit. See Thinking for guidance on how to use it, and Chat Template and Tool Use for the message format.For math and science, use temperature=1.0, top_p=0.95, top_k=20, and repetition_penalty=1.0 instead of the general generation parameters.
Defer Loading and Tool Search
LFM3-1.7B supports deferred tools, so tool definitions stay out of the prompt until a search tool returns them. See Defer Loading and Tool Search for how it works and a complete example.
FP8 and NVFP4 Checkpoints
LFM3-1.7B-FP8 and LFM3-1.7B-NVFP4 are FP8 and 4-bit floating-point versions of LFM3-1.7B for inference with SGLang and zml/llmd. To use one with SGLang, replace the model ID in the example above.