CoolFace
Modelpublic

ZakariaAlMoktar/presto-qwen3-embedding-4b-arabic-ecommerce

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes
Model Card

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

PropertyValue
Base modelQwen/Qwen3-Embedding-4B
Base revision5cf2132abc99cad020ac570b19d031efec650f2b
Released checkpointcheckpoint-2000
AdapterLoRA r=16, alpha=32, dropout=0.05
Target modulesq/k/v/o attention projections
Precisionbfloat16
Training hardwareSingle NVIDIA A40, 48 GB VRAM

Usage

python
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.