Model reference · open weights

MiniCPM-Embedding-Light

Embeddings openbmb Embeddings 1 build Licence not stated 12k dl/mo

MiniCPM-Embedding-Light is an open-weight embedding model from openbmb. MiniCPM-Embedding-Light (BF16) weighs 868 MB; the smallest configuration that runs it is RTX 3060 12 GB.

  • MiniCPM-Embedding-Light is a 434M parameter bilingual text embedding model developed by openbmb for feature extraction and retrieval tasks.
  • It supports Chinese and English with a maximum context length of 4096 tokens and provides both dense and sparse vector outputs.
  • The model code is released under the Apache-2.0 license, while the weights are free for academic research and available for commercial use after registration.

Summary of the openbmb/MiniCPM-Embedding-Light model card, 2026-10-01

What it is

Released byopenbmb
Released2025-01-17
Parameters434M
VRAM868 MB for the weights

What it runs on

Memory and cards for MiniCPM-Embedding-Light (BF16)

868 MBweights, file size
1.1 GBruntime overhead
CardRunsMemory
RTX 3060 12 GBfits11.6 GB
RTX 4060 Ti 16 GBfits15.4 GB
RTX 3090 24 GBfits23.4 GB
RTX 4090 24 GBfits23.4 GB
RTX 5090 32 GBfits31.0 GB
L40S 48 GBfits44.0 GB
A100 80 GBfits78.2 GB
H100 80 GBfits78.1 GB
RTX PRO 6000 Blackwell 96 GBfits93.8 GB
DGX Spark (GB10) 128 GB unifiedfits107 GB
H200 141 GBfits138 GB
B200 180 GBfits176 GB

From the model card

What openbmb says about MiniCPM-Embedding-Light

Read the model card

MiniCPM-Embedding-Light

MiniCPM-Embedding-Light 是面壁智能与清华大学自然语言处理实验室(THUNLP)、东北大学信息检索小组(NEUIR)共同开发的中英双语言文本嵌入模型,有如下特点:

  • 出色的中文、英文检索能力。
  • 出色的中英跨语言检索能力。
  • 支持长文本(最长8192token)。
  • 提供稠密向量与token级别的稀疏向量。
  • 可变的稠密向量维度(套娃表征)。

MiniCPM-Embedding-Light结构上采取双向注意力和 Weighted Mean Pooling [1]。采取多阶段训练方式,共使用包括开源数据、机造数据、闭源数据在内的约 260M 条训练数据。

欢迎关注 UltraRAG 系列:

MiniCPM-Embedding-Light is a bilingual & cross-lingual text embedding model developed by ModelBest Inc. , THUNLP and NEUIR , featuring:

  • Exceptional Chinese and English retrieval capabilities.
  • Outstanding cross-lingual retrieval capabilities between Chinese and English.
  • Long-text support (up to 8192 tokens).
  • Dense vectors and token-level sparse vectors.
  • Variable dense vector dimensions (Matryoshka representation [2]).

MiniCPM-Embedding-Light incorporates bidirectional attention and Weighted Mean Pooling [1] in its architecture. The model underwent multi-stage training using approximately 260 million training examples, including open-source, synthetic, and proprietary data.

We also invite you to explore the UltraRAG series:

[1] Muennighoff, N. (2022). Sgpt: Gpt sentence embeddings for semantic search. arXiv preprint arXiv:2202.08904. [2] Kusupati, Aditya, et al. "Matryoshka representation learning." Advances in Neural Information Processing Systems 35 (2022): 30233-30249.

模型信息 Model Information

  • 模型大小:440M

  • 嵌入维度:1024

  • 最大输入token数:8192

  • Model Size: 440M

  • Embedding Dimension: 1024

  • Max Input Tokens: 8192

使用方法 Usage

输入格式 Input Format

本模型支持 query 侧指令,格式如下:

MiniCPM-Embedding-Light supports query-side instructions in the following format:

Instruction: {{ instruction }} Query: {{ query }}

例如:

For example:

Instruction: 为这个医学问题检索相关回答。Query: 咽喉癌的成因是什么?
Instruction: Given a claim about climate change, retrieve documents that support or refute the claim. Query: However the warming trend is slower than most climate models have forecast.

也可以不提供指令,即采取如下格式:

MiniCPM-Embedding-Light also works in instruction-free mode in the following format:

Query: {{ query }}

环境要求 Requirements

transformers==4.37.2

示例脚本 Demo

Huggingface Transformers
from transformers import AutoModel
import torch

model_name = "openbmb/MiniCPM-Embedding-Light"
model = AutoModel.from_pretrained(model_name, trust_remote_code=True, torch_dtype=torch.float16).to("cuda")

# you can use flash_attention_2 for faster inference
# model = AutoModel.from_pretrained(model_name, trust_remote_code=True, attn_implementation="flash_attention_2", torch_dtype=torch.float16).to("cuda")

