Text Classification
Transformers
PyTorch
ONNX
English
albert
text-classfication
int8
Intel® Neural Compressor
neural-compressor
PostTrainingStatic
Instructions to use INC4AI/albert-base-v2-sst2-int8-static-inc with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use INC4AI/albert-base-v2-sst2-int8-static-inc with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="INC4AI/albert-base-v2-sst2-int8-static-inc")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("INC4AI/albert-base-v2-sst2-int8-static-inc") model = AutoModelForSequenceClassification.from_pretrained("INC4AI/albert-base-v2-sst2-int8-static-inc", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
19ad58c
1
Parent(s): 024c1ed
update int8 onnx model and readme
Browse filesSigned-off-by: dujun <jun.du@intel.com>
- README.md +4 -2
- model.onnx +2 -2
README.md
CHANGED
|
@@ -63,12 +63,14 @@ This is an INT8 ONNX model quantized with [Intel® Neural Compressor](https://gi
|
|
| 63 |
|
| 64 |
The original fp32 model comes from the fine-tuned model [Alireza1044/albert-base-v2-sst2](https://huggingface.co/Alireza1044/albert-base-v2-sst2).
|
| 65 |
|
|
|
|
|
|
|
| 66 |
#### Test result
|
| 67 |
|
| 68 |
| |INT8|FP32|
|
| 69 |
|---|:---:|:---:|
|
| 70 |
-
| **Accuracy (eval-accuracy)** |0.
|
| 71 |
-
| **Model size (MB)** |
|
| 72 |
|
| 73 |
|
| 74 |
#### Load ONNX model:
|
|
|
|
| 63 |
|
| 64 |
The original fp32 model comes from the fine-tuned model [Alireza1044/albert-base-v2-sst2](https://huggingface.co/Alireza1044/albert-base-v2-sst2).
|
| 65 |
|
| 66 |
+
The calibration dataloader is the eval dataloader. The calibration sampling size is 100.
|
| 67 |
+
|
| 68 |
#### Test result
|
| 69 |
|
| 70 |
| |INT8|FP32|
|
| 71 |
|---|:---:|:---:|
|
| 72 |
+
| **Accuracy (eval-accuracy)** |0.9140|0.9232|
|
| 73 |
+
| **Model size (MB)** |50|45|
|
| 74 |
|
| 75 |
|
| 76 |
#### Load ONNX model:
|
model.onnx
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:64266db101b17dc05cb4fd7b0643d7eda5425f02494feca37c38b2153b3d10fc
|
| 3 |
+
size 51754627
|