From: Alibaba-NLP <huggingface.co/Alibaba-NLP>Newsgroups: alt.freeweights.embedSubject:

UEmbed-2B

Date: 2026-11-14Commit: d02beb2Signed: 2DC28CC7B26A283B ✓

Feature extraction model with 2.2B parameters. Safetensors weights, 5.22 GB in all. Published by Alibaba-NLP under CC-BY-4.0.

2.2B params5.22GBUEmbed-2Bsafetensorspermissive
FactsParams2.2BSize5.22 GBFormatssafetensorsTaskfeature extractionLicenseCC-BY-4.0From sourcepermissive
$ fw get Alibaba-NLP/UEmbed-2B
# manifest sha256 1cf6e73149a4… · 5.22 GB · 24 files
$ fw verify ./UEmbed-2B Alibaba-NLP/UEmbed-2B
From sourceHosted (signed)Alibaba-NLP/UEmbed-2BLast check: 2026-11-14 21:07 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Works with

Evaluate with

Overview

Size
5.22 GB
Weights
4.43 GB (safetensors)
Parameters
2.2B
Formats
safetensors
Task
feature extraction
License
CC-BY-4.0 (permissive)
Files
24, each with a sha256
Publisher
Alibaba-NLP
Added
2026-11-14
Section
alt.freeweights.embed
Lineage

Original release from the publisher.

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-14 21:07 UTCpassed

Model card

From the publisher at commit d02beb2. Shown as plain text with links; images open at the publisher.

UEmbed: Unified Sparse and Dense Multimodal Embeddings#

Website arXiv GitHub Image: License: CC-BY-4.0

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.

News 🔥#

  • [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.

Model Family#

ModelBackboneParametersOutputsModalities
UEmbed-2BQwen3.52BDense + SparseText, image, video
UEmbed-4BQwen3.54BDense + SparseText, image, video
UEmbed-9BQwen3.59BDense + SparseText, image, video

Highlights#

  • Unified dense and sparse retrieval: one checkpoint returns normalized dense vectors and sparse lexical vectors.
  • Multimodal inputs: text, images, videos, and mixed inputs are represented in the same retrieval space.
  • Sparse interpretability: sparse activations correspond to vocabulary terms and can be used with inverted indexes.
  • Causal-model serving compatibility: the sparse design keeps the decoder-only backbone, no conversion to a bidirectional encoder.

Architecture#

ComponentDesign
BackboneDecoder-only Qwen3.5 multimodal model
Dense poolingHidden state of the EOS token before sparse special tokens
Sparse tokensN=16 appended special tokens
Sparse headsOne subset-specific linear head per special token
Sparse vocabularyCompressed from 248,320 tokenizer entries to 184,016 canonical entries
Sparse activationlog(1 + ReLU(logits))
Training objectiveDense InfoNCE + sparse InfoNCE + query/document FLOPS regularization

Usage#

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)
Input Format#

Qwen35Embedder.process accepts a list of dictionaries with the following fields:

FieldTypeDescription
textstr or list[str]Text content.
imagepath, URL, PIL.Image, or listOne or more images.
videopath, URL, frame list, or listOne or more videos.
instructionstrOptional task-specific instruction.
fpsfloatOptional frame sampling rate for video files.
max_framesintOptional maximum number of sampled video frames.

Training Data#

UEmbed is trained on 3.94M public samples:

  • E5 training data for broad text retrieval coverage.
  • M3 training data, using the MLDR subset.
  • MMEB training sets for multimodal query-document pairs.

For multimodal data, hard negatives are mined with Qwen3-VL-Embedding-8B as the teacher retriever.

Citation#

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}, 
}

Acknowledgements#

Thanks to the Qwen3-VL-Embedding repo for the evaluation framework.

Files

