212 4 days ago

LFM2.5-230M is a hybrid language model by Liquid AI, Built to Run Anywhere. The ideal lightweight AI companion for: 4 GB laptops · 8 GB desktops · Edge devices · Raspberry Pi 5

ollama run oamazonasgabriel/lfm2.5-230m:bf16-8gbRAM

Details

4 days ago

3d88c4c83859 · 462MB ·

lfm2
·
230M
·
BF16
LFM Open License v1.0 TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "
LFM Open License v1.0 TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "
{ "frequency_penalty": 0, "min_p": 0, "num_batch": 128, "num_ctx": 16384, "num_g

Readme

LFM2.5-230M — Ollama Model (4-8 GB RAM) Ultra-Lightweight

Model: oamazonasgabriel/lfm2.5-230m:bf16-8gbRAM

Ollama Built by impacte.tech


DESCRIPTION

LFM2.5-230M is a next-generation hybrid language model by Liquid AI, architecturally distinct from conventional transformers. It combines 8 double -gated Linear-Invariant-Valued (LIV) convolution blocks with 6 Grouped-Query Attention (GQA) blocks — a novel hybrid design that achieves 2-3x better perplexity per paramet er than dense transformers of equivalent size. This Ollama packaging uses the official BF16 GGUF quantization (~461 MB), bringing full model fidelity to the tightest hardware bud gets.

“Built to Run Anywhere.” — Liquid AI

The ideal lightweight AI companion for: 4 GB laptops · 8 GB desktops · Edge devices · Raspberry Pi 5 · Any system with limited RAM

Key Features

  • Ultra-tiny footprint: only ~461 MB at BF16 full precision — runs on any 4 GB system including CPU-only
  • Full precision: BF16 weights preserve 100% model quality (230M params, zero quantization loss)
  • Blazing fast: 213 tok/s on Galaxy S25 Ultra, 42 tok/s on Raspberry Pi 5, 500+ tok/s on modern GPUs
  • 16K context (configurable to 32K) — comfortable for multi-turn agentic conversations and data extraction
  • Native tool calling: built-in <|tool_call_start|>, <|tool_call_end|> tokens for function calling
  • Edge ready: explicitly designed for on-device deployment — trained with edge inference as a primary goal
  • CPU-friendly: runs great on CPU-only hardware; works on Raspberry Pi 5 and smartphones
  • 10 languages: EN, AR, ZH, FR, DE, IT, JA, KO, PT, ES
  • LFM Open License v1.0: royalty-free for non-commercial/research and small business (<$10M annual revenue)

Architecture

Property Value
Architecture Hybrid: 8 double-gated LIV conv blocks + 6 GQA blocks
Parameters 230M — dense (all active per token)
Layers 14 (8 LIV conv + 6 GQA)
Embedding Dim 1024
Native Context 32,768 tokens (128K supported in GGUF metadata)
Configured Context 16,384 tokens (4-8 GB RAM optimized)
Vocabulary 65,536 tokens
Training Budget 19 trillion tokens
Knowledge Cutoff Mid-2024
Modalities Text only
Chat Format ChatML-like (`<
Tool Call Tokens <|tool_call_start|>, `<
Supported Languages English, Arabic, Chinese, French, German, Italian, Japanese, Korean, Portuguese, Spanish
Quantization BF16 (maximum precision)
Model Size ~461 MB
License LFM Open License v1.0
Upstream LiquidAI/LFM2.5-230M-GGUF

REQUIREMENTS

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

Platform support: - CPU-only — runs on any modern CPU (230M model is tiny) - Any GPU (NVIDIA, AMD, Intel Arc, Apple Silicon) with 0.5 GB+ VRAM - Integrated GPU — Intel UHD, AMD Radeon Graphics (iGPU) all work - Raspberry Pi 5 — confirmed working at 42 tok/s - Smartphones — via termux/Ollama app - Edge devices — purpose-built for edge deployment

💡 Why 4-8 GB RAM? The model is ~461 MB. A 4 GB machine has ~2.5 GB of headroom — you can run this alongside your browser, IDE, and other applications without breaking a sweat. On 8 GB, you have ~6 GB headroom.


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 ~461 MB)
ollama pull oamazonasgabriel/lfm2.5-230m:bf16-8gbRAM

# Run interactively
ollama run oamazonasgabriel/lfm2.5-230m:bf16-8gbRAM

# Single prompt
ollama run oamazonasgabriel/lfm2.5-230m:bf16-8gbRAM \
  "Extract all email addresses from this text: Contact us at support@example.com or sales@example.org"

USAGE

CLI

# Interactive chat
ollama run oamazonasgabriel/lfm2.5-230m:bf16-8gbRAM

# With system prompt
ollama run oamazonasgabriel/lfm2.5-230m:bf16-8gbRAM \
  --system "You are a data extraction assistant. Extract structured data from unstructured text."

# Override context for 8 GB systems
ollama run oamazonasgabriel/lfm2.5-230m:bf16-8gbRAM \
  --num-ctx 32768

REST API

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

# Data extraction
curl -s http://127.0.0.1:11434/api/chat \
  -d '{
    "model": "oamazonasgabriel/lfm2.5-230m:bf16-8gbRAM",
    "messages": [
      {"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
curl -s http://127.0.0.1:11434/api/chat \
  -d '{
    "model": "oamazonasgabriel/lfm2.5-230m:bf16-8gbRAM",
    "messages": [{"role": "user", "content": "What is the weather in Boston?"}],
    "tools": [
      {
        "type": "function",
        "function": {
          "name": "get_weather",
          "description": "Get the current weather for a city",
          "parameters": {
            "type": "object",
            "properties": {
              "location": {"type": "string", "description": "City name"}
            },
            "required": ["location"]
          }
        }
      }
    ]
  }'

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

Python (ollama library)

pip install ollama
import ollama

# Chat
response = ollama.chat(
    model='oamazonasgabriel/lfm2.5-230m:bf16-8gbRAM',
    messages=[{'role': 'user', 'content': 'Extract all names from this text: John Doe and Jane Smith were present.'}],
)
print(response.message.content)

# Tool calling
response = ollama.chat(
    model='oamazonasgabriel/lfm2.5-230m:bf16-8gbRAM',
    messages=[{'role': 'user', 'content': 'What is the weather in Boston?'}],
    tools=[{
        'type': 'function',
        'function': {
            'name': 'get_weather',
            'description': 'Get current weather',
            'parameters': {
                'type': 'object',
                'properties': {
                    'location': {'type': 'string', 'description': 'City name'}
                },
                'required': ['location']
            }
        }
    }],
)
print(response.message.tool_calls)

JavaScript (ollama.js)

npm install ollama
import ollama from 'ollama'

const response = await ollama.chat({
  model: 'oamazonasgabriel/lfm2.5-230m:bf16-8gbRAM',
  messages: [{ role: 'user', content: 'Extract the date from: The meeting is on 2024-06-15.' }],
})
console.log(response.message.content)

SAMPLING PARAMETERS

These are baked into the model via its Modelfile:

Parameter Value Rationale
num_ctx 16384 Balanced for tool-use and data extraction on 4-8 GB RAM
num_gpu 99 Offload all 14 layers to GPU
num_thread 4 Conservative for CPU-friendly operation
num_batch 128 Moderate batch size for 4 GB systems
temperature 0.1 Highly deterministic for data extraction and tool calling
top_k 50 Official recommended value from Liquid AI docs
top_p 0.9 Slightly wider nucleus for tool-use flexibility
repeat_penalty 1.05 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-230M-BF16.gguf \
  -ngl 99 \
  -c 16384 \
  --temp 0.1 \
  --top-k 50 \
  --repeat-penalty 1.05 \
  -cnv

Override for More Creative Tasks

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

ollama run oamazonasgabriel/lfm2.5-230m:bf16-8gbRAM \
  --temperature 0.7 --top-p 0.95

MEMORY & PERFORMANCE

RAM Budget

Component 4 GB System (16K ctx) 8 GB System (32K ctx)
Model weights (BF16) ~0.46 GB ~0.46 GB
KV cache (FP16) ~0.7 GB ~1.4 GB
Ollama overhead ~0.3 GB ~0.3 GB
Total ~1.5 GB ~2.2 GB
Headroom ~2.5 GB ~5.8 GB

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

Context KV Cache Total Fits?
8,192 ~0.18 GB ~0.94 GB ✅ Lots of headroom
16,384 ~0.35 GB ~1.11 GB ✅ Comfortable
32,768 (native) ~0.70 GB ~1.46 GB ✅ Yes

Performance

Hardware Text Generation
RTX 4060 (8 GB) ~500-1,000 tok/s
GTX 1660 (6 GB) ~200-500 tok/s
Apple Silicon M1 ~150-400 tok/s
Intel i7 (CPU-only) ~50-150 tok/s
Raspberry Pi 5 ~30-50 tok/s
Galaxy S25 Ultra ~200-300 tok/s

TROUBLESHOOTING

Symptom Fix
Model not found Run ollama pull oamazonasgabriel/lfm2.5-230m:bf16-8gbRAM first
Slow on CPU Normal for CPU; enable any GPU with num_gpu 99
Tool calling not working Ensure tools are passed in /api/chat (not /api/generate)
Too deterministic Override temperature to 0.3-0.7 for more creative outputs
Repetitive output Override repeat_penalty to 1.1 or 1.15 at runtime
OOM on 4 GB Reduce num_ctx to 8192 or enable q8_0 KV cache

Optimizations for 4 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-230m:bf16-8gbRAM

# Or reduce context at runtime:
ollama run oamazonasgabriel/lfm2.5-230m:bf16-8gbRAM --num-ctx 8192

ALTERNATIVE MODELS

# 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

# Similar lightweight model (FIM-optimized, 0.5B, 8 GB)
ollama pull oamazonasgabriel/qwen2.5-coder-0.5b:fp16-8gbGPU

# Even smaller 4-bit version of this model
ollama pull hf.co/LiquidAI/LFM2.5-230M-GGUF:Q4_K_M

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 19T tokens, and instruction-tuned with
multi-stage RL. Based on the LFM2 architecture described in arXiv:2511.23404.
Original Model Liquid AI LFM2.5-230M instruction-tuned 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.
BF16 Quantization Liquid AI Native BF16 export preserving full model fidelity.
Ollama Modelfile & Packaging impacte.tech Ollama Modelfile configuration, sampling parameter tuning for 4-8 GB RAM targets, documentation, and r
egistry publishing.
Benchmarking & Validation Liquid AI (official), impacte.tech (Ollama integration test) Verified on RTX 4060, GTX 1660, Apple Silicon M1, Intel CPU-only, Raspberry Pi 5.
License Liquid AI, Inc. LFM Open License v1.0

Citation

If you use this model in your work, please cite the original LFM2 technical report:

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

@article{liquidAI2026230M,
  author = {Liquid AI},
  title = {LFM2.5-230M: Built to Run Anywhere},
  journal = {Liquid AI Blog},
  year = {2026},
  note = {www.liquid.ai/blog/lfm2-5-230m}
}

Acknowledgments

  • The llama.cpp project (github.com/ggerganov/llama.cpp) for the GGUF format and efficient inference engine that makes models like t his 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-230m
Upstream model (HuggingFace) https://huggingface.co/LiquidAI/LFM2.5-230M
GGUF files (HuggingFace) https://huggingface.co/LiquidAI/LFM2.5-230M-GGUF
LFM2 technical report https://arxiv.org/abs/2511.23404
LFM2.5-230M blog post https://www.liquid.ai/blog/lfm2-5-230m
Liquid AI https://www.liquid.ai/
Ollama docs https://docs.ollama.com
Built by impacte.tech