/ Модель

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

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

distilbert-base-uncased-finetuned-sst-2-english-int8-static-inc

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

Квантованная до INT8 модель DistilBERT от Intel для определения положительной или отрицательной тональности англоязычных текстов.

614скачиваний за 30 дней6лайковвеса обновлены27 июн 2023

Бенчмарки

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

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

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

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

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

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

Intel distilbert-base-uncased-finetuned-sst-2-english-int8-static-inc — версия DistilBERT, дообученная для классификации тональности отзывов и сжатая до INT8 статической посттренировочной квантизацией. Она определяет, является ли текст положительным или отрицательным; модель предназначена для инференса и не подходит для дальнейшего дообучения в опубликованном виде.

Модель принимает текст на английском языке и выдаёт метку тональности. Контекст — до 512 токенов. Репозиторий содержит веса PyTorch и ONNX; для загрузки описаны Optimum Intel и Intel Neural Compressor. На SST-2 точность указана как 0,9037 для PyTorch INT8 и 0,9071 для ONNX INT8, по сравнению с 0,9106 у исходной версии FP32.

Модель разработана Intel и распространяется по лицензии Apache-2.0. Она предназначена прежде всего для классификации коротких отзывов, а результаты могут отражать ограничения и смещения данных из интернет-отзывов о фильмах; модель не следует использовать для решений, существенно влияющих на жизнь людей.

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

  • определение тональности коротких отзывов о фильмах
  • автоматическая разметка англоязычных отзывов как положительных или отрицательных
  • анализ тональности текстовых комментариев
  • быстрый инференс классификатора тональности в форматах PyTorch и ONNX

Ограничения

Обучена и оценена на SST-2 с отзывами о фильмах, поэтому результаты на других жанрах и типах текста могут отличаться. В опубликованном INT8-виде модель не предназначена для дальнейшего дообучения; документация указывает точность ниже исходной FP32-версии.

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

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

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

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

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

Открыть на Hugging Face

Model Details: INT8 DistilBERT base uncased finetuned SST-2

This model is a fine-tuned DistilBERT model for the downstream task of sentiment classification, training on the SST-2 dataset and quantized to INT8 (post-training static quantization) from the original FP32 model (distilbert-base-uncased-finetuned-sst-2-english). The same model is provided in two different formats: PyTorch and ONNX.

Model DetailDescription
Model Authors - CompanyIntel
DateMarch 29, 2022 for PyTorch model & February 3, 2023 for ONNX model
Version1
TypeNLP DistilBERT (INT8) - Sentiment Classification (+/-)
Paper or Other Resourceshttps://github.com/huggingface/optimum-intel
LicenseApache 2.0
Questions or CommentsCommunity Tab and Intel Developers Discord
Intended UseDescription
Primary intended usesInference for sentiment classification (classifying whether a statement is positive or negative)
Primary intended usersAnyone
Out-of-scope usesThis model is already fine-tuned and quantized to INT8. It is not suitable for further fine-tuning in this form. To fine-tune your own model, you can start with distilbert-base-uncased-finetuned-sst-2-english. The model should not be used to intentionally create hostile or alienating environments for people.

Load the PyTorch model with Optimum Intel

from optimum.intel.neural_compressor import INCModelForSequenceClassification

model_id = "Intel/distilbert-base-uncased-finetuned-sst-2-english-int8-static"
int8_model = INCModelForSequenceClassification.from_pretrained(model_id)

Load the ONNX model with Optimum:

from optimum.onnxruntime import ORTModelForSequenceClassification

model_id = "Intel/distilbert-base-uncased-finetuned-sst-2-english-int8-static"
int8_model = ORTModelForSequenceClassification.from_pretrained(model_id)
FactorsDescription
GroupsMovie reviewers from the internet
InstrumentationText movie single-sentence reviews taken from 4 authors. More information can be found in the original paper by Pang and Lee (2005)
Environment-
Card PromptsModel deployment on alternate hardware and software can change model performance
MetricsDescription
Model performance measuresAccuracy
Decision thresholds-
Approaches to uncertainty and variability-
PyTorch INT8ONNX INT8FP32
Accuracy (eval-accuracy)0.90370.90710.9106
Model Size (MB)6589255
Training and Evaluation DataDescription
DatasetsThe dataset can be found here: datasets/sst2. There dataset has a total of 215,154 unique phrases, annotated by 3 human judges.
MotivationDataset was chosen to showcase the benefits of quantization on an NLP classification task with the Optimum Intel and Intel® Neural Compressor
PreprocessingThe calibration dataloader is the train dataloader. The default calibration sampling size 100 isn't divisible exactly by batch size 8, so the real sampling size is 104.
Quantitative AnalysesDescription
Unitary resultsThe model was only evaluated on accuracy. There is no available comparison between evaluation factors.
Intersectional resultsThere is no available comparison between the intersection of evaluated factors.
Ethical ConsiderationsDescription
DataThe data that make up the model are movie reviews from authors on the internet.
Human lifeThe model is not intended to inform decisions central to human life or flourishing. It is an aggregated set of movie reviews from the internet.
MitigationsNo additional risk mitigation strategies were considered during model development.
Risks and harmsThe data are biased toward the particular reviewers' opinions and the judges (labelers) of the data. Significant research has explored bias and fairness issues with language models (see, e.g., Sheng et al., 2021, and Bender et al., 2021). Predictions generated by the model may include disturbing and harmful stereotypes across protected classes; identity characteristics; and sensitive, social, and occupational groups. Beyond this, the extent of the risks involved by using the model remain unknown.
Use cases-
Caveats and Recommendations
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. There are no additional caveats or recommendations for this model.

BibTeX Entry and Citation Info

@misc{distilbert-base-uncased-finetuned-sst-2-english-int8-static
  author    = {Xin He, Yu Wenz},
  title     = {distilbert-base-uncased-finetuned-sst-2-english-int8-static},
  year      = {2022},
  url       = {https://huggingface.co/Intel/distilbert-base-uncased-finetuned-sst-2-english-int8-static},
}

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей