LiYuan / amazon-query-product-ranking

huggingface.co
Total runs: 34
24-hour runs: 0
7-day runs: 8
30-day runs: 24
Model's Last Updated: April 28 2022
text-classification

Introduction of amazon-query-product-ranking

Model Details of amazon-query-product-ranking

distilbert-base-uncased-finetuned-mnli-amazon-query-shopping

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:

  • Loss: 0.8244
  • Accuracy: 0.6617
Model description

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.

Intended uses & limitations

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.

How to use

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")
Training and evaluation data

Download all the raw dataset from the Amazon KDD Cup website.

  1. Concatenate the all product attributes from the product dataset
  2. Join it with a training query dataset
  3. Stratified Split the merged data into 571,223-row training, 142,806-row validation, 79,337-row test set
  4. Train on the full training set
Training procedure
Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 2e-05
  • train_batch_size: 16
  • eval_batch_size: 16
  • seed: 42
  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • lr_scheduler_type: linear
  • num_epochs: 2
Training results
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
Framework versions
  • Transformers 4.18.0
  • Pytorch 1.11.0+cu113
  • Datasets 2.1.0
  • Tokenizers 0.12.1

Runs of LiYuan amazon-query-product-ranking on huggingface.co

34
Total runs
0
24-hour runs
5
3-day runs
8
7-day runs
24
30-day runs

More Information About amazon-query-product-ranking huggingface.co Model

More amazon-query-product-ranking license Visit here:

https://choosealicense.com/licenses/apache-2.0

amazon-query-product-ranking huggingface.co

amazon-query-product-ranking huggingface.co is an AI model on huggingface.co that provides amazon-query-product-ranking's model effect (), which can be used instantly with this LiYuan amazon-query-product-ranking model. huggingface.co supports a free trial of the amazon-query-product-ranking model, and also provides paid use of the amazon-query-product-ranking. Support call amazon-query-product-ranking model through api, including Node.js, Python, http.

amazon-query-product-ranking huggingface.co Url

https://huggingface.co/LiYuan/amazon-query-product-ranking

LiYuan amazon-query-product-ranking online free

amazon-query-product-ranking huggingface.co is an online trial and call api platform, which integrates amazon-query-product-ranking's modeling effects, including api services, and provides a free online trial of amazon-query-product-ranking, you can try amazon-query-product-ranking online for free by clicking the link below.

LiYuan amazon-query-product-ranking online free url in huggingface.co:

https://huggingface.co/LiYuan/amazon-query-product-ranking

amazon-query-product-ranking install

amazon-query-product-ranking is an open source model from GitHub that offers a free installation service, and any user can find amazon-query-product-ranking on GitHub to install. At the same time, huggingface.co provides the effect of amazon-query-product-ranking install, users can directly use amazon-query-product-ranking installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

amazon-query-product-ranking install url in huggingface.co:

https://huggingface.co/LiYuan/amazon-query-product-ranking

Url of amazon-query-product-ranking

amazon-query-product-ranking huggingface.co Url

Provider of amazon-query-product-ranking huggingface.co

LiYuan
ORGANIZATIONS

Other API from LiYuan