/ Модель

Характеристики

Контекст
512 токенов
Лицензия
Apache 2.0
Архитектура
distilbert · dense
Опубликована
27 апр 2022

amazon-query-product-ranking

Классификация текстаТекст → label3 профессии

Модель DistilBERT оценивает релевантность товаров поисковому запросу для сортировки результатов интернет-магазина.

10скачиваний за 30 дней13лайковвеса обновлены28 апр 2022

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

LiYuan/amazon-query-product-ranking — модель на базе DistilBERT, дообученная на данных поисковых запросов и товаров Amazon для оценки релевантности пары «запрос — описание товара». Она предназначена для классификации релевантности и переупорядочивания результатов поиска в интернет-магазинах. Модель использует архитектуру DistilBertForSequenceClassification, принимает текст и выдаёт оценку класса; контекст ограничен 512 токенами.

В README приведены результаты на тестовой выборке: accuracy 0,6617 и loss 0,8244. Модель без учёта регистра и ориентирована на англоязычные запросы и каталог Amazon. Лицензия — Apache-2.0.

Сценарии применения

  • оценка релевантности товара поисковому запросу
  • переранжирование результатов поиска в интернет-магазине
  • сортировка карточек товаров по соответствию запросу

Ограничения

Модель ориентирована на запросы и товары Amazon; в других областях её качество может быть низким. На указанной тестовой выборке accuracy составляет 0,6617.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

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 LossEpochStepValidation LossAccuracy
0.89811.0357020.86620.6371
0.78372.0714040.82440.6617

Framework versions

  • Transformers 4.18.0
  • Pytorch 1.11.0+cu113
  • Datasets 2.1.0
  • Tokenizers 0.12.1

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · text-classification

Можно запустить

Подбираем GPU…

Класс архитектуры
DistilBertForSequenceClassification
Ревизия весов
3496770

0 моделей