Agents / WORKFLOW

LFM2.5 2.6B local agent setup

Metadata for building a local tool-using agent with LFM2.5 2.6B using Transformers or llama.cpp across Windows, Linux, and macOS.

EstimatedSource checked 9/28/2026
LOCALRENTED GPU
Freshness 74 out of 100. Repository age: 79 days old, Jul 28, 2026. Measures age, not quality.
Popularity 70 out of 100. 114,916 downloads in 30 days; 831 lifetime likes. Checked Oct 15, 2026. Measures adoption, not quality.
What do these scores mean?

Two ways to compare models. Neither score measures answer quality, benchmark performance, or whether a model fits your machine.

Freshness · release age

A new release starts at 100. The score halves every 180 days: 100 × 2^(−age in days / 180). When the release date is unavailable, a repository date is a fallback—not proof of when the model was released. Missing dates stay unscored.

Check the date source
Popularity · adoption

Downloads over the past 30 days carry 80% of the score; lifetime likes carry 20%. Both use a logarithmic scale, capped at 10 million downloads and 100,000 likes. If likes are unavailable, downloads carry all the weight. Missing download statistics stay unscored.

round(80 × min(1, log10(1 + downloads) / 7) + 20 × min(1, log10(1 + likes) / 5))

Check the statistics source
Scores as of Oct 15, 2026. Statistics checked Oct 15, 2026. Statistics are marked for refresh after 72 hours.Full scoring method

Before you begin

Hardware

MachineLFM2.5-2.6BLFM2.5-2.6B-GGUFLFM2.5-2.6B-Heretic-Abliterated-GGUF
NVIDIA GPU (8 GB VRAM)Transformers bfloat16 weights ~5.4GB; 8GB VRAM tight, use low context or CPU offload.llama.cpp CUDA: Q4/QAD Q4_0 ~2GB + 2-4GB overhead fits 8GB.llama.cpp CUDA: Q4_K_M 1.67GB + 2-4GB context overhead fits 8GB.
AMD GPU (8 GB VRAM)Transformers ROCm on Linux: weights ~5.4GB; 8GB VRAM tight; CPU offload may help.llama.cpp ROCm/Vulkan: Q4/QAD Q4_0 ~2GB + 2-4GB overhead fits 8GB.llama.cpp ROCm/Vulkan: Q4_K_M 1.67GB + 2-4GB overhead fits 8GB.
Intel Arc GPU (8 GB VRAM)Transformers on Intel Arc is not covered in this guide; use liquidai-lfm2-5-2-6b-gguf via Vulkan.llama.cpp Vulkan: Q4/QAD Q4_0 ~2GB + 2-4GB overhead fits 8GB.llama.cpp Vulkan: Q4_K_M 1.67GB + 2-4GB overhead fits 8GB.
Apple Silicon (16 GB unified memory)Transformers MPS/CPU: weights ~5.4GB; 16GB unified likely fits with low context.llama.cpp Metal: Q4/QAD Q4_0 ~2GB + 2-4GB overhead fits 16GB unified.llama.cpp Metal: Q4_K_M 1.67GB + 2-4GB overhead fits 16GB unified.
CPU (16 GB system RAM)Transformers CPU: weights ~5.4GB; 16GB system RAM fits with context headroom.llama.cpp CPU: Q4/QAD Q4_0 ~2GB + 2-4GB overhead fits 16GB RAM.llama.cpp CPU: Q4_K_M 1.67GB + 2-4GB overhead fits 16GB RAM.

Context window

MachineLFM2.5-2.6BLFM2.5-2.6B-GGUFLFM2.5-2.6B-Heretic-Abliterated-GGUF
NVIDIA GPU (8 GB VRAM)Start 2048 tokens; publisher limit 131k; 5.4GB weights leave little 8GB headroom.Start 4096 tokens; publisher limit 131k; Q4 ~2GB fits 8GB with headroom.Start 4096 tokens; publisher limit 131k; 1.67GB weights fit 8GB with headroom.
AMD GPU (8 GB VRAM)Start 2048 tokens on Linux ROCm; 5.4GB weights leave little 8GB headroom.Start 4096 tokens; publisher limit 131k; Q4 ~2GB fits 8GB with headroom.Start 4096 tokens; publisher limit 131k; ROCm/Vulkan fits 8GB with headroom.
Intel Arc GPU (8 GB VRAM)No Intel Arc Transformers route; use liquidai-lfm2-5-2-6b-gguf at 4096 tokens.Start 4096 tokens; publisher limit 131k; Vulkan fits 8GB with headroom.Start 4096 tokens; publisher limit 131k; Vulkan fits 8GB with headroom.
Apple Silicon (16 GB unified memory)Start 4096 tokens; publisher limit 131k; MPS/CPU fits 16GB unified with headroom.Start 8192 tokens; publisher limit 131k; Metal fits 16GB unified with headroom.Start 8192 tokens; publisher limit 131k; Metal fits 16GB unified with headroom.
CPU (16 GB system RAM)Start 4096 tokens; publisher limit 131k; CPU RAM fits 16GB with headroom.Start 4096 tokens; publisher limit 131k; CPU RAM fits 16GB with headroom.Start 4096 tokens; publisher limit 131k; CPU RAM fits 16GB with headroom.
Metadata onlySOURCE-LINKED SETUP

