
LFM2.5-Encoders for Fast Long-Context Inference on CPU
Quick Answer
Hugging Face introduces LFM2.5-Encoders (230M and 350M), achieving superior performance on long-context tasks while being 3.7x faster than ModernBERT-base on CPU.
Quick Take
These models excel in multilingual tasks and can be fine-tuned for various applications, making them ideal for cost-effective, high-volume NLP tasks.
Key Points
- LFM2.5-Encoder-350M ranks fourth among 14 models in GLUE and SuperGLUE benchmarks.
- Supports an 8,192-token context with minimal latency increase.
- LFM2.5-Encoder-230M is the fastest on CPU for all sequence lengths.
- Ideal for intent routing, policy linting, and PII detection tasks.
- Fine-tuning options available for specific NLP applications.
DeepSignal Analysis
What happened
Hugging Face has released two new encoder models, LFM2.5-Encoder-230M and LFM2.5-Encoder-350M, designed for efficient long-context inference on CPUs. These models can handle up to 8,192 tokens and are reported to be 3.7 times faster than ModernBERT-base for long inputs. They excel in multilingual tasks and can be fine-tuned for various applications.
Key evidence
- LFM2.5-Encoder-350M ranks fourth among 14 models in benchmark tests, outperforming smaller models like ModernBERT-base.
- The LFM2.5-Encoders maintain a latency that grows slowly as input length increases, making them suitable for document-scale tasks.
- On CPU, LFM2.5-Encoder-230M processes 8,192 tokens in about 28 seconds, significantly faster than ModernBERT-base, which takes over a minute and a half.
Why it matters
The introduction of LFM2.5-Encoders addresses the growing need for efficient processing of long-context inputs in natural language processing tasks. Their ability to perform well on CPUs allows organizations to utilize existing hardware for high-volume applications, potentially reducing costs associated with deploying larger models. This could democratize access to advanced NLP capabilities, particularly for multilingual tasks.
Source Excerpt
A Blog post by Liquid AI on Hugging Face
Want this in your inbox every morning?
Daily brief at your local 8am — bilingual EN/中文, free.
More from Hugging Face
See more →
From Hugging Face to Amazon SageMaker Studio in one click
Hugging Face has launched a deep-link integration with Amazon SageMaker Studio, allowing developers to seamlessly transition from model discovery to deployment with a single click. This integration streamlines the process by pre-configuring permissions and providing GPU quota visibility, significantly reducing the time from model selection to experimentation.

