Model reference · open weights
UEmbed is an open-weight embedding model from Alibaba. UEmbed-4B (BF16) weighs 10.0 GB; the smallest configuration that runs it is RTX 3060 12 GB.
Summary of the Alibaba-NLP/UEmbed-2B model card, 2026-10-01. The estimate below is for another build of the family.
What it is
| Released by | Alibaba |
|---|---|
| Released | 2026-07-29 |
| Parameters | 2.2B |
| VRAM | 10.0 GB for the weights |
What it runs on
| Card | Runs | Memory |
|---|---|---|
| RTX 3060 12 GB | tight | 11.6 GB |
| RTX 4060 Ti 16 GB | fits | 15.4 GB |
| RTX 3090 24 GB | fits | 23.4 GB |
| RTX 4090 24 GB | fits | 23.4 GB |
| RTX 5090 32 GB | fits | 31.0 GB |
| L40S 48 GB | fits | 44.0 GB |
| A100 80 GB | fits | 78.2 GB |
| H100 80 GB | fits | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | fits | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | fits | 107 GB |
| H200 141 GB | fits | 138 GB |
| B200 180 GB | fits | 176 GB |
Builds
From the model card
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.
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.| Model | Backbone | Parameters | Outputs | Modalities |
|---|---|---|---|---|
| UEmbed-2B | Qwen3.5 | 2B | Dense + Sparse | Text, image, video |
| UEmbed-4B | Qwen3.5 | 4B | Dense + Sparse | Text, image, video |
| UEmbed-9B | Qwen3.5 | 9B | Dense + Sparse | Text, image, video |
| Component | Design |
|---|---|
| Backbone | Decoder-only Qwen3.5 multimodal model |
| Dense pooling | Hidden state of the EOS token before sparse special tokens |
| Sparse tokens | N=16 appended special tokens |
| Sparse heads | One subset-specific linear head per special token |
| Sparse vocabulary | Compressed from 248,320 tokenizer entries to 184,016 canonical entries |
| Sparse activation | log(1 + ReLU(logits)) |
| Training objective | Dense InfoNCE + sparse InfoNCE + query/document FLOPS regularization |
Requires a recent transformers build with Qwen3.5/Qwen3-VL support:
pip install "transformers>=5.4.0" torch qwen-vl-utils tokenizers huggingface-hub pillow numpy
Download the complete model repository, since sparse inference requires both sparse_info.json and sparse_weights.pt in the local model directory:
huggingface-cli download Alibaba-NLP/UEmbed-2B --local-dir ./models/UEmbed-2B
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)
Qwen35Embedder.process accepts a list of dictionaries with the following fields:
| Field | Type | Description |
|---|---|---|
text | str or list[str] | Text content. |
image | path, URL, PIL.Image, or list | One or more images. |
video | path, URL, frame list, or list | One or more videos. |
instruction | str | Optional task-specific instruction. |
fps | float | Optional frame sampling rate for video files. |
max_frames | int | Optional maximum number of sampled video frames. |
UEmbed is trained on 3.94M public samples:
For multimodal data, hard negatives are mined with Qwen3-VL-Embedding-8B as the teacher retriever.
If you use UEmbed, please cite the paper:
@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},
}
Thanks to the Qwen3-VL-Embedding repo for the evaluation framework.
Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.