Set up LFM2.5 2.6B for local agentic tool calling

Use the publisher's native Transformers weights, the publisher's GGUF quantizations, or a community uncensored GGUF variant with llama.cpp. Verify a complete tool-call round-trip.

Choose a package Run its commands Check the result
01
BEFORE YOU BEGIN

Choose your package

Select the weights you want. The instructions, downloads and settings change with your choice.

The publisher has not provided a complete memory target for this task. Check its hardware guidance before starting.

CURRENT SETUP

LFM2.5-2.6B · official

Estimate: 8+ GB RAM/VRAM for inference. Uses bfloat16; ensure hardware supports it.

Freshness 74 out of 100. Repository age: 79 days old, Jul 28, 2026. Measures age, not quality.
Popularity 70 out of 100. 114,916 downloads in 30 days; 831 lifetime likes. Checked Oct 15, 2026. Measures adoption, not quality.
What do these scores mean?

Two ways to compare models. Neither score measures answer quality, benchmark performance, or whether a model fits your machine.

Freshness · release age

A new release starts at 100. The score halves every 180 days: 100 × 2^(−age in days / 180). When the release date is unavailable, a repository date is a fallback—not proof of when the model was released. Missing dates stay unscored.

Check the date source
Popularity · adoption

Downloads over the past 30 days carry 80% of the score; lifetime likes carry 20%. Both use a logarithmic scale, capped at 10 million downloads and 100,000 likes. If likes are unavailable, downloads carry all the weight. Missing download statistics stay unscored.

round(80 × min(1, log10(1 + downloads) / 7) + 20 × min(1, log10(1 + likes) / 5))

Check the statistics source
Scores as of Oct 15, 2026. Statistics checked Oct 15, 2026. Statistics are marked for refresh after 72 hours.Full scoring method
View weight source
02
THE WORKFLOW

Set up LFM2.5-2.6B on your machine

Choose where you want to run it. The instructions below update to match your selection.

CHOOSE YOUR SETUPMac

Python 3.10+, PyTorch 2.5+. Install transformers[torch]. Use MPS or CPU.

01

Prerequisites and working folder

Open Terminal. This route targets the publisher's native Transformers checkpoint LiquidAI/LFM2.5-2.6B at revision 654f9463ce32b05d0429d76fe1f580b27d4c1ac0: two bfloat16 safetensors shards (~5.4 GB total) plus tokenizer, config, generation config and chat template. It does not use GGUF files. Confirm Python 3.10 or newer and create a dedicated working folder so all downloads, virtual environments and scripts stay in one place. The published model maximum is 131072 tokens (config.json max_position_embeddings), but the active runtime context you actually feed the model on a 16 GB Apple Silicon machine starts far lower; this guide starts at 4096 tokens active context and lowers it further under memory pressure.

Python downloads Transformers installation
python3 --version mkdir -p "$HOME/YouRunAI-LFM2.5-2.6B-Agent" cd "$HOME/YouRunAI-LFM2.5-2.6B-Agent"
02

Create a virtual environment and install the runtime

Install Transformers with PyTorch inside an isolated virtual environment. Python must be 3.10 or newer and PyTorch 2.5 or newer. On macOS the supported backends for this checkpoint are MPS and CPU, so there is no CUDA or ROCm dependency here. The final command prints both installed versions so you can confirm the environment before downloading weights.

PyTorch local installation Transformers PyPI install
python3 -m venv .venv source .venv/bin/activate python -m pip install --upgrade pip python -m pip install "transformers[torch]" "huggingface_hub[cli]" python -c "import torch, transformers; print('torch', torch.__version__, 'transformers', transformers.__version__)"
03

Download the exact pinned checkpoint

Download the native safetensors checkpoint for LiquidAI/LFM2.5-2.6B pinned to the evidenced revision so weights, tokenizer and chat template all match. The download places the two sharded weight files, the safetensors index, config.json, tokenizer.json, tokenizer_config.json, generation_config.json and chat_template.jinja into the local model folder. Loading the model later resolves from this folder instead of the remote cache. Keep several GB of free disk space beyond the ~5.4 GB of weight files for cache and runtime overhead.

