LiquidAI/LFM2.5-Encoder-230M-GGUF
<center> <div style="text-align: center;"> <img src="https://cdn-uploads.huggingface.co/production/uploads/61b8e2ba285851687028d395/2b08LKpev0DNEk6DlnWkY.png" alt="Liquid AI" style="width: 100%; max-width: 100%; height: auto; display: inline-block; margin-bottom: 0.5em; margin-top: 0.5em;" /> </div> <div style="display: flex; justify-content: center; gap: 0.5em;"> <a href="https://playground.liquid.ai/"><strong>Try LFM</strong></a> • <a href="https://docs.liquid.ai/lfm"><strong>Documentation</strong></a> • <a href="https://leap.liquid.ai/"><strong>LEAP</strong></a> </div> </center>
LFM2.5-Encoder-230M
LFM2.5-Encoder-230M is a multilingual bidirectional encoder built on the LFM2 architecture — a lightweight encoder for tight latency and memory budgets, punching above its size class. It is a masked language model with full bidirectional attention, designed to be fine-tuned into task-specific models (classification, token classification, retrieval, reranking, and semantic similarity) across 15 languages, and to run efficiently on-device.
- Highly capable for its size. On par with the best similarly sized encoders and well ahead of our own retrieval siblings.
- General-purpose. 8k context, strong across NLI, paraphrase, sentiment, and multilingual tasks.
- Fast and on-device. Matches or beats ModernBERT throughput, with a long-context edge on CPU; runs in the browser on WebGPU.
Find more information about LFM2.5-Encoder-230M in our blog post.
🏃 How to run
Example usage with llama.cpp:
Start llama-server with per-token embeddings
hf download LiquidAI/LFM2.5-Encoder-230M-GGUF LFM2.5-Encoder-230M-F16.gguf --local-dir .
llama-server -m LFM2.5-Encoder-230M-F16.gguf --embeddings --pooling noneRun masked-token prediction — the mask position's logits come from the per-token hidden states and the tied embedding matrix read from the GGUF (`fill-mask.py` in this repo)
❯ uv run fill-mask.py LFM2.5-Encoder-230M-F16.gguf "The capital of France is [MASK]."
top-5 at [MASK]:
# 1 16.17 ' Paris'
# 2 13.41 ' Strasbourg'
# 3 13.35 'Paris'
# 4 13.18 ' Lyon'
# 5 11.87 ' Versailles' The same server also serves per-token embeddings directly:
curl -s http://localhost:8080/embedding -d '{"content": "hello world"}'Find more details in the original model card: https://huggingface.co/LiquidAI/LFM2.5-Encoder-230M
