Model reference · open weights

Dmeta-embedding-zh

Embeddings DMetaSoul Embeddings 1 build Open weights 910 dl/mo

Dmeta-embedding-zh is an open-weight embedding model from DMetaSoul. Dmeta-embedding-zh (BF16) weighs 411 MB; the smallest configuration that runs it is RTX 3060 12 GB.

For self-hosting, compare this build's requirements below with the GPU you plan to rent.

  • Dmeta-embedding-zh is a feature-extraction model developed by DMetaSoul for tasks such as search, Q&A, and RAG.
  • It supports Chinese and English with a context length of 1024 tokens and a parameter size of 400MB.
  • The model is released under the Apache-2.0 license.

Summary of the DMetaSoul/Dmeta-embedding-zh model card, 2026-10-01

What it is

Released byDMetaSoul
Released2024-01-25
VRAM411 MB for the weights

What it runs on

Memory and cards for Dmeta-embedding-zh (BF16)

411 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 DMetaSoul says about Dmeta-embedding-zh

Read the model card

Update News

  • 2024.04.01, The Dmeta-embedding small version is released. Just with 8 layers, inference is more efficient, about 30% improved.

  • 2024.02.07, The Embedding API service based on the Dmeta-embedding model now open for internal beta testing. Click the link to apply, and you will receive 400M tokens for free, which can encode approximately GB-level Chinese text.

    • Our original intention. Let everyone use Embedding technology at low cost, pay more attention to their own business and product services, and leave the complex technical parts to us.
    • How to apply and use. Click the link to submit a form. We will reply to you via within 48 hours. In order to be compatible with the large language model (LLM) technology ecosystem, our Embedding API is used in the same way as OpenAI. We will explain the specific usage in the reply email.
    • Join the ours. In the future, we will continue to work in the direction of large language models/AIGC to bring valuable technologies to the community. You can click on the picture and scan the QR code to join our WeChat community and cheer for the AIGC together!

Dmeta-embedding is a cross-domain, cross-task, out-of-the-box Chinese embedding model. It is suitable for various scenarios such as search engine, Q&A, intelligent customer service, LLM+RAG, etc. It supports inference using tools like Transformers/Sentence-Transformers/Langchain.

Features:

  • Excellent cross-domain and scene generalization performance, currently ranked second on the MTEB Chinese leaderboard. (2024.01.25)
  • The parameter size of model is just 400MB, which can greatly reduce the cost of inference.
  • The context window length is up to 1024, more suitable for long text retrieval, RAG and other scenarios

Usage

The model supports inference through frameworks such as Sentence-Transformers, Langchain, Huggingface Transformers, etc. For specific usage, please refer to the following examples.

Sentence-Transformers

Load and inference Dmeta-embedding via sentence-transformers as following:

pip install -U sentence-transformers
from sentence_transformers import SentenceTransformer

texts1 = ["胡子长得太快怎么办?", "在香港哪里买手表好"]
texts2 = ["胡子长得快怎么办?", "怎样使胡子不浓密!", "香港买手表哪里好", "在杭州手机到哪里买"]

model = SentenceTransformer('DMetaSoul/Dmeta-embedding')
embs1 = model.encode(texts1, normalize_embeddings=True)
embs2 = model.encode(texts2, normalize_embeddings=True)

similarity = embs1 @ embs2.T
print(similarity)

for i in range(len(texts1)):
    scores = []
    for j in range(len(texts2)):
        scores.append([texts2[j], similarity[i][j]])
    scores = sorted(scores, key=lambda x:x[1], reverse=True)

    print(f"查询文本:{texts1[i]}")
    for text2, score in scores:
        print(f"相似文本:{text2},打分:{score}")
    print()

Output:

查询文本:胡子长得太快怎么办?
相似文本:胡子长得快怎么办?,打分:0.9535336494445801
相似文本:怎样使胡子不浓密!,打分:0.6776421070098877
相似文本:香港买手表哪里好,打分:0.2297907918691635
相似文本:在杭州手机到哪里买,打分:0.11386542022228241

查询文本:在香港哪里买手表好
相似文本:香港买手表哪里好,打分:0.9843372106552124
相似文本:在杭州手机到哪里买,打分:0.45211508870124817
相似文本:胡子长得快怎么办?,打分:0.19985519349575043
相似文本:怎样使胡子不浓密!,打分:0.18558596074581146

