Model reference · open weights
LFM2.5-Embedding is an open-weight embedding model from LiquidAI. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Released by | LiquidAI |
|---|---|
| Type | Embedding models |
| Task | Embeddings |
| Parameters (lead) | 354M |
| Context | 125k tokens |
| Runs with | sentence-transformers |
| Based on | LiquidAI/LFM2.5-350M-Base |
| Released | 2026-05-05 |
| Popularity | 9k downloads / month |
| Licence | Commercial licence needed |
About
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;" />
We release two new best-in-class multilingual retrieval models:
Both models are 350M params and the first bidirectional members of the LFM family, built on LFM2.5-350M-Base. They can be used as a drop-in replacement for your current RAG pipeline and target fast, cheap, and reliable multilingual / cross-lingual search across 11 languages.
Find more details about the bidirectional architecture and training recipe in our blog post.
| Property | LFM2.5-Embedding-350M | LFM2.5-ColBERT-350M |
|---|---|---|
| Type | Dense bi-encoder (single vector) | Late interaction (per-token vectors) |
| Total parameters | ~354M | ~353M |
| Backbone | LFM2.5-350M-Base + bi-directional patches | LFM2.5-350M-Base + bi-directional patches |
| Layers | 17 (10 conv + 6 attn + 1 pool) | 17 (10 conv + 6 attn + 1 dense) |
| Vocabulary size | 65,536 | 64,402 |
| Output | 1024-dim CLS vector | 128-dim per token |
| Similarity | Cosine | MaxSim |
| Training precision | BF16 | BF16 |
| License | LFM Open License v1.0 | LFM Open License v1.0 |
Document length: 512 tokens
Supported languages: English, Spanish, German, French, Italian, Portuguese, Arabic, Swedish, Norwegian, Japanese, Korean.
Architecture:
SentenceTransformer(
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: Lfm2BidirectionalModel
(1): Pooling({'word_embedding_dimension': 1024, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False})
)
Asymmetric prompts: query: for queries, document: for passages. They are stored in the model config and applied automatically via prompt_name.
We recommend LFM2.5-Embedding-350M and LFM2.5-ColBERT-350M for short-context retrieval use cases, such as:
First, install sentence-transformers:
pip install -U sentence-transformers
Load LFM2.5-Embedding-350M and encode your queries and documents separately, using the matching prompt name on each side. Cosine similarity (or a normalized dot product) ranks documents against queries:
from sentence_transformers import SentenceTransformer
# Load the model (trust_remote_code applies the bidirectional patches)
model = SentenceTransformer(
"LiquidAI/LFM2.5-Embedding-350M",
trust_remote_code=True,
)
queries = [
"What is the capital of France?",
"Which city is Japan's capital?",
]
documents = [
"Paris is the capital and largest city of France. Located on the Seine River in northern France, it serves as the country's political, economic, and cultural center.",
"Tokyo, officially the Tokyo Metropolis, is the capital of Japan. It is the most populous metropolitan area in the world and serves as Japan's administrative, financial, and commercial hub.",
"Berlin is the capital and largest city of Germany. Reunified in 1990 after the fall of the Berlin Wall, it now serves as a major cultural and political center in Europe.",
]
# Encode with the matching prompt name; normalize so the dot product == cosine similarity
q_emb = model.encode(queries, prompt_name="query", normalize_embeddings=True)
d_emb = model.encode(documents, prompt_name="document", normalize_embeddings=True)
scores = q_emb @ d_emb.T # shape: (n_queries, n_documents)
Always pass prompt_name="query" for queries and prompt_name="document" for passages — the model was trained with these prefixes, and omitting them silently degrades retrieval quality.
LFM2.5-Embedding-350M can run with FlashAttention-2 (requires flash-attn installed):
import torch
from sentence_transformers import SentenceTransformer
model = SentenceTransformer(
"LiquidAI/LFM2.5-Embedding-350M",
trust_remote_code=True,
model_kwargs={"attn_implementation": "flash_attention_2", "dtype": torch.bfloat16},
)
Verified equivalent to the default within bf16 noise (multilingual NanoBEIR ndcg@10 within 0.002 across 11 languages). At the model's 512-token max length the speed gain is small (~5%); FA2 mainly helps memory and throughput if you fine-tune or run the backbone at l
From the published model card. Full card on the HuggingFace links in the sidebar.
Using it via the API
Once AxForge deploys lfm2-5-embedding for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (lfm2-5-embedding below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/embeddings \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"lfm2-5-embedding","input":"text to embed"}'
Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.