Model reference · open weights

LFM2.5-Embedding

Available as managed deployment Licence fee Embeddings LiquidAI Embeddings 2 variants 9k dl/mo

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 byLiquidAI
TypeEmbedding models
TaskEmbeddings
Parameters (lead)354M
Context125k tokens
Runs withsentence-transformers
Based onLiquidAI/LFM2.5-350M-Base
Released2026-05-05
Popularity9k downloads / month
LicenceCommercial licence needed

About

What LFM2.5-Embedding is

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;" />

Read the full model card

LFM2.5-Embedding-350M

We release two new best-in-class multilingual retrieval models:

  • LFM2.5-Embedding-350M — A dense bi-encoder, one vector per document. Smallest, fastest index.
  • LFM2.5-ColBERT-350M — A late-interaction model. One vector per token, matched via MaxSim. Higher accuracy and better generalization at the cost of index size.

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.

📄 Model details

PropertyLFM2.5-Embedding-350MLFM2.5-ColBERT-350M
TypeDense bi-encoder (single vector)Late interaction (per-token vectors)
Total parameters~354M~353M
BackboneLFM2.5-350M-Base + bi-directional patchesLFM2.5-350M-Base + bi-directional patches
Layers17 (10 conv + 6 attn + 1 pool)17 (10 conv + 6 attn + 1 dense)
Vocabulary size65,53664,402
Output1024-dim CLS vector128-dim per token
SimilarityCosineMaxSim
Training precisionBF16BF16
LicenseLFM Open License v1.0LFM 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:

  • E-commerce: find products across many languages with semantic search at scale.
  • FAQ and support knowledge bases: retrieve the right answer reliably across customer-facing surfaces.
  • On-device semantic search: search files, emails, and notes locally on consumer hardware.
  • Enterprise knowledge assistants: retrieve internal legal, financial, and technical documents across languages.

🏃 How to run

First, install sentence-transformers:

pip install -U sentence-transformers

Encoding queries and documents

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.

Flash Attention 2 (optional)

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

Call it like any OpenAI endpoint

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.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms