--- license: apache-2.0 library_name: transformers tags: - sentence-embeddings - contextual-embeddings - text-retrieval --- # pplx-embed-context-v1.2-4B (private preview) A continued fine-tune of [`perplexity-ai/pplx-embed-context-v1-4B`](https://huggingface.co/perplexity-ai/pplx-embed-context-v1-4B). Same architecture and loading code — drop-in replacement. Targets three failure modes observed on adversarial paraphrase-resolution probes: paraphrase-resolution, lexical-distractor pull, and glossary co-retrieval. ## Usage
Using Transformers ```python from transformers import AutoModel model_ctx = AutoModel.from_pretrained( "seslami-pplx/pplx-embed-context-v1.2-4B", trust_remote_code=True ) doc_chunks = [ [ "Curiosity begins in childhood with endless questions about the world.", "As we grow, curiosity drives us to explore new ideas.", "Scientific breakthroughs often start with a curious question." ], [ "The curiosity rover explores Mars searching for ancient life.", "Each discovery on Mars sparks new questions about the universe." ] ] # Returns list of numpy arrays (one per document) # embeddings[0].shape = (3, 2560), embeddings[1].shape = (2, 2560) embeddings = model_ctx.encode(doc_chunks) ```