Initial commit
Browse files- README.md +3 -0
- config.json +52 -0
- onnx/model.onnx +3 -0
- onnx/model_quantized.onnx +3 -0
- quantize_config.json +30 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +17 -0
- vocab.txt +0 -0
README.md
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
https://huggingface.co/Babelscape/wikineural-multilingual-ner with ONNX weights to be compatible with Transformers.js.
|
| 2 |
+
|
| 3 |
+
Note: Having a separate repo for ONNX weights is intended to be a temporary solution until WebML gains more traction. If you would like to make your models web-ready, we recommend converting to ONNX using 🤗 Optimum and structuring your repo like this one (with ONNX weights located in a subfolder named onnx).
|
config.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "Babelscape/wikineural-multilingual-ner",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"BertForTokenClassification"
|
| 5 |
+
],
|
| 6 |
+
"attention_probs_dropout_prob": 0.1,
|
| 7 |
+
"classifier_dropout": null,
|
| 8 |
+
"directionality": "bidi",
|
| 9 |
+
"hidden_act": "gelu",
|
| 10 |
+
"hidden_dropout_prob": 0.1,
|
| 11 |
+
"hidden_size": 768,
|
| 12 |
+
"id2label": {
|
| 13 |
+
"0": "O",
|
| 14 |
+
"1": "B-PER",
|
| 15 |
+
"2": "I-PER",
|
| 16 |
+
"3": "B-ORG",
|
| 17 |
+
"4": "I-ORG",
|
| 18 |
+
"5": "B-LOC",
|
| 19 |
+
"6": "I-LOC",
|
| 20 |
+
"7": "B-MISC",
|
| 21 |
+
"8": "I-MISC"
|
| 22 |
+
},
|
| 23 |
+
"initializer_range": 0.02,
|
| 24 |
+
"intermediate_size": 3072,
|
| 25 |
+
"label2id": {
|
| 26 |
+
"B-LOC": 5,
|
| 27 |
+
"B-MISC": 7,
|
| 28 |
+
"B-ORG": 3,
|
| 29 |
+
"B-PER": 1,
|
| 30 |
+
"I-LOC": 6,
|
| 31 |
+
"I-MISC": 8,
|
| 32 |
+
"I-ORG": 4,
|
| 33 |
+
"I-PER": 2,
|
| 34 |
+
"O": 0
|
| 35 |
+
},
|
| 36 |
+
"layer_norm_eps": 1e-12,
|
| 37 |
+
"max_position_embeddings": 512,
|
| 38 |
+
"model_type": "bert",
|
| 39 |
+
"num_attention_heads": 12,
|
| 40 |
+
"num_hidden_layers": 12,
|
| 41 |
+
"pad_token_id": 0,
|
| 42 |
+
"pooler_fc_size": 768,
|
| 43 |
+
"pooler_num_attention_heads": 12,
|
| 44 |
+
"pooler_num_fc_layers": 3,
|
| 45 |
+
"pooler_size_per_head": 128,
|
| 46 |
+
"pooler_type": "first_token_transform",
|
| 47 |
+
"position_embedding_type": "absolute",
|
| 48 |
+
"transformers_version": "4.33.2",
|
| 49 |
+
"type_vocab_size": 2,
|
| 50 |
+
"use_cache": true,
|
| 51 |
+
"vocab_size": 119547
|
| 52 |
+
}
|
onnx/model.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3c2cadc4d49eaa7d938428cd3641c22c23b80d647f1eda2d547b4bee1583eb4e
|
| 3 |
+
size 709345295
|
onnx/model_quantized.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:90a16d04fa98123cb49ba65c69892b963259700889589d00bef18971be4f0b16
|
| 3 |
+
size 178495474
|
quantize_config.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"per_channel": true,
|
| 3 |
+
"reduce_range": true,
|
| 4 |
+
"per_model_config": {
|
| 5 |
+
"model": {
|
| 6 |
+
"op_types": [
|
| 7 |
+
"Slice",
|
| 8 |
+
"Unsqueeze",
|
| 9 |
+
"Div",
|
| 10 |
+
"Sub",
|
| 11 |
+
"Erf",
|
| 12 |
+
"Softmax",
|
| 13 |
+
"Gather",
|
| 14 |
+
"Sqrt",
|
| 15 |
+
"ReduceMean",
|
| 16 |
+
"MatMul",
|
| 17 |
+
"Transpose",
|
| 18 |
+
"Constant",
|
| 19 |
+
"Add",
|
| 20 |
+
"Pow",
|
| 21 |
+
"Concat",
|
| 22 |
+
"Reshape",
|
| 23 |
+
"Cast",
|
| 24 |
+
"Shape",
|
| 25 |
+
"Mul"
|
| 26 |
+
],
|
| 27 |
+
"weight_type": "QInt8"
|
| 28 |
+
}
|
| 29 |
+
}
|
| 30 |
+
}
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cls_token": "[CLS]",
|
| 3 |
+
"mask_token": "[MASK]",
|
| 4 |
+
"pad_token": "[PAD]",
|
| 5 |
+
"sep_token": "[SEP]",
|
| 6 |
+
"unk_token": "[UNK]"
|
| 7 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"clean_up_tokenization_spaces": true,
|
| 3 |
+
"cls_token": "[CLS]",
|
| 4 |
+
"do_lower_case": false,
|
| 5 |
+
"mask_token": "[MASK]",
|
| 6 |
+
"max_length": 512,
|
| 7 |
+
"model_max_length": 512,
|
| 8 |
+
"pad_token": "[PAD]",
|
| 9 |
+
"sep_token": "[SEP]",
|
| 10 |
+
"stride": 0,
|
| 11 |
+
"strip_accents": null,
|
| 12 |
+
"tokenize_chinese_chars": true,
|
| 13 |
+
"tokenizer_class": "BertTokenizer",
|
| 14 |
+
"truncation_side": "right",
|
| 15 |
+
"truncation_strategy": "longest_first",
|
| 16 |
+
"unk_token": "[UNK]"
|
| 17 |
+
}
|
vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|