Duplicate from julien-c/EsperBERTo-small-pos
Browse filesCo-authored-by: Julien Chaumond <[email protected]>
- .gitattributes +10 -0
- README.md +43 -0
- config.json +39 -0
- flax_model.msgpack +3 -0
- merges.txt +0 -0
- model.safetensors +3 -0
- onnx/model.onnx +3 -0
- onnx/model_quantized.onnx +3 -0
- pytorch_model.bin +3 -0
- quant_config.json +36 -0
- special_tokens_map.json +51 -0
- tokenizer.json +0 -0
- tokenizer_config.json +65 -0
- vocab.json +0 -0
.gitattributes
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
*.bin.* filter=lfs diff=lfs merge=lfs -text
|
2 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
5 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
6 |
+
*.tar.gz filter=lfs diff=lfs merge=lfs -text
|
7 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
8 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
9 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
10 |
+
model.safetensors filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language: eo
|
3 |
+
thumbnail: https://huggingface.co/blog/assets/01_how-to-train/EsperBERTo-thumbnail-v2.png
|
4 |
+
widget:
|
5 |
+
- text: Mi estas viro kej estas tago varma.
|
6 |
+
duplicated_from: julien-c/EsperBERTo-small-pos
|
7 |
+
---
|
8 |
+
|
9 |
+
# EsperBERTo: RoBERTa-like Language model trained on Esperanto
|
10 |
+
|
11 |
+
**Companion model to blog post https://huggingface.co/blog/how-to-train** 🔥
|
12 |
+
|
13 |
+
## Training Details
|
14 |
+
|
15 |
+
- current checkpoint: 566000
|
16 |
+
- machine name: `galinette`
|
17 |
+
|
18 |
+
|
19 |
+
![](https://huggingface.co/blog/assets/01_how-to-train/EsperBERTo-thumbnail-v2.png)
|
20 |
+
|
21 |
+
## Example pipeline
|
22 |
+
|
23 |
+
```python
|
24 |
+
from transformers import TokenClassificationPipeline, pipeline
|
25 |
+
|
26 |
+
|
27 |
+
MODEL_PATH = "./models/EsperBERTo-small-pos/"
|
28 |
+
|
29 |
+
nlp = pipeline(
|
30 |
+
"ner",
|
31 |
+
model=MODEL_PATH,
|
32 |
+
tokenizer=MODEL_PATH,
|
33 |
+
)
|
34 |
+
# or instantiate a TokenClassificationPipeline directly.
|
35 |
+
|
36 |
+
nlp("Mi estas viro kej estas tago varma.")
|
37 |
+
|
38 |
+
# {'entity': 'PRON', 'score': 0.9979867339134216, 'word': ' Mi'}
|
39 |
+
# {'entity': 'VERB', 'score': 0.9683094620704651, 'word': ' estas'}
|
40 |
+
# {'entity': 'VERB', 'score': 0.9797462821006775, 'word': ' estas'}
|
41 |
+
# {'entity': 'NOUN', 'score': 0.8509314060211182, 'word': ' tago'}
|
42 |
+
# {'entity': 'ADJ', 'score': 0.9996201395988464, 'word': ' varma'}
|
43 |
+
```
|
config.json
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_num_labels": 6,
|
3 |
+
"architectures": [
|
4 |
+
"RobertaForTokenClassification"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"bos_token_id": 0,
|
8 |
+
"eos_token_id": 2,
|
9 |
+
"hidden_act": "gelu",
|
10 |
+
"hidden_dropout_prob": 0.1,
|
11 |
+
"hidden_size": 768,
|
12 |
+
"id2label": {
|
13 |
+
"0": "O",
|
14 |
+
"1": "NOUN",
|
15 |
+
"2": "ADJ",
|
16 |
+
"3": "ADV",
|
17 |
+
"4": "VERB",
|
18 |
+
"5": "PRON"
|
19 |
+
},
|
20 |
+
"initializer_range": 0.02,
|
21 |
+
"intermediate_size": 3072,
|
22 |
+
"label2id": {
|
23 |
+
"ADJ": 2,
|
24 |
+
"ADV": 3,
|
25 |
+
"NOUN": 1,
|
26 |
+
"O": 0,
|
27 |
+
"PRON": 5,
|
28 |
+
"VERB": 4
|
29 |
+
},
|
30 |
+
"layer_norm_eps": 1e-05,
|
31 |
+
"max_position_embeddings": 514,
|
32 |
+
"model_type": "roberta",
|
33 |
+
"num_attention_heads": 12,
|
34 |
+
"num_hidden_layers": 6,
|
35 |
+
"output_past": true,
|
36 |
+
"pad_token_id": 1,
|
37 |
+
"type_vocab_size": 1,
|
38 |
+
"vocab_size": 52000
|
39 |
+
}
|
flax_model.msgpack
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fc59c5b16cfe0888c80bc8e4ef17b5feed02dacd32a22354abf860bf17cba85e
|
3 |
+
size 331463343
|
merges.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:91858d873cf0e9c58ae63cdc1b8f50586f9a74078b1e0134f026d7b015b9065b
|
3 |
+
size 333834486
|
onnx/model.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:562055090b2745c85f0e74162f6283a22f3c79e005870ae9d8e4504afdfa035d
|
3 |
+
size 331605810
|
onnx/model_quantized.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:283f2b0300cc6e49c2b8dda8c10364c7c274df4e6e4470708ea957a7e1e88b47
|
3 |
+
size 83499694
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bb3f102b0ff6cc1bc649beab8e46fcaa21193e3aabfd427f229d61070615a385
|
3 |
+
size 333848590
|
quant_config.json
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"per_channel": true,
|
3 |
+
"reduce_range": true,
|
4 |
+
"per_model_config": {
|
5 |
+
"model": {
|
6 |
+
"op_types": [
|
7 |
+
"ConstantOfShape",
|
8 |
+
"Sqrt",
|
9 |
+
"Slice",
|
10 |
+
"Pow",
|
11 |
+
"Transpose",
|
12 |
+
"Where",
|
13 |
+
"Softmax",
|
14 |
+
"Gather",
|
15 |
+
"MatMul",
|
16 |
+
"Erf",
|
17 |
+
"Mul",
|
18 |
+
"Cast",
|
19 |
+
"Expand",
|
20 |
+
"Div",
|
21 |
+
"Add",
|
22 |
+
"Constant",
|
23 |
+
"Sub",
|
24 |
+
"Not",
|
25 |
+
"Reshape",
|
26 |
+
"ReduceMean",
|
27 |
+
"Unsqueeze",
|
28 |
+
"Shape",
|
29 |
+
"Concat",
|
30 |
+
"CumSum",
|
31 |
+
"Equal"
|
32 |
+
],
|
33 |
+
"weight_type": "QInt8"
|
34 |
+
}
|
35 |
+
}
|
36 |
+
}
|
special_tokens_map.json
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": {
|
3 |
+
"content": "<s>",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": true,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"cls_token": {
|
10 |
+
"content": "<s>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": true,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"eos_token": {
|
17 |
+
"content": "</s>",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": true,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
},
|
23 |
+
"mask_token": {
|
24 |
+
"content": "<mask>",
|
25 |
+
"lstrip": true,
|
26 |
+
"normalized": true,
|
27 |
+
"rstrip": false,
|
28 |
+
"single_word": false
|
29 |
+
},
|
30 |
+
"pad_token": {
|
31 |
+
"content": "<pad>",
|
32 |
+
"lstrip": false,
|
33 |
+
"normalized": true,
|
34 |
+
"rstrip": false,
|
35 |
+
"single_word": false
|
36 |
+
},
|
37 |
+
"sep_token": {
|
38 |
+
"content": "</s>",
|
39 |
+
"lstrip": false,
|
40 |
+
"normalized": true,
|
41 |
+
"rstrip": false,
|
42 |
+
"single_word": false
|
43 |
+
},
|
44 |
+
"unk_token": {
|
45 |
+
"content": "<unk>",
|
46 |
+
"lstrip": false,
|
47 |
+
"normalized": true,
|
48 |
+
"rstrip": false,
|
49 |
+
"single_word": false
|
50 |
+
}
|
51 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_prefix_space": false,
|
3 |
+
"bos_token": {
|
4 |
+
"__type": "AddedToken",
|
5 |
+
"content": "<s>",
|
6 |
+
"lstrip": false,
|
7 |
+
"normalized": true,
|
8 |
+
"rstrip": false,
|
9 |
+
"single_word": false
|
10 |
+
},
|
11 |
+
"clean_up_tokenization_spaces": true,
|
12 |
+
"cls_token": {
|
13 |
+
"__type": "AddedToken",
|
14 |
+
"content": "<s>",
|
15 |
+
"lstrip": false,
|
16 |
+
"normalized": true,
|
17 |
+
"rstrip": false,
|
18 |
+
"single_word": false
|
19 |
+
},
|
20 |
+
"eos_token": {
|
21 |
+
"__type": "AddedToken",
|
22 |
+
"content": "</s>",
|
23 |
+
"lstrip": false,
|
24 |
+
"normalized": true,
|
25 |
+
"rstrip": false,
|
26 |
+
"single_word": false
|
27 |
+
},
|
28 |
+
"errors": "replace",
|
29 |
+
"mask_token": {
|
30 |
+
"__type": "AddedToken",
|
31 |
+
"content": "<mask>",
|
32 |
+
"lstrip": true,
|
33 |
+
"normalized": true,
|
34 |
+
"rstrip": false,
|
35 |
+
"single_word": false
|
36 |
+
},
|
37 |
+
"max_len": 512,
|
38 |
+
"model_max_length": 512,
|
39 |
+
"pad_token": {
|
40 |
+
"__type": "AddedToken",
|
41 |
+
"content": "<pad>",
|
42 |
+
"lstrip": false,
|
43 |
+
"normalized": true,
|
44 |
+
"rstrip": false,
|
45 |
+
"single_word": false
|
46 |
+
},
|
47 |
+
"sep_token": {
|
48 |
+
"__type": "AddedToken",
|
49 |
+
"content": "</s>",
|
50 |
+
"lstrip": false,
|
51 |
+
"normalized": true,
|
52 |
+
"rstrip": false,
|
53 |
+
"single_word": false
|
54 |
+
},
|
55 |
+
"tokenizer_class": "RobertaTokenizer",
|
56 |
+
"trim_offsets": true,
|
57 |
+
"unk_token": {
|
58 |
+
"__type": "AddedToken",
|
59 |
+
"content": "<unk>",
|
60 |
+
"lstrip": false,
|
61 |
+
"normalized": true,
|
62 |
+
"rstrip": false,
|
63 |
+
"single_word": false
|
64 |
+
}
|
65 |
+
}
|
vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|