sentence-transformers · embedding

all-MiniLM-L6-v2

sentence-transformers/all-MiniLM-L6-v2

all-MiniLM-L6-v2 at Q4_K_M is exactly 20,999,104 bytes (0.02 GiB / 0.02 GB) — an effective 7.396 bits per weight, not the nominal 4.

From the file· summed from 1 file(s)From the file· KV per layer
Parameters
23M
Architecture
bert
6 layers
Context
512
native (config.json)
License
apache-2.0

Shipped quantizations

exact bytes, summed from published files
QuantSizeExact bytesEffective bpwTensorsPublisher
Q2_K0.02 GiB19,229,6326.773leliuga
Q3_K_S0.02 GiB19,229,6326.773leliuga
Q3_K_S0.02 GiB19,229,6326.773second-state
Q2_K0.02 GiB19,229,6326.773second-state
Q4_00.02 GiB19,699,6486.938leliuga
Q4_00.02 GiB19,699,6486.938101second-state
Q3_K_M0.02 GiB19,939,2647.023101leliuga
Q3_K_M0.02 GiB19,939,2647.023second-state
Q3_K_L0.02 GiB20,473,7927.211leliuga
Q3_K_L0.02 GiB20,473,7927.211second-state
Q4_K_S0.02 GiB20,694,9767.289leliuga
Q4_K_S0.02 GiB20,694,9767.289second-state
Q4_K_M0.02 GiB20,999,1047.396leliuga
Q4_K_M0.02 GiB20,999,1047.396101second-state
Q5_00.02 GiB21,026,7527.406second-state
Q5_00.02 GiB21,026,7527.406leliuga
Q5_K_S0.02 GiB21,469,1207.562leliuga
Q5_K_S0.02 GiB21,469,1207.562second-state
Q5_K_M0.02 GiB21,717,9527.649second-state
Q5_K_M0.02 GiB21,717,9527.649101leliuga
Q6_K0.02 GiB24,150,9768.506101second-state
Q6_K0.02 GiB24,150,9768.506leliuga
Q8_00.02 GiB25,008,0648.808101second-state
Q8_00.02 GiB25,008,0648.808leliuga
Q8_00.02 GiB25,282,1768.905sudomoniker
F160.04 GiB45,949,21616.184second-state
F160.04 GiB45,949,21616.184101leliuga
F320.08 GiB91,016,99232.057leliuga

No KV cache

architectural, not a gap in our data

This architecture allocates no KV cache. Encoder and embedding models process their input in one pass rather than generating token by token, so there is nothing to carry forward between steps and memory does not grow with context. Its footprint is the weights plus a working buffer, and that is the whole story.

Compare with

same modality, comparable size

Will it run on your card?

full quant x context sweep

Why other calculators give a different number

A parameters × bits ÷ 8 estimate puts Q4_K_M at roughly 0.01 GiB. The real file is 0.02 GiB, because a quantization is a mixture and some tensors are always kept at higher precision.

Architecture

from config.json
Layers
6
Attention heads
12
KV heads
12
Head dim
32
Hidden size
384
Vocab
30,522
Sliding window
none
SWA period
MLA
no
Experts
Experts per token
use_sliding_window

Questions people ask

How much VRAM does all-MiniLM-L6-v2 need?
Q4_K_M is exactly 20,999,104 bytes (0.02 GiB) in weights. Add the KV cache, which depends on your context length, plus roughly half a gigabyte of runtime overhead.
Which quantization of all-MiniLM-L6-v2 should I use?
Q4_K_M is the usual default. Pick the largest quantization that fits your card at the context you actually need — the table above gives exact sizes for every one published.