oamazonasgabriel/ lfm2.5-2.6b:q4_k_m-8gbGPU

178 yesterday

LFM2.5-2.6B by Liquid AI — deploy agents everywhere. A 2.6B dense reasoning model (Q4_K_M, ~1.7 GB) with native tool calling, 128K context, and 16-language support. Runs on any 8 GB GPU.

ollama run oamazonasgabriel/lfm2.5-2.6b:q4_k_m-8gbGPU

Details

yesterday

7f5b6c31e24a · 1.7GB ·

lfm2
·
2.7B
·
Q4_K_M
LFM Open License v1.0 TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "
{ "frequency_penalty": 0, "min_p": 0, "num_batch": 512, "num_ctx": 32768, "num_g

Readme

LFM2.5-2.6B — Ollama Model (8 GB GPU) General-Purpose Agent

Model: oamazonasgabriel/lfm2.5-2.6b:q4_k_m-8gbGPU

Ollama Built by impacte.tech


DESCRIPTION

LFM2.5-2.6B is a next-generation agentic language model by Liquid AI, built on the hybrid LFM2 architecture — 22 double-gated short convolution (LIV) blocks combined with 8 Grouped-Query Attention (GQA) blocks. It is a pure reasoning model that always thinks before it answers (wrapping its reasoning in <think>/</think> tags), and was trained inside popular agentic harnesses to work reliably as an on-device agent. This Ollama packaging uses the official Q4_K_M GGUF quantization (~1.67 GB), bringing frontier-grade agentic performance to 8 GB GPUs and CPU-only laptops.

“Deploy Agents Everywhere.” — Liquid AI

The ideal on-device agent for: 8 GB laptops · 4-8 GB desktops · Edge servers · Raspberry Pi 5 · Agent harnesses (Hermes Agent, OpenClaw, Pi)

Key Features

  • Best-in-class agent: competitive with models 4x larger on tool use, instruction following, and multi-step agentic tasks
  • Native tool calling: Pythonic function calls (func(arg="value")) between <|tool_call_start|>/<|tool_call_end|> tokens
  • Always thinks first: built-in reasoning (<think> tags) for planning and multi-step workflows
  • 128K native context (configured to 32K for 8 GB, expandable to 128K at runtime)
  • Tiny footprint: only ~1.67 GB at Q4_K_M — runs on any 8 GB GPU with ~5.5 GB of headroom
  • Blazing fast: 220 tok/s on Apple M5 Max, 113 tok/s on AMD Ryzen, ~30 tok/s on a phone
  • 16 languages: EN, AR, ZH, FR, DE, IT, JA, KO, PT, ES, VI, TH, ID, HI, RU, PL
  • Trained on ~34T tokens: pre-training + context extension to 128K + agentic RL
  • LFM Open License v1.0: royalty-free for non-commercial/research and small business (<$10M annual revenue)

Architecture

Property Value
Architecture Hybrid: 22 double-gated short conv blocks + 8 GQA blocks
Parameters 2.69B — dense (all active per token)
Layers 30 (22 conv + 8 GQA)
Embedding Dim 2048
Native Context 131,072 tokens
Configured Context 32,768 tokens (8 GB GPU optimized)
Vocabulary 128,000 tokens
Training Budget ~34 trillion tokens
Modalities Text only
Chat Format ChatML-like (`<
Tool Call Tokens <|tool_call_start|>, `<
Tool Call Format Pythonic: function_name(arg="value")
Supported Languages English, Arabic, Chinese, French, German, Italian, Japanese, Korean, Portuguese, Spanish, Vietnamese, Thai, Indonesian, Hindi, Russian, Polish
Quantization Q4_K_M (~1.67 GB)
Model Size ~1.67 GB
License LFM Open License v1.0
Upstream LiquidAI/LFM2.5-2.6B-GGUF

REQUIREMENTS

Resource Minimum (4 GB) Recommended (8 GB)
RAM 4 GB 8 GB+
GPU Memory 2 GB VRAM (optional) 4 GB+ VRAM (optional)
Disk Space 3 GB free 5 GB+ free
Ollama Version 0.30.6+ Latest

Platform support: - CPU-only — runs on any modern CPU (efficient hybrid architecture) - Any GPU (NVIDIA, AMD, Intel Arc, Apple Silicon) with 2 GB+ VRAM - Raspberry Pi 5 — confirmed by Liquid AI for on-device agents - Edge devices & phones — purpose-built for edge deployment

💡 Why 8 GB GPU? The model is only ~1.67 GB. An 8 GB GPU has ~5.5 GB of headroom — enough for large 128K contexts, KV cache, and concurrent requests.


QUICK START

1. Install Ollama

# macOS (Homebrew)
brew install ollama

# Linux
curl -fsSL https://ollama.com/install.sh | sh

# Windows
# Download from https://ollama.com/download

2. Pull & Run

# Pull the model (downloads ~1.7 GB)
ollama pull oamazonasgabriel/lfm2.5-2.6b:q4_k_m-8gbGPU

# Run interactively
ollama run oamazonasgabriel/lfm2.5-2.6b:q4_k_m-8gbGPU

# Single prompt
ollama run oamazonasgabriel/lfm2.5-2.6b:q4_k_m-8gbGPU \
  "Plan a 3-step workflow to research and summarize the Q3 earnings of a public company."

USAGE

CLI

# Interactive chat
ollama run oamazonasgabriel/lfm2.5-2.6b:q4_k_m-8gbGPU

# With system prompt
ollama run oamazonasgabriel/lfm2.5-2.6b:q4_k_m-8gbGPU \
  --system "You are an agent. Plan and execute multi-step tasks using the available tools."

# Override context for long-context workflows
ollama run oamazonasgabriel/lfm2.5-2.6b:q4_k_m-8gbGPU \
  --num-ctx 131072

REST API

# Chat completion
curl -s http://127.0.0.1:11434/api/chat \
  -d '{
    "model": "oamazonasgabriel/lfm2.5-2.6b:q4_k_m-8gbGPU",
    "messages": [{"role": "user", "content": "What is the capital of France?"}]
  }'

# Multi-turn agentic task
curl -s http://127.0.0.1:11434/api/chat \
  -d '{
    "model": "oamazonasgabriel/lfm2.5-2.6b:q4_k_m-8gbGPU",
    "messages": [
      {"role": "system", "content": "You are a helpful agent. Think step by step."},
      {"role": "user", "content": "Extract all dates and amounts from: Invoice dated 2024-03-15 for $1,234.56"}
    ],
    "options": {
      "temperature": 0.1,
      "top_k": 50
    }
  }'

