HyperAIHyperAI

Command Palette

Search for a command to run...

Liquid AI Releases LFM2.5 Encoders for Fast Long-Context CPU Inference

Liquid AI has released two new open-weight encoder models, LFM2.5-Encoder-230M and LFM2.5-Encoder-350M, now available on Hugging Face. Designed for high-volume, long-context natural language processing tasks, these models deliver competitive accuracy while maintaining exceptional inference speed, particularly on CPU hardware. This release marks a strategic expansion from Liquid AI’s earlier multilingual retrievers to a broader class of general-purpose encoders. The encoders are constructed by adapting the causal decoder backbones of the LFM2.5 series into bidirectional architectures. Key modifications include symmetric padding for non-causal short convolutions and a full bidirectional attention mask, allowing each token to process information from both preceding and subsequent positions. Training occurs in two phases: an initial stage establishes general language competence using a masked language modeling objective across a 1,024-token context, followed by long-context adaptation extending the sequence limit to 8,192 tokens while strengthening multilingual, legal, and factual capabilities. Benchmark evaluations across seventeen tasks from GLUE, SuperGLUE, and multilingual classification datasets demonstrate strong competitive positioning. The LFM2.5-Encoder-350M ranks fourth among fourteen evaluated models, trailing only larger architectures including a 3.5B parameter model. Meanwhile, the 230M variant outperforms ModernBERT-base and all EuroBERT models despite its smaller footprint. Inference measurements highlight the models primary advantage: efficiency on CPU. At the maximum 8,192-token context, the 230M encoder processes inputs approximately 3.7 times faster than ModernBERT-base, completing forward passes in roughly 28 seconds compared to over 90 seconds. On GPU, the encoders surpass competing architectures at sequence lengths exceeding 2,000 tokens. Liquid AI engineered the LFM2.5 series to address the growing demand for cost-effective, always-on NLP pipelines. The architectural design ensures that computational overhead scales gradually rather than exponentially as input length increases. This efficiency makes the encoders particularly suited for continuous, high-throughput workloads such as intent routing, policy validation, personally identifiable information detection, and text classification. Developers can integrate the models directly into existing Python environments using the Hugging Face transformers library, optionally leveraging Flash Attention 2 for maximum efficiency. The architecture supports standard fine-tuning workflows for classification, token-level extraction, and scoring tasks, with documented tutorials available for specialized use cases like long-document legal analysis. Both models are released as open weights and are ready for immediate deployment. The release enables development teams to migrate computationally intensive understanding tasks from large generative models to lightweight, deterministic encoders, significantly reducing infrastructure costs while preserving accuracy across extended context windows.

Related Links