Downloads · 30 days
118
25% of all-time downloads
ironbcc/Qwen3-Embedding-4B-NVFP4A16
Qwen3-Embedding-4B-NVFP4A16 is a feature extraction model from ironbcc. Use it when you need embeddings to search or compare text. It is set up for transformers. The card lists the license as apache-2.0.
Qwen/Qwen3-Embedding-4B quantized to NVIDIA NVFP4 weights with BF16 activations (W4A16). This checkpoint is packaged for the compressed-tensors loader and was runtime-verified with the vLLM pooling runner on NVIDIA Bl…
Downloads · 30 days
118
25% of all-time downloads
All-time downloads
473
Public
Parameters
4B
2.8 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors2.8 GB · 99%
How the weights are stored.
U83.6B · 90%
From the Hugging Face model README
Qwen/Qwen3-Embedding-4B
quantized to NVIDIA NVFP4 weights with BF16 activations (W4A16). This checkpoint is
packaged for the compressed-tensors loader and was runtime-verified with the vLLM
pooling runner on NVIDIA Blackwell.
| Property | Value |
|---|---|
| Base model | Qwen/Qwen3-Embedding-4B |
| Quantization | NVFP4A16: 4-bit NVFP4 weights, BF16 activations |
| Checkpoint size | 2,820,762,536-byte model.safetensors (2.7 GiB directory) |
| Architecture | Qwen3ForCausalLM, 36 layers, hidden size 2560 |
| Native embedding width | 2560 |
| Verified output width | 768, unit-normalized |
| MRL widths in config | 128, 256, 512, 768, 1024, 1536, 2048, 2560 |
| Verified serving stack | vLLM 0.26.0, RTX PRO 6000 Blackwell |
The emitted recipe uses NVFP4A16 for Linear layers and excludes lm_head:
QuantizationModifier:
targets: [Linear]
ignore: [lm_head]
scheme: NVFP4A16
The serialized compressed-tensors configuration records 4-bit float weights,
group_size=16, symmetric tensor-group quantization, and FP8 E4M3 scales. Input and
output activation quantizers are null, so activations remain BF16.
The included one-shot log reports a data-free quantization pipeline. Exact historical command-line and input-byte provenance were not pinned, and the artifact predates the later English calibration-file preparation. Accordingly, this checkpoint is not described as English-calibrated.
Official MTEB 2.18.13 evaluators, five complete English test tasks (ArguAna, ArXivHierarchicalClusteringP2P, Banking77Classification.v2, BIOSSES, CQADupstackGamingRetrieval) — a targeted subset, not the full MTEB English v2 suite. Evaluated against the BF16 original and the W4A4 sibling, at every Matryoshka width used in production, same protocol for all three.
TL;DR: ~2.7GB weights (vs ~8GB BF16, ~3x smaller) at ~99% of BF16 MTEB score, consistent from 768 to 2048 dims. The W4A4 sibling trades a bit more quality (~97-98%) for faster FP4 activations.
Average score across the 5 tasks:
| Dim | BF16 (baseline) | W4A16 (this model) | W4A4 |
|---|---|---|---|
| 768 | 0.7329 | 0.7241 (98.8%) | 0.7131 (97.3%) |
| 1024 | 0.7335 | 0.7258 (99.0%) | 0.7169 (97.7%) |
| 1536 | 0.7340 | 0.7266 (99.0%) | 0.7157 (97.5%) |
| 2048 | 0.7351 | 0.7274 (99.0%) | 0.7203 (98.0%) |
| Task | Dim | BF16 | W4A16 | W4A4 |
|---|---|---|---|---|
| ArguAna | 768 | 0.7333 | 0.7114 | 0.6904 |
| ArguAna | 1024 | 0.7390 | 0.7159 | 0.6974 |
| ArguAna | 1536 | 0.7377 | 0.7150 | 0.6960 |
| ArguAna | 2048 | 0.7355 | 0.7158 | 0.6962 |
| ArXivHierarchicalClusteringP2P | 768 | 0.5936 | 0.5904 | 0.5897 |
| ArXivHierarchicalClusteringP2P | 1024 | 0.5871 | 0.5846 | 0.5866 |
| ArXivHierarchicalClusteringP2P | 1536 | 0.5851 | 0.5895 | 0.5802 |
| ArXivHierarchicalClusteringP2P | 2048 | 0.5897 | 0.5871 | 0.5913 |
| Banking77Classification.v2 | 768 | 0.8435 | 0.8404 | 0.8323 |
| Banking77Classification.v2 | 1024 | 0.8442 | 0.8408 | 0.8314 |
| Banking77Classification.v2 | 1536 | 0.8457 | 0.8410 | 0.8337 |
| Banking77Classification.v2 | 2048 | 0.8473 | 0.8418 | 0.8348 |
| BIOSSES | 768 | 0.8258 | 0.8278 | 0.8169 |
| BIOSSES | 1024 | 0.8252 | 0.8289 | 0.8232 |
| BIOSSES | 1536 | 0.8248 | 0.8248 | 0.8194 |
| BIOSSES | 2048 | 0.8262 | 0.8300 | 0.8282 |
| CQADupstackGamingRetrieval | 768 | 0.6681 | 0.6503 | 0.6360 |
| CQADupstackGamingRetrieval | 1024 | 0.6722 | 0.6588 | 0.6458 |
| CQADupstackGamingRetrieval | 1536 | 0.6767 | 0.6626 | 0.6491 |
| CQADupstackGamingRetrieval | 2048 | 0.6767 | 0.6621 | 0.6509 |
Retrieval tasks (ArguAna, CQADupstackGamingRetrieval) show the largest quantization gap (~2-3% relative); clustering and classification are within noise of BF16 at every width. Raw embedding cosine similarity vs BF16 (separate 100-text check, not a task score): mean ~0.95-0.96 across dims.
test splits, dataset revisions pinned in the
uploaded manifests.Raw scores:
benchmarks/mteb_dims_comparison/all_scores.json.
vllm serve ironbcc/Qwen3-Embedding-4B-NVFP4A16 \
--served-model-name qwen3-embedding-4b \
--runner pooling --convert embed \
--pooler-config '{"dimensions": 768}' \
--max-model-len 8192
The tested server returned finite, unit-normalized 768-dimensional vectors and accepted long inputs with explicit endpoint-side truncation.
Queries should carry the base model's retrieval instruction; documents should remain bare:
Instruct: Given a web search query, retrieve relevant passages that answer the query
Query: {your query}
OpenAI-compatible example:
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8000/v1", api_key="unused")
query = (
"Instruct: Given a web search query, retrieve relevant passages that answer the query\n"
"Query: What is NVFP4?"
)
response = client.embeddings.create(
model="qwen3-embedding-4b",
input=[query],
extra_body={"truncate_prompt_tokens": 8192, "truncation_side": "right"},
)
embedding = response.data[0].embedding
FLASHINFER_DISABLE_VERSION_CHECK=1 because its FlashInfer Python/cubin package
versions did not match.config.json SHA-256:
0d66a32f634ab1196ff724f536a6f4af1a6c81108470d82eaf05445fb2c3be84model.safetensors SHA-256:
2ea69117761426f841907430ec03c8aa979fd12ca6c2bebfb805436554350ce4recipe.yaml SHA-256:
051768d850068590f7ac0c0d10441378f8c759e9db444bd228b0fb1ee8c5dcb0recipe.yaml and oneshot_2026-08-05_03-26-07.log are included as emitted build
artifacts. The exact historical build invocation remains unpinned.