all-mpnet-base-v2
by sentence-transformers
The most downloaded sentence embedding model on Hugging Face, and the 384-token limit nobody reads
sentence-transformers/all-mpnet-base-v2Deploy all-mpnet-base-v2
Single-tenantMixpeek has no managed extractor for this model. On a single-tenant deployment you upload the weights and a custom plugin serves them next to the rest of your pipeline.
Overview
all-mpnet-base-v2 is the default text embedding model for a large share of the retrieval systems in production today: 23.7 million downloads a month, which is more than any other sentence-similarity model on Hugging Face. It maps a sentence or a short paragraph to a 768-dimensional vector, mean-pooled over the token embeddings and L2-normalized, so cosine similarity is the comparison.
The thing worth knowing before you build on it is the sequence limit. Its sentence-transformers configuration sets max_seq_length to 384 tokens even though the underlying MPNet positional table goes to 512. Text past 384 tokens is truncated silently, with no warning and no error, so a pipeline that chunks at 512 or at 1000 characters is indexing the opening of each chunk and discarding the rest. Chunk to 384 tokens or fewer and the model behaves as documented.
It is English-only. A multilingual corpus embedded with it returns plausible-looking neighbours for non-English text and measurably worse recall, which is the failure that does not announce itself.
Architecture
MPNet base encoder, 12 layers, 768-dimensional hidden state, 109,486,978 parameters, 30,527-token vocabulary. Mean pooling over token embeddings (pooling_mode_mean_tokens), then L2 normalization, giving a 768-dimensional unit vector. config.json sets max_position_embeddings to 514; sentence_bert_config.json sets max_seq_length to 384, and the second number is the one that applies when you call it through sentence-transformers.
Mixpeek SDK Integration
// No Mixpeek extractor parameter takes a Hugging Face model id, so this model
// runs on your side and the vectors are upserted. On Enterprise the other path
// is uploading the weights through POST /v1/namespaces/{id}/models so a custom
// plugin loads them and the extraction runs on Mixpeek.
//
// Chunk to 384 tokens or fewer before encoding. Past that the model truncates
// and reports nothing.
const res = await fetch(
"https://api.mixpeek.com/v1/namespaces/ns_your_namespace/documents/upsert",
{
method: "POST",
headers: {
Authorization: "Bearer API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
collection_id: "col_your_collection",
documents: [
{
document_id: "transcript-00412-chunk-03",
// 768 floats. The vector name has to match a vector index declared on
// the collection, at 768 dimensions with cosine distance.
vectors: { "text-embedding": yourVector },
payload: { source_key: "archive/2026/ep-412.vtt", start_ms: 184000 },
},
],
}),
},
);Capabilities
- 768-dimensional dense embeddings for sentences and short passages
- Symmetric encoding: queries and passages go through the same forward pass with no instruction prefix
- Runs on CPU at useful speed, which is why it is so widely deployed
- ONNX and OpenVINO weights published alongside PyTorch
Use Cases on Mixpeek
Performance
No latency or throughput figures here, because we have not benchmarked this model on our own hardware. Published comparative retrieval scores are on the MTEB leaderboard.
Common Pipeline Companions
Frequently Asked Questions
How many dimensions does all-mpnet-base-v2 output?
768, mean-pooled over the token embeddings and L2-normalized. Declare the vector index at 768 dimensions with cosine distance; a normalized vector makes dot product and cosine equivalent, so either metric works if your store offers both.
What is the real maximum input length?
384 tokens. config.json sets max_position_embeddings to 514, which is what people quote, but the sentence-transformers configuration shipped in the repo sets max_seq_length to 384 and that is what truncates. Anything past 384 tokens is dropped without a warning, so chunk below it.
Is all-mpnet-base-v2 still a reasonable choice in 2026?
For English text with short chunks and a CPU budget, yes, and its download volume reflects that. Newer models beat it on multilingual coverage, on context length and on instruction-tuned asymmetric retrieval. Compare on your own queries rather than on a leaderboard average: the gap between models is smaller than the gap between a tuned and an untuned chunking strategy.
Does Mixpeek run this model for me?
Not on the managed tier. No Mixpeek extractor loads these weights, so you either encode on your side and upsert the vectors, or upload the weights on a single-tenant Enterprise deployment and have a custom plugin run them. The managed default for text is intfloat/multilingual-e5-large-instruct.
Specification
Research Paper
MPNet: Masked and Permuted Pre-training for Language Understanding
arxiv.orgBuild a pipeline with all-mpnet-base-v2
Add this model to a processing pipeline alongside other extractors. Combine with retrieval stages for end-to-end search.
Run it on your own data, free