24 files · 5.22 GBWeights 4.43 GB (safetensors). Sizes and sha256 from the signed manifest.
Show all 24 files with their sha256
FileSizesha256
.gitattributes1.57 KB34448b82c17d60fec9b65b1f093c115ddbaadc04beb1b0140b6bfed2e012a930
LICENSE11.3 KB50cbab8a892c5f2993b8c7351a99182507472def3b1374558308605d99b86b32
README.md6.33 KBd666d57cb56dad5b956dac1e855db571f1f17fca00fc8b27b2a7e91769f2e397
chat_template.jinja7.75 KB273d8e0e683b885071fb17e08d71e5f2a5ddfb5309756181681de4f5a1822d80
config.json2.91 KBed1c1723241f23f7f4e23430759cbd7dcfb4103cbdfe052bfe7626b57c2615b4
configuration.json51 B2d4464e2ead06bc9bc718c781309ad1e7baded626d66e8dcdc8b469ba185faf0
examples/transformers_example.py3.03 KB551fe3ed4b4bd902c9ef161c6992febf293003c865abb994ffc51a087c9dc94b
examples/vllm_example.py6.57 KB57202c9435da5a53d9ef97995c54f8e846a10e36bd67aa46cd8fe12de355c0b1
merges.txt3.35 MBa9d356d7bdf1ef4949e3e748e95b8e10ad9d4e2e838eddc38a0a7b6b94d1db8d
model-00001-of-00005.safetensors1.02 GB394ca7f5bca79eb0124a11f1b91a26db78b04125f06db78409c5c2021cd8a6d5
model-00002-of-00005.safetensors983 MBf6165c6c6b10daf748e84164ad15231d5bdbec9b0e0ad887c187d2c43d9898f8
model-00003-of-00005.safetensors1,000 MB298a88bfc7d961b2d04dbc1086ddbad4e366bda76f014018595df5b6a20845c3
model-00004-of-00005.safetensors999 MB80ad5bf1ef5b78c84de25d3fc9d8c9bae433aed5161b0dee39e4e9f996a76927
model-00005-of-00005.safetensors428 MBf4aa27f387538103e122448e844ed9b032e991a3714ee38a8904fc4a38d02a92
model.safetensors.index.json52.1 KBab4be761a5f62bde35da1915cb2f5a649930466a3cb21fc8c35731a33d0ad7a0
preprocessor_config.json390 B27225450ac9c6529872ee1924fcb0962ff5634834f817040f444118116f4e516
processor_config.json1.19 KBd89ef49ce9cd37fbf510158e13c1ef063d9286411c1ec9049932dbe0487143b1
sparse_info.json5.75 MB06c68e9ad75119512bb31088d0c41ff82cc9c1e5942f53310859945a078367a4
sparse_weights.pt754 MBbb55b3e2068b6551c76211e05e32802400002d22cb580e24410a2d819eb69da1
src/models/qwen35_embedding.py14.7 KB3a0442de3aca2f85914a8ac322707859a51b37eda1a83663305a672d79770844
tokenizer.json20.0 MB88c9e5503a3d642304938a43cd07c3cd2e3e3bd75493dea4037ef39b85686c3b
tokenizer_config.json15.2 KB583e681d43f45562e0d71059b9daeb408bae48799935b40140bc8a1ed80972d0
video_preprocessor_config.json385 B7768af27c1fafa9cc9011c1dc20067e03f8915e03b63504550e11d5066986d13
vocab.json6.72 MBce99b4cb2983d118806ce0a8b777a35b093e2000a503ebde25853284c9dfa003
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
d02beb2d8b pinned now manifest updated, same commit2026-11-14 21:07 UTC24 files · 5.22 GB
d02beb2d8b2026-11-14 21:07 UTC24 files · 5.22 GB

Use it

$ fw get Alibaba-NLP/UEmbed-2B
# manifest sha256 1cf6e73149a4… · 5.22 GB · 24 files
$ fw verify ./UEmbed-2B Alibaba-NLP/UEmbed-2B
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/Alibaba-NLP/UEmbed-2B.json --dir ./UEmbed-2B $ python3 fw.py verify ./UEmbed-2B ./Alibaba-NLP__UEmbed-2B.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download Alibaba-NLP/UEmbed-2B --revision d02beb2d8b975f8140ebb035bd0e1dbf8afe98c4 --local-dir ./UEmbed-2B
transformersLoad the weights in Python.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from transformers import AutoModel, AutoTokenizer tok = AutoTokenizer.from_pretrained("Alibaba-NLP/UEmbed-2B", revision="d02beb2d8b975f8140ebb035bd0e1dbf8afe98c4") model = AutoModel.from_pretrained("Alibaba-NLP/UEmbed-2B", revision="d02beb2d8b975f8140ebb035bd0e1dbf8afe98c4", device_map="auto")

License

Name
Creative Commons Attribution 4.0
Id
CC-BY-4.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-14
Text in
LICENSE
Text sha256
50cbab8a892c5f2993b8c7351a99182507472def3b1374558308605d99b86b32
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: Alibaba-NLP <huggingface.co/Alibaba-NLP>Newsgroups: alt.freeweights.embedSubject: UEmbed-2BDate: 2026-11-14Commit: d02beb2Signed: 2DC28CC7B26A283B ✓
Upstream
Alibaba-NLP/UEmbed-2B
Pinned commit
d02beb2d8b975f8140ebb035bd0e1dbf8afe98c4
Manifest
UEmbed-2B.json · .minisig
Manifest sha256
1cf6e73149a4cd18fe3ff097485e7b0a38923daba25ac2f0ac761424ca0860e3
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-14 21:07 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/Alibaba-NLP/UEmbed-2B.json $ curl -O https://freeweights.allternit.com/manifests/Alibaba-NLP/UEmbed-2B.json.minisig $ minisign -Vm UEmbed-2B.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

No related models in this catalog.Nothing here lists this model as its parent, and it names no parent.
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download Alibaba-NLP/UEmbed-2B
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. UEmbed-2B.json. Provenance. Takedown history: none.
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: all-MiniLM-L6-v1
From: unsloth <huggingface.co/unsloth>Subject: all-MiniLM-L6-v2
From: mlx-community <huggingface.co/mlx-community>Subject: all-MiniLM-L6-v2-4bit
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: all-mpnet-base-v1
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: allenai-specter
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: bert-base-nli-max-tokens