BERT
Collection
BERT models of varying flavors • 22 items • Updated
How to use Intel/bert-mini-sst2-distilled-sparse-90-1X4-block with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="Intel/bert-mini-sst2-distilled-sparse-90-1X4-block") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("Intel/bert-mini-sst2-distilled-sparse-90-1X4-block")
model = AutoModelForSequenceClassification.from_pretrained("Intel/bert-mini-sst2-distilled-sparse-90-1X4-block")Finetuned model pruned to 1:4 structured sparsity. The model is a pruned version of the BERT mini model.
The model can be used for inference with sparsity optimization. For further details on the model and its usage will be soon available.
We get the following results on the sst2 tasks development set:
| Task | SST-2 (Acc) |
|---|---|
| 87.2 | |
| Better than dense bert mini which is 84.74%. |