Text Classification
Transformers
PyTorch
English
distilbert
text-classfication
nlp
neural-compressor
PostTrainingDynamic
int8
Intel® Neural Compressor
text-embeddings-inference
Instructions to use Intel/distilbert-base-uncased-MRPC-int8-dynamic-inc with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Intel/distilbert-base-uncased-MRPC-int8-dynamic-inc with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Intel/distilbert-base-uncased-MRPC-int8-dynamic-inc")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Intel/distilbert-base-uncased-MRPC-int8-dynamic-inc") model = AutoModelForSequenceClassification.from_pretrained("Intel/distilbert-base-uncased-MRPC-int8-dynamic-inc", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from Intel/distilbert-base-uncased-MRPC-int8-dynamic-inc: direct link, hf CLI and curl.
- Browser
- Download file 1.51 kB
-
https://huggingface.co/Intel/distilbert-base-uncased-MRPC-int8-dynamic-inc/resolve/main/README.md
- Command line
-
hf download hf://Intel/distilbert-base-uncased-MRPC-int8-dynamic-inc/README.md
-
curl -L -o README.md https://huggingface.co/Intel/distilbert-base-uncased-MRPC-int8-dynamic-inc/resolve/main/README.md
1.51 kB
metadata
language: en
license: mit
datasets:
- glue
- mrpc
metrics:
- f1
tags:
- text-classfication
- nlp
- neural-compressor
- PostTrainingDynamic
- int8
- Intel® Neural Compressor
Dynamically quantized DistilBERT base uncased finetuned MPRC
Table of Contents
Model Details
Model Description: This model is a DistilBERT fine-tuned on MPRC dynamically quantized with optimum-intel through the usage of huggingface/optimum-intel through the usage of Intel® Neural Compressor.
- Model Type: Text Classification
- Language(s): English
- License: Apache-2.0
- Parent Model: For more details on the original model, we encourage users to check out this model card.
How to Get Started With the Model
PyTorch
To load the quantized model, you can do as follows:
from optimum.intel import INCModelForSequenceClassification
model_id = "Intel/distilbert-base-uncased-MRPC-int8-dynamic"
model = INCModelForSequenceClassification.from_pretrained(model_id)
Test result
| INT8 | FP32 | |
|---|---|---|
| Accuracy (eval-f1) | 0.8983 | 0.9027 |
| Model size (MB) | 75 | 268 |