inference/research
verifiedhigh · 0.95updated 2026-10-04

BGE Small English v1.5

dense 0.0334B

Fields

id
models/bge-small-en-v1-5
Family
bge
Vendor
BAAI
Release year
2023
Architecture
dense
Params (B)
0.0334
Active params (B)
0.0334
Hidden size
384
Layers
12
Max context
512
Context scaling method
native
Activation
gelu
Attention variant
bidirectional encoder (BERT), full attention, no causal mask
KV cache (bytes/token)
0
FLOPs per active token
66,800,000
Open weights
yes
License
MIT
embedding dims
384
notes
kv_cache_bytes_per_token = 0, and this is NOT a missing value. This is a bidirectional BERT encoder: it runs a single forward pass over the whole input, every token attends to every token including the future, and it produces one embedding vector. Nothing is cached between timesteps because there are no timesteps to iterate. The KV formula num_layers*num_kv_heads*head_dim*2*bytes_per_element is undefined here and must not be applied. Instead the real capacity constraint is hidden_size = 384, which fixes the output vector dimension (384 floats = 1.5 KB per document) and therefore the vector-store memory: 1M documents is 1.5 GB of fp32 vectors or 0.38 GB at int8. flops_per_token_active is quoted as 2 * 0.0334e9 = 6.68e7 but read it as FLOPs per INPUT token over a bidirectional pass, not per generated token. The practical hardware profile is the opposite of a decoder: 12 layers x 384 hidden is small enough that a 512-token query fits in L2 cache and embedding is effectively compute-bound at batch 1 — no memory-bandwidth wall, no autoregressive latency chain, so a CPU is often faster than a GPU for interactive single-query search. vocab 30522, intermediate 1536, 512 max_position_embeddings. MIT license. 62.8M downloads — the most-downloaded embedding model on the Hub. GGUF ports (unsloth, ggml-org Q8_0) and ONNX ports (onnx-community, Qdrant int8) both exist; Qdrant ships its own onnx-Q build for server-side use. SERVICEABILITY JOIN (added 2026-10-03; the architecture x engine matrix this record was missing, with a citation per cell in docs/13-model-compatibility.md): FAMILY=bi-encoder. REQUIRED KERNEL CLASS: a single full-sequence bidirectional forward pass with a pooling reduction. No KV cache, no incremental state, no autoregressive weight streaming - flop/embedding-batch-encoding gives AI = B*t flop/byte (weights read once for all B documents), so on H100 SXM at ridge 295.4 a single 128-token encode at B=1 is memory-bound but at B=3 it is compute-bound, and the threshold is the PRODUCT B*t. flop/cross-encoder-reranking makes the same point for the scoring phase. This inverts the hardware-selection rule: an embedding/rerank tier wants FLOPS and core count, not HBM bandwidth. SUPPORTED BY (cited): vLLM pooling is a separate runner with its own endpoint surface and the broadest architecture table in the repo - BertModel, BgeM3EmbeddingModel, GteModel, JteNewModel (mGTE-TRM), JinaEmbeddingsV5Model, LlamaBidirectionalModel, LlamaModel/MistralModel (intfloat/e5-mistral-7b-instruct), ModernBertModel, NomicBertModel, Qwen2Model, Qwen3Model, RobertaModel, XLMRobertaModel, plus any generative model via automatic --convert, with the Transformers modeling backend covering encoder-only architectures directly [[vllm-pooling-models]]. TEI is the purpose-built reference and lists BERT, CamemBERT, XLM-RoBERTa, NomicBERT, JinaBERT (Alibi), MPNet, ModernBERT plus RoPE decoder backbones Mistral, Alibaba GTE, Qwen2, Qwen3 and Gemma3 [[hf-text-embeddings-inference]]. SGLang's embedding page states native encoder architectures are auto-detected while decoder-style embedders need --is-embedding, and that on CUDA it automatically uses breakable CUDA graph for the full encoder prefill and DISABLES radix-cache and chunked-prefill [[mdl2-sglang-embedding-rerank-models]]. sentence-transformers covers everything transformers can load [[sentence-transformers]]. llama.cpp reaches BERT-family encoders via the LLM_ARCH_BERT / MODERN_BERT / NOMIC_BERT / JINA_BERT_V2 / JINA_BERT_V3 entries [[pap-arch-llamacpp-arch-registry]]. CORRECTNESS CAVEATS THAT ARE ARCHITECTURE-SPECIFIC AND CITED: vLLM's pooling path is a capability not a speed win - the project's own docs say 'We currently support pooling models primarily for convenience. This is not guaranteed to provide any performance improvements over using Hugging Face Transformers or Sentence Transformers directly' [[vllm-pooling-models]]. Several of the architectures above need --trust-remote-code or --hf-overrides, so 'supported' sometimes means 'supported after three flags' [[vllm-pooling-models]]. bge-m3 ships extra sparse AND ColBERT weights with a separate docs path, and jina-embeddings-v3 is limited to text-matching with LoRA merged rather than selected [[vllm-pooling-models]]. TEI's --dtype accepts only float16 and float32 - no int8 or fp8 at runtime, so quantization must happen at export [[hf-text-embeddings-inference]]. llama.cpp's embedding path cannot serve SPLADE/learned-sparse encoders, cannot serve ColBERT end to end, and cannot serve multimodal encoders requiring a projector graph [[llama-cpp-embedding-server]]. For the Qwen2-decoder-as-bi-encoder pattern specifically, both gte-Qwen2 and Qwen2 family models are the documented --trust-remote-code case in vLLM [[vllm-pooling-models]].
task
embedding

