miniALBERT is a recursive transformer model which uses cross-layer parameter sharing, embedding factorisation, and bottleneck adapters to achieve high parameter efficiency.
Since miniALBERT is a compact model, it is trained using a layer-to-layer distillation technique, using the BioBERT-v1.1 model as the teacher. Currently, this model is trained for 100K steps on the PubMed Abstracts dataset.
In terms of architecture, this model uses an embedding dimension of 128, a hidden size of 768, an MLP expansion rate of 4, and a reduction factor of 16 for bottleneck adapters. In general, this model uses 6 recursions and has a unique parameter count of 11 million parameters.
Usage
Since miniALBERT uses a unique architecture it can not be loaded using ts.AutoModel for now. To load the model, first, clone the miniALBERT GitHub project, using the below code:
Then use the
sys.path.append
to add the miniALBERT files to your project and then import the miniALBERT modeling file using the below code:
import sys
sys.path.append("PATH_TO_CLONED_PROJECT/MiniALBERT/")
from minialbert_modeling import MiniAlbertForSequenceClassification, MiniAlbertForTokenClassification
Finally, load the model like a regular model in the transformers library using the below code:
# For NER use the below code
model = MiniAlbertForTokenClassification.from_pretrained("nlpie/bio-miniALBERT-128")
# For Sequence Classification use the below code
model = MiniAlbertForTokenClassification.from_pretrained("nlpie/bio-miniALBERT-128")
In addition, For efficient fine-tuning using the pre-trained bottleneck adapters use the below code:
model.trainAdaptersOnly()
Citation
If you use the model, please cite our paper:
@inproceedings{nouriborji2023minialbert,
title={MiniALBERT: Model Distillation via Parameter-Efficient Recursive Transformers},
author={Nouriborji, Mohammadmahdi and Rohanian, Omid and Kouchaki, Samaneh and Clifton, David A},
booktitle={Proceedings of the 17th Conference of the European Chapter of the Association for Computational Linguistics},
pages={1161--1173},
year={2023}
}
Runs of nlpie bio-miniALBERT-128 on huggingface.co
25
Total runs
0
24-hour runs
2
3-day runs
6
7-day runs
6
30-day runs
More Information About bio-miniALBERT-128 huggingface.co Model
bio-miniALBERT-128 huggingface.co is an AI model on huggingface.co that provides bio-miniALBERT-128's model effect (), which can be used instantly with this nlpie bio-miniALBERT-128 model. huggingface.co supports a free trial of the bio-miniALBERT-128 model, and also provides paid use of the bio-miniALBERT-128. Support call bio-miniALBERT-128 model through api, including Node.js, Python, http.
bio-miniALBERT-128 huggingface.co is an online trial and call api platform, which integrates bio-miniALBERT-128's modeling effects, including api services, and provides a free online trial of bio-miniALBERT-128, you can try bio-miniALBERT-128 online for free by clicking the link below.
nlpie bio-miniALBERT-128 online free url in huggingface.co:
bio-miniALBERT-128 is an open source model from GitHub that offers a free installation service, and any user can find bio-miniALBERT-128 on GitHub to install. At the same time, huggingface.co provides the effect of bio-miniALBERT-128 install, users can directly use bio-miniALBERT-128 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.