StackMap
Subscribe
Explore / WeMM-Embedding
Tencent

WeMM-Embedding

Tencent WeChat's universal multimodal embedding family (2B/4B/9B): one vector space for text, images, video, visual documents and interleaved inputs, with Matryoshka dimensions from 64 to 4096.

1,775 123 Python NOASSERTIONupdated 29 days ago
View on GitHubDispute this mapping →
Curator's take

The embedder to try for retrieval over screenshots, slide decks, scanned pages and video, not just text: one model, one space, and Matryoshka truncation lets you index at 256 dims and rerank at 2048 without re-embedding. Loads through Transformers (pin 5.2.0) or SentenceTransformers by Hugging Face id; a serving path is documented. State-of-the-art on the usual multimodal benchmarks per the paper. NOT for audio (unsupported), NOT a tiny model — 2B is the floor, so CPU-only indexing will hurt — and the licence is Tencent's own, not Apache: read it before commercial use.

Mapped by ShipWithAI editors · links verified

Continue your stack

What teams reach for next — and why each earns a place beside WeMM-Embedding. Ranked by curator confidence.

pairs wellpairs wellpairs wellPixelRAGmorphik-coreChromaWeMM-Embedding
pairs wellalternativebuilt withpick a node for the why · open it from the panel
Weekly digest
README.md2 min read

WeMM-Embedding: WeChat Multi-Modal Embedding

English | 中文

Hugging Face Technical Report License

WeMM-Embedding is a family of universal multimodal embedding models developed by the WeChat Vision team. It provides unified representations for text, images, videos, visual documents, and interleaved multimodal inputs, achieving state-of-the-art performance across multiple benchmarks covering diverse tasks and domains.

WeMM-Embedding Performance Overview

Model Zoo

Model Matryoshka dimensions Hugging Face
WeMM-Embedding-2B 64, 128, 256, 512, 1024, 2048 🤗 Link
WeMM-Embedding-4B 64, 128, 256, 512, 1024, 2560 🤗 Link
WeMM-Embedding-9B 64, 128, 256, 512, 1024, 2048, 4096 🤗 Link

All models support text, images, videos, visual documents, and interleaved multimodal inputs. Embeddings are obtained from the last-layer hidden state at the dedicated <embedding> token position, followed by L2 normalization. Audio input is not currently supported.

Installation

pip install -r requirements.txt

Transformers

We recommend using transformers==5.2.0 for inference and reproducibility, as newer versions may differ in preprocessing behavior.

python examples/transformers_inference.py \
  --model /path/to/WeMM-Embedding-2B \
  --image /path/to/image.jpg \
  --video /path/to/video.mp4 \
  --dimension 2048

The example produces independent text, image, and video embeddings. Omit --dimension for the full embedding dimension.

Sentence Transformers

python examples/sentence_transformers_inference.py \
  --model /path/to/WeMM-Embedding-2B \
  --image /path/to/image.jpg \
  --video /path/to/video.mp4 \
  --dimension 2048

SentenceTransformer loads the model directly, so a Hugging Face model id such as tencent/WeMM-Embedding-2B also works in place of a local path. Text, image, and video inputs go through SentenceTransformer.encode(), and MRL is selected with --dimension.

Serving

Tested versions: vLLM 0.27.0 and SGLang 0.5.9.

vLLM:

MODEL_PATH=/path/to/WeMM-Embedding-2B
vllm serve "$MODEL_PATH" \
  --runner pooling \
  --chat-template "$MODEL_PATH/embedding_chat_template.jinja"

SGLang:

MODEL_PATH=/path/to/WeMM-Embedding-2B
python scripts/patch_sglang_video.py
python -m sglang.launch_server \
  --model-path "$MODEL_PATH" \
  --is-embedding \
  --enable-precise-embedding-interpolation

Equivalent one-command wrappers are available in scripts/serve_vllm.sh and scripts/serve_sglang.sh.

Matryoshka Embeddings

For a supported dimension d, truncate the full embedding and normalize it again:

embedding = torch.nn.functional.normalize(embedding[..., :d], dim=-1)

On MMEB-v2, the 2B model at 256 dimensions retains 98.7% of its full-dimensional image and video performance.

Evaluation

MMEB-v2

Results on 78 datasets from Table 1 of the technical report. Image and video tasks use Hit@1, while visual-document tasks use NDCG@5. Higher is better.

Model Size AVG Image Video VisDoc
VLM2Vec 2B 4