UEmbed is a decoder-only multimodal embedding model that produces both dense embeddings and SPLADE-style sparse lexical embeddings from a single causal forward pass. It supports text, image, video, and mixed-modal inputs for retrieval, multimodal search, and visual-document retrieval.
[2026-08-15]: UEmbed achieves state-of-the-art results on the text and agent tracks of MMEB-v3, and ranks second only to the Qwen3-VL-Embedding series among open-source models on MMEB-v2.
[2026-08-13]: We updated the inference code — UEmbed now loads natively with transformers (no trust_remote_code or processor patching needed), and we added a vLLM backend for high-throughput dense and sparse embedding inference. See the runnable examples: examples/transformers_example.py and examples/vllm_example.py.
Inference code is provided in the GitHub repository. Set pooling="last.normal" for dense embeddings or pooling="splade.last" for sparse embeddings.
import torch
from src.models.qwen35_embedding import Qwen35Embedder
model = Qwen35Embedder(
model_name_or_path="./models/UEmbed-2B",
torch_dtype=torch.bfloat16,
# flash_attention_2 for better acceleration and memory saving
attn_implementation="flash_attention_2",
)
inputs = [{
"text": "A woman playing with her dog on a beach at sunset.",
"instruction": "Retrieve images or text relevant to the user's query.",
}, {
"text": "A woman shares a joyful moment with her golden retriever on a sun-drenched beach at sunset, as the dog offers its paw in a heartwarming display of companionship and trust."
}, {
"image": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg"
}, {
"text": "A woman shares a joyful moment with her golden retriever on a sun-drenched beach at sunset, as the dog offers its paw in a heartwarming display of companionship and trust.",
"image": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg"
}]
embeddings = model.process(inputs)
print(embeddings @ embeddings.T)
@misc{uembed2026,
title={UEmbed: Unified Sparse and Dense Multimodal Embeddings},
author={Tingyu Song and Mingxin Li and Yanzhao Zhang and Dingkun Long and Pengjun Xie and Zhijie Nie and Yilun Zhao and Shu Wu},
year={2026},
eprint={2608.02583},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2608.02583},
}
import os
os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com"
from transformers import AutoModel, AutoTokenizer
tok = AutoTokenizer.from_pretrained("Alibaba-NLP/UEmbed-4B", revision="2982eab2f474ce762362209a1045c882c2ed43e5")
model = AutoModel.from_pretrained("Alibaba-NLP/UEmbed-4B", revision="2982eab2f474ce762362209a1045c882c2ed43e5", device_map="auto")