Skip to main content
Back

MokaAI's m3e-base Beats OpenAI's Ada-002 on Chinese Retrieval at Half the Size

MokaAI's open-source m3e-base embedding model outperforms OpenAI's text-embedding-ada-002 on Chinese benchmarks while running on a 110M-parameter RoBERTa backbone.

Pro

  • MokaAI released m3e-base, a 110M-param Chinese-English embedding model built on RoBERTa.
  • Beats OpenAI ada-002 on T2Ranking with 0.8004 ndcg@10 versus 0.7786.
  • Trained via contrastive learning on 22M+ Chinese sentence pairs plus 1.45M English MEDI triplets.
  • Drop-in compatible with sentence-transformers, Chroma, LangChain, and semantic-kernel.
  • Fine-tunable in a few lines through the companion uniem library.
  • License is research-only due to non-commercial datasets in the training mix.

MokaAI, a Beijing-based HR software company, has quietly shipped one of the more interesting open-source embedding models for Chinese text. Its m3e-base beats OpenAI's text-embedding-ada-002 on Chinese retrieval and classification while being fully open, self-hostable, and half the embedding dimension.

The name stands for Moka Massive Mixed Embedding. It handles both Chinese and English, was trained on more than 22 million sentence pairs spanning encyclopedias, finance, healthcare, law, news, and academia, and is built on the RoBERTa architecture. It ships as a drop-in replacement for any sentence-transformers pipeline.

Benchmarks worth checking

On the T2Ranking 1W Chinese retrieval benchmark, m3e-base hits an ndcg@10 of 0.8004 against ada-002's 0.7786. On a six-dataset Chinese text classification suite, it reaches 0.6157 accuracy versus 0.5956 for ada-002.

Here is how it stacks up on the two headline tasks:

ModelParamsDims2s Accuracys2p ndcg@10
m3e-small24M5120.58340.7262
m3e-base110M7680.61570.8004
text2vec110M7680.57550.6346
openai-ada-002unknown15360.59560.7786

The s2s column measures sentence-to-sentence similarity (duplicate detection, clustering, classification). The s2p column measures sentence-to-passage retrieval, which is what you actually care about when building RAG pipelines.

How it was built

The training recipe is refreshingly simple. The model uses in-batch negative sampling and contrastive learning, was trained on A100 80G GPUs to maximize batch size, and draws on both the massive Chinese corpus and 1.45M English triplets from the MEDI dataset. Training ran for a single epoch over the full 22M+ pair collection.

Three ingredients differentiate it from prior Chinese embedding models:

  • Base model: HFL's chinese-roberta-wwm-ext, which already has strong Chinese pretraining.
  • Instruction data: over 3 million instruction-tuning pairs, an approach borrowed from the INSTRUCTOR embedding work, so the model can follow prompt-style task descriptions.
  • Mixed objectives: the same weights handle homogeneous similarity (short-to-short) and heterogeneous retrieval (query-to-passage), which most earlier Chinese models did not combine.

Plugging it in

Because m3e was designed for full sentence-transformers compatibility, integration is a one-line change in existing stacks like Chroma, LangChain, or Microsoft's semantic-kernel:

from sentence_transformers import SentenceTransformer
model = SentenceTransformer('moka-ai/m3e-base')
embeddings = model.encode([
    'query text in Chinese or English',
    'candidate passage'
])
similarities = model.similarity(embeddings, embeddings)

Fine-tuning is equally lightweight through the companion uniem library, which wraps the training script used to build m3e itself. A few lines pointed at any HuggingFace dataset will produce a domain-adapted variant.

Where it breaks down

The model is deliberately scoped. Because it was trained primarily on Chinese data, it lags on English-only and truly multilingual tasks. The maintainers recommend sticking with ada-002 for multilingual workloads or for code search, since m3e does not yet support sentence-to-code embedding.

There is also a licensing catch worth flagging. Because the training mixture pulls in several non-commercial Chinese corpora, the released weights are research-only. Teams that need commercial deployment either have to wait for a promised commercial release or retrain on the subset of the M3E dataset that the authors marked as commercially usable.

Why it matters for RAG builders

Until m3e landed, teams building Chinese-language RAG systems had two unappealing options: ship queries to OpenAI's API, paying per token and losing data control, or use text2vec-style models that trailed ada-002 by a wide margin on retrieval. A 110M-parameter open model that runs on a single consumer GPU and outperforms ada-002 on Chinese retrieval changes that calculation.

It is also a useful data point in the broader argument about specialization. A model trained on the right domain mixture with a modest architecture beat a much larger closed model that tries to serve every language at once. For anyone building Chinese search, semantic dedup, or memory modules for LLM applications, m3e-base is now the default starting point, and the MTEB-zh benchmark it introduced gives the community a way to track what comes next.