# Tool calling (prompt mode)
curl -s http://127.0.0.1:11434/api/chat \
  -d '{
    "model": "oamazonasgabriel/lfm2.5-2.6b:q4_k_m-8gbGPU",
    "messages": [
      {"role": "system", "content": "List of tools: [{\"name\": \"get_weather\", \"description\": \"Get the current weather for a city\", \"parameters\": {\"type\": \"object\", \"properties\": {\"location\": {\"type\": \"string\"}}, \"required\": [\"location\"]}}]"},
      {"role": "user", "content": "What is the weather in Boston?"}
    ]
  }'

# OpenAI-compatible endpoint
curl -s http://127.0.0.1:11434/v1/chat/completions \
  -d '{
    "model": "oamazonasgabriel/lfm2.5-2.6b:q4_k_m-8gbGPU",
    "messages": [{"role": "user", "content": "Hello!"}],
    "stream": false
  }'

Python (ollama library)

pip install ollama
import ollama

# Chat
response = ollama.chat(
    model='oamazonasgabriel/lfm2.5-2.6b:q4_k_m-8gbGPU',
    messages=[{'role': 'user', 'content': 'What is 2+2? Answer briefly.'}],
)
print(response.message.content)

JavaScript (ollama.js)

npm install ollama
import ollama from 'ollama'

const response = await ollama.chat({
  model: 'oamazonasgabriel/lfm2.5-2.6b:q4_k_m-8gbGPU',
  messages: [{ role: 'user', content: 'Plan a trip to Japan.' }],
})
console.log(response.message.content)

SAMPLING PARAMETERS

These are baked into the model via its Modelfile:

Parameter Value Rationale
num_ctx 32768 Generous default for agentic multi-turn tasks on 8 GB GPU
num_gpu 99 Offload all 30 layers to GPU
num_thread 8 Balanced for 8 GB GPU workstations
num_batch 512 Good throughput for dense 2.6B model
temperature 0.1 Official Liquid AI recommendation for focused, accurate output
top_k 50 Official recommended value from Liquid AI docs
top_p 0.9 Slightly wider nucleus for tool-use flexibility
repeat_penalty 1.1 Official value — light repetition penalty for natural flow
stop <\|im_start\|>, <\|im_end\|> Chat template tokens
stop <\|tool_call_start\|>, <\|tool_call_end\|> Tool boundary tokens

Equivalent llama.cpp Command

./llama-cli \
  -m LFM2.5-2.6B-Q4_K_M.gguf \
  -ngl 99 \
  -c 32768 \
  --temp 0.1 \
  --top-k 50 \
  --repeat-penalty 1.1 \
  -cnv

Override for More Creative Tasks

If you need less deterministic outputs (e.g., for creative text generation):

ollama run oamazonasgabriel/lfm2.5-2.6b:q4_k_m-8gbGPU \
  --temperature 0.7 --top-p 0.95

MEMORY & PERFORMANCE

VRAM Budget

Component 8 GB GPU (32K ctx) 8 GB GPU (128K ctx)
Model weights (Q4_K_M) ~1.67 GB ~1.67 GB
KV cache (FP16) ~0.5 GB ~2.0 GB
Ollama overhead ~0.3 GB ~0.3 GB
Total ~2.5 GB ~4.0 GB
Headroom ~5.5 GB ~4.0 GB

Context Window Scaling (8 GB, with q8_0 KV cache)

