Skip to main content
Back

Compendium Labs' BGE Base En v1.5 GGUF Build Hits 800,000 Downloads

A quantized GGUF build of BAAI's popular BGE embedding model lets you run high-quality text embeddings locally through llama.cpp at a fraction of the original size.

Pro

  • GGUF conversion of BAAI/bge-base-en-v1.5 now sits at 800K+ downloads on Hugging Face.
  • Four quantizations available: F32 (417 MB), F16 (209 MB), Q8_0 (113 MB), Q4_K_M (66 MB).
  • Up to 30% CPU speedup over Transformers with minimal accuracy loss from quantization.
  • Runs natively in llama.cpp, Ollama, LM Studio, Jan, and Docker Model Runner.
  • Scores 63.55 average on MTEB across 56 datasets at only 109M parameters.
  • Ideal for local RAG where generator and embedder share one llama.cpp process.

At the snapshot used for this article, Hugging Face had recorded more than 800,000 downloads for Compendium Labs’ GGUF build, including roughly 500,000 during the latest month. The repository packages BAAI’s widely used English embedding model in four precision variants that run through llama.cpp, Ollama, LM Studio, and Docker Model Runner without a PyTorch or Transformers dependency at deployment time.

Why the conversion is spreading

An embedding model converts text into fixed-length numeric vectors that applications compare during semantic search, clustering, and retrieval-augmented generation. BAAI’s upstream model is a 109-million-parameter BERT-style encoder that derives each 768-dimensional embedding from the final layer’s [CLS] token.

  • Maximum input: 512 tokens
  • Embedding size: 768 dimensions
  • Upstream checkpoint: about 0.44 GB
  • Primary language: English
  • Architecture: bidirectional encoder with [CLS] pooling

BAAI recommends v1.5 over the original release because its similarity scores are less compressed at the high end, which makes retrieval thresholds easier to interpret. The model retains the same general calling pattern and performs well across classification, clustering, semantic similarity, and retrieval benchmarks.

GGUF stores model tensors and metadata in a single binary designed for efficient loading by llama.cpp-based runtimes. The conversion gives local applications one model format and one runtime family for generation and embeddings, reducing package size and removing the Python environment from distributed desktop or edge applications.

Four files, four precision budgets

The repository publishes four variants that trade numeric precision for download size, memory use, and CPU throughput.

Variant Size Practical use
F32 417 MB Full-precision reference and evaluation baseline
F16 209 MB Compact default with high numeric precision
Q8_0 113 MB Smaller CPU deployment with limited quantization
Q4_K_M 66 MB Minimum model footprint for bundled local applications

The repository author reports CPU speed gains of up to 30% from quantization. Actual throughput depends on hardware, batch size, runtime version, and input length. File size also understates peak memory because the runtime allocates working buffers during inference.

Serving embeddings without PyTorch

Recent llama.cpp builds can download the Q4_K_M file from Hugging Face and expose an OpenAI-compatible embeddings endpoint:

llama-server \
  -hf CompendiumLabs/bge-base-en-v1.5-gguf:Q4_K_M \
  --embedding \
  --pooling cls
curl http://localhost:8080/v1/embeddings \
  -H "Content-Type: application/json" \
  -d '{
    "model": "bge-base-en-v1.5",
    "input": "Represent this sentence for searching relevant passages: refund policy"
  }'

Ollama can pull the same quantized file and serve it through its native embedding API:

ollama pull hf.co/CompendiumLabs/bge-base-en-v1.5-gguf:Q4_K_M

curl http://localhost:11434/api/embed \
  -H "Content-Type: application/json" \
  -d '{
    "model": "hf.co/CompendiumLabs/bge-base-en-v1.5-gguf:Q4_K_M",
    "input": "Represent this sentence for searching relevant passages: refund policy"
  }'

The llama-cpp-python binding provides a small in-process API for applications that still use Python:

from llama_cpp import Llama

model = Llama(
    model_path="bge-base-en-v1.5-q4_k_m.gguf",
    embedding=True,
    verbose=False,
)

texts = [
    "Represent this sentence for searching relevant passages: refund policy"
]
vectors = model.embed(texts, normalize=True)

The binding accepts individual strings or lists and handles batching internally. LangChain applications can use langchain_community.embeddings.LlamaCppEmbeddings around the same local file.

Small integration choices shape retrieval

Retrieval accuracy depends on reproducing the upstream model’s pooling, normalization, and prompt conventions. Four details affect results:

  • Prefix retrieval queries: prepend Represent this sentence for searching relevant passages: when matching short queries against longer passages.
  • Leave documents unprefixed: the official instruction belongs on the query side of asymmetric retrieval.
  • Use CLS pooling and normalization: extract the final [CLS] representation and L2-normalize the resulting vector. Unit vectors produce equivalent rankings with cosine similarity and dot product.
  • Chunk before 512 tokens: longer documents require segmentation because content beyond the context limit is truncated.

Vector stores must use a 768-dimensional schema. Existing indexes built with another embedding model require regeneration because vector dimensions and embedding spaces are model-specific.

Upstream scores set the baseline

The upstream model card reports the following MTEB scores on a 0-to-100 scale, with an overall average calculated across 56 datasets:

MTEB category Score
Overall average 63.55
Classification 75.53
Retrieval 53.25
Semantic textual similarity 82.40
Pair classification 86.55

Each quantized file can shift nearest-neighbor rankings around close decision boundaries. These published scores provide an upstream baseline, so production teams should evaluate the selected GGUF variant on representative queries, documents, and relevance labels.

The 512-token limit constrains long-document retrieval, and the English training focus makes multilingual results less predictable. Multilingual or longer-context deployments can consider BGE-M3 or another embedding family designed for those inputs.

A smaller local RAG stack

Local retrieval-augmented generation is the clearest deployment target. A llama.cpp-based application can run its generator and embedder through the same runtime and model format, usually as separate model instances or processes. Vectors can live in LanceDB, a dedicated vector database, or SQLite with an appropriate vector extension.

The 66 MB Q4_K_M model file is compact enough to bundle with a desktop application, although the tokenizer, runtime, index, and generated data increase the final package size. Applications built around LM Studio, Ollama, or Docker Model Runner can consume the GGUF file without maintaining a separate Transformers service.

For teams already operating Transformers or ONNX services, GGUF offers packaging and runtime consolidation. Retrieval quality still comes from the same BGE architecture, preprocessing rules, and corpus-specific evaluation.

The upstream model card lists an MIT license. Redistributors should preserve applicable notices and review the converted repository’s metadata before shipping the GGUF files in a product.