Feature Extraction
sentence-transformers
ONNX
Safetensors
multilingual
bidirectional_pplx_qwen3
sentence-similarity
mteb
custom_code
text-embeddings-inference
Instructions to use perplexity-ai/pplx-embed-v1-4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use perplexity-ai/pplx-embed-v1-4b with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("perplexity-ai/pplx-embed-v1-4b", trust_remote_code=True) sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
Embedding Code snippets
#10
by noobmldude - opened
How would this perform for embedding code snippets or chunks containing code like Python,C etc ?
Hey noobmldude ! The training data is ~1% code, so it'll handle hybrid content (code + natural language, docstrings, etc.) but it's not optimized for pure code retrieval. If your use case is mostly code-to-code search, a code-specific model will likely do better. Worth benchmarking on your data to see.