Downloads · 30 days
11
0% of all-time downloads
LiYuan/amazon-query-product-ranking
amazon-query-product-ranking is a text classification model from LiYuan. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
should probably proofread and complete it, then remove this comment. --
Downloads · 30 days
11
0% of all-time downloads
All-time downloads
142K
Public
Repo size
3.5 GB
Likes
13
Public
Click a slice to open those files.
.pt2.1 GB · 61%
From the Hugging Face model README
This model is a fine-tuned version of distilbert-base-uncased on an Amazon shopping query dataset. The code for the fine-tuning process can be found here. This model is uncased: it does not make a difference between english and English. It achieves the following results on the evaluation set:
DistilBERT is a transformers model, smaller and faster than BERT, which was pretrained on the same corpus in a self-supervised fashion, using the BERT base model as a teacher. This means it was pretrained on the raw texts only, with no humans labelling them in any way (which is why it can use lots of publicly available data) with an automatic process to generate inputs and labels from those texts using the BERT base model. We replaced its head with our shopping relevance category to fine-tune it on 571,223 rows of training set while validate it on 142,806 rows of dev set. Finally, we evaluated our model performance on a held-out test set: 79,337 rows.
DistilBERT is primarily aimed at being fine-tuned on tasks that use the whole sentence (potentially masked) to make decisions, such as sequence classification, token classification, or question answering. This fine-tuned version of DistilBERT is used to predict the relevance between one query and one product description. It also can be used to rerank the relevance order of products given one query for the amazon platform or other e-commerce platforms.
The limitations are this trained model is focusing on queries and products on Amazon. If you apply this model to other domains, it may perform poorly.
You can use this model directly by downloading the trained weights and configurations like the below code snippet:
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("LiYuan/amazon-query-product-ranking")
model = AutoModelForSequenceClassification.from_pretrained("LiYuan/amazon-query-product-ranking")
Download all the raw dataset from the Amazon KDD Cup website.
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|---|---|---|---|---|
| 0.8981 | 1.0 | 35702 | 0.8662 | 0.6371 |
| 0.7837 | 2.0 | 71404 | 0.8244 | 0.6617 |