LiquidAI/LFM2.5-2.6B model card Model config.json Model tokenizer_config.json
huggingface-cli download LiquidAI/LFM2.5-2.6B --revision 654f9463ce32b05d0429d76fe1f580b27d4c1ac0 --local-dir "$HOME/YouRunAI-LFM2.5-2.6B-Agent/model"
04

Smoke test: first local response

Write and run a small script that loads the local checkpoint with device_map="auto" (MPS when available, otherwise CPU), applies the publisher chat template, and generates with the publisher's documented sampling values: temperature 0.1, top_k 50, repetition_penalty 1.1. The chat template is applied with add_generation_prompt=True and tokenize=True, and the resulting input_ids are moved to the model device. The observable result is a streamed, non-empty answer to the prompt "What is C. elegans?". If macOS reports memory pressure, lower max_new_tokens or move to the CPU-only path by replacing device_map="auto" with device_map="cpu".

LiquidAI/LFM2.5-2.6B README (Transformers quick start)
cat > smoke_test.py <<'PY' import os from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer model_id = os.path.expanduser("~/YouRunAI-LFM2.5-2.6B-Agent/model") model = AutoModelForCausalLM.from_pretrained( model_id, device_map="auto", dtype="bfloat16", ) tokenizer = AutoTokenizer.from_pretrained(model_id) streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True) prompt = "What is C. elegans?" input_ids = tokenizer.apply_chat_template( [{"role": "user", "content": prompt}], add_generation_prompt=True, return_tensors="pt", tokenize=True, )["input_ids"].to(model.device) model.generate( input_ids, do_sample=True, temperature=0.1, top_k=50, repetition_penalty=1.1, max_new_tokens=512, streamer=streamer, ) PY python smoke_test.py
05

Reusable conversation loop with a known-answer check

Start an interactive loop in the same terminal so you can send several prompts to the local model in one session. The loop truncates each templated prompt to the last 4096 tokens, which is the recommended starting active context for this checkpoint on a 16 GB Apple Silicon Mac; the advertised model maximum is still 131072 tokens. Lower active_context_tokens if memory is tight, or raise it only as far as the machine actually sustains. Start the loop, ask a known-answer question such as "What is the capital of France?" and confirm the answer contains Paris, then ask a second question in the same session. Type quit to exit.

LiquidAI/LFM2.5-2.6B README (chat template usage)
cat > chat_loop.py <<'PY' import os from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer model_id = os.path.expanduser("~/YouRunAI-LFM2.5-2.6B-Agent/model") model = AutoModelForCausalLM.from_pretrained( model_id, device_map="auto", dtype="bfloat16", ) tokenizer = AutoTokenizer.from_pretrained(model_id) streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True) active_context_tokens = 4096 print("Type a prompt, or type quit to exit.") while True: user_text = input("You: ") if user_text.strip().lower() == "quit": break input_ids = tokenizer.apply_chat_template( [{"role": "user", "content": user_text}], add_generation_prompt=True, return_tensors="pt", tokenize=True, )["input_ids"][:, -active_context_tokens:].to(model.device) model.generate( input_ids, do_sample=True, temperature=0.1, top_k=50, repetition_penalty=1.1, max_new_tokens=256, streamer=streamer, ) print() PY python chat_loop.py
06

Run a complete tool-call round-trip

This is the actual agent task. The publisher documents function calling in four steps: the system message carries the tool list, the assistant emits a tool call wrapped in <|tool_call_start|> and <|tool_call_end|>, the tool result is returned as a tool message, and the assistant then writes a final answer that uses that result. The script below defines one bounded local tool (a fixed weather lookup that performs no network access), asks a question that requires it, and feeds the tool output back into the model. The generate() helper returns the decoded assistant text and uses inputs.shape[-1] captured inside its own scope, so the prompt length is never referenced from outside the function. Inputs are truncated to a 4096-token active context on MPS/CPU. The model stays loaded in this process while the two generations run.

LiquidAI/LFM2.5-2.6B README (tool use example) Liquid AI tool use documentation
cat > tool_roundtrip.py <<'PY' import json import os from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer model_id = os.path.expanduser("~/YouRunAI-LFM2.5-2.6B-Agent/model") model = AutoModelForCausalLM.from_pretrained( model_id, device_map="auto", dtype="bfloat16", ) tokenizer = AutoTokenizer.from_pretrained(model_id) streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True) def local_weather(city): return json.dumps({"city": city, "condition": "sunny", "temperature_c": 19}) tools = [{ "name": "local_weather", "description": "Returns a fixed local weather result for a city", "parameters": { "type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"], }, }] messages = [ {"role": "system", "content": "List of tools: " + json.dumps(tools)}, {"role": "user", "content": "What is the weather in Paris?"}, ] def generate(messages): inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, return_tensors="pt", tokenize=True, )["input_ids"][:, -4096:].to(model.device) output = model.generate( inputs, do_sample=True, temperature=0.1, top_k=50, repetition_penalty=1.1, max_new_tokens=256, streamer=streamer, ) prompt_len = inputs.shape[-1] return tokenizer.decode(output[0][prompt_len:], skip_special_tokens=True) first_text = generate(messages) print("\nFirst assistant text:", first_text) if "local_weather" in first_text: messages.append({"role": "assistant", "content": first_text}) messages.append({"role": "tool", "content": local_weather("Paris")}) final_text = generate(messages) print("\nFinal assistant text:", final_text) else: print("The model did not emit a local_weather tool call; inspect the first assistant text.") PY python tool_roundtrip.py
07

