You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.
System (please complete the following information):
OS: Linux
Python version: 3.7.1
AllenNLP version: 0.8.3
Question
I'm working on a text classification task and I'm using PretrainedBertEmbedder. The size of classification model is over 400Mb. How can I reduce the model size while still using Bert?
I don't think you can reduce the model size beyond your classifier's parameters, unless you retrain a smaller BERT. If you need more efficient training, some tricks like mixed precision training (#2149) and gradient accumulation are in the works (#2721)
System (please complete the following information):
Question
Token embedder:
"token_embedders": {
"bert": {
"type": "bert-pretrained",
"pretrained_model": "bert-base-uncased",
"top_layer_only": true
}
}
Token Indexer:
"token_indexers": {
"bert": {
"type": "bert-pretrained",
"pretrained_model": ".pretrained/bert/bert-base-uncased.tar.gz",
"do_lowercase": true,
"max_pieces": 100
}
}
The text was updated successfully, but these errors were encountered: