Model Card for T5-GenQ-TDC-v1
🤖 ✨ 🔍 Generate precise, realistic user-focused search queries from product text 🛒 🚀 📊
Model Description
- Model Name: Fine-Tuned Query-Generation Model
- Model type: Text-to-Text Transformer
- Finetuned from model: BeIR/query-gen-msmarco-t5-base-v1
- Dataset: smartcat/Amazon-2023-GenQ
- Primary Use Case: Generating accurate and relevant search queries from item descriptions
- Repository: smartcat-labs/product2query
Model variations
Uses
This model is designed to improve e-commerce search functionality by generating user-friendly search queries based on product descriptions. It is particularly suited for applications where product descriptions are the primary input, and the goal is to create concise, descriptive queries that align with user search intent.
Examples of Use:
Comparison of ROUGE scores:
Note: This evaluation is done after training, based on the test split of the smartcat/Amazon-2023-GenQ.
Examples
This youth T-shirt is an officially licensed AC/DC product and features our cool Back In Black design printed on 100% cotton. AC/DC Back In Black T-Shirt what is ac dc back in black AC/DC Back in Black T-Shirt AISYBB Women's Sweet Japanese Strawberry Embroidered Knit Cardigan Top Korean Retro Elegant Cute Kawaii Coat
BrandName: AISYBBSleeveStyle: RegularMaterialComposition: AcrylicPatternType: SolidSleeveLength(cm): FullStyle: SweetSeason: Spring/AutumnThickness: STANDARDDecoration: ButtonClothingLength: RegularMaterial: AcrylicClosureType: SingleBreastedGender: WOMENCollar: V-NeckPattern: Loose-fittingAge: Ages16-28YearsOldPercentageofMaterial: 31%-50%YarnThickness: RegularyarnColor: Red,PinkSize: M,L,XLFabricName: AcrylicPopularElements: Patchwork,ContrastColor,ButtonAge-appropriate: 18-29SweaterCraft: FlatKnittingFeature1: LeisureFeature2: ChicFeature3: ElegantFeature4: Fashion AISYBB Women's Strawberry Cardigan aisybb cardigans Japanese Strawberry Cardigan Flying Fisherman Square Wrap Polarized Protection Oval Sand Bank Matte Black Amber, One Size
As stunning as the crystal blue water over a shallow, The Flying Fisherman sand bank polarized sunglasses will have you seeing clearer with increased visual perception. This light weight wrap style has a sturdy build ready for whatever comes your way. Medium fit features non-slip temples and built in Rubberized nose pads adding to solid performance and comfort for all day wear. Polarized Triacetate lenses are impact and scratch resistant, lightweight and durable. Acutint lens coloring system adds color contrast without distorting natural colors, allowing you to see more clearly. 100% protection from harmful UVA and UVB rays. Polarized sunglasses for fishing what is polarized sand bank Flying Fisherman polarized sunglasses
How to Get Started with the Model
Use the code below to get started with the model.
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
model = AutoModelForSeq2SeqLM.from_pretrained("smartcat/T5-GenQ-TDC-v1")
tokenizer = AutoTokenizer.from_pretrained("smartcat/T5-GenQ-TDC-v1")
description = "Silver-colored cuff with embossed braid pattern. Made of brass, flexible to fit wrist."
inputs = tokenizer(description, return_tensors="pt", padding=True, truncation=True)
generated_ids = model.generate(inputs["input_ids"], max_length=30, num_beams=4, early_stopping=True)
generated_text = tokenizer.decode(generated_ids[0], skip_special_tokens=True)
Training Details
Training Data
The model was trained on the smartcat/Amazon-2023-GenQ dataset, which consists of user-like queries generated from product descriptions. The dataset was created using Claude Haiku 3, incorporating key product attributes such as the title, description, and images to ensure relevant and realistic queries. For more information, read the Dataset Card. 😊
Preprocessing
- Trained on titles + descriptions of the products and a subset of products with titles only that had a similarity score with short queries above 85%
- Tokenized using T5’s default tokenizer with truncation to handle long text.
Training Hyperparameters
Train time: 16.79 hrs
Hardware
A6000 GPU:
- Memory Size: 48 GB
- Memory Type: GDDR6
- CUDA: 8.6
Metrics
Metrics
ROUGE, or Recall-Oriented Understudy for Gisting Evaluation, is a set of metrics used for evaluating automatic summarization and machine translation in NLP. The metrics compare an automatically produced summary or translation against a reference or a set of references (human-produced) summary or translation. ROUGE metrics range between 0 and 1, with higher scores indicating higher similarity between the automatically produced summary and the reference.
In our evaluation, ROUGE scores are scaled to resemble percentages for better interpretability. The metric used in the training was ROUGE-L.
Model Analysis
The largest performance gap is in ROUGE2, where checkpoint-41448 achieves 56.11, whereas query-gen-msmarco-t5-base-v1 scores 15.29.
ROUGE1, ROUGEL, and ROUGELSUM scores are very similar in both trends, with checkpoint-41448 consistently scoring above 72, while query-gen-msmarco-t5-base-v1 stays below 41.
T5-GenQ-TDC-v1 - Higher concentration of high ROUGE scores, especially near 100%, indicating strong text overlap with references.
query-gen-msmarco-t5-base-v1 – more spread-out distribution, with multiple peaks at 10-40%, suggesting greater variability but lower precision.
ROUGE-1 & ROUGE-L: T5-GenQ-TDC-v1 peaks at 100%, while query-gen-msmarco-t5-base-v1 has lower, broader peaks.
ROUGE-2: query-gen-msmarco-t5-base-v1 has a high density at 0%, indicating many low-overlap outputs.
T5-GenQ-TDC-v1 – higher concentration of high ROUGE scores, especially near 100%, indicating strong text overlap with references.
query-gen-msmarco-t5-base-v1 – more spread-out distribution, with peaks in the 10-40% range, suggesting greater variability but lower precision.
ROUGE-1 & ROUGE-L: T5-GenQ-TDC-v1 shows a rising trend towards higher scores, while query-gen-msmarco-t5-base-v1 has multiple peaks at lower scores.
ROUGE-2: query-gen-msmarco-t5-base-v1 has a high concentration of low-score outputs, whereas T5-GenQ-TDC-v1 generates more accurate text.
Consistently High ROUGE Scores (Sizes 2-8): ROUGE-1, ROUGE-2, ROUGE-L, and ROUGE-LSUM scores remain stable and above 60% across most word sizes.
Significant Drop at Size 9: A sharp decline in scores at size 9, followed by a spike at size 10, indicates a possible edge case in the dataset.
Stable Score Differences (Sizes 3-9):
After the initial spike at size 2, score differences stay close to zero, indicating consistent performance across phrase lengths.
The majority of similarity scores cluster near 1.0, indicating that most text pairs are highly similar.
A gradual increase in frequency is observed as similarity scores rise, with a sharp peak at 1.0.
Lower similarity scores (0.0–0.4) are rare, suggesting fewer instances of dissimilar text pairs.
Higher similarity → Higher ROUGE scores, indicating strong n-gram overlap in semantically similar texts.
ROUGE-1 & ROUGE-L show the strongest correlation, while ROUGE-2 has more variability.
Some low-similarity outliers still achieve moderate ROUGE scores, suggesting surface-level overlap without deep semantic alignment.
These plots help assess how semantic similarity aligns with n-gram overlap metrics in text evaluation.
More Information
- Please visit the GitHub Repository
Authors
- Mentor: Milutin Studen
- Engineers: Petar Surla, Andjela Radojevic
Model Card Contact
For questions, please open an issue on the GitHub Repository