Downloads ยท 30 days
23
19% of all-time downloads
smartcat/T5-GenQ-TDE-v1
T5-GenQ-TDE-v1 is a text generation model from smartcat. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
๐ค โจ ๐ Generate precise, realistic user-focused search queries from product text ๐ ๐ ๐
Downloads ยท 30 days
23
19% of all-time downloads
All-time downloads
122
Public
Parameters
223M
898 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors892 MB ยท 99%
From the Hugging Face model README
๐ค โจ ๐ Generate precise, realistic user-focused search queries from product text ๐ ๐ ๐
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.
Note: This evaluation is done after training, based on the test split of the smartcat/Amazon-2023-GenQ.
Show your Mountaineers pride with this West Virginia long sleeve shirt. Its soft cotton material and unique graphics make this a great addition to any West Virginia apparel collection. Features: -100% cotton -Ribbed and double stitched collar and sleeves -Officially licensed West Virginia University long sleeve shirt</td> <td>West Virginia long sleeve shirt</td> <td>wvu long sleeve shirt</td> <td>West Virginia long sleeve shirt</td> </tr> <tr> <td><strong>The Body Shop Mattifying Lotion (Vegan), Tea Tree, 1.69 Fl Oz</strong>
Product Description Made with community trade tea tree oil, The Body Shop's Tea Tree Mattifying Lotion provides lightweight hydration, helps tackles excess oil and visibly reduces the appearance of blemishes, revealing a clearer looking, mattifed finish. 100 percent vegan, suitable for blemish prone skin. From the Manufacturer Made with Community Trade tea tree oil, The Body Shop's Tea Tree Mattifying Lotion provides lightweight hydration, helps tackles excess oil and visibly reduces the appearance of blemishes, revealing a clearer-looking, mattifed finish. 100% vegan, suitable for blemish-prone skin. Paraben-free. Gluten-free. 100% Vegan.</td> <td>Tea Tree Mattifying Lotion</td> <td>what is body shop tea tree lotion</td> <td>vegan matte lotion</td> </tr>
</tbody> </table> </details>Use the code below to get started with the model.
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
model = AutoModelForSeq2SeqLM.from_pretrained("smartcat/T5-GenQ-TDE-v1")
tokenizer = AutoTokenizer.from_pretrained("smartcat/T5-GenQ-TDE-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)
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. ๐
A6000 GPU:
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.
<table border="1"> <thead> <tr> <th>Epoch</th> <th>Step</th> <th>Loss</th> <th>Grad Norm</th> <th>Learning Rate</th> <th>Eval Loss</th> <th>ROUGE-1</th> <th>ROUGE-2</th> <th>ROUGE-L</th> <th>ROUGE-Lsum</th> </tr> </thead> <tbody> <tr> <td>1.0</td> <td>8569</td> <td>0.7955</td> <td>2.9784</td> <td>4.9e-05</td> <td>0.6501</td> <td>75.3001</td> <td>55.0195</td> <td>74.6632</td> <td>74.6678</td> </tr> <tr> <td>2.0</td> <td>17138</td> <td>0.6595</td> <td>3.2943</td> <td>4.2e-05</td> <td>0.6293</td> <td>76.2210</td> <td>56.2050</td> <td>75.5728</td> <td>75.5670</td> </tr> <tr> <td>3.0</td> <td>25707</td> <td>0.5982</td> <td>4.0392</td> <td>3.5e-05</td> <td>0.6207</td> <td>76.5493</td> <td>56.7006</td> <td>75.8775</td> <td>75.8796</td> </tr> <tr> <td>4.0</td> <td>34276</td> <td>0.5552</td> <td>2.8237</td> <td>2.8e-05</td> <td>0.6267</td> <td>76.5433</td> <td>56.7025</td> <td>75.8319</td> <td>75.8343</td> </tr> <tr> <td>5.0</td> <td>42845</td> <td>0.5225</td> <td>2.7701</td> <td>2.1e-05</td> <td>0.6303</td> <td>76.7192</td> <td>56.9090</td> <td>75.9884</td> <td>75.9972</td> </tr> <tr> <td>6.0</td> <td>51414</td> <td>0.4974</td> <td>3.1344</td> <td>1.4e-05</td> <td>0.6316</td> <td>76.8851</td> <td>57.1349</td> <td>76.1420</td> <td>76.1484</td> </tr> <tr> <td>7.0</td> <td>59983</td> <td>0.4798</td> <td>3.5027</td> <td>7e-06</td> <td>0.6355</td> <td>76.8884</td> <td>57.1055</td> <td>76.1433</td> <td>76.1501</td> </tr> <tr> <td>8.0</td> <td>68552</td> <td>0.4674</td> <td>4.5172</td> <td>0.0</td> <td>0.6408</td> <td>76.9075</td> <td>57.0980</td> <td>76.1464</td> <td>76.1502</td> </tr> </tbody> </table> <style> .model-analysis table { width: 100%; border-collapse: collapse; } .model-analysis td { padding: 10px; vertical-align: middle; } .model-analysis img { width: auto; /* Maintain aspect ratio */ display: block; margin: 0 auto; max-height: 750px; /* Default height for most images */ } </style> <div class="model-analysis">checkpoint-68552 (T5-GenQ-TDE-v1) outperforms query-gen-msmarco-t5-base-v1 across all ROUGE metrics.
The most significant difference is in ROUGE-2, where checkpoint-68552 scores 54.32% vs. 17.40% for the baseline model.</td></tr>
</table>
checkpoint-68552 (T5-GenQ-TDE-v1) peaks near 100%, showing strong text overlap.
query-gen-msmarco-t5-base-v1 has a wider distribution, with peaks in the low to mid-score range (10-40%), indicating greater variability but lower precision.
ROUGE-2 has a high density at 0% for the baseline model, meaning many outputs lack bigram overlap.</td></tr> </table>
</details> <details><summary>Histogram comparison </summary> <table style="width:100%"><tr> <td style="width:65%"><img src="histogram_comparison.png" alt="image"></td> <td>checkpoint-68552 (T5-GenQ-TDE-v1, blue) trends toward higher ROUGE scores, with a peak at 100%.
query-gen-msmarco-t5-base-v1 (orange) has more low-score peaks, especially in ROUGE-2, reinforcing its lower precision.
These histograms confirm checkpoint-68552 consistently generates more accurate text.</td></tr>
</table>
Score spike at 2 words: Indicates better alignment for short phrases, followed by stability.
Score differences remain near zero for most sizes, meaning consistent model performance across phrase lengths.</td></tr> </table>
</details> <details><summary>Semantic similarity distribution </summary> <table style="width:100%"><tr> <td style="width:65%"><img src="semantic_similarity_distribution.png" alt="image"></td> <td> This histogram visualizes the distribution of cosine similarity scores, which measure the semantic similarity between paired texts (generated query and target query).A strong peak near 1.0 suggests most pairs are highly semantically similar.
Low similarity scores (0.0โ0.4) are rare, meaning the dataset contains mostly closely related text pairs.</td></tr> </table>
</details> <details><summary>Semantic similarity score against ROUGE scores </summary> <table style="width:100%"><tr> <td style="width:65%"><img src="similarity_vs_rouge.png" alt="image"></td> <td>Higher similarity โ Higher ROUGE scores, indicating strong correlation.ROUGE-1 & ROUGE-L show the strongest alignment, while ROUGE-2 has more variation.
Some low-similarity outliers still achieve moderate ROUGE scores, suggesting surface-level overlap without deep semantic alignment.
</td></tr> </table> </details> </div>For questions, please open an issue on the GitHub Repository