Liquid AI's LFM2.5-Encoders — 230M and 350M Models That Beat ModernBERT-base on CPU, Even at 8K Context

Liquid AI shipped LFM2.5-Encoder-230M and 350M bidirectional encoders on July 28. Native 8K context, 30% mask rate, 3.7x faster than ModernBERT-base on CPU at 8K. Open weights, GGUF the same day, and they actually run on your laptop without a GPU.

Liquid AI just shipped two bidirectional encoders that solve the one thing that mattered for local stacks: they stay fast at 8K context on CPU. The 230M parameter variant is the fastest sub-350M model from 1K tokens up, and at 8,192 tokens it beats ModernBERT-base by roughly 3.7x in CPU forward-pass latency. Both checkpoints land on Hugging Face with GGUF conversions the same day, so you can load them in LM Studio or llama.cpp before this post finishes loading. (Liquid AI blog, HF blog)

What changed vs LFM2.5 decoders

LFM2.5-220M and 350M already existed as causal decoders. The encoder versions are derived from those decoders in three concrete steps:

  1. Causal mask → bidirectional mask. Standard encoder attention. Each token sees all of its context.
  2. LFM2 short convolutions made non-causal via symmetric center padding. The hybrid backbone (short conv + grouped query attention) is preserved, but the convolutions now look both directions.
  3. Masked LM objective at 30% mask rate. BERT used 15%. Doubling the mask rate forces the model to lean harder on bidirectional context and prevents it from cheating off a strong unidirectional prior.

Training was two-phase: 1,024-token short context, then 8,192-token long context. Both models train and serve at 8K natively. (HF blog)

Benchmark scores, framed accurately

Liquid AI ran 17 classification tasks (GLUE + SuperGLUE + multilingual) with five fresh held-out seeds and full fine-tunes per task, comparing 14 models. The repo is open-sourced so you can reproduce the numbers.

  • LFM2.5-Encoder-350M: 81.02 mean (±1.00) — ranks 4th of 14. Three models ahead: XLM-R XL at 3.5B (83.06), ModernBERT-large at 395M (81.68), and one other larger model. The 350M is ahead of every sub-350M model in the comparison.
  • LFM2.5-Encoder-230M: 79.29 mean (±1.02) — beats ModernBERT-base (the smaller 110M variant) and every EuroBERT variant benchmarked, while being smaller than most of them.

Framing this matters: ModernBERT-large still scores 81.68 vs LFM2.5-Encoder-350M’s 81.02. The 350M is below ModernBERT-large by 0.66 points, ahead of every sub-350M model. The 230M beats ModernBERT-base but not ModernBERT-large. Don’t conflate. (HF blog, Liquid AI blog, 350M model card)

The headline number: CPU latency at 8K

This is the actual unlock. At 8,192 tokens on CPU:

  • LFM2.5-Encoder-230M: ~28 seconds per forward pass
  • ModernBERT-base: ~90 seconds per forward pass

That is roughly 3.7x faster end-to-end on the same CPU. The 230M is the fastest model from 1K tokens up on CPU, and the gap widens as input length grows. ModernBERT-base wins at very short sequences on Apple GPU silicon, but LFM2.5-Encoders overtake as inputs grow. (Liquid AI blog, MarkTechPost)

The practical read: a forward pass at 8K is the difference between a CI classifier that runs on every commit and one that times out. The 230M crosses that line.

Loading LFM2.5-Encoder-230M in LM Studio

LM Studio exposes the same llama.cpp runtime that the GGUF checkpoints target. Walkthrough for a laptop with no GPU:

  1. Download the GGUF. From the 230M model card, pull the GGUF file (Q4_K_M is the right default for CPU-only hosts). One file, typically ~150MB for the 230M at Q4_K_M.
  2. Open LM Studio → Search → “LFM2.5-Encoder-230M” (or use “My Models” → Import → point at the downloaded .gguf). Encoder checkpoints load through the embeddings/embedding-classifier path, not the chat path. Pick the Embedding runtime in the model picker.
  3. CPU offload config. LM Studio’s GPU Offload slider is irrelevant here — these are encoder checkpoints, not generative models. The runtime expects everything on CPU. The system RAM requirement is the load-bearing number: budget roughly 2x the GGUF file size for runtime headroom (so ~300MB free RAM for the 230M at Q4_K_M). The 350M at Q4_K_M lands closer to ~500MB on disk and ~1GB RAM headroom.
  4. Layer slider. Leave the GPU layers slider at 0. The CPU offload slider is also at 0 (the encoder path doesn’t offload). Set context length to 8,192 to match the training distribution; the model degrades on longer inputs.
  5. Test it. Encode a long passage (a contract, an email thread, a retrieval hit of >4K tokens) and verify the embedding vector shape matches what your downstream classifier expects. The first forward pass is slow due to memory allocation; subsequent passes hit the ~28s figure.

For the 350M, the same steps apply; just budget more RAM and accept ~40% higher latency than the 230M at the same context length.

llama.cpp from the command line

If you skip the GUI:

# Clone and build llama.cpp (CPU-only Apple/Linux/Windows)
git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp && cmake -B build && cmake --build build --config Release

# Download the GGUF
huggingface-cli download LiquidAI/LFM2.5-Encoder-230M-GGUF \
  LFM2.5-Encoder-230M-Q4_K_M.gguf --local-dir ./models

# Run an embedding pass at 8K context
./build/bin/llama-embedding \
  -m ./models/LFM2.5-Encoder-230M-Q4_K_M.gguf \
  -c 8192 \
  -p "$(cat long-document.txt)"

The -c 8192 flag is the long-context flag. Drop to 512 if you have headroom constraints and the input is shorter.

What to use these for

Liquid AI’s framing is plain: “Run constantly, often on CPU rather than GPUs, and increasingly on longer inputs.” The doc strings name classifiers, intent routers, policy linters, PII detectors, safety filters, and multilingual search. The 8K context is the unlock for the first three — a full contract, a long email thread, or a multi-section policy document fits in one forward pass without chunking. (Liquid AI blog)

The multilingual angle is worth noticing: the 350M ties or beats larger multilingual encoders on the eval set while staying under 400M parameters. If you’re running classification pipelines across non-English traffic, the GPU savings compound quickly.

Context: this is the encoder branch of the LFM2 family

LFM2 is Liquid AI’s hybrid short-conv + attention backbone. The dense lineup (350M / 700M / 1.2B / 2.6B) and the LFM2-8B-A1B MoE shipped earlier in 2026. LFM2.5-230M and 350M are the decoder variants. The LFM2.5-Encoder family is the first LFM2 branch trained with bidirectional attention and masked LM — the encoder half of the family tree. The LFM2 technical report covers the architecture in detail if you want the depth. (LFM2 technical report, LFM2.5-230M decoder)

Sources