alt.freeweights.lfm / LFM2.5-Embedding-350M
From: LiquidAI <huggingface.co/LiquidAI>Newsgroups: alt.freeweights.lfmSubject:

LFM2.5-Embedding-350M

Date: 2026-11-15Commit: f35ae2cSigned: 2DC28CC7B26A283B ✓

Sentence similarity model with 354M parameters. Safetensors weights, 714 MB in all. Published by LiquidAI under LFM-1.0 (custom).

354M params714MBLFM2.5-Embedding-350Msafetensorscustom terms
FactsParams354MSize714 MBFormatssafetensorsTasksentence similarityLicenseLFM-1.0 (custom)From sourcecustom termsread terms
# custom terms: read the license before you download
$ fw get LiquidAI/LFM2.5-Embedding-350M
# manifest sha256 24b054ec567a… · 714 MB · 14 files
$ fw verify ./LFM2.5-Embedding-350M LiquidAI/LFM2.5-Embedding-350M
From sourceHosted (signed)LiquidAI/LFM2.5-Embedding-350MLast check: 2026-11-15 02:39 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Fine-tune of LFM2.5-350M-Base.

Works with

Evaluate with

Overview

Size
714 MB
Weights
709 MB (safetensors)
Parameters
354M
Formats
safetensors
Task
sentence similarity
License
LFM-1.0 (custom) (custom)
Files
14, each with a sha256
Publisher
LiquidAI
Added
2026-11-15
Section
alt.freeweights.lfm
Lineage

Original release from the publisher.

Base model: LiquidAI/LFM2.5-350M-Base

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 02:39 UTCpassed

Model card

From the publisher at commit f35ae2c. Shown as plain text with links; images open at the publisher.

Image: Liquid AI

Try LFM • Docs • LEAP • Discord

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.

Image: bienc

📄 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 longer contexts.

Fine-tuning#

Standard sentence-transformers training works directly. Example with MultipleNegativesRankingLoss:

from datasets import Dataset
from sentence_transformers import (
    SentenceTransformer,
    SentenceTransformerTrainer,
    SentenceTransformerTrainingArguments,
)
from sentence_transformers.losses import MultipleNegativesRankingLoss

model = SentenceTransformer("LiquidAI/LFM2.5-Embedding-350M", trust_remote_code=True)
loss = MultipleNegativesRankingLoss(model)

train_ds = Dataset.from_dict({
    "query":    [...],
    "positive": [...],
    # optional: "negative": [...],
})

args = SentenceTransformerTrainingArguments(
    output_dir="out",
    num_train_epochs=1,
    per_device_train_batch_size=64,
    learning_rate=2e-5,
    warmup_ratio=0.1,
    bf16=True,
    prompts={"query": "query: ", "positive": "document: "},
)

trainer = SentenceTransformerTrainer(model=model, args=args, train_dataset=train_ds, loss=loss)
trainer.train()

Notes:

  • Always pass the asymmetric prompts during training (the model was trained with them).
  • For larger effective batches without OOM, swap MultipleNegativesRankingLoss for CachedMultipleNegativesRankingLoss.
  • Save with model.save_pretrained(...); the modeling file and auto_map are preserved so the patched behavior survives reloads.

📈 Performance#

We highlight (= bold) the best bi-encoder and best late retriever for each language.

NanoBEIR Multilingual Extended — NDCG@10#

LiquidAI/nanobeir-multilingual-extended. Multilingual retrieval capabilities.

ModelTypeAVGardeenesfritjakonoptsv
LiquidAI/LFM2.5-ColBERT-350Mlate0.6050.5510.6060.6870.6070.6220.6060.6140.5900.5700.6130.586
LiquidAI/LFM2.5-Embedding-350Mdense0.5770.5290.5810.6440.5810.5920.5830.5750.5630.5570.5810.566
Qwen/Qwen3-Embedding-0.6Bdense0.5560.5140.5600.6490.5680.5650.5650.5510.5300.5160.5710.525
LiquidAI/LFM2-ColBERT-350Mlate0.5400.4910.5630.6610.5630.5640.5430.5570.5270.4490.5470.480
Alibaba-NLP/gte-multilingual-basedense0.5280.4770.5230.6240.5370.5420.5280.5110.4940.5160.5340.526
lightonai/GTE-ModernColBERT-v1late0.4890.3090.4990.6800.5250.5460.5160.4590.3680.4650.5300.483
lightonai/LateOnlate0.4840.3070.5050.6900.5310.5370.5140.4420.3260.4650.5330.475
lightonai/DenseOndense0.4320.1780.4740.6760.4960.5200.4870.3780.1970.4220.4930.433
Alibaba-NLP/gte-modernbert-basedense0.3830.1120.4490.6660.4480.4750.4080.2750.1800.3760.4310.391
BAAI/bge-large-en-v1.5dense0.3590.0590.4190.6420.4450.4750.4310.1980.1320.3580.4340.353
MKQA-11 — Recall@20#