Langchain

Load and inference Dmeta-embedding via langchain as following:

pip install -U langchain
import torch
import numpy as np
from langchain.embeddings import HuggingFaceEmbeddings

model_name = "DMetaSoul/Dmeta-embedding"
model_kwargs = {'device': 'cuda' if torch.cuda.is_available() else 'cpu'}
encode_kwargs = {'normalize_embeddings': True} # set True to compute cosine similarity

model = HuggingFaceEmbeddings(
    model_name=model_name,
    model_kwargs=model_kwargs,
    encode_kwargs=encode_kwargs,
)

texts1 = ["胡子长得太快怎么办?", "在香港哪里买手表好"]
texts2 = ["胡子长得快怎么办?", "怎样使胡子不浓密!", "香港买手表哪里好", "在杭州手机到哪里买"]

embs1 = model.embed_documents(texts1)
embs2 = model.embed_documents(texts2)
embs1, embs2 = np.array(embs1), np.array(embs2)

similarity = embs1 @ embs2.T
print(similarity)

for i in range(len(texts1)):
    scores = []
    for j in range(len(texts2)):
        scores.append([texts2[j], similarity[i][j]])
    scores = sorted(scores, key=lambda x:x[1], reverse=True)

    print(f"查询文本:{texts1[i]}")
    for text2, score in scores:
        print(f"相似文本:{text2},打分:{score}")
    print()

HuggingFace Transformers

Load and inference Dmeta-embedding via HuggingFace Transformers as following:

pip install -U transformers
import torch
from transformers import AutoTokenizer, AutoModel

def mean_pooling(model_output, attention_mask):
    token_embeddings = model_output[0] #First element of model_output contains all token embeddings
    input_mask_expanded = attention_mask.unsqueeze(-1).expand(token_embeddings.size()).float()
    return torch.sum(token_embeddings * input_mask_expanded, 1) / torch.clamp(input_mask_expanded.sum(1), min=1e-9)

def cls_pooling(model_output):
    return model_output[0][:, 0]

texts1 = ["胡子长得太快怎么办?", "在香港哪里买手表好"]
texts2 = ["胡子长得快怎么办?", "怎样使胡子不浓密!", "香港买手表哪里好", "在杭州手机到哪里买"]

tokenizer = AutoTokenizer.from_pretrained('DMetaSoul/Dmeta-embedding')
model = AutoModel.from_pretrained('DMetaSoul/Dmeta-embedding')
model.eval()

with torch.no_grad():
    inputs1 = tokenizer(texts1, padding=True, truncation=True, return_tensors='pt')
    inputs2 = tokenizer(texts2, padding=True, truncation=True, return_tensors='pt')

    model_output1 = model(**inputs1)
    model_output2 = model(**inputs2)
    embs1

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 AFQMCcos_sim_pearson65.608
STSMTEB AFQMCcos_sim_spearman71.129
STSMTEB AFQMCeuclidean_pearson70.181
STSMTEB AFQMCeuclidean_spearman71.129
STSMTEB AFQMCmanhattan_pearson70.145
STSMTEB AFQMCmanhattan_spearman71.052
STSMTEB ATECcos_sim_pearson65.524
STSMTEB ATECcos_sim_spearman64.642
STSMTEB ATECeuclidean_pearson73.202
STSMTEB ATECeuclidean_spearman64.642
STSMTEB ATECmanhattan_pearson73.228
STSMTEB ATECmanhattan_spearman64.626
ClassificationMTEB AmazonReviewsClassification (zh)accuracy44.926
ClassificationMTEB AmazonReviewsClassification (zh)f142.826
STSMTEB BQcos_sim_pearson71.352
STSMTEB BQcos_sim_spearman72.296
STSMTEB BQeuclidean_pearson70.946
STSMTEB BQeuclidean_spearman72.296
STSMTEB BQmanhattan_pearson70.845
STSMTEB BQmanhattan_spearman72.245
ClusteringMTEB CLSClusteringP2Pv_measure40.242
ClusteringMTEB CLSClusteringS2Sv_measure39.168
RerankingMTEB CMedQAv1map88.488
RerankingMTEB CMedQAv1mrr90.369
© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms