Migrate model card from transformers-repo
Browse filesRead announcement at https://discuss.huggingface.co/t/announcement-all-model-cards-will-be-migrated-to-hf-co-model-repos/2755
Original file history: https://github.com/huggingface/transformers/commits/master/model_cards/google/mobilebert-uncased/README.md
README.md
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language: en
|
3 |
+
thumbnail: https://huggingface.co/front/thumbnails/google.png
|
4 |
+
|
5 |
+
license: apache-2.0
|
6 |
+
---
|
7 |
+
|
8 |
+
## MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devices
|
9 |
+
|
10 |
+
MobileBERT is a thin version of BERT_LARGE, while equipped with bottleneck structures and a carefully designed balance
|
11 |
+
between self-attentions and feed-forward networks.
|
12 |
+
|
13 |
+
This checkpoint is the original MobileBert Optimized Uncased English:
|
14 |
+
[uncased_L-24_H-128_B-512_A-4_F-4_OPT](https://storage.googleapis.com/cloud-tpu-checkpoints/mobilebert/uncased_L-24_H-128_B-512_A-4_F-4_OPT.tar.gz)
|
15 |
+
checkpoint.
|
16 |
+
|
17 |
+
## How to use MobileBERT in `transformers`
|
18 |
+
|
19 |
+
```python
|
20 |
+
from transformers import pipeline
|
21 |
+
|
22 |
+
fill_mask = pipeline(
|
23 |
+
"fill-mask",
|
24 |
+
model="google/mobilebert-uncased",
|
25 |
+
tokenizer="google/mobilebert-uncased"
|
26 |
+
)
|
27 |
+
|
28 |
+
print(
|
29 |
+
fill_mask(f"HuggingFace is creating a {fill_mask.tokenizer.mask_token} that the community uses to solve NLP tasks.")
|
30 |
+
)
|
31 |
+
|
32 |
+
```
|