bert-base-uncased model fine-tuned on SST-2

This model was created using the nn_pruning python library: the linear layers contains 37% of the original weights.

The model contains 51% of the original weights overall (the embeddings account for a significant part of the model, and they are not pruned by this method).

<script src="/echarlaix/bert-base-uncased-sst2-acc91.1-d37-hybrid/raw/main/model_card/density_info.js" id="2d0fc334-fe98-4315-8890-d6eaca1fa9be">

In terms of perfomance, its accuracy is 91.17.

Fine-Pruning details

This model was fine-tuned from the HuggingFace model checkpoint on task, and distilled from the model textattack/bert-base-uncased-SST-2. This model is case-insensitive: it does not make a difference between english and English.

A side-effect of the block pruning method is that some of the attention heads are completely removed: 88 heads were removed on a total of 144 (61.1%). Here is a detailed view on how the remaining heads are distributed in the network after pruning.

<script src="/echarlaix/bert-base-uncased-sst2-acc91.1-d37-hybrid/raw/main/model_card/pruning_info.js" id="93b19d7f-c11b-4edf-9670-091e40d9be25">

Details of the SST-2 dataset

Dataset Split # samples
SST-2 train 67K
SST-2 eval 872


Pytorch model file size: 351MB (original BERT: 420MB)

Metric # Value # Original (Table 2) Variation
accuracy 91.17 92.7 -1.53
Downloads last month
Hosted inference API
Text Classification
This model can be loaded on the Inference API on-demand.