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

UEmbed-4B

Date: 2026-11-14Commit: 2982eabSigned: 2DC28CC7B26A283B ✓

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

4.5B params10.1GBUEmbed-4Bsafetensorspermissive
FactsParams4.5BSize10.1 GBFormatssafetensorsTaskfeature extractionLicenseCC-BY-4.0From sourcepermissive
$ fw get Alibaba-NLP/UEmbed-4B
# manifest sha256 8f3d3eb1cf61… · 10.1 GB · 28 files
$ fw verify ./UEmbed-4B Alibaba-NLP/UEmbed-4B
From sourceHosted (signed)Alibaba-NLP/UEmbed-4BLast 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
10.1 GB
Weights
9.08 GB (safetensors)
Parameters
4.5B
Formats
safetensors
Task
feature extraction
License
CC-BY-4.0 (permissive)
Files
28, 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 2982eab. 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

28 files · 10.1 GBWeights 9.08 GB (safetensors). Sizes and sha256 from the signed manifest.
Show all 28 files with their sha256
FileSizesha256
.gitattributes1.57 KB34448b82c17d60fec9b65b1f093c115ddbaadc04beb1b0140b6bfed2e012a930
LICENSE11.3 KB50cbab8a892c5f2993b8c7351a99182507472def3b1374558308605d99b86b32
README.md6.33 KB9124d57fa17e1eda3c34a4787e4e5043deb46e7854b61588e32b39ca3dab5c6b
chat_template.jinja7.76 KBa4aee8afcf2e0711942cf848899be66016f8d14a889ff9ede07bca099c28f715
config.json3.16 KBddc63e1c717afa86c865bb5e01313d89d72bb53b97ad4a8a03ba8510c0621670
configuration.json73 Bf888421726665e8a84b738eed42a64875aed79de8be7daade851ac8bf4c0cef9
examples/transformers_example.py3.03 KB551fe3ed4b4bd902c9ef161c6992febf293003c865abb994ffc51a087c9dc94b
examples/vllm_example.py6.57 KB57202c9435da5a53d9ef97995c54f8e846a10e36bd67aa46cd8fe12de355c0b1
merges.txt3.35 MBa9d356d7bdf1ef4949e3e748e95b8e10ad9d4e2e838eddc38a0a7b6b94d1db8d
model-00001-of-00009.safetensors1.27 GB7f72ee47f9714968a72603ed30dabc21b33d83fa3a6bbce40d0daccaf947a8a0
model-00002-of-00009.safetensors977 MB369293d7f4a2c40a06ee28406a9b2cfe902baee3c5d480a72c58310546a9ff2c
model-00003-of-00009.safetensors987 MB0b9bfacb94e16f7095fa8767a1bba1df0523a0361c141c4516c99c5dbef846b7
model-00004-of-00009.safetensors982 MB4cfaf520592e1f664d22117f06a057255f886279f1ebca09a0249bc77cae7f58
model-00005-of-00009.safetensors982 MB75676c3750fb6942cae38ffb7e2b93e928fc232a609e2f18c72358dd9de38f3c
model-00006-of-00009.safetensors987 MBd5a738e2e4d251fed9c4ae52e913f58b8cace0c5a7c25f1bfb6cf663c28f1fa3
model-00007-of-00009.safetensors976 MBd2ab163cf6c0a6b2e74bc1ef0b91afcc802ae28878d7e21657a80c04c6fceca5
model-00008-of-00009.safetensors987 MBedbcccd17c1de57f7903d157120a14f5e47b53b3378b4ae2365980c249f4f0dd
model-00009-of-00009.safetensors929 MBbf372a1e1f16565022a643ee0ef88ef2678bd68f0cd69ad915d1ef98b7d435cf
model.safetensors.index.json61.9 KBc9869eb64e73facaaf76029ba61eca8b364f92397821c356efb89933b8b41292
preprocessor_config.json390 B27225450ac9c6529872ee1924fcb0962ff5634834f817040f444118116f4e516
processor_config.json1.19 KBd89ef49ce9cd37fbf510158e13c1ef063d9286411c1ec9049932dbe0487143b1
sparse_info.json5.75 MB0f518b6b254fc8228bb52a729d3144d8834bfb59abf833971499c5852a03f6b8
sparse_weights.pt943 MB8d314442559be2d43594b750df64808416d2313daa6874ee6c35463380d3eb6b
src/models/qwen35_embedding.py14.7 KB3a0442de3aca2f85914a8ac322707859a51b37eda1a83663305a672d79770844
tokenizer.json20.0 MB88c9e5503a3d642304938a43cd07c3cd2e3e3bd75493dea4037ef39b85686c3b
tokenizer_config.json15.2 KB04e9928fd85f260625cfa48c491adee9f69879a03a04fed73ec853811c3acd7b
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
2982eab2f4 pinned now manifest updated, same commit2026-11-14 21:07 UTC28 files · 10.1 GB
2982eab2f42026-11-14 21:07 UTC28 files · 10.1 GB

Use it

$ fw get Alibaba-NLP/UEmbed-4B
# manifest sha256 8f3d3eb1cf61… · 10.1 GB · 28 files
$ fw verify ./UEmbed-4B Alibaba-NLP/UEmbed-4B
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-4B.json --dir ./UEmbed-4B $ python3 fw.py verify ./UEmbed-4B ./Alibaba-NLP__UEmbed-4B.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download Alibaba-NLP/UEmbed-4B --revision 2982eab2f474ce762362209a1045c882c2ed43e5 --local-dir ./UEmbed-4B
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-4B", revision="2982eab2f474ce762362209a1045c882c2ed43e5") model = AutoModel.from_pretrained("Alibaba-NLP/UEmbed-4B", revision="2982eab2f474ce762362209a1045c882c2ed43e5", 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-4BDate: 2026-11-14Commit: 2982eabSigned: 2DC28CC7B26A283B ✓
Upstream
Alibaba-NLP/UEmbed-4B
Pinned commit
2982eab2f474ce762362209a1045c882c2ed43e5
Manifest
UEmbed-4B.json · .minisig
Manifest sha256
8f3d3eb1cf61bbb437bb6529f0d0eb655f2ff08c975932b49af77bf53c01dc8e
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-4B.json $ curl -O https://freeweights.allternit.com/manifests/Alibaba-NLP/UEmbed-4B.json.minisig $ minisign -Vm UEmbed-4B.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-4B
Open in Freeweights Studio

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

Signed manifest
minisign, key 2DC28CC7B26A283B. UEmbed-4B.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