# oBERT-6-upstream-pretrained-dense

This model is obtained with [The Optimal BERT Surgeon: Scalable and Accurate Second-Order Pruning for Large Language Models](https://arxiv.org/abs/2203.07259).

It corresponds to 6 layers from `neuralmagic/oBERT-12-upstream-pretrained-dense`, pretrained with knowledge distillation. This model is used as a starting point for downstream finetuning and pruning runs presented in the `Table 3 - 6 Layers`.
The model can also be used for finetuning on any downstream task, as a starting point instead of the two times larger `bert-base-uncased` model.

Finetuned and pruned versions of this model on the SQuADv1 downstream task, as described in the paper:
- 0%: `neuralmagic/oBERT-6-downstream-dense-squadv1`
- 80% unstructured: `neuralmagic/oBERT-6-downstream-pruned-unstructured-80-squadv1`
- 80% block-4: `neuralmagic/oBERT-6-downstream-pruned-block4-80-squadv1`
- 90% unstructured: `neuralmagic/oBERT-6-downstream-pruned-unstructured-90-squadv1`
- 90% block-4: `neuralmagic/oBERT-6-downstream-pruned-block4-90-squadv1`

```
Training objective: masked language modeling (MLM) + knowledge distillation
Paper: https://arxiv.org/abs/2203.07259
Dataset: BookCorpus and English Wikipedia
Sparsity: 0%
Number of layers: 6
```

Code: [https://github.com/neuralmagic/sparseml/tree/main/research/optimal_BERT_surgeon_oBERT](https://github.com/neuralmagic/sparseml/tree/main/research/optimal_BERT_surgeon_oBERT)

If you find the model useful, please consider citing our work.

## Citation info
```bibtex
@article{kurtic2022optimal,
  title={The Optimal BERT Surgeon: Scalable and Accurate Second-Order Pruning for Large Language Models},
  author={Kurtic, Eldar and Campos, Daniel and Nguyen, Tuan and Frantar, Elias and Kurtz, Mark and Fineran, Benjamin and Goin, Michael and Alistarh, Dan},
  journal={arXiv preprint arXiv:2203.07259},
  year={2022}
}
```
{"language": "en", "tags": ["bert", "oBERT", "sparsity", "pruning", "compression"], "datasets": ["bookcorpus", "wikipedia"]}
transformers pytorch bert oBERT sparsity pruning compression en dataset:bookcorpus dataset:wikipedia arxiv:2203.07259 endpoints_compatible region:us
TAGS
#transformers #pytorch #bert #oBERT #sparsity #pruning #compression #en #dataset-bookcorpus #dataset-wikipedia #arxiv-2203.07259 #endpoints_compatible #region-us 

# oBERT-6-upstream-pretrained-dense

This model is obtained with The Optimal BERT Surgeon: Scalable and Accurate Second-Order Pruning for Large Language Models.

It corresponds to 6 layers from 'neuralmagic/oBERT-12-upstream-pretrained-dense', pretrained with knowledge distillation. This model is used as a starting point for downstream finetuning and pruning runs presented in the 'Table 3 - 6 Layers'.
The model can also be used for finetuning on any downstream task, as a starting point instead of the two times larger 'bert-base-uncased' model.

Finetuned and pruned versions of this model on the SQuADv1 downstream task, as described in the paper:
- 0%: 'neuralmagic/oBERT-6-downstream-dense-squadv1'
- 80% unstructured: 'neuralmagic/oBERT-6-downstream-pruned-unstructured-80-squadv1'
- 80% block-4: 'neuralmagic/oBERT-6-downstream-pruned-block4-80-squadv1'
- 90% unstructured: 'neuralmagic/oBERT-6-downstream-pruned-unstructured-90-squadv1'
- 90% block-4: 'neuralmagic/oBERT-6-downstream-pruned-block4-90-squadv1'



Code: URL

If you find the model useful, please consider citing our work.

info

# oBERT-6-upstream-pretrained-dense

This model is obtained with The Optimal BERT Surgeon: Scalable and Accurate Second-Order Pruning for Large Language Models.

It corresponds to 6 layers from 'neuralmagic/oBERT-12-upstream-pretrained-dense', pretrained with knowledge distillation. This model is used as a starting point for downstream finetuning and pruning runs presented in the 'Table 3 - 6 Layers'.
The model can also be used for finetuning on any downstream task, as a starting point instead of the two times larger 'bert-base-uncased' model.

Finetuned and pruned versions of this model on the SQuADv1 downstream task, as described in the paper:
- 0%: 'neuralmagic/oBERT-6-downstream-dense-squadv1'
- 80% unstructured: 'neuralmagic/oBERT-6-downstream-pruned-unstructured-80-squadv1'
- 80% block-4: 'neuralmagic/oBERT-6-downstream-pruned-block4-80-squadv1'
- 90% unstructured: 'neuralmagic/oBERT-6-downstream-pruned-unstructured-90-squadv1'
- 90% block-4: 'neuralmagic/oBERT-6-downstream-pruned-block4-90-squadv1'



Code: URL

If you find the model useful, please consider citing our work.

info
TAGS
#transformers #pytorch #bert #oBERT #sparsity #pruning #compression #en #dataset-bookcorpus #dataset-wikipedia #arxiv-2203.07259 #endpoints_compatible #region-us 
 # oBERT-6-upstream-pretrained-dense

This model is obtained with The Optimal BERT Surgeon: Scalable and Accurate Second-Order Pruning for Large Language Models.

It corresponds to 6 layers from 'neuralmagic/oBERT-12-upstream-pretrained-dense', pretrained with knowledge distillation. This model is used as a starting point for downstream finetuning and pruning runs presented in the 'Table 3 - 6 Layers'.
The model can also be used for finetuning on any downstream task, as a starting point instead of the two times larger 'bert-base-uncased' model.

Finetuned and pruned versions of this model on the SQuADv1 downstream task, as described in the paper:
- 0%: 'neuralmagic/oBERT-6-downstream-dense-squadv1'
- 80% unstructured: 'neuralmagic/oBERT-6-downstream-pruned-unstructured-80-squadv1'
- 80% block-4: 'neuralmagic/oBERT-6-downstream-pruned-block4-80-squadv1'
- 90% unstructured: 'neuralmagic/oBERT-6-downstream-pruned-unstructured-90-squadv1'
- 90% block-4: 'neuralmagic/oBERT-6-downstream-pruned-block4-90-squadv1'



Code: URL

If you find the model useful, please consider citing our work.

info
passage: TAGS
#transformers #pytorch #bert #oBERT #sparsity #pruning #compression #en #dataset-bookcorpus #dataset-wikipedia #arxiv-2203.07259 #endpoints_compatible #region-us 
# oBERT-6-upstream-pretrained-dense

This model is obtained with The Optimal BERT Surgeon: Scalable and Accurate Second-Order Pruning for Large Language Models.

It corresponds to 6 layers from 'neuralmagic/oBERT-12-upstream-pretrained-dense', pretrained with knowledge distillation. This model is used as a starting point for downstream finetuning and pruning runs presented in the 'Table 3 - 6 Layers'.
The model can also be used for finetuning on any downstream task, as a starting point instead of the two times larger 'bert-base-uncased' model.

Finetuned and pruned versions of this model on the SQuADv1 downstream task, as described in the paper:
- 0%: 'neuralmagic/oBERT-6-downstream-dense-squadv1'
- 80% unstructured: 'neuralmagic/oBERT-6-downstream-pruned-unstructured-80-squadv1'
- 80% block-4: 'neuralmagic/oBERT-6-downstream-pruned-block4-80-squadv1'
- 90% unstructured: 'neuralmagic/oBERT-6-downstream-pruned-unstructured-90-squadv1'
- 90% block-4: 'neuralmagic/oBERT-6-downstream-pruned-block4-90-squadv1'



Code: URL

If you find the model useful, please consider citing our work.

info