Running LFM3 on the Edge: One 1.7B Backbone, Six 2B Models, How to Run and Fine-tune Small Models

TL;DR: On 2026-10-27, MIT-spinoff Liquid AI released LFM3 — one LFM3-1.7B-Base pretrained on 22T tokens spawns six ~2B open-weight models covering text, vision, audio, omni, and two "decision" variants (source: Liquid AI official blog LiquidAI/lfm3, 2026-10-27; same-day at techtimes.com, datosabiertos.com, and China's iresearch news.iresearch.cn). It is not "another bigger model," it is an engineering thesis: instead of one general large model, pick a ~2B specialized model per modality, fine-tune it on a single GPU, and run it on your own device or server. The key is the tri-hybrid architecture — 13 gated short conv + 5 sliding-window attention + 6 global attention — which cuts KV cache to about 27 percent of a same-depth standard transformer, letting the 1.7B text model fit about 1GB at 4-bit with a 256K context and run on phones, laptops, and a Raspberry Pi 5. This post breaks the architecture, explains why specialized small models are the 2026 edge mainline, and ships three local-run commands plus single-GPU fine-tune and decision-model runnable examples.

1. Background: why 2026 is the year of specialized small models

The big-model race once optimized only for parameters, but real deployment has two hard constraints: privacy (data cannot leave the device) and latency/cost (cloud round-trip plus per-token billing). LFM3 treats both as design goals — Liquid AI's hardware-in-the-loop architecture search covered 14 device/backend combos from phones and a Raspberry Pi 5 to laptops, cloud CPUs/GPUs, and the Qualcomm Hexagon NPU. Result: LFM3-1.7B matches the previous LFM2-1.2B on short prompts and is about 25 percent faster at 8K context, while the 256K context makes long agent tasks usable. The point of one backbone, six models is: you stop debating "should I go multimodal," you pick the model by input, fine-tune on your data, and run on your own hardware — that is the edge-first product philosophy.

2. How it works: why the tri-hybrid saves memory and is fast

Layer typeCountRoleKV cache
gated short conv13local patterns, fastest, no KVnone (cheapest)
sliding-window attention (SWA)5mid-range deps, 256-token windowbounded (small)
global attention6long-range deps, Partial RoPEfull (long)

The ratio cuts total KV cache to about 27 percent of a same-depth standard transformer — the physical reason a 1.7B model is ~1GB at 4-bit with a 256K context and still runs on-device. Two more design points: head-wise gated attention (a sigmoid gate per head can switch a head off entirely, suppressing quantization-sensitive activation outliers) and sandwich norm (normalize both block input and output, keeping activations well-scaled at long context). The final 3.5T tokens of post-training add agentic traces and tool calls, so on WebArena-Verified LFM3-1.7B scores 38.42 (vs 3.02 before) and even beats Qwen3.5-9B on long browser tasks.

3. Tie-in to today's news: decision models become a standalone modality

The most interesting part of LFM3 is the d1-2B / d1-Omni-2B decision models: instead of generating free text, given a situation and a set of questions they return calibrated structured judgments (choice / probability / interval estimate / multi-select) in a single forward pass. This is the same wave as the "rise of decision models" we wrote on 2026-10-28 and the Seb Labs NVFP4 decision model shipped as API/MCP on Hugging Face on 2026-10-29 (returns choice / noul / score, $0.021/M input tokens): models are splitting from "generate words" into "generate judgments/actions." LFM3 puts it on-device (millisecond, no cloud round-trip); Seb Labs puts it as a hosted service — both prove many scenarios need a small model returning a trustworthy probability, not a 1T model writing a paragraph.

4. Developer checklist

  1. Pick the modality first: pure text uses LFM3-1.7B; image/video uses LFM3-VL-2B; speech uses LFM3-Audio-2B (first token as low as 50ms); "judgment" uses d1-2B.
  2. Edge first: ~1GB at 4-bit, runs locally on Apple M4 / Raspberry Pi 5 — privacy and latency win together.
  3. Single-GPU fine-tune: the whole family supports SFT/DPO/GRPO; Liquid AI ships 10 Colab notebooks (JSON extraction, new-language learning, smart-home command mapping).
  4. Watch the license: LFM Open License v1.0 is open-weight but commercial use is limited to organizations under $10M annual revenue; larger enterprises get "source-available," not standard open source.
  5. Use d1 for decision tasks, not a general model: classification/routing/relevance screening in one forward pass is faster, cheaper, and more controllable.
  6. Do not blindly chase size: a 1.7B specialized model already beats a 9B general model on long tasks — benchmark before going to the cloud.

5. Step-by-step: run LFM3 locally + single-GPU fine-tune + decision model

5.1 Run LFM3-1.7B with transformers (day-one support, runs as-is)

pip install -U transformers
from transformers import pipeline

gen = pipeline("text-generation", model="LiquidAI/LFM3-1.7B", trust_remote_code=True)
out = gen("Explain edge computing in one sentence.", max_new_tokens=128)
print(out[0]["generated_text"])

Expected: one sentence defining edge computing. LFM3-1.7B is post-trained for agentic toolchains and also works as a local agent base.

5.2 Edge quantized run (llama.cpp / MLX, ~1GB at 4-bit)

# ~1GB at 4-bit, runs on phone / laptop / Raspberry Pi 5
llama-server -m LFM3-1.7B-Q4_K_M.gguf -c 262144          # 256K context
# Apple Silicon is faster with MLX
pip install mlx-lm && mlx_lm generate --model LiquidAI/LFM3-1.7B-MLX --max-tokens 128

With the model on-device, the speech/vision models do real-time transcription and GUI understanding with zero cloud round-trip.

5.3 Single-GPU LoRA fine-tune (real commands, consumer GPU is enough)

pip install -U transformers peft datasets
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import LoraConfig, get_peft_model

tok = AutoTokenizer.from_pretrained("LiquidAI/LFM3-1.7B", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("LiquidAI/LFM3-1.7B", trust_remote_code=True)
model = get_peft_model(model, LoraConfig(r=16, lora_alpha=32, target_modules="all-linear"))
# then Trainer on your data; 1.7B + LoRA fits a single consumer GPU, no cloud scale

The official Colab also covers turning LFM3-VL-2B into robot grasp/navigation/manipulation via GRPO, reproducible on a single GPU.

5.4 Decision model: local d1-2B idea + hosted Seb Labs API (runs as-is)

# If you do not want to run d1-2B yourself, use the same-week Seb Labs NVFP4 decision API
# Returns structured judgments (choice / noul / score) not text, $0.021/M input tokens
curl https://mcp.seblabs.dev/api/v1/systemone   -H "Authorization: Bearer $SEB_API_KEY"   -H 'Content-Type: application/json'   -d '{"state":"The parcel arrived damaged. Please replace it.",
       "questions":{"team":{"type":"choice",
       "instructions":"Choose the team to handle this request",
       "criteria":{"returns":"Damaged products and replacements",
       "billing":"Payments and invoices","escalate":"Unclear or outside these teams"}}}}'

Expected: a probability distribution over teams, directly usable for ticket routing / relevance screening — far more stable than asking a large model to write a paragraph and then parse it.

6. Recap

DimensionOne-liner
Event2026-10-27 LFM3: one 1.7B backbone, six ~2B models
Architecturetri-hybrid 13+5+6, KV cache 27 percent, ~1GB at 4-bit
Edge256K context, runs on phone / laptop / Raspberry Pi 5
New modalitydecision model d1-2B: calibrated probability in one forward pass
Fine-tunesingle-GPU LoRA/GRPO, 10 official Colab notebooks
Red lineLFM Open License limits commercial use to under $10M revenue

The lesson of LFM3: the 2026 edge mainline is not "shove a large model into a phone," but "raise a ~2B specialized model per task, fine-tune on a single GPU, run it on-device." Related: Long-Context KV Cache Compression in Practice and The Rise of Decision Models: Strongly-Typed Judgments Over Free-Text LLMs.

Further reading

フィードバック

このサイトはフロントエンドのみでバックエンドやアカウントはなく、フィードバックはGitHub Issues・ディスカッション・メールで受け付けています。

issueやメールに貼り付けていただくと問題特定が早まります。入力内容は含まれません

その他:既存の報告を見る · メールでのフィードバック(GitHubアカウント不要):278975598@qq.com