Model details
Table with columns: Property, Value| Property | Value |
|---|
| Base model | Qwen/Qwen3-Embedding-4B |
| Base revision | 5cf2132abc99cad020ac570b19d031efec650f2b |
| Released checkpoint | checkpoint-2000 |
| Adapter | LoRA r=16, alpha=32, dropout=0.05 |
| Target modules | q/k/v/o attention projections |
| Precision | bfloat16 |
| Training hardware | Single NVIDIA A40, 48 GB VRAM |
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.T
Apply 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.