pplx-embed-v2-context-9b-preview
pplx-embed-v2-context-9b-preview is a contextual embedding model for document chunks in RAG systems. A document is passed as a list of chunks; the chunks are encoded together, so each chunk's embedding reflects its surrounding context, and one embedding is returned per chunk.
[!NOTE]
This is a preview release, not a final model. Weights, embeddings, and the interface may change in later versions without backward compatibility, so embeddings produced with this preview should not be mixed with embeddings from a future release.
[!IMPORTANT]
Queries and documents are encoded with different methods: use encode_queries for queries and encode for document chunks. The model is trained with separate query and document prefixes, and encoding queries with encode silently degrades retrieval quality.
[!IMPORTANT]
Like pplx-embed-context-v1, the model natively produces unnormalized int8-quantized embeddings. Compare embeddings with cosine similarity, or pass normalize_embeddings=True and use the dot product.
Model
Usage
Requires transformers>=5.4.0, torch, numpy, safetensors, and tqdm. The model uses custom code, so load it with trust_remote_code=True.
Options
encode(documents, ...) and encode_queries(queries, ...) accept:
Matryoshka dimensions
The model was trained with Matryoshka losses at 1024 and 2048 dimensions. To use 1024-dimensional embeddings, take the first 1024 values of each unnormalized embedding and normalize afterwards:
Other truncation sizes were not trained.
Citation