Notes

kv_cache_bytes_per_token = 0, and this is NOT a missing value. This is a bidirectional BERT encoder: it runs a single forward pass over the whole input, every token attends to every token including the future, and it produces one embedding vector. Nothing is cached between timesteps because there are no timesteps to iterate. The KV formula num_layers*num_kv_heads*head_dim*2*bytes_per_element is undefined here and must not be applied. Instead the real capacity constraint is hidden_size = 384, which fixes the output vector dimension (384 floats = 1.5 KB per document) and therefore the vector-store memory: 1M documents is 1.5 GB of fp32 vectors or 0.38 GB at int8. flops_per_token_active is quoted as 2 * 0.0334e9 = 6.68e7 but read it as FLOPs per INPUT token over a bidirectional pass, not per generated token. The practical hardware profile is the opposite of a decoder: 12 layers x 384 hidden is small enough that a 512-token query fits in L2 cache and embedding is effectively compute-bound at batch 1 — no memory-bandwidth wall, no autoregressive latency chain, so a CPU is often faster than a GPU for interactive single-query search. vocab 30522, intermediate 1536, 512 max_position_embeddings. MIT license. 62.8M downloads — the most-downloaded embedding model on the Hub. GGUF ports (unsloth, ggml-org Q8_0) and ONNX ports (onnx-community, Qdrant int8) both exist; Qdrant ships its own onnx-Q build for server-side use.

SERVICEABILITY JOIN (added 2026-10-03; the architecture x engine matrix this record was missing, with a citation per cell in docs/13-model-compatibility.md): FAMILY=bi-encoder. REQUIRED KERNEL CLASS: a single full-sequence bidirectional forward pass with a pooling reduction. No KV cache, no incremental state, no autoregressive weight streaming - flop/embedding-batch-encoding gives AI = B*t flop/byte (weights read once for all B documents), so on H100 SXM at ridge 295.4 a single 128-token encode at B=1 is memory-bound but at B=3 it is compute-bound, and the threshold is the PRODUCT B*t. flop/cross-encoder-reranking makes the same point for the scoring phase. This inverts the hardware-selection rule: an embedding/rerank tier wants FLOPS and core count, not HBM bandwidth. SUPPORTED BY (cited): vLLM pooling is a separate runner with its own endpoint surface and the broadest architecture table in the repo - BertModel, BgeM3EmbeddingModel, GteModel, JteNewModel (mGTE-TRM), JinaEmbeddingsV5Model, LlamaBidirectionalModel, LlamaModel/MistralModel (intfloat/e5-mistral-7b-instruct), ModernBertModel, NomicBertModel, Qwen2Model, Qwen3Model, RobertaModel, XLMRobertaModel, plus any generative model via automatic --convert, with the Transformers modeling backend covering encoder-only architectures directly [[vllm-pooling-models]]. TEI is the purpose-built reference and lists BERT, CamemBERT, XLM-RoBERTa, NomicBERT, JinaBERT (Alibi), MPNet, ModernBERT plus RoPE decoder backbones Mistral, Alibaba GTE, Qwen2, Qwen3 and Gemma3 [[hf-text-embeddings-inference]]. SGLang's embedding page states native encoder architectures are auto-detected while decoder-style embedders need --is-embedding, and that on CUDA it automatically uses breakable CUDA graph for the full encoder prefill and DISABLES radix-cache and chunked-prefill [[mdl2-sglang-embedding-rerank-models]]. sentence-transformers covers everything transformers can load [[sentence-transformers]]. llama.cpp reaches BERT-family encoders via the LLM_ARCH_BERT / MODERN_BERT / NOMIC_BERT / JINA_BERT_V2 / JINA_BERT_V3 entries [[pap-arch-llamacpp-arch-registry]]. CORRECTNESS CAVEATS THAT ARE ARCHITECTURE-SPECIFIC AND CITED: vLLM's pooling path is a capability not a speed win - the project's own docs say 'We currently support pooling models primarily for convenience. This is not guaranteed to provide any performance improvements over using Hugging Face Transformers or Sentence Transformers directly' [[vllm-pooling-models]]. Several of the architectures above need --trust-remote-code or --hf-overrides, so 'supported' sometimes means 'supported after three flags' [[vllm-pooling-models]]. bge-m3 ships extra sparse AND ColBERT weights with a separate docs path, and jina-embeddings-v3 is limited to text-matching with LoRA merged rather than selected [[vllm-pooling-models]]. TEI's --dtype accepts only float16 and float32 - no int8 or fp8 at runtime, so quantization must happen at export [[hf-text-embeddings-inference]]. llama.cpp's embedding path cannot serve SPLADE/learned-sparse encoders, cannot serve ColBERT end to end, and cannot serve multimodal encoders requiring a projector graph [[llama-cpp-embedding-server]]. For the Qwen2-decoder-as-bi-encoder pattern specifically, both gte-Qwen2 and Qwen2 family models are the documented --trust-remote-code case in vLLM [[vllm-pooling-models]].

Cross-references

This record references no other records — it is a leaf. It is cited by 0.