Context KV Cache Total Fits?
16,384 ~0.13 GB ~2.1 GB ✅ Lots of headroom
32,768 (default) ~0.25 GB ~2.2 GB ✅ Comfortable
131,072 (native) ~1.00 GB ~3.0 GB ✅ Yes

Performance

Hardware Text Generation
RTX 4060 (8 GB) ~300-600 tok/s
Apple M5 Max ~220 tok/s
AMD Ryzen AI Max+ 395 ~113 tok/s
Intel i7 (CPU-only) ~40-100 tok/s
Raspberry Pi 5 / Phone ~30 tok/s

TROUBLESHOOTING

Symptom Fix
Model not found Run ollama pull oamazonasgabriel/lfm2.5-2.6b:q4_k_m-8gbGPU first
Tool calling returns empty tool_calls Use prompt mode (tools in system prompt) — OpenAI-style tools param needs newer Ollama
Too verbose / always reasons first This is expected — the model is a reasoning model; add “Output only the answer” to the prompt
Slow on CPU Normal for CPU; enable any GPU with num_gpu 99
Repetitive output Override repeat_penalty to 1.2 at runtime
OOM on 8 GB Reduce num_ctx to 16384 or enable q8_0 KV cache

Optimizations for 8 GB Systems

# Set KV cache to q8_0 for ~50% memory reduction
export OLLAMA_KV_CACHE_TYPE=q8_0
ollama serve

# In another terminal:
ollama run oamazonasgabriel/lfm2.5-2.6b:q4_k_m-8gbGPU

ALTERNATIVE MODELS

# Larger general-purpose MoE sibling (8 GB GPU)
ollama pull oamazonasgabriel/lfm2.5-8b-a1b:q4_k_m-8gbGPU

# Ultra-lightweight LFM2.5 (4-8 GB RAM)
ollama pull oamazonasgabriel/lfm2.5-230m:bf16-8gbRAM

# Tool-calling specialized (8-16 GB RAM)
ollama pull oamazonasgabriel/lfm2-1.2b-tool:f16-8gbRAM

# Larger coding model (needs 16 GB)
ollama pull oamazonasgabriel/qwen3.5-9b:q4-16gbGPU

# Larger MoE model (needs 24 GB)
ollama pull oamazonasgabriel/qwen3.6-35b-a3b:q4-24gbGPU

# Other quants of this model (Q8_0, Q6_K, etc.)
ollama pull hf.co/LiquidAI/LFM2.5-2.6B-GGUF:Q8_0

CREDITS

This Ollama packaging brings together work from multiple teams and individuals:

Role Entity Contribution
Model Architecture & Training Liquid AI, Inc. Designed the hybrid LIV+GQA architecture, pre-trained on ~34T tokens, extended context to 128K, and post-trained via agentic RL. Based on the LFM2 architecture described in arXiv:2511.23404.
Original Model Liquid AI LFM2.5-2.6B post-trained checkpoint in native Transformers format.
GGUF Conversion Liquid AI / llama.cpp community Converted to GGUF format via llama.cpp for broad compatibility with Ollama, LM Studio, and other GGUF-based runtimes.
Q4_K_M Quantization Liquid AI Official Q4_K_M export (~1.67 GB) optimized for 8 GB hardware targets.
Ollama Modelfile & Packaging impacte.tech Ollama Modelfile configuration, sampling parameter tuning for 8 GB GPU targets, documentation, and registry publishing.
Benchmarking & Validation Liquid AI (official), impacte.tech (Ollama integration test) Verified on 8 GB GPU workstations with Ollama 0.30.6.
License Liquid AI, Inc. LFM Open License v1.0

Citation

If you use this model in your work, please cite the original LFM2.5-2.6B blog post and the LFM2 technical report:

@article{liquidAI202626B,
  author  = {Liquid AI},
  title   = {LFM2.5-2.6B: Agents Everywhere},
  journal = {Liquid AI Blog},
  year    = {2026},
  note    = {www.liquid.ai/blog/lfm2-5-2-6b},
}

@article{liquidai2025lfm2,
  title={LFM2 Technical Report},
  author={Liquid AI},
  journal={arXiv preprint arXiv:2511.23404},
  year={2025}
}

Acknowledgments

  • The llama.cpp project (github.com/ggml-org/llama.cpp) for the GGUF format and efficient inference engine that makes models like this accessible on commodity hardware.
  • The Ollama team (ollama.com) for the seamless model distribution platform.
  • Hugging Face (huggingface.co) for model hosting and the Hub ecosystem.

LINKS

Resource URL
This model on Ollama https://ollama.com/oamazonasgabriel/lfm2.5-2.6b
Upstream model (HuggingFace) https://huggingface.co/LiquidAI/LFM2.5-2.6B
GGUF files (HuggingFace) https://huggingface.co/LiquidAI/LFM2.5-2.6B-GGUF
LFM2.5-2.6B blog post https://www.liquid.ai/blog/lfm2-5-2-6b
LFM2 technical report https://arxiv.org/abs/2511.23404
Liquid AI https://www.liquid.ai/
Ollama docs https://docs.ollama.com
Built by impacte.tech