Skip to content
ATAI Today Brief
HomeNewsConceptsGuidesToolbox
AboutSubscribeUA
Subscribe

AI Today Brief

The daily AI-engineering brief. Built in public. EN · UA.

XTelegramLinkedInYouTubeRSS

Follow AI Today Brief on LinkedIn for daily AI-engineering updates and the weekly “5 shifts that changed how developers work” PDF.

Explore

NewsDigestsConceptsGuides

Company

SubscribeAdvertiseAbout

Legal

Editorial policyAI disclosurePrivacyTerms

© 2026 AI Today Brief. All rights reserved.

  1. Home/
  2. News/
  3. Token & cost optimization/
  4. Liquid AI Releases LFM2.5 Encoders for Fast 8K Context CPU Inference
Token & cost optimization

Liquid AI Releases LFM2.5 Encoders for Fast 8K Context CPU Inference

July 29, 2026· 3 min read
OKCurated by Oleksandr Kuzmenko, AI Product Engineer·Updated July 29, 2026·Sources cited on every story
AI-assisted · editor-reviewed·How we use AI
Liquid AI Releases LFM2.5 Encoders for Fast 8K Context CPU Inference

Liquid AI released two open-weight bidirectional encoder models, LFM2.5-Encoder-230M and 350M, optimized for long context. On CPU, the 230M model processes 8,192 tokens in 28 seconds—3.7x faster than ModernBERT-base.

Impact: Medium

Why it matters

You can run low-cost classification, intent routing, and PII screening pipelines on standard server CPUs without GPU allocation.

TL;DR

  • 01LFM2.5-Encoder-230M executes 8k context CPU forward passes 3.7x faster than ModernBERT-base.
  • 02Supports classification, PII screening, and prompt routing without generative LLM overhead.
  • 03Both 230M and 350M variants are published as open weights on Hugging Face.

Key facts

Model Sizes
230M and 350M parameters
Context Length
8,192 tokens
CPU Speedup (8k context)
3.7x faster than ModernBERT-base (self-reported)
8k CPU Forward Pass Latency
~28 seconds (230M variant)

Running LFM2.5-Encoders in Transformers

The models are available on Hugging Face with open weights. You can initialize the masked language model directly with transformers:

from transformers import AutoModelForMaskedLM, AutoTokenizer

model_id = "LiquidAI/LFM2.5-Encoder-230M"
tok = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
mlm = AutoModelForMaskedLM.from_pretrained(model_id, trust_remote_code=True)

text = f"The capital of France is {tok.mask_token}."
inputs = tok(text, return_tensors="pt")
logits = mlm(**inputs).logits

Task Fine-Tuning Setup

For downstream sequence classification, PII detection, or policy linting, attach a classification head to the encoder body:

from transformers import AutoModel

body = AutoModel.from_pretrained(
    "LiquidAI/LFM2.5-Encoder-230M",
    trust_remote_code=True
)

Flash Attention 2 is supported on compatible GPU environments for additional throughput during training.

Try it in 2 minutes

from transformers import AutoModelForMaskedLM, AutoTokenizer

model_id = "LiquidAI/LFM2.5-Encoder-230M"
tok = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
mlm = AutoModelForMaskedLM.from_pretrained(model_id, trust_remote_code=True)

text = f"The capital of France is {tok.mask_token}."
inputs = tok(text, return_tensors="pt")
logits = mlm(**inputs).logits

python

✓ When to use

  • Use for high-volume CPU-bound NLP processing, including policy enforcement, PII detection, and intent classification.

✕ When NOT to use

  • Do not use as a standalone generative model for text synthesis or open-ended chat.

What to do today

  • →Test LiquidAI/LFM2.5-Encoder-230M on your CPU document analysis and intent routing tasks.
  • →Benchmark CPU inference latency against existing BERT/RoBERTa pipelines.
#Liquid AI#Hugging Face#PyTorch#ModernBERT#Transformers

Sources

  • LFM2.5-Encoders for Fast Long-Context Inference on CPU
ShareShare on XShare on LinkedIn
← Previous storyOfficial Model Context Protocol C# SDK v2.0 Releases with Stateless HTTP TransportNext story →OpenAI Releases Codex Security CLI Tool and TypeScript SDK for Repository Audits

Related stories

  • Token & cost optimizationGPU Management: Why Idle Hardware is the Next Enterprise Bottleneck
  • Token & cost optimizationOpenAI Field Report: How Coding Agents Speed Up Software Modernization and Refactoring
  • Token & cost optimizationTokenless: Multi-Model Parallel Routing to Reduce API Expenses
  • Token & cost optimizationPublic Claude Shared Links Search-Indexed: Audit Your Shared Artifacts Now

Email digest

Get the morning AI brief

One email a day — the stories that matter for engineers, founders and tech leads. Human-edited, with links to primary sources.

  • ✓120+ sources scanned daily
  • ✓Edited by a human
  • ✓1 email per day
  • ✓EN + UA

By subscribing you agree to the privacy policy.