Edit model card

INT8 RoBERT base finetuned on Squad2

Post-training static quantization

This is an INT8 PyTorch model quantized with huggingface/optimum-intel through the usage of Intel® Neural Compressor.

The original fp32 model comes from the fine-tuned model deepset/roberta-base-squad2.

The 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.

The linear modules roberta.encoder.layer.7.output.dense, roberta.encoder.layer.8.output.dense, roberta.encoder.layer.9.output.dense, fall back to fp32 for less than 1% relative accuracy loss.

Evaluation result

INT8 FP32
Accuracy (eval-f1) 82.3122 82.9231
Model size (MB) 141 474

Load with optimum:

from optimum.intel import INCModelForQuestionAnswering

model_id = "Intel/roberta-base-squad2-int8-static"
int8_model = INCModelForQuestionAnswering.from_pretrained(model_id)
Downloads last month
1
Inference API
Unable to determine this model’s pipeline type. Check the docs .

Collection including Intel/roberta-base-squad2-int8-static-inc