retail-embeddinggemma-2-tw

Homepage PIC LinkedIn PIC
Homepage UNI-PIPC LinkedIn UNI-PIPC
Chat Hugging Face GitHub
License Base Model

Note: Preliminary results. The scores below are from the development split; the held-out test split has not yet been scored.

retail-embeddinggemma-2-tw is a text embedding model fine-tuned from google/embeddinggemma-2 for Traditional Chinese (Taiwan) retail product search. It matches short shopper queries (for example, 洗衣精, Mizuno 慢跑鞋, and 客廳 邊桌 小空間) against product titles.

Model Details

Developed by President Information Corp. (統一資訊, PIC) and Uni-President Information Philippines Corp. (UNI-PIPC)
Model type Text embedding model (Sentence Transformers)
Base model google/embeddinggemma-2
Adaptation method Full fine-tuning (all weights trainable)
Parameters 271M
Embedding dimension 768
Max sequence length 192 tokens (training)
Domain Taiwan retail and e-commerce product search
Languages Traditional Chinese (zh-TW)
License Apache 2.0

Key Features

  • 🛒 Retail Search Adaptation: Trained mainly on real shopper search queries whose candidate products were graded by an LLM judge, supplemented with LLM-generated queries.
  • 🏷️ Keyword-Tag Support: Accepts bare queries as well as query + keyword tags inputs, as produced by some search stacks. Training included noisy and incorrect tags so that a wrong tag does not override the query.
  • 🎯 Hard-Negative Training: Trained with judge-graded hard negatives, with near-duplicate products and overly broad titles filtered out to avoid false negatives.
  • 🇹🇼 Taiwan Query Style: Covers short brand and product-type keywords, typographical errors, mixed Chinese–English queries, and descriptive or scenario queries.

Training Data

The training data is a proprietary Taiwan retail (zh-TW) dataset and is not publicly available. Queries come from two sources:

  1. Real shopper search queries. Candidate products were retrieved by several retrievers, and an LLM judge graded each (query, product title) pair as 0, 1, or 2. Grade-2 products serve as positives and grade-0 products as hard negatives. Grade-1 products are never used as negatives. Near-identical products (color or size variants) and broad titles that match many queries are filtered out.
  2. LLM-generated queries grounded in real products and written in the style of real traffic, with a smaller share of descriptive and scenario queries.

About 70% of training queries carry keyword tags and 30% are bare queries; a fraction of the tags are deliberately noisy. Held-out evaluation queries were excluded from training.

Training Procedure

Objective Contrastive learning (CachedMultipleNegativesRankingLoss) with in-batch negatives and 3 mined hard negatives per example
Batch size 128 (effective)
Batch sampler NO_DUPLICATES
Optimizer Learning rate 2e-5, 10% warm-up, linear decay
Precision bf16
Epochs 3
Max sequence length 192 tokens
Training hardware 1× NVIDIA H100

Evaluation

Evaluation Setup

The fine-tuned model is compared against its base model, google/embeddinggemma-2, and a BM25 baseline (character bigrams). Evaluation uses real shopper search queries that were never used in training (split by query group), restricted to the 1,023 queries with at least one relevant product in the judged pool. Retrieval is performed over one proprietary retail product catalog, with product titles as documents.

Relevance is graded by an LLM judge (DeepSeek-V4-Flash) as 0, 1, or 2. Every product returned by any compared system is graded, so no system is penalized for retrieving a product that was not graded. Metrics are nDCG@10 against all graded products of each query and strict P@1 (the top-ranked product has grade 2); higher is better. Confidence intervals are 95% paired bootstrap intervals (5,000 resamples over queries), and gains are computed from unrounded scores.

🟢 improvement · 🔴 degradation · ⚪ no change (in the gain figures, 🟢 indicates that the 95% confidence interval excludes zero)

Retrieval Quality (Development Split)

Bare Query

BM25Base modelFine-tuned modelBM25BaseTunedΔ PP nDCG@1069.0%72.3%83.4%+11.2% P@171.0%74.5%83.9%+9.4%