model.eval()

queries = ["MiniCPM-o 2.6 A GPT-4o Level MLLM for Vision, Speech and Multimodal Live Streaming on Your Phone"]
passages = ["MiniCPM-o 2.6 is the latest and most capable model in the MiniCPM-o series. The model is built in an end-to-end fashion based on SigLip-400M, Whisper-medium-300M, ChatTTS-200M, and Qwen2.5-7B with a total of 8B parameters. It exhibits a significant performance improvement over MiniCPM-V 2.6, and introduces new features for real-time speech conversation and multimodal live streaming."]

embeddings_query_dense, embeddings_query_sparse = model.encode_query(queries, return_sparse_vectors=True)
embeddings_doc_dense, embeddings_doc_sparse = model.encode_corpus(passages, return_sparse_vectors=True)

dense_scores = (embeddings_query_dense @ embeddings_doc_dense.T)
print(dense_scores.tolist())  # [[0.6512398719787598]]
print(model.compute_sparse_score_dicts(embeddings_query_sparse,  embeddings_doc_sparse)) # [[0.27202296]]

dense_scores, sparse_scores, mixed_scores = model.compute_score(queries, passages)
print(dense_scores) # [[0.65123993]]
print(sparse_scores) # [[0.27202296]]
print(mixed_scores) # [[0.73284686]]
Sentence Transformers
import torch
from sentence_transformers import SentenceTransformer

model_name = "openbmb/MiniCPM-Embedding-Light"
model = SentenceTransformer(model_name, trust_remote_code=True, model_kwargs={"torch_dtype": torch.float16})

# you can use flash_attention_2 for faster inference
# model = SentenceTransformer(model_name, trust_remote_code=True, model_kwargs={"attn_implementation": "flash_attention_2", "torch_dtype": torch.float16})

queries = ["中国的首都是哪里?"] # "What is the capital of China?"
passages = ["beijing", "shanghai"] # "北京", "上海"

INSTRUCTION = "Query: "

embeddings_query = model.encode(queries, prompt=INSTRUCTION)
embeddings_doc = model.encode(passages)

scores = (embeddings_query @ embeddings_doc.T)
print(scores.tolist())  # [[0.40356746315956116, 0.36183440685272217]]
Infinity
import asyncio
from infinity_emb import AsyncEngineArray, EngineArgs, AsyncEmbeddingEngine
import numpy as np

array = AsyncEngineArray.from_args([
  EngineArgs(model_name_or_path = "openbmb/MiniCPM-Embedding-Light", engine="torch", dtype="float16", bettertransformer=False, pooling_method="mean", trust_remote_code=True),
])
queries = ["中国的首都是哪里?"] # "What is the capital of China?"
passages = ["beijing", "shanghai"] # "北京", "上海"

INSTRUCTION = "Query:"
queries = [f"{INSTRUCTION} {query}" for query in queries]

async def embed_text(engine: AsyncEmbeddingEngine,sentences):
    async with engine:
        embeddings, usage = await engine.embed(sentences=sentences)
    return embeddings

queries_embedding = asyncio.run(embed_text(array[0],queries))
passages_embedding = asyncio.run(embed_text(array[0],passages))

scores = (np.array(querie

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

Benchmarks

Reported results

As published on the model card: the maker's own numbers, not measured by AxForge.

TaskDatasetMetricScore
STSMTEB AFQMC (default)cosine_pearson31.602
STSMTEB AFQMC (default)cosine_spearman32.266
STSMTEB AFQMC (default)euclidean_pearson31.387
STSMTEB AFQMC (default)euclidean_spearman32.266
STSMTEB AFQMC (default)main_score32.266
STSMTEB AFQMC (default)manhattan_pearson31.012
STSMTEB AFQMC (default)manhattan_spearman31.881
STSMTEB AFQMC (default)pearson31.602
STSMTEB AFQMC (default)spearman32.266
STSMTEB ATEC (default)cosine_pearson40.900
STSMTEB ATEC (default)cosine_spearman40.342
STSMTEB ATEC (default)euclidean_pearson43.266
STSMTEB ATEC (default)euclidean_spearman40.342
STSMTEB ATEC (default)main_score40.342
STSMTEB ATEC (default)manhattan_pearson43.094
STSMTEB ATEC (default)manhattan_spearman40.133
STSMTEB ATEC (default)pearson40.900
STSMTEB ATEC (default)spearman40.342
STSMTEB ATEC (default)cosine_pearson40.977
STSMTEB ATEC (default)cosine_spearman41.151
STSMTEB ATEC (default)euclidean_pearson43.127
STSMTEB ATEC (default)euclidean_spearman41.151
STSMTEB ATEC (default)main_score41.151
STSMTEB ATEC (default)manhattan_pearson43.016
© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms