LFM2.5-Encoder-350M is a multilingual bidirectional encoder built on the LFM2 architecture — a larger encoder for maximum downstream quality. 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.
Find more information about LFM2.5-Encoder-350M in our blog post.
Example usage with llama.cpp:
Start llama-server with per-token embeddings
hf download LiquidAI/LFM2.5-Encoder-350M-GGUF LFM2.5-Encoder-350M-F16.gguf --local-dir .
llama-server -m LFM2.5-Encoder-350M-F16.gguf --embeddings --pooling none
Run 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-350M-F16.gguf "The capital of France is [MASK]."
top-5 at [MASK]:
# 1 11.42 ' Paris'
# 2 10.43 'Paris'
# 3 9.65 ' Nice'
# 4 8.94 ' Strasbourg'
# 5 8.62 ' Lyon'
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-350M