Inspect the result and confirm the loaded revision

Read both printed blocks from the previous run. The first assistant text should contain a tool call in the publisher format, for example <|tool_call_start|>[local_weather(city='Paris')]<|tool_call_end|> followed by a short natural-language lead-in. After the tool result is appended as a tool message, the final assistant text should answer with the returned values (sunny, 19 degrees C) instead of inventing weather data. Then confirm the local files match the pinned revision: config.json should report model_type lfm2, max_position_embeddings 131072 and dtype bfloat16, and the model folder should hold both safetensors shards. If the tool call never appears, check that the system message content is exactly "List of tools: " followed by the JSON array and that the download used revision 654f9463ce32b05d0429d76fe1f580b27d4c1ac0.

LiquidAI/LFM2.5-2.6B model card
ls -lh "$HOME/YouRunAI-LFM2.5-2.6B-Agent/model" python -c "import json;c=json.load(open('$HOME/YouRunAI-LFM2.5-2.6B-Agent/model/config.json'));print(c['model_type'], c['max_position_embeddings'], c['dtype'])" python tool_roundtrip.py
03
SUCCESS CHECK · LFM2.5-2.6B

Agentic tool round-trip

The model must load and generate text via the chosen runtime. A complete tool call round-trip must succeed: user query, model emits a tool call, tool returns a result, model produces a final answer using that result. The output should follow the publisher's tool use format.

https://huggingface.co/LiquidAI/LFM2.5-2.6BOpens on your machine

This metadata outlines the setup. Detailed hardware tables, context matrices, and executable instructions are covered in later stages.

Back to setup steps

When it doesn’t go to plan

Model fails to load due to dtype or architecture not supported by installed Transformers version.

Update Transformers to a version that supports Lfm2ForCausalLM (transformers_version 5.2.0 in config). Install via `pip install transformers[torch] --upgrade` and ensure PyTorch 2.5+ is present.

Tool calls are not parsed or emitted correctly during agent interaction.

Ensure the chat template from the model repository (chat_template.jinja) is applied via `apply_chat_template`. The template defines special tokens for tool call start/end. Confirm your client or framework uses this exact template.

REFERENCE LIBRARY

Sources and files

Original instructions, model files, and compatibility notes behind this setup.

6 SOURCES

The model behind this workflow

LFM2.5 2.6B

Keep exploring

Text
SETUP GUIDE

Qwen3.5 · 9B private chat setup

Source-backed package and platform-route plan for private local chat with Qwen3.5 · 9B. Preserves the official Ollama 9B package, a smaller 4B family fallback, and a clearly labeled community uncensored GGUF option.

Freshness 41 out of 100. Release age: 230 days old, Feb 27, 2026. Measures age, not quality.
Popularity 93 out of 100. 8,591,266 downloads in 30 days; 2,171 lifetime likes. Checked Oct 15, 2026. Measures adoption, not quality.
SOFTWAREOllama
Coding
SETUP GUIDE

Build a private coding assistant with Qwen3.8 27B

Run Qwen3.8 27B with Ollama, connect it to Cline in VS Code, and make one reviewable code change in a tiny local project.

Freshness 76 out of 100. Repository age: 71 days old, Aug 5, 2026. Measures age, not quality.
Popularity 95 out of 100. 7,363,968 downloads in 30 days; 17,749 lifetime likes. Checked Oct 15, 2026. Measures adoption, not quality.
Arena Open Source Web coding: rank 10 of 55. Ranked model: qwen3.8-27b. Original model ranking, not a benchmark of this package. Export dated Oct 13, 2026. Source checked Oct 15, 2026. Human preference ranking, not hardware suitability.+3
SOFTWAREOllama + Visual Studio Code + Cline + Python
Images
SETUP GUIDE

Create images locally with FLUX.2 Klein

Generate images from text prompts in ComfyUI with the fast distilled or more adjustable base 4B model. Save your results and reuse the visual workflow.

Freshness 35 out of 100. Release age: 273 days old, Jan 15, 2026. Measures age, not quality.
Popularity 76 out of 100. 423,736 downloads in 30 days; 1,043 lifetime likes. Checked Oct 15, 2026. Measures adoption, not quality.
SOFTWAREComfyUI