BGE-M3 is special: a single model produces
three
retrieval signals simultaneously --
dense, sparse (SPLADE-style lexical weights), and ColBERT-style multi-vector -- over
100+ languages and up to 8192 tokens. CrispEmbed exposes all three heads through one
C API; see
test_bgem3.py
for the validation harness.
Recommended:
q8_0
-- effectively lossless for all three heads (see quality below).
Quality vs FlagEmbedding (FP32 reference)
Measured on three test sentences with
FlagEmbedding
's
BGEM3FlagModel
:
Variant
Dense cos
Sparse IoU
ColBERT cos
F32
0.9999+
0.78-0.90
0.9999+
Q8_0
0.9996+
0.78-0.90
0.9991+
Q4_K
0.966
0.78-0.90
0.952
Sparse IoU is capped below 1.0 because FlagEmbedding post-filters special tokens
(
<s>
,
</s>
) from the lexical-weight map while CrispEmbed returns them raw. The
filter is trivial on the consumer side.
Quick Start
CrispEmbed (CLI)
./crispembed -m bge-m3 "Paris is the capital of France."# Server (OpenAI/Ollama/native dialects)
./crispembed-server -m bge-m3 --port 8080
CrispEmbed (Python)
from crispembed import CrispEmbed
model = CrispEmbed("bge-m3-q8_0.gguf")
# Dense
dense = model.encode("Paris is the capital of France.") # [1024]# Sparse (SPLADE-style lexical weights)
sparse = model.encode_sparse("Paris is the capital of France.") # [(vocab_id, weight), ...]# ColBERT / multi-vector (per-token)
colbert = model.encode_multivec("Paris is the capital of France.") # [n_tokens, 1024]
CrispEmbed (Rust)
use crispembed::CrispEmbed;
letmut m = CrispEmbed::new("bge-m3-q8_0.gguf", 4)?;
letdense = m.encode("Paris is the capital of France.");
letsparse = m.encode_sparse("Paris is the capital of France.");
letcolbert = m.encode_multivec("Paris is the capital of France.");
Model Details
Property
Value
Backbone
XLM-RoBERTa (extended)
Parameters
~568M
Embedding Dimension
1024
Layers
24
Attention Heads
16
Max Sequence Length
8192
Pooling
CLS
Tokenizer
SentencePiece Unigram (XLM-R, 250002 tokens)
Languages
100+
Dense head
CLS hidden state, L2-normalized
Sparse head
sparse_linear: Linear(1024, 1)
+ ReLU, per-vocab max
The converter downloads
sparse_linear.pt
/
colbert_linear.pt
from the HF hub alongside
the main XLM-R backbone and stores all metadata CrispEmbed needs for three-headed
inference.
Citation
@misc{bge-m3,
title={BGE M3-Embedding: Multi-Lingual, Multi-Functionality, Multi-Granularity Text Embeddings Through Self-Knowledge Distillation},
author={Jianlv Chen and Shitao Xiao and Peitian Zhang and Kun Luo and Defu Lian and Zheng Liu},
year={2024},
eprint={2402.03216},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
bge-m3-GGUF huggingface.co is an AI model on huggingface.co that provides bge-m3-GGUF's model effect (), which can be used instantly with this cstr bge-m3-GGUF model. huggingface.co supports a free trial of the bge-m3-GGUF model, and also provides paid use of the bge-m3-GGUF. Support call bge-m3-GGUF model through api, including Node.js, Python, http.
bge-m3-GGUF huggingface.co is an online trial and call api platform, which integrates bge-m3-GGUF's modeling effects, including api services, and provides a free online trial of bge-m3-GGUF, you can try bge-m3-GGUF online for free by clicking the link below.
cstr bge-m3-GGUF online free url in huggingface.co:
bge-m3-GGUF is an open source model from GitHub that offers a free installation service, and any user can find bge-m3-GGUF on GitHub to install. At the same time, huggingface.co provides the effect of bge-m3-GGUF install, users can directly use bge-m3-GGUF installed effect in huggingface.co for debugging and trial. It also supports api for free installation.