LFM2.5 Encoder vs ModernBERT - CPU, GPU and Legal Document Benchmark

Download printable cheat-sheet (CC-BY 4.0)

30 Jul 2026, 00:00 Z

60-second takeaway
We tested four bidirectional language encoders under one fixed protocol: LFM2.5-Encoder-230M, LFM2.5-Encoder-350M, ModernBERT-base and ModernBERT-large.
On our RTX 3090 Ti at 8,192 tokens, the two LFM models were 2.69x and 2.85x faster than their ModernBERT comparison models. On CPU, the advantage appeared mainly at long context. The LFM models also performed well in our small sentiment and legal-document classification pilots.
These are promising deployment results, not a universal model ranking. We tested one machine, small task subsets, three seeds and one learning rate. We also tested base encoder classification, not retrieval embeddings.

Why compare these four models?

Many document workflows do not need a model to generate prose. They need a model to read a passage and produce a useful representation for classification, extraction, reranking or search.

That is the role of a bidirectional encoder. Unlike a decoder that reads only the text to its left when predicting the next token, an encoder can use words on both sides. This often makes it a better fit for understanding a complete document.

Liquid AI's LFM2.5 encoders are especially interesting because they were converted from compact decoder backbones. Liquid replaced causal attention with bidirectional attention, made the short convolutions non-causal and continued training with masked language modelling.

The practical claim is not simply that the models are small. It is that their architecture should remain efficient when a document grows to thousands of tokens.

We compared them with ModernBERT, a strong modern encoder family with native support for 8,192-token inputs.

ModelParametersRole in our comparison
LFM2.5-Encoder-230M230MCompact LFM model
LFM2.5-Encoder-350M350M

Turn AI video into a repeatable engine

Build an AI-assisted video pipeline with hook-first scripts, brand-safe edits, and multi-platform delivery.