Embed v1 4b
Embed v1 4b is the higher-accuracy tier of Perplexity's pplx-embed-v1 text embedding family. It returns 2560-dimensional vectors quantized to INT8 natively, requires no instruction prefix, and accepts inputs up to 32K tokens.
- Input price
- Input $0.03, Per 1M tokens
import { embed } from 'ai';
const result = await embed({ model: 'perplexity/pplx-embed-v1-4b', value: 'Sunny day at the beach',})Copy link to headingProviders
Route requests across multiple providers. Copy a provider slug to set your preference. Visit the docs for more info. Using a provider means you agree to their terms, listed under Legal.
| Provider |
|---|
Copy link to headingAbout Embed v1 4b
Embed v1 4b maps queries and documents into a shared vector space so retrieval reduces to approximate nearest neighbor search. Perplexity released it on February 26, 2026 as the larger of the two standard pplx-embed-v1 models. Embed v1 4b uses bidirectional attention with mean pooling over all token representations, rather than the causal attention that decoder-derived embedding models inherit.
On MTEB(Multilingual, v2), Embed v1 4b reaches an average nDCG@10 of 69.66% at INT8 precision, matching Qwen3-Embedding-4B at 69.60% and exceeding gemini-embedding-001 at 67.71%. On ToolRet, which measures retrieval over tool and API descriptions, it scores 44.45% average nDCG@10. On Perplexity's internal PPLXQuery2Query benchmark over a 2.4 million document corpus, it reaches 73.5% Recall@10 against 67.9% for Qwen3-Embedding-4B. On PPLXQuery2Doc over a 30 million page corpus, it reaches 91.7% Recall@1000 against 88.6%.
Two design choices shape how you integrate Embed v1 4b. It produces INT8 embeddings natively rather than as a post-hoc compression step, which cuts storage 4x compared with FP32; binary output cuts it 32x, and at this parameter scale Perplexity measures the binary quality drop at under 1.6 percentage points. Embed v1 4b also requires no instruction prefix, so you embed text directly. That removes a common failure mode where the instruction used at indexing time drifts from the one used at query time and quietly degrades recall. Matryoshka representation learning lets you request shorter vectors through the dimensions parameter when storage matters more than the last point of accuracy.
Copy link to headingWhat To Consider When Choosing a Provider
- Configuration: Embed v1 4b returns unnormalized embeddings. Compare INT8 vectors with cosine similarity and binary vectors with Hamming distance. If your vector database only supports inner product, convert to float32 and L2-normalize before storing, or similarity scores will be wrong. Most managed vector databases offer cosine similarity, but confirm the setting before you index anything.
- Configuration: Pick your dimension count before you build the index. Embed v1 4b returns 2560 dimensions by default and supports shorter vectors through Matryoshka representation learning, but changing the dimension later means re-embedding the whole corpus.
- Configuration: Perplexity recommends embedding documents and queries with the same model. Mixing Embed v1 4b with
pplx-embed-v1-0.6bacross the two sides makes similarity scores unreliable. - Zero Data Retention: Zero Data Retention is offered on a per-provider and model basis. See the documentation for details.
- Authentication: AI Gateway authenticates requests using an API key or OIDC token. You do not need to manage provider credentials directly.
Copy link to headingWhen to Use Embed v1 4b
Best for
- Web-Scale First-Stage Retrieval: High recall at large depths feeds a downstream reranker
- Large RAG Corpora: Native INT8 and binary output keep vector storage within budget
- Multilingual Semantic Search: Evaluated on MTEB(Multilingual, v2) across many languages
- Tool and API Retrieval: Scores 44.45% average nDCG@10 on the ToolRet benchmark
- Prompt-Free Integration: No instruction prefix can drift between indexing and query time
Consider alternatives when
- Per-Token Cost Dominates:
pplx-embed-v1-0.6breturns 1024-dimensional vectors at a lower price - Code-Only Corpora:
voyage-code-3is purpose-built for source code retrieval - Reranking Stage Needed:
rerank-2.5reorders candidates after first-stage retrieval - Generated Text Required: This model returns vectors only, not completions
Copy link to headingConclusion
Embed v1 4b is a practical default once your index grows large enough that storage and recall both constrain the design. Native INT8 output, binary compression, and a context window of 32K tokens cover most retrieval workloads without prompt engineering. Call it through AI Gateway with the AI SDK embed and embedMany functions, or through the OpenAI-compatible REST API, and keep one integration across embedding providers.
Copy link to headingFrequently Asked Questions
What embedding dimensions does Embed v1 4b produce?
2560 by default. Matryoshka representation learning lets you request shorter vectors through the
dimensionsparameter, trading a small amount of retrieval quality for faster search and less storage.Does Embed v1 4b need an instruction prefix?
No. You embed text directly. That removes a failure mode where the instruction used at indexing time differs from the one used at query time and silently degrades recall.
Which similarity metric should I use with Embed v1 4b?
Cosine similarity for INT8 embeddings and Hamming distance for binary embeddings. Embed v1 4b returns unnormalized vectors, so inner product and L2 distance give incorrect results unless you convert to float32 and L2-normalize first.
How does Embed v1 4b compare to Qwen3-Embedding-4B?
On MTEB(Multilingual, v2), Embed v1 4b reaches 69.66% average nDCG@10 at INT8 precision against 69.60% for Qwen3-Embedding-4B. On Perplexity's PPLXQuery2Query benchmark it reaches 73.5% Recall@10 against 67.9%. The
qwen3-embedding-4bmodel is also available through AI Gateway if you want to compare on your own corpus.How much storage do INT8 and binary embeddings save?
INT8 output uses 4x less storage than FP32, and binary output uses 32x less. At this parameter scale, Perplexity measures the quality drop from binary output at under 1.6 percentage points.
What is the context window for Embed v1 4b?
32K tokens. Chunk documents longer than that before you embed them.
How does Embed v1 4b differ from the contextualized pplx-embed-context-v1 models?
Embed v1 4b embeds each input independently, which suits queries, single sentences, and standalone documents. The contextualized models embed chunks with respect to the surrounding document, which helps when a chunk's meaning depends on its neighbors.
How do I call Embed v1 4b through AI Gateway?
Use the AI SDK
embedfunction for one value orembedManyfor a batch, with the model identifierperplexity/pplx-embed-v1-4b. AI Gateway also serves embeddings through the OpenAI-compatible REST API.Can I change the embedding dimension after indexing?
Not without re-embedding. Existing vectors and new ones must share the same model and dimension count, so pick both before you build the production index.
Is Zero Data Retention available for Embed v1 4b?
Zero Data Retention is not currently available for this model. Zero Data Retention is offered on a per-provider basis. See https://vercel.com/docs/ai-gateway/capabilities/zdr for details.
Your use is subject to Perplexity's Terms & Privacy Policies.