ZakariaAlMoktar/presto-qwen3-embedding-4b-arabic-ecommerce
Presto Qwen3 Embedding 4B — Arabic E-Commerce
LoRA adapter for dense Arabic and mixed-language e-commerce retrieval. The adapter is fine-tuned from Qwen/Qwen3-Embedding-4B using provider-labeled query-product pairs and a false-negative-aware multi-positive InfoNCE objective.
Model details
Usage
import torch
from sentence_transformers import SentenceTransformer
model = SentenceTransformer(
"ZakariaAlMoktar/presto-qwen3-embedding-4b-arabic-ecommerce",
device="cuda",
model_kwargs={"dtype": torch.bfloat16},
)
instruction = (
"Instruct: Given an Arabic or mixed-language e-commerce search query, "
"retrieve all catalog products that match the requested product type, "
"brand, model, variant, attributes, and constraints.\nQuery: "
)
query = model.encode([instruction + "قهوة عربية"], normalize_embeddings=True)
products = model.encode(
["قهوة عربية محمصة 500 جرام", "شاحن هاتف سريع"],
normalize_embeddings=True,
)
scores = query @ products.TApply the instruction to queries only. Encode product titles without it.
Intended use
The model is intended for candidate retrieval from short Arabic or Arabic-English product catalogs. Product availability, policy constraints, and final ranking should be handled by downstream application logic.
Training
Queries were trained with up to four relevant products and four labeled hard negatives. Known equivalent positives were masked from the contrastive denominator. The complete objective and configuration are available in the Presto Arabic Search repository.
Limitations
The adapter was developed for short e-commerce titles. Performance may differ for long documents, dialects absent from the training distribution, or catalogs with substantially different product naming conventions.
License
Apache-2.0. The adapter requires the Apache-2.0 Qwen base model.
