CompendiumLabs' BGE-Large Hits 800K Monthly Downloads as a 199 MB Local Embedding Model
A GGUF-packaged version of BAAI's top-ranked BGE embedding model lets you run local retrieval through llama.cpp with 30% CPU speedups.
Takeaways
- GGUF repack of BAAI/bge-large-en-v1.5 hits 808k downloads on Hugging Face.
- Four quantizations from F32 (1.3 GB) down to Q4_K_M (199 MB) available.
- Runs in llama.cpp with an OpenAI-compatible embeddings endpoint via
llama serve --embeddings. - Up to 30% CPU speedup from quantization with minimal accuracy loss per the author.
- Produces 1024-dim vectors, scores 64.23 on MTEB, 512 token input limit.
- English only, BERT-based, MIT licensed, works with Ollama, LM Studio, LangChain.
CompendiumLabs’ GGUF conversion of BAAI’s bge-large-en-v1.5 has passed 800,000 downloads on Hugging Face’s rolling monthly counter. The package puts a 335-million-parameter English embedding model into files that llama.cpp can load directly, with the smallest at about 199 MB. Developers can serve local, OpenAI-compatible embedding requests without adding PyTorch, Transformers, or a hosted API.
Why this encoder has lasted
BAAI’s original BGE model is a BERT-style encoder fine-tuned for retrieval, semantic similarity, and clustering. It maps each input to a 1024-dimensional dense vector. Similar texts produce nearby vectors, allowing a vector database to retrieve passages by meaning instead of exact keywords.
The model card reports an average score of 64.23 across the then-current MTEB suite, including 54.29 for retrieval. Those figures provide a historical baseline, while current leaderboards include stronger models for some tasks. BGE remains competitive for English retrieval, has a manageable parameter count, and carries an MIT license.
Four files, four deployment budgets
GGUF stores model weights and metadata in a format supported by the native inference kernels in llama.cpp. The conversion preserves the model’s 1024-dimensional output and 512-token context limit while offering four precision levels:
| Variant | Approximate size | Trade-off |
|---|---|---|
F32 |
1.3 GB | Full precision and the largest memory footprint |
F16 |
639 MB | Half precision with limited output drift |
Q8_0 |
342 MB | Smaller weights with modest quantization error |
Q4_K_M |
199 MB | Smallest download and the greatest potential ranking drift |
The converter reports CPU speed gains of up to 30% from quantization, with smaller gains on GPUs. Actual throughput depends on processor instructions, batch size, compiler flags, and input length. A useful evaluation compares each quantized build with F16 using recall at a fixed k, latency, and vectors processed per second on the target hardware.
A 199 MB artifact fits desktop and edge storage budgets, including some Raspberry Pi deployments. Resident memory will exceed the file size because the runtime also allocates context, batch, and compute buffers. ARM instruction support and memory bandwidth will determine whether latency suits an interactive application.
Serve it from one native binary
With a recent llama.cpp build, llama-server can download the Q4 file from Hugging Face, apply CLS pooling, normalize the vectors, and expose an embedding endpoint:
llama-server \
-hf CompendiumLabs/bge-large-en-v1.5-gguf:Q4_K_M \
--embedding \
--pooling cls \
--embd-normalize 2 \
--host 127.0.0.1 \
--port 8080
The server exposes /v1/embeddings using the request and response shape expected by many OpenAI clients. A direct request looks like this:
curl http://127.0.0.1:8080/v1/embeddings \
-H "Content-Type: application/json" \
-d '{
"model": "bge-large-en-v1.5",
"input": [
"Represent this sentence for searching relevant passages: refund policy"
]
}'
Binding the process to 127.0.0.1 limits access to the local machine. Remote deployments should place the server behind an authenticated TLS proxy.
The OpenAI-compatible route simplifies client migration, but the vector schema still changes. BGE returns 1024 values, while text-embedding-ada-002 returns 1536, and each model defines a different embedding space. Existing collections require a 1024-dimensional field and a complete re-embedding of stored documents.
Direct Python bindings
The llama-cpp-python binding loads the same GGUF file without running a separate server:
from llama_cpp import Llama
model = Llama(
model_path="path/to/bge-large-en-v1.5-q4_k_m.gguf",
embedding=True,
verbose=False,
)
query_vectors = model.embed(
[
"Represent this sentence for searching relevant passages: "
"refund policy"
],
normalize=True,
)
document_vectors = model.embed(
["Customers may request a refund within 30 days."],
normalize=True,
)
Recent Ollama releases can pull the model with ollama pull hf.co/CompendiumLabs/bge-large-en-v1.5-gguf:Q4_K_M and serve it through /api/embed. LangChain’s community package provides the LlamaCppEmbeddings adapter for applications already using its retriever interfaces.
Retrieval quality depends on three details
BGE’s retrieval recipe affects results as much as the runtime choice. Applications should keep the same preprocessing, precision variant, and normalization policy for indexed documents and live queries.
- Prefix retrieval queries. Add
Represent this sentence for searching relevant passages:to the query side. Store passage text without the prefix. Symmetric tasks such as sentence similarity generally use plain text on both sides. - Normalize consistently. Unit-normalized vectors work with cosine similarity or dot product. The server command above enables L2 normalization through
--embd-normalize 2. - Chunk by tokenizer length. The 512-token limit includes special tokens. Long documents need tokenizer-aware chunks, and overlap should be tuned against retrieval tests rather than character counts alone.
The practical deployment envelope
| Constraint | Practical effect | Response |
|---|---|---|
| English-focused training | Cross-language retrieval quality is limited | Evaluate BGE-M3 or multilingual-e5 for multilingual corpora |
| 512-token input limit | Long pages and documents require chunking | Measure retrieval quality across chunk sizes and overlap settings |
| Fixed 1024 dimensions | Vector indexes need a matching schema | Create a new collection and re-embed the full corpus |
| Quantized weights | Nearest-neighbor ordering can shift slightly | Compare recall against F16 on representative queries |
| Older benchmark generation | Newer models may perform better on specialized tasks | Test current candidates from Nomic, Jina, Alibaba, and Snowflake |
English semantic search is the model’s clearest fit, especially in these deployments:
- Local retrieval-augmented generation where documents must remain on the host
- Desktop and on-device search built with
llama.cpp, Ollama, LM Studio, or Jan - CPU-based corpus embedding where a native runtime reduces deployment complexity
- OpenAI-client prototypes that can accommodate a new vector schema and full re-indexing
Reading the 800,000-download signal
Hugging Face’s counter measures file downloads over a rolling 30-day window. Automated pulls, fresh containers, and uncached requests can all contribute, so the figure does not map one-to-one to users or production installations.
Sustained download volume still shows substantial demand for a compact, established encoder that runs through the same native toolchain many local AI applications already use. Teams may need separate server processes for chat and embedding models, but they can share one inference stack, hardware backend, deployment format, and operational model.