MKQA. Cross-lingual capabilities (subset of the 11 languages we target).

ModelTypeAVGardeenesfritjakonoptsv
LiquidAI/LFM2.5-ColBERT-350Mlate0.6940.6080.7090.7480.7110.7150.7070.7030.6400.6890.7030.700
LiquidAI/LFM2.5-Embedding-350Mdense0.6910.6100.7090.7380.7080.7150.7030.6850.6300.6910.7100.708
Alibaba-NLP/gte-multilingual-basedense0.6750.5670.6920.7410.7050.7030.6970.6550.5630.6980.7000.699
LiquidAI/LFM2-ColBERT-350Mlate0.6460.5540.6960.7540.7110.7100.6670.6580.5580.5410.6690.589
Qwen/Qwen3-Embedding-0.6Bdense0.6380.5200.6710.7230.6780.6720.6710.6350.5430.6200.6670.620
lightonai/GTE-ModernColBERT-v1late0.4590.0920.5320.7540.5520.6150.5100.2750.1660.5030.5240.524
lightonai/LateOnlate0.4540.1570.4920.7550.5370.5770.4810.3160.2090.4720.5020.501
lightonai/DenseOndense0.4350.1650.4820.7510.4910.5530.4570.3250.2220.4380.4430.453
BAAI/bge-large-en-v1.5dense0.4130.1330.4710.7480.4500.5310.4610.2080.1720.4560.4430.467
Alibaba-NLP/gte-modernbert-basedense0.2950.0600.3330.7360.2730.4170.2910.1000.0520.3320.3260.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).

ModelStageDocs cachedp50p95
LFM2.5-Embedding-350MQuery embeddingyes7.3 ms9.6 ms
LFM2.5-ColBERT-350MQuery embeddingyes8.1 ms8.5 ms
LFM2.5-ColBERT-350MQuery embedding + MaxSimyes8.2 ms15.2 ms
LFM2.5-ColBERT-350MQuery embedding + Doc embedding + MaxSimno34.3 ms36.3 ms

Both models LiquidAI/LFM2.5-ColBERT-350M-GGUF and LiquidAI/LFM2.5-Embedding-350M-GGUF are available on Hugging Face under different quantization schemas for llama.cpp.

Inference speed - Enterprise GPU#

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.

Image: GPU serving latency

WorkloadSetupp50p95p99
LFM2.5-Embedding-350MQuery embedding1.5 ms1.6 ms1.7 ms
LFM2.5-ColBERT-350MQuery embedding1.3 ms1.4 ms1.5 ms
LFM2.5-ColBERT-350MQuery embedding + MaxSim2.5 ms2.7 ms2.8 ms
LFM2.5-ColBERT-350MQuery embedding + Doc embedding + MaxSim22.8 ms24.1 ms26.4 ms

📬 Contact#

Citation#

@article{liquidai2025lfm2,
  title={LFM2 Technical Report},
  author={Liquid AI},
  journal={arXiv preprint arXiv:2511.23404},
  year={2025}
}

Files

14 files · 714 MBWeights 709 MB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 14 files with their sha256
FileSizesha256
.gitattributes1.52 KB11ad7efa24975ee4b0c3c3a38ed18737f0658a5f75a0a96787b576a78a023361
1_Pooling/config.json313 B31345c23e6f8196484977bf94e465bfe9859101fc4a89d53befad73f776014a9
LICENSE10.6 KB4d28ca14dedc0b3d0fcc2b3339f0e79931faa33874f3d24f522183a8fc70068c
README.md14.2 KB43a6de0333ad52e4f360e8ba72f48693e8719e59d585645518ca34e759eeb8ad
chat_template.jinja1.30 KB89e790f027916b5a2bca145a6a8454e06ffc7a5043bf3b6d97829aff86bb543f
config.json1.40 KBc44923b7d8e728cfd1293628355889c3c037bd8d0b13093747d595b06fa591ee
config_sentence_transformers.json555 Ba6089803863955ce7b31274bd02ad3a5ddbabc061dfca7ba88460514b91399b0
model.safetensors709 MBe2909cdd28e938b224bc043c6138dfbb88817bfd1443e98087156b0f077e2007
modeling_lfm2_bidirectional.py5.19 KBc7f98a43764dbb93d4d912cb09dc828672680d762452c59637917522fbaedae0
modules.json229 B8f4b264b80206c830bebbdcae377e137925650a433b689343a63bdc9b3145460
sentence_bert_config.json57 B948201d8329907aae938fa62f9ceeed53f5694dacc2b87b9f3b78b37ee986529
special_tokens_map.json434 B742aefe2b7dec496e8caffdba03a75d0c1a9925d53bd3f3e0d388c96b591b6f4
tokenizer.json4.73 MBeb89449ddea8caaff6bcefc4993f30da173f3f1c6f30ad96bc964863f692f1cf
tokenizer_config.json92.1 KB7787607af2d3ed1afe861f2c5da946f63b1ff7ee39460bfe847801ae612069af
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
f35ae2c91d pinned now2026-11-15 02:39 UTC14 files · 714 MB

