LFM2 Technical Report
Paper • 2511.23404 • Published • 61
How to use stamsam/LFM2.5-8B-A1B-oQ6 with MLX:
# Make sure mlx-lm is installed
# pip install --upgrade mlx-lm
# Generate text with mlx-lm
from mlx_lm import load, generate
model, tokenizer = load("stamsam/LFM2.5-8B-A1B-oQ6")
prompt = "Write a story about Einstein"
messages = [{"role": "user", "content": prompt}]
prompt = tokenizer.apply_chat_template(
messages, add_generation_prompt=True
)
text = generate(model, tokenizer, prompt=prompt, verbose=True)How to use stamsam/LFM2.5-8B-A1B-oQ6 with Pi:
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "stamsam/LFM2.5-8B-A1B-oQ6"
# Install Pi:
npm install -g @mariozechner/pi-coding-agent
# Add to ~/.pi/agent/models.json:
{
"providers": {
"mlx-lm": {
"baseUrl": "http://localhost:8080/v1",
"api": "openai-completions",
"apiKey": "none",
"models": [
{
"id": "stamsam/LFM2.5-8B-A1B-oQ6"
}
]
}
}
}# Start Pi in your project directory: pi
How to use stamsam/LFM2.5-8B-A1B-oQ6 with Hermes Agent:
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "stamsam/LFM2.5-8B-A1B-oQ6"
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default stamsam/LFM2.5-8B-A1B-oQ6
hermes
How to use stamsam/LFM2.5-8B-A1B-oQ6 with MLX LM:
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "stamsam/LFM2.5-8B-A1B-oQ6"
# Install MLX LM
uv tool install mlx-lm
# Start the server
mlx_lm.server --model "stamsam/LFM2.5-8B-A1B-oQ6"
# Calling the OpenAI-compatible server with curl
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "stamsam/LFM2.5-8B-A1B-oQ6",
"messages": [
{"role": "user", "content": "Hello"}
]
}'This model is an MLX oQ6 quantized version of LiquidAI/LFM2.5-8B-A1B, quantized using oQ (oMLX v0.3.12) mixed-precision quantization.
LFM2.5 is a new family of hybrid models designed for on-device deployment by Liquid AI. It builds on the LFM2 architecture with extended pre-training and reinforcement learning.
| Property | Value |
|---|---|
| Total parameters | 8.3B |
| Active parameters | 1.5B |
| Number of layers | 24 (18 double-gated LIV conv + 6 GQA) |
| Training budget | 38 trillion tokens |
| Context length | 131,072 |
| Vocabulary size | 128,000 |
| Languages | English, Arabic, Chinese, French, German, Japanese, Korean, Portuguese, Spanish |
temperature: 0.2top_p: 80repetition_penalty: 1.05LFM2.5 uses a ChatML-like format:
<|startoftext|><|im_start|>system
You are a helpful assistant trained by Liquid AI.<|im_end|>
<|im_start|>user
What is C. elegans?<|im_end|>
<|im_start|>assistant
@article{liquidAI20268BA1B,
author = {Liquid AI},
title = {LFM2.5-8B-A1B: Personal Assistant On Your Laptop},
journal = {Liquid AI Blog},
year = {2026},
note = {www.liquid.ai/blog/lfm2-5-8b-a1b},
}
@article{liquidai2025lfm2,
title = {LFM2 Technical Report},
author = {Liquid AI},
journal = {arXiv preprint arXiv:2511.23404},
year = {2025}
}
6-bit