Liquid AI ships LFM2.5-Encoders for fast CPU inference

Liquid AI ships LFM2.5-Encoders for fast CPU inference

Liquid AI released LFM2.5-Encoders, two open-weight bidirectional encoder models with 230M and 350M parameters, aimed at long-context classification, routing and detection tasks that need to run cheaply on CPU rather than GPU. The models are built from the same LFM2 architecture as the company's causal decoders: Liquid AI takes the LFM2.5-230M and LFM2.5-350M decoder backbones and converts each into a bidirectional encoder by switching to a bidirectional attention mask, padding the short convolutions symmetrically so each token mixes in neighbors on both sides, and training with a masked-language objective that masks 30% of tokens. Training runs in two stages: first a short-context masked-language pass on a large web corpus at 1,024 tokens for general language competence, then a long-context adaptation stage that extends the context to 8,192 tokens and strengthens factual, legal and multilingual competence. This follows LFM2.5-Retrievers, a multilingual search model Liquid AI released the month before from the same family; the new encoders serve a broader purpose, since a pretrained masked-language model can be fine-tuned for classification and token-level tasks as well as search.

On accuracy, Liquid AI benchmarked 14 models across 17 tasks drawn from GLUE, SuperGLUE and multilingual classification, fully fine-tuning each model on every task and reporting the mean score across five held-out seeds for run-to-run stability; the full framework and raw results are open-sourced. LFM2.5-Encoder-350M ranks fourth of the 14 models, behind three larger models, one of them a 3.5B-parameter model nearly ten times its size. LFM2.5-Encoder-230M beats ModernBERT-base and every EuroBERT model on the benchmark while being smaller than most of them, and both LFM2.5 encoders score above Liquid AI's own LFM2.5-Retrievers.

On speed, both encoders support the same 8,192-token context as ModernBERT, so Liquid AI measured throughput across that full range. On CPU the gap is largest: LFM2.5-Encoder-230M is the fastest model at every sequence length tested, and at 8,192 tokens it completes a forward pass in about 28 seconds versus over a minute and a half for ModernBERT-base, roughly 3.7 times faster. On GPU the pattern holds with a smaller margin: on an Apple GPU, ModernBERT-base leads below about 1,000 tokens, while the LFM2.5-Encoders take the lead from about 2,000 tokens onward.

Alongside the release, Liquid AI published four CPU-only demo apps built from fine-tuned versions of the encoders: zero-shot prompt routing that scores a prompt against user-defined routing lanes in one pass, zero-shot policy linting that checks text against free-text company rules token by token, a spell checker, and a PII detector that spots and removes 40 kinds of personal information across 16 languages, plus a bonus masked-diffusion chatbot that generates text by iteratively unmasking rather than writing left to right. Both models are open-weight and available now on Hugging Face under LiquidAI/LFM2.5-Encoder-230M and LiquidAI/LFM2.5-Encoder-350M; Liquid AI recommends the 350M model when accuracy matters most and the 230M model for tighter hardware or higher throughput, and provides a fine-tuning tutorial covering long legal documents at 8k context.

Key facts

  • Liquid AI released two open-weight encoder models, LFM2.5-Encoder-230M and LFM2.5-Encoder-350M, built on the LFM2 architecture for classification, routing, spell checking and PII detection.
  • Both support an 8,192-token context; on CPU, LFM2.5-Encoder-230M completes a forward pass at that length in about 28 seconds versus over a minute and a half for ModernBERT-base, about 3.7 times faster.
  • Across 14 models benchmarked on 17 tasks from GLUE, SuperGLUE and multilingual classification, LFM2.5-Encoder-350M ranks fourth, behind only larger models including one with 3.5B parameters, nearly ten times its size.
  • LFM2.5-Encoder-230M beats ModernBERT-base and every EuroBERT model on the benchmark while being smaller than most of them.
  • The release ships with CPU-only demos for zero-shot prompt routing, policy linting, spell checking and PII detection covering 40 kinds of personal information across 16 languages.

Why it matters

Encoders are the workhorse behind classifiers, intent routers and safety filters that run constantly in production, usually on CPU, over ever-longer inputs. BERT established the category and ModernBERT more recently pushed its accuracy, speed and context further; LFM2.5-Encoders push again on the LFM2 architecture, where inference cost grows slowly as inputs get longer. The result Liquid AI reports is a small model that matches or beats larger encoders on standard benchmarks while cutting long-context CPU latency by a factor of 3.7 against ModernBERT-base.

Who it affects

Developers and teams building high-volume understanding tasks, classification, routing, extraction or scoring, that need to run continuously and cheaply, particularly on CPU rather than GPU. It is not a generative chat model: it is a base encoder that needs fine-tuning before it produces task-specific outputs, so it targets NLP infrastructure builders rather than end users.

How to use it

Both models are open-weight and available now on Hugging Face as LiquidAI/LFM2.5-Encoder-230M and LiquidAI/LFM2.5-Encoder-350M. They load through the transformers library (pip install -U transformers): AutoModelForMaskedLM runs masked-token prediction directly, while AutoModel exposes the encoder body for attaching a custom head and fine-tuning on classification, token classification, regression or retrieval. Flash Attention 2 is recommended on GPUs that support it, and Liquid AI provides a fine-tuning tutorial for long legal documents at 8k context. The company recommends the 350M model when accuracy matters most and the 230M model for tighter hardware or higher throughput. No pricing is mentioned; the models are free open-weight downloads.

How solid is it

Liquid AI fully fine-tuned all 14 compared models on every one of the 17 tasks drawn from GLUE, SuperGLUE and multilingual classification, and reported the mean score across five held-out seeds for run-to-run stability. The evaluation framework and raw results are open-sourced, so the ranking can in principle be checked independently. The CPU speed comparison against ModernBERT-base was run at matched sequence lengths up to the shared 8,192-token context limit.

Risks and caveats

Every benchmark number, ranking and speed comparison in the release comes from Liquid AI's own blog post; no independent third-party evaluation is cited. No pricing figures are given. The CPU speed advantage does not fully carry over to GPU: on an Apple GPU, ModernBERT-base is still faster below about 1,000 tokens, and LFM2.5-Encoders only take the lead from around 2,000 tokens onward. As a base encoder, the model produces general-purpose representations rather than finished task outputs, so real-world use requires a fine-tuning step Liquid AI's own benchmarks do not fully substitute for.

“LFM2.5-Encoder-230M beats ModernBERT-base and every EuroBERT model, while being smaller than most of them.”

— Liquid AI, LFM2.5-Encoders release blog