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
.
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 longer contexts.
Fine-tuning
Standard
sentence-transformers
training works directly. Example with
MultipleNegativesRankingLoss
:
MKQA
. Cross-lingual capabilities (subset of the 11 languages we target).
Model
Type
AVG
ar
de
en
es
fr
it
ja
ko
no
pt
sv
LiquidAI/LFM2.5-ColBERT-350M
late
0.694
0.608
0.709
0.748
0.711
0.715
0.707
0.703
0.640
0.689
0.703
0.700
LiquidAI/LFM2.5-Embedding-350M
dense
0.691
0.610
0.709
0.738
0.708
0.715
0.703
0.685
0.630
0.691
0.710
0.708
Alibaba-NLP/gte-multilingual-base
dense
0.675
0.567
0.692
0.741
0.705
0.703
0.697
0.655
0.563
0.698
0.700
0.699
LiquidAI/LFM2-ColBERT-350M
late
0.646
0.554
0.696
0.754
0.711
0.710
0.667
0.658
0.558
0.541
0.669
0.589
Qwen/Qwen3-Embedding-0.6B
dense
0.638
0.520
0.671
0.723
0.678
0.672
0.671
0.635
0.543
0.620
0.667
0.620
lightonai/GTE-ModernColBERT-v1
late
0.459
0.092
0.532
0.754
0.552
0.615
0.510
0.275
0.166
0.503
0.524
0.524
lightonai/LateOn
late
0.454
0.157
0.492
0.755
0.537
0.577
0.481
0.316
0.209
0.472
0.502
0.501
lightonai/DenseOn
dense
0.435
0.165
0.482
0.751
0.491
0.553
0.457
0.325
0.222
0.438
0.443
0.453
BAAI/bge-large-en-v1.5
dense
0.413
0.133
0.471
0.748
0.450
0.531
0.461
0.208
0.172
0.456
0.443
0.467
Alibaba-NLP/gte-modernbert-base
dense
0.295
0.060
0.333
0.736
0.273
0.417
0.291
0.100
0.052
0.332
0.326
0.330
Inference speed - llama.cpp
End-to-end latency on
MacBook Pro M4 Max
via
llama.cpp
at
fp16
, measured at
32-token queries
and
256-token documents
.
Docs cached
means that the document embeddings are pre-computed and looked up (from an index).
For large-scale production-grade enterprise deployments, we also experiment with an internal GPU stack to deliver extremely low-latency serving under high inbound load. We observe latencies as low as 1 ms.
LFM2.5-Embedding-350M huggingface.co is an AI model on huggingface.co that provides LFM2.5-Embedding-350M's model effect (), which can be used instantly with this LiquidAI LFM2.5-Embedding-350M model. huggingface.co supports a free trial of the LFM2.5-Embedding-350M model, and also provides paid use of the LFM2.5-Embedding-350M. Support call LFM2.5-Embedding-350M model through api, including Node.js, Python, http.
LFM2.5-Embedding-350M huggingface.co is an online trial and call api platform, which integrates LFM2.5-Embedding-350M's modeling effects, including api services, and provides a free online trial of LFM2.5-Embedding-350M, you can try LFM2.5-Embedding-350M online for free by clicking the link below.
LiquidAI LFM2.5-Embedding-350M online free url in huggingface.co:
LFM2.5-Embedding-350M is an open source model from GitHub that offers a free installation service, and any user can find LFM2.5-Embedding-350M on GitHub to install. At the same time, huggingface.co provides the effect of LFM2.5-Embedding-350M install, users can directly use LFM2.5-Embedding-350M installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
LFM2.5-Embedding-350M install url in huggingface.co: