How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-classification", model="Intel/MiniLM-L12-H384-uncased-mrpc-int8-dynamic-inc")
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("Intel/MiniLM-L12-H384-uncased-mrpc-int8-dynamic-inc")
model = AutoModelForSequenceClassification.from_pretrained("Intel/MiniLM-L12-H384-uncased-mrpc-int8-dynamic-inc", device_map="auto")
Quick Links

INT8 MiniLM-L12-H384-uncased-mrpc

Post-training dynamic quantization

ONNX

This is an INT8 ONNX model quantized with Intel® Neural Compressor.

The original fp32 model comes from the fine-tuned model Intel/MiniLM-L12-H384-uncased-mrpc.

Test result

INT8 FP32
Accuracy (eval-f1) 0.9107 0.9097
Model size (MB) 33 128

Load ONNX model:

from optimum.onnxruntime import ORTModelForSequenceClassification
model = ORTModelForSequenceClassification.from_pretrained('Intel/MiniLM-L12-H384-uncased-mrpc-int8-dynamic')
Downloads last month
5
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Collection including Intel/MiniLM-L12-H384-uncased-mrpc-int8-dynamic-inc