Feature Extraction
Transformers
ONNX
Safetensors
multilingual
bidirectional_pplx_qwen3
sentence-similarity
conteb
contextual-embeddings
custom_code
text-embeddings-inference
Instructions to use perplexity-ai/pplx-embed-context-v1-4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use perplexity-ai/pplx-embed-context-v1-4b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="perplexity-ai/pplx-embed-context-v1-4b", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("perplexity-ai/pplx-embed-context-v1-4b", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
7cadae0
1
Parent(s): 05343bd
fix: update config for TEI
Browse files- README.md +1 -1
- config.json +2 -1
README.md
CHANGED
|
@@ -71,7 +71,7 @@ curl -X POST https://api.perplexity.ai/v1/contextualizedembeddings \
|
|
| 71 |
from transformers import AutoModel
|
| 72 |
|
| 73 |
model_ctx = AutoModel.from_pretrained(
|
| 74 |
-
"perplexity-ai/pplx-embed-1-context-
|
| 75 |
trust_remote_code=True
|
| 76 |
)
|
| 77 |
|
|
|
|
| 71 |
from transformers import AutoModel
|
| 72 |
|
| 73 |
model_ctx = AutoModel.from_pretrained(
|
| 74 |
+
"perplexity-ai/pplx-embed-1-context-4B",
|
| 75 |
trust_remote_code=True
|
| 76 |
)
|
| 77 |
|
config.json
CHANGED
|
@@ -72,5 +72,6 @@
|
|
| 72 |
"use_cache": false,
|
| 73 |
"use_sliding_window": false,
|
| 74 |
"attn_implementation": "sdpa",
|
| 75 |
-
"vocab_size": 151936
|
|
|
|
| 76 |
}
|
|
|
|
| 72 |
"use_cache": false,
|
| 73 |
"use_sliding_window": false,
|
| 74 |
"attn_implementation": "sdpa",
|
| 75 |
+
"vocab_size": 151936,
|
| 76 |
+
"use_bidirectional_attention": true
|
| 77 |
}
|