source: Hugging Face Blog: LFM2.5-Encoders for Fast Long-Context Inference on CPU
level: technical
Liquid AI released two new encoder models, LFM2.5-Encoder-230M and LFM2.5-Encoder-350M, on Hugging Face. They match or exceed the quality of larger models on GLUE, SuperGLUE, and multilingual tasks while maintaining fast inference as inputs grow. The models support an 8,192-token context and are designed for CPU execution, making them suitable for document-scale jobs on existing hardware without requiring GPUs.
On CPU, LFM2.5-Encoder-230M is the fastest at every sequence length, even outperforming the smaller ModernBERT-base for short inputs. At 8,192 tokens, ModernBERT-base takes over 90 seconds per forward pass, while LFM2.5-Encoder-230M completes it in about 28 seconds—roughly 3.7 times faster. On GPU, the encoders lead from around 2,000 tokens onward. Benchmark results show LFM2.5-Encoder-350M ranks fourth among 14 models, behind only larger ones, and the 230M version beats ModernBERT-base and all EuroBERT models.
The encoders are built from LFM2 decoder backbones, converted to bidirectional models with masked language modeling. They are pre-trained in two stages: short-context language competence on a web corpus, then long-context adaptation up to 8,192 tokens. Liquid AI provides demos for zero-shot prompt routing, policy linting, spell checking, and PII detection, all running on CPU. The models are open-weight and can be fine-tuned for classification, token-level tasks, or retrieval using standard transformers code.
why it matters: These encoders enable cheap, fast, and accurate text classification, routing, and extraction on CPU, making long-document NLP practical without expensive GPU infrastructure.
source: Hugging Face Blog: LFM2.5-Encoders for Fast Long-Context Inference on CPU