amine-private commited on
Commit
33537c4
1 Parent(s): 20d93f9

commit from amine

Browse files
Files changed (6) hide show
  1. README.md +43 -0
  2. config.json +28 -0
  3. pytorch_model.bin +3 -0
  4. tf_model.h5 +3 -0
  5. tokenizer_config.json +1 -0
  6. vocab.txt +0 -0
README.md ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: multilingual
3
+
4
+ datasets: wikipedia
5
+
6
+ license: apache-2.0
7
+ ---
8
+
9
+ # bert-base-en-pt-cased
10
+
11
+ We are sharing smaller versions of [bert-base-multilingual-cased](https://huggingface.co/bert-base-multilingual-cased) that handle a custom number of languages.
12
+
13
+ Unlike [distilbert-base-multilingual-cased](https://huggingface.co/distilbert-base-multilingual-cased), our versions give exactly the same representations produced by the original model which preserves the original accuracy.
14
+
15
+
16
+ For more information please visit our paper: [Load What You Need: Smaller Versions of Multilingual BERT](https://www.aclweb.org/anthology/2020.sustainlp-1.16.pdf).
17
+
18
+ ## How to use
19
+
20
+ ```python
21
+ from transformers import AutoTokenizer, AutoModel
22
+
23
+ tokenizer = AutoTokenizer.from_pretrained("Geotrend/bert-base-en-pt-cased")
24
+ model = AutoModel.from_pretrained("Geotrend/bert-base-en-pt-cased")
25
+
26
+ ```
27
+
28
+ To generate other smaller versions of multilingual transformers please visit [our Github repo](https://github.com/Geotrend-research/smaller-transformers).
29
+
30
+ ### How to cite
31
+
32
+ ```bibtex
33
+ @inproceedings{smallermbert,
34
+ title={Load What You Need: Smaller Versions of Mutlilingual BERT},
35
+ author={Abdaoui, Amine and Pradel, Camille and Sigel, Grégoire},
36
+ booktitle={SustaiNLP / EMNLP},
37
+ year={2020}
38
+ }
39
+ ```
40
+
41
+ ## Contact
42
+
43
+ Please contact amine@geotrend.fr for any question, feedback or request.
config.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "new-models/bert-base-en-pt-cased",
3
+ "architectures": [
4
+ "BertForMaskedLM"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "directionality": "bidi",
8
+ "gradient_checkpointing": false,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 768,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 3072,
14
+ "layer_norm_eps": 1e-12,
15
+ "max_position_embeddings": 512,
16
+ "model_type": "bert",
17
+ "num_attention_heads": 12,
18
+ "num_hidden_layers": 12,
19
+ "pad_token_id": 0,
20
+ "pooler_fc_size": 768,
21
+ "pooler_num_attention_heads": 12,
22
+ "pooler_num_fc_layers": 3,
23
+ "pooler_size_per_head": 128,
24
+ "pooler_type": "first_token_transform",
25
+ "position_embedding_type": "absolute",
26
+ "type_vocab_size": 2,
27
+ "vocab_size": 34325
28
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:feec190035de98cf8b25bdaaf6c5ddf1d6ade70bef43e0e2963944e5b281ebb2
3
+ size 449840119
tf_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eb64f8505d9b7017225de3cc1672e62f776c494f08a048d66a5da9ea8fe5d9fc
3
+ size 557065764
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"do_lower_case": false, "model_max_length": 512}
vocab.txt ADDED
The diff for this file is too large to render. See raw diff