Query + Keyword Tags

BM25 is not evaluated with keyword tags.

Base modelFine-tuned modelBaseTunedΔ PP nDCG@1063.2%83.1%+19.9% P@162.3%83.3%+21.0%

nDCG@10 Gain over the Base Model

Gain in nDCG@10 over base model95% CI (paired bootstrap)Gain95% CI 0 5 10 15 20 25 PP Bare query+11.2%[9.8, 12.5] Query + tags+19.9%[18.2, 21.7]

Training-Overlap Analysis

The gain over the base model is reported by whether the relevant products of each query appeared in this model's training data (evaluation queries themselves were never used):

  • Clean: no grade-2 product of the query was a training positive.
  • Leaked: at least one grade-2 product of the query was a training positive.
  • Never seen: no product of the query, positive or negative, appeared in training (a subset of Clean).
Gain in nDCG@10 over base model95% CI (paired bootstrap)nDCG@10Gain95% CI 0 5 10 15 20 25 PP All queries (n = 1,023)83.4%+11.2%[9.8, 12.5] Clean (n = 317)81.2%+12.1%[9.9, 14.4] Leaked (n = 706)84.4%+10.7%[9.2, 12.2] Never seen (n = 182)78.6%+13.9%[11.0, 17.1]

Usage

Input Format

The model was trained with the base model's own retrieval prompts, which must be passed at inference. Documents are product titles only.

Sentence Transformers

from sentence_transformers import SentenceTransformer

model = SentenceTransformer("UNI-PIC/retail-embeddinggemma-2-tw")

Q = "task: search result | query: "      # the base model's own retrieval prompts
D = "title: none | text: "

queries = ["洗衣精", "透明貼紙 文具", "客廳 邊桌 小空間"]
docs = ["Hampton 漢汀堡 迪亞小圓桌 寶石藍", "狐吉機場 透明割型貼紙", "白蘭 洗衣精 補充包 1.6kg"]

q = model.encode(queries, prompt=Q, normalize_embeddings=True)
d = model.encode(docs, prompt=D, normalize_embeddings=True)
print(q @ d.T)

Queries with Keyword Tags

If a search stack expands a query into keyword tags, the model was also trained on the input query + " " + ",".join(tags), for example 寶可夢 寶可夢,神奇寶貝,周邊. Bare queries remain fully supported.

Intended Use and Limitations

  • Intended use: Dense retrieval and candidate generation for zh-TW retail product search, alone or combined with lexical search.
  • Judge-based evaluation: Relevance labels come from an LLM judge rather than human annotators or click data. Absolute scores should be read as comparisons between systems under this setup, not as production accuracy.
  • Single catalog: Training and evaluation used one proprietary catalog and its search logs; behavior on substantially different catalogs has not been tested.
  • Tag dependence: Results are reported with and without keyword tags. If your tagger differs from the one used here, evaluate both input formats.
  • Language scope: Taiwan Traditional Chinese only; other languages have not been evaluated.
  • Use policy: Per the base model card, deployments must adhere to the Gemma Prohibited Use Policy.

License and Attribution

This model is released under the Apache License 2.0 (see LICENSE). It is a fine-tuned derivative of google/embeddinggemma-2 by Google DeepMind, which is also licensed under Apache 2.0; all model weights were modified by fine-tuning.

Citation

@misc{retailembeddinggemma2tw,
  title     = {retail-embeddinggemma-2-tw},
  author    = {President Information Corp. (PIC) and Uni-President Information Philippines Corp. (UNI-PIPC)},
  year      = {2026},
  publisher = {Hugging Face},
  url       = {https://huggingface.co/UNI-PIC/retail-embeddinggemma-2-tw}
}

Contact

Downloads last month
5
Safetensors
Model size
0.3B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for UNI-PIC/retail-embeddinggemma-2-tw

Finetuned
(128)
this model

Collection including UNI-PIC/retail-embeddinggemma-2-tw