Skip to content
Dashboard

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. Your use is subject to Perplexity's Terms & Privacy Policies.

import { embed } from 'ai';
const result = await embed({
model: 'perplexity/pplx-embed-v1-4b',
value: 'Sunny day at the beach',
})
Read docs

Frequently Asked Questions

  • What embedding dimensions does Embed v1 4b produce?

    2560 by default. Matryoshka representation learning lets you request shorter vectors through the dimensions parameter, 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-4b model 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 embed function for one value or embedMany for a batch, with the model identifier perplexity/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.