Use it

# custom terms: read the license before you download
$ fw get LiquidAI/LFM2.5-Embedding-350M
# manifest sha256 24b054ec567a… · 714 MB · 14 files
$ fw verify ./LFM2.5-Embedding-350M LiquidAI/LFM2.5-Embedding-350M
Terms that come with these files. LFM 1.0: commercial use only for organisations under US$10M annual revenue. Keep a copy of the license with the files.
Custom license (custom). Read the license text first. Open this panel to show the commands once you accept its terms.
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/LiquidAI/LFM2.5-Embedding-350M.json --dir ./LFM2.5-Embedding-350M $ python3 fw.py verify ./LFM2.5-Embedding-350M ./LiquidAI__LFM2.5-Embedding-350M.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download LiquidAI/LFM2.5-Embedding-350M --revision f35ae2c91d687658dbf1f2b449382f0b019b9808 --local-dir ./LFM2.5-Embedding-350M
transformersLoad the weights in Python.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from transformers import AutoModel, AutoTokenizer tok = AutoTokenizer.from_pretrained("LiquidAI/LFM2.5-Embedding-350M", revision="f35ae2c91d687658dbf1f2b449382f0b019b9808") model = AutoModel.from_pretrained("LiquidAI/LFM2.5-Embedding-350M", revision="f35ae2c91d687658dbf1f2b449382f0b019b9808", device_map="auto")
sentence-transformersEmbed text with sentence-transformers.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from sentence_transformers import SentenceTransformer model = SentenceTransformer("LiquidAI/LFM2.5-Embedding-350M", revision="f35ae2c91d687658dbf1f2b449382f0b019b9808") vectors = model.encode(["Hello"])

License

Name
LFM Open License v1.0
Id
LicenseRef-LFM-1.0
Class
Custom terms
Redistribution
click-through
Listing
Hosted (signed)
Terms
LFM 1.0: commercial use only for organisations under US$10M annual revenue. Keep a copy of the license with the files.
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
LICENSE
Text sha256
4d28ca14dedc0b3d0fcc2b3339f0e79931faa33874f3d24f522183a8fc70068c
Terms gate
Yes. The commands stay folded until you open them after reading the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: LiquidAI <huggingface.co/LiquidAI>Newsgroups: alt.freeweights.lfmSubject: LFM2.5-Embedding-350MDate: 2026-11-15Commit: f35ae2cSigned: 2DC28CC7B26A283B ✓
Upstream
LiquidAI/LFM2.5-Embedding-350M
Pinned commit
f35ae2c91d687658dbf1f2b449382f0b019b9808
Manifest
LFM2.5-Embedding-350M.json · .minisig
Manifest sha256
24b054ec567accf14f4247485f7b36cacfa5ffb27f42a6b57ba82a95aa5848e7
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 02:39 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/LiquidAI/LFM2.5-Embedding-350M.json $ curl -O https://freeweights.allternit.com/manifests/LiquidAI/LFM2.5-Embedding-350M.json.minisig $ minisign -Vm LFM2.5-Embedding-350M.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

Parent

LiquidAI/LFM2.5-350M-Base · this model is a finetune of it

2 models in the catalog name this one as their parent.

Fine-tunes
2
Get it
Read license, then download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download LiquidAI/LFM2.5-Embedding-350M
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. LFM2.5-Embedding-350M.json. Provenance. Takedown history: none.
From: LiquidAI <huggingface.co/LiquidAI>Subject: LFM2-1.2B
From: LiquidAI <huggingface.co/LiquidAI>Subject: LFM2-1.2B-Extract
From: LiquidAI <huggingface.co/LiquidAI>Subject: LFM2-1.2B-RAG
From: LiquidAI <huggingface.co/LiquidAI>Subject: LFM2-1.2B-Tool
From: LiquidAI <huggingface.co/LiquidAI>Subject: LFM2-2.6B
From: LiquidAI <huggingface.co/LiquidAI>Subject: LFM2-2.6B-Exp