39 Downloads Updated 2 weeks ago
ollama run oamazonasgabriel/lfm2-1.2b-tool:f16-8gbGPU
Model: oamazonasgabriel/lfm2-1.2b-tool:f16-8gbGPU
LFM2-1.2B-Tool is a specialized variant of Liquid AI’s LFM2 architecture, fine-tuned exclusively for concise and precise tool calling. It combines 10 double-gated Linear-Invariant-Valued (LIV) convolution blocks with 6 full-attention Grouped-Query Attention (GQA) blocks — a novel hybrid design that achieves 2-3x better perplexity per parameter than dense transformers. The model is designed to outperform similarly sized thinking models for function-calling tasks without any internal chain-of-thought overhead, delivering instant tool call generation for latency-sensitive applications. This Ollama packaging uses the official F16 GGUF quantization (~2.5 GB).
“Built to Run Anywhere.” — Liquid AI
The ultimate tool-calling companion for: 8 GB laptops · 16 GB desktops · Edge servers · Real-time assistants · IoT devices · API orchestration
func(arg="value") — natural and intuitive| Property | Value |
|---|---|
| Architecture | Hybrid: 10 conv blocks + 6 full_attention GQA blocks |
| Parameters | 1.17B — dense (all active per token) |
| Layers | 16 (10 conv + 6 full_attention) |
| Hidden Dim | 2048 |
| Intermediate Dim | 12288 |
| Attention Heads | 32 |
| Key-Value Heads | 8 (GQA, ratio 4:1) |
| Native Context | 128,000 tokens |
| Configured Context | 32,768 tokens (8-16 GB GPU optimized) |
| Vocabulary | 65,536 tokens |
| Base Model | LFM2-1.2B |
| Knowledge Cutoff | Mid-2024 |
| Modalities | Text only |
| Chat Format | ChatML-like (`< |
| Tool List Tokens | <|tool_list_start|>, `< |
| Tool Call Tokens | <|tool_call_start|>, `< |
| Tool Response Tokens | <|tool_response_start|>, `< |
| Tool Call Format | Pythonic: function_name(arg="value") |
| FFN Activation | SwiGLU |
| Position Encoding | RoPE (theta=1,000,000) |
| Tie Embeddings | Yes |
| Supported Languages | English, Arabic, Chinese, French, German, Japanese, Korean, Portuguese, Spanish |
| Quantization | F16 (maximum precision) |
| Model Size | ~2.5 GB |
| License | LFM Open License v1.0 |
| Upstream | LiquidAI/LFM2-1.2B-Tool-GGUF |
| Base Model | LiquidAI/LFM2-1.2B-Tool |
| Resource | Minimum (8 GB) | Recommended (16 GB) |
|---|---|---|
| RAM | 4 GB | 8 GB+ |
| GPU Memory | 2 GB VRAM (optional) | 4 GB+ VRAM (optional) |
| Disk Space | 5 GB free | 10 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 - Edge servers & IoT — purpose-built for edge deployment
💡 Why 8-16 GB RAM? The model is ~2.5 GB. An 8 GB machine has ~4.2 GB of headroom — enough to run alongside your other applications. On 16 GB, you have ~11 GB headroom for larger contexts.
# macOS (Homebrew)
brew install ollama
# Linux
curl -fsSL https://ollama.com/install.sh | sh
# Windows
# Download from https://ollama.com/download
# Pull the model (downloads ~2.5 GB)
ollama pull oamazonasgabriel/lfm2-1.2b-tool:f16-8gbGPU
# Run interactively
ollama run oamazonasgabriel/lfm2-1.2b-tool:f16-8gbGPU
# Interactive chat (tool calling via API recommended)
ollama run oamazonasgabriel/lfm2-1.2b-tool:f16-8gbGPU
# With system prompt providing tools
ollama run oamazonasgabriel/lfm2-1.2b-tool:f16-8gbGPU \
--system "You are a tool-calling assistant. Use the available tools to answer questions."
# Override context for 16 GB systems
ollama run oamazonasgabriel/lfm2-1.2b-tool:f16-8gbGPU \
--num-ctx 65536
# Single tool call
curl -s http://127.0.0.1:11434/api/chat \
-d '{
"model": "oamazonasgabriel/lfm2-1.2b-tool:f16-8gbGPU",
"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"]
}
}
}
],
"options": {
"temperature": 0.0
}
}'
# Turn 1: User asks a question
curl -s http://127.0.0.1:11434/api/chat \
-d '{
"model": "oamazonasgabriel/lfm2-1.2b-tool:f16-8gbGPU",
"messages": [
{"role": "user", "content": "Find me a hotel in San Francisco for July 4-6 with a pool"}
],
"tools": [
{
"type": "function",
"function": {
"name": "search_hotels",
"description": "Search hotels by location, dates, and amenities",
"parameters": {
"type": "object",
"properties": {
"location": {"type": "string"},
"check_in": {"type": "string"},
"check_out": {"type": "string"},
"amenities": {"type": "array", "items": {"type": "string"}}
},
"required": ["location", "check_in", "check_out"]
}
}
}
],
"options": {"temperature": 0.0}
}'
# Then feed the tool response back to get the final answer
curl -s http://127.0.0.1:11434/api/chat \
-d '{
"model": "oamazonasgabriel/lfm2-1.2b-tool:f16-8gbGPU",
"messages": [
{"role": "user", "content": "Find me a hotel in San Francisco for July 4-6 with a pool"},
{"role": "assistant", "content": "",
"tool_calls": [{"function": {"name": "search_hotels", "arguments": {"location": "San Francisco", "check_in": "2024-07-04", "check_out": "2024-07-06", "amenities": ["pool"]}}}]
},
{"role": "tool", "content": "{\"hotels\": [{\"name\": \"Marriott Marquis\", \"pool\": true, \"price\": 299}, {\"name\": \"Hilton Union Square\", \"pool\": true, \"price\": 249}]}"}
],
"options": {"temperature": 0.0}
}'
curl -s http://127.0.0.1:11434/api/chat \
-d '{
"model": "oamazonasgabriel/lfm2-1.2b-tool:f16-8gbGPU",
"messages": [{"role": "user", "content": "Hello! What can you do?"}]
}'
curl -s http://127.0.0.1:11434/v1/chat/completions \
-d '{
"model": "oamazonasgabriel/lfm2-1.2b-tool:f16-8gbGPU",
"messages": [{"role": "user", "content": "Get me the stock price for AAPL."}],
"tools": [
{
"type": "function",
"function": {
"name": "get_stock_price",
"description": "Get current stock price",
"parameters": {
"type": "object",
"properties": {
"symbol": {"type": "string"}
},
"required": ["symbol"]
}
}
}
],
"stream": false
}'
pip install ollama
import ollama
# Tool calling
response = ollama.chat(
model='oamazonasgabriel/lfm2-1.2b-tool:f16-8gbGPU',
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)
# Multi-turn with tool response
response = ollama.chat(
model='oamazonasgabriel/lfm2-1.2b-tool:f16-8gbGPU',
messages=[
{'role': 'user', 'content': 'What is the weather in Boston?'},
{'role': 'assistant', 'content': '', 'tool_calls': [{'function': {'name': 'get_weather', 'arguments': {'location': 'Boston'}}}]},
{'role': 'tool', 'content': '{"temperature": 72, "conditions": "sunny"}'},
],
)
print(response.message.content)
npm install ollama
import ollama from 'ollama'
const response = await ollama.chat({
model: 'oamazonasgabriel/lfm2-1.2b-tool:f16-8gbGPU',
messages: [{ role: 'user', content: 'Get the stock price for AAPL.' }],
tools: [{
type: 'function',
function: {
name: 'get_stock_price',
description: 'Get current stock price',
parameters: {
type: 'object',
properties: {
symbol: { type: 'string' }
},
required: ['symbol']
}
}
}],
})
console.log(response.message.tool_calls)
These are baked into the model via its Modelfile:
| Parameter | Value | Rationale |
|---|---|---|
num_ctx |
32768 | Generous context for multi-turn tool chains on 8-16 GB RAM |
num_gpu |
99 | Offload all 16 layers to GPU |
num_thread |
6 | Conservative for CPU-friendly operation |
num_batch |
256 | Moderate batch size for 8 GB systems |
temperature |
0.0 | Greedy decoding — official recommendation for deterministic tool calls |
top_k |
50 | Safety net (no effect at temp=0) |
top_p |
0.9 | No effect at temp=0 |
repeat_penalty |
1.05 | Light repetition penalty for natural flow |
stop |
<\|im_start\|>, <\|im_end\|> |
Chat template tokens |
stop |
<\|tool_list_start\|>, <\|tool_list_end\|> |
Tool list boundary tokens |
stop |
<\|tool_call_start\|>, <\|tool_call_end\|> |
Tool call boundary tokens |
stop |
<\|tool_response_start\|>, <\|tool_response_end\|> |
Tool response boundary tokens |
⚠️ Important: Always use
temperature=0.0for production tool-calling pipelines. Higher temperatures may introduce syntax errors in Pythonic function calls.
./llama-cli \
-m LFM2-1.2B-Tool-F16.gguf \
-ngl 99 \
-c 32768 \
--temp 0.0 \
--top-k 50 \
--repeat-penalty 1.05 \
-cnv
| Component | 8 GB System (32K ctx) | 16 GB System (64K ctx) |
|---|---|---|
| Model weights (F16) | ~2.5 GB | ~2.5 GB |
| KV cache (FP16) | ~1.0 GB | ~2.0 GB |
| Ollama overhead | ~0.3 GB | ~0.3 GB |
| Total | ~3.8 GB | ~4.8 GB |
| Headroom | ~4.2 GB | ~11.2 GB |
| Context | KV Cache | Total | Fits? |
|---|---|---|---|
| 16,384 | ~0.25 GB | ~3.05 GB | ✅ Lots of headroom |
| 32,768 (default) | ~0.50 GB | ~3.30 GB | ✅ Comfortable |
| 65,536 | ~1.00 GB | ~3.80 GB | ✅ Yes |
| 131,072 (native) | ~2.00 GB | ~4.80 GB | ✅ Yes (with headroom) |
| Hardware | Tool Call Latency | Text Generation |
|---|---|---|
| RTX 4060 (8 GB) | ~10-30ms | ~150-400 tok/s |
| RTX 3060 (12 GB) | ~8-20ms | ~200-500 tok/s |
| Apple Silicon M2 | ~15-40ms | ~100-300 tok/s |
| Intel i7 (CPU-only) | ~50-200ms | ~20-60 tok/s |
| Symptom | Fix |
|---|---|
| Model not found | Run ollama pull oamazonasgabriel/lfm2-1.2b-tool:f16-8gbGPU first |
| Tool calling returns text instead of function call | Ensure you’re passing tools array in /api/chat (not /api/generate) |
| Malformed function calls | Make sure temperature is set to 0.0 — any randomness can break Pythonic syntax |
| Slow on CPU | Normal for CPU; enable any GPU with num_gpu 99 |
| OOM on 8 GB | Reduce num_ctx to 16384 or enable q8_0 KV cache |
| Multi-turn not working | Pass full conversation history including previous tool calls and responses |
# 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-1.2b-tool:f16-8gbGPU
# Or reduce context at runtime:
ollama run oamazonasgabriel/lfm2-1.2b-tool:f16-8gbGPU --num-ctx 16384
# Ultra-lightweight version of this family (4-8 GB)
ollama pull oamazonasgabriel/lfm2.5-230m:bf16-8gbGPU
# Larger general-purpose 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
# Same architecture, general instruct version
ollama pull hf.co/LiquidAI/LFM2.5-1.2B-Instruct-GGUF:Q4_K_M
# Quantized version of this model (smaller, faster)
ollama pull hf.co/LiquidAI/LFM2-1.2B-Tool-GGUF:Q4_K_M
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, fine-tuned LFM2-1.2B for concise and precise tool calling without chain-of-thought. Based on the LFM2 architecture described in arXiv:2511.23404. |
| Original Model | Liquid AI | LFM2-1.2B-Tool tool-calling specialized 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. |
| F16 Quantization | Liquid AI | Native F16 export preserving full model fidelity. |
| Ollama Modelfile & Packaging | impacte.tech | Ollama Modelfile configuration, greedy-decoding parameter tuning for 8-16 GB RAM targets, documentation, and registry publishing. |
| Benchmarking & Validation | Liquid AI (official), impacte.tech (Ollama integration test) | Verified on RTX 4060, RTX 3060, Apple Silicon, Intel CPU. |
| License | Liquid AI, Inc. | LFM Open License v1.0 |
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}
}
@misc{liquidAI2026tool,
author = {Liquid AI},
title = {LFM2-1.2B-Tool: Concise and Precise Tool Calling for Edge Devices},
year = {2026},
note = {https://huggingface.co/LiquidAI/LFM2-1.2B-Tool}
}
| Resource | URL |
|---|---|
| This model on Ollama | https://ollama.com/oamazonasgabriel/lfm2-1.2b-tool |
| Upstream model (HuggingFace) | https://huggingface.co/LiquidAI/LFM2-1.2B-Tool |
| GGUF files (HuggingFace) | https://huggingface.co/LiquidAI/LFM2-1.2B-Tool-GGUF |
| Liquid Nanos collection | https://huggingface.co/collections/LiquidAI/liquid-nanos |
| LFM2 technical report | https://arxiv.org/abs/2511.23404 |
| Liquid AI blog | https://www.liquid.ai/blog/introducing-liquid-nanos-frontier-grade-performance-on-everyday-devices |
| Liquid AI | https://www.liquid.ai/ |
| Ollama docs | https://docs.ollama.com |
| Built by | impacte.tech |