ONNX Model Zoo

neiz/distilbert-base-uncased-finetuned-sst-2-english

By neiz · ↓ 7 · ♥ 0 · Updated 2023-05-29

What's in this repo

This page lists the files in neiz/distilbert-base-uncased-finetuned-sst-2-english, including model.onnx, model_quantized.onnx and more.

  • 3 ONNX models (.onnx files)
  • 11 files, including 4 .json, 3 .onnx, 1 .md, 1 .py, 1 .txt
  • Last updated 2023-05-29

ONNX files

File Size Download
model.onnx — Download
onnx/model.onnx — Download
onnx/model_quantized.onnx — Download

How to use

These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.

README

ONNX convert DistilBERT base uncased finetuned SST-2

Conversion of distilbert-base-uncased-finetuned-sst-2-english

This model is a fine-tune checkpoint of DistilBERT-base-uncased, fine-tuned on SST-2. This model reaches an accuracy of 91.3 on the dev set (for comparison, Bert bert-base-uncased version reaches an accuracy of 92.7).

For more details about DistilBERT, we encourage users to check out this model card.

Fine-tuning hyper-parameters

  • learning_rate = 1e-5
  • batch_size = 32
  • warmup = 600
  • max_seq_length = 128
  • num_train_epochs = 3.0

Bias

Based on a few experimentations, we observed that this model could produce biased predictions that target underrepresented populations.

For instance, for sentences like This film was filmed in COUNTRY, this binary classification model will give radically different probabilities for the positive label depending on the country (0.89 if the country is France, but 0.08 if the country is Afghanistan) when nothing in the input indicates such a strong semantic shift. In this colab, Aurélien Géron made an interesting map plotting these probabilities for each country.

Map of positive probabilities per country.

We strongly advise users to thoroughly probe these aspects on their use-cases in order to evaluate the risks of this model. We recommend looking at the following bias evaluation datasets as a place to start: WinoBias, WinoGender, Stereoset.

Model info

text-classification transformers
transformers onnx distilbert text-classification en dataset:sst2 license:apache-2.0 text-embeddings-inference endpoints_compatible region:us
↓ 7 ♥ 0

Created: 2023-05-29

Updated: 2023-05-29

View on Hugging Face

Files (11)

.gitattributes
README.md
config.json
model.onnx ONNX
onnx/model.onnx ONNX
onnx/model_quantized.onnx ONNX
onnx/quantize.py
special_tokens_map.json
tokenizer.json
tokenizer_config.json
vocab.txt

Related models