Text Retrieval
Transformers
Safetensors
bidirectional_pplx_qwen3
image-feature-extraction
sentence-embeddings
contextual-embeddings
custom_code
Instructions to use seslami-pplx/pplx-embed-context-v1.2-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use seslami-pplx/pplx-embed-context-v1.2-4B with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("seslami-pplx/pplx-embed-context-v1.2-4B", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Fix transformers <5.9 compatibility: create_causal_mask kwargs
#1
by maximilian-schall-ppx - opened
modeling.py built the bidirectional mask with a hardcoded create_causal_mask(inputs_embeds=...) call and no cache_position. That matches transformers 5.9+ but breaks on earlier 5.x, where the kwarg is input_embeds and cache_position is required. Detect the accepted kwargs once at import time and build the call accordingly (same approach as pplx-embed-v1-0.6b), so it works on all of 5.0–5.12. PPLXQwen3ContextualModel / encode() are unchanged.
Validated by loading the model across transformers 5.0.0, 5.8.1, 5.9.0 and 5.12.0 — it loads, runs a forward pass, and produces identical output on all of them. Scope: transformers 5.x.
seslami-pplx changed pull request status to merged