Models - Aug 5, 2026

How to Run LFM2.5-2.6B Locally

Quick answer

Start with one official artifact and one pinned runtime:

  • Transformers for the native LiquidAI/LFM2.5-2.6B checkpoint;
  • GGUF for llama.cpp and compatible local applications;
  • MLX for Apple Silicon;
  • ONNX when a cross-platform edge runtime is the real deployment target.

The official native quick start uses transformers>=5.0.0, AutoModelForCausalLM, AutoTokenizer, and tokenizer.apply_chat_template(). Do not mix the older LFM2-2.6B ID, the Base checkpoint, and the post-trained LFM2.5 checkpoint.

Native Transformers smoke test

Create an isolated environment and install a pinned Transformers release plus the device-appropriate PyTorch build. Then adapt this source-parity test:

from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "LiquidAI/LFM2.5-2.6B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    device_map="auto",
    dtype="bfloat16",
)

inputs = tokenizer.apply_chat_template(
    [{"role": "user", "content": "Return three checks for a local model smoke test."}],
    add_generation_prompt=True,
    return_tensors="pt",
    tokenize=True,
)["input_ids"].to(model.device)

output = model.generate(
    inputs,
    do_sample=True,
    temperature=0.1,
    top_k=50,
    repetition_penalty=1.1,
    max_new_tokens=256,
)
print(tokenizer.decode(output[0][inputs.shape[-1]:], skip_special_tokens=True))

Record the repository revision, package versions, device, precision, prompt, generation settings, first-token latency, decode speed, peak memory, and output. If bfloat16 is unsupported on the target, choose a documented compatible precision or a published quantized artifact rather than silently changing the contract.

GGUF or MLX path

For llama.cpp, use the official LiquidAI/LFM2.5-2.6B-GGUF repository and a runtime version that recognizes the model architecture. For Apple Silicon, use the official MLX repository and measure unified-memory use. Quantization reduces weight memory but does not make KV cache, runtime overhead, or tool services disappear.

Use the runtime matrix before choosing. Then use the device guide to increase context from a small baseline instead of starting at 128K.

Validate more than one answer

  1. Repeat the same prompt to characterize sampling variance.
  2. Test the intended language and task type.
  3. Verify structured output and tool templates separately.
  4. Test malformed, ambiguous, adversarial, and unsupported inputs.
  5. Measure memory and latency at realistic prompt lengths.
  6. Compare with the current model on a versioned acceptance set.

Frequently asked questions

What is the easiest official way to test LFM2.5-2.6B?

Use the exact LiquidAI/LFM2.5-2.6B repository with Transformers for a direct Python test, or choose the official GGUF or MLX repository for a local runtime that matches your device.

Does LFM2.5-2.6B require Transformers 5?

The official model card’s quick start says Transformers 5.0.0 or newer. Pin and record the actual package version used by your test.

Can I use the full 128K context locally?

The checkpoint supports 131,072 tokens, but usable local context depends on available memory, KV-cache growth, runtime support, latency, and the task. Start small and increase only after measurement.

Official sources

Source check: August 5, 2026. Verify the current repository revision, runtime compatibility, license, precision, quantization, and target-device behavior before deployment.