upload model
Browse files- .gitattributes +2 -0
- README.md +28 -0
- config.json +33 -0
- openvino_config.json +104 -0
- openvino_model.mapping +3 -0
- openvino_model.xml +3 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +14 -0
- trainer_states.json +0 -0
- vocab.txt +0 -0
.gitattributes
CHANGED
@@ -32,3 +32,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
32 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
33 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
34 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
32 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
33 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
34 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
35 |
+
*.xml filter=lfs diff=lfs merge=lfs -text
|
36 |
+
*.mapping filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
tags:
|
4 |
+
- generated_from_trainer
|
5 |
+
datasets:
|
6 |
+
- squad
|
7 |
+
model-index:
|
8 |
+
- name: mobilebert-uncased-squadv1-14blocks-structured39.8-int8
|
9 |
+
results: []
|
10 |
+
---
|
11 |
+
|
12 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
13 |
+
should probably proofread and complete it, then remove this comment. -->
|
14 |
+
|
15 |
+
# mobilebert-uncased-squadv1-14blocks-structured39.8-int8
|
16 |
+
|
17 |
+
This model is a fine-tuned version of [google/mobilebert-uncased](https://huggingface.co/google/mobilebert-uncased) on the squad dataset.
|
18 |
+
|
19 |
+
Notice that this model only has the first 14 transformer blocks. It is quantized and structually pruned by NNCF. The sparsity in remaining linear layers is 39.8%.
|
20 |
+
|
21 |
+
- Torch f1: 90.15
|
22 |
+
|
23 |
+
### Framework versions
|
24 |
+
|
25 |
+
- Transformers 4.25.1
|
26 |
+
- Pytorch 1.13.1+cu116
|
27 |
+
- Datasets 2.8.0
|
28 |
+
- Tokenizers 0.13.2
|
config.json
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "google/mobilebert-uncased",
|
3 |
+
"architectures": [
|
4 |
+
"NNCFNetwork"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"classifier_activation": false,
|
8 |
+
"classifier_dropout": null,
|
9 |
+
"embedding_size": 128,
|
10 |
+
"hidden_act": "relu",
|
11 |
+
"hidden_dropout_prob": 0.0,
|
12 |
+
"hidden_size": 512,
|
13 |
+
"initializer_range": 0.02,
|
14 |
+
"intermediate_size": 512,
|
15 |
+
"intra_bottleneck_size": 128,
|
16 |
+
"key_query_shared_bottleneck": true,
|
17 |
+
"layer_norm_eps": 1e-12,
|
18 |
+
"max_position_embeddings": 512,
|
19 |
+
"model_type": "mobilebert",
|
20 |
+
"normalization_type": "no_norm",
|
21 |
+
"num_attention_heads": 4,
|
22 |
+
"num_feedforward_networks": 4,
|
23 |
+
"num_hidden_layers": 14,
|
24 |
+
"pad_token_id": 0,
|
25 |
+
"torch_dtype": "float32",
|
26 |
+
"transformers_version": "4.25.1",
|
27 |
+
"trigram_input": true,
|
28 |
+
"true_hidden_size": 128,
|
29 |
+
"type_vocab_size": 2,
|
30 |
+
"use_bottleneck": true,
|
31 |
+
"use_bottleneck_attention": false,
|
32 |
+
"vocab_size": 30522
|
33 |
+
}
|
openvino_config.json
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"compression": [
|
3 |
+
{
|
4 |
+
"algorithm": "movement_sparsity",
|
5 |
+
"ignored_scopes": [
|
6 |
+
"{re}.*MobileBertEmbeddings.*",
|
7 |
+
"{re}.*Bottleneck.*",
|
8 |
+
"{re}.*OutputBottleneck.*",
|
9 |
+
"{re}.*qa_outputs.*"
|
10 |
+
],
|
11 |
+
"params": {
|
12 |
+
"enable_structured_masking": true,
|
13 |
+
"importance_regularization_factor": 0.065,
|
14 |
+
"warmup_end_epoch": 10,
|
15 |
+
"warmup_start_epoch": 3
|
16 |
+
},
|
17 |
+
"sparse_structure_by_scopes": [
|
18 |
+
{
|
19 |
+
"mode": "block",
|
20 |
+
"sparse_factors": [
|
21 |
+
16,
|
22 |
+
16
|
23 |
+
],
|
24 |
+
"target_scopes": "{re}.*MobileBertAttention.*"
|
25 |
+
},
|
26 |
+
{
|
27 |
+
"axis": 0,
|
28 |
+
"mode": "per_dim",
|
29 |
+
"target_scopes": "{re}.*MobileBertIntermediate.*"
|
30 |
+
},
|
31 |
+
{
|
32 |
+
"axis": 1,
|
33 |
+
"mode": "per_dim",
|
34 |
+
"target_scopes": "{re}.*MobileBertOutput.*"
|
35 |
+
},
|
36 |
+
{
|
37 |
+
"axis": 1,
|
38 |
+
"mode": "per_dim",
|
39 |
+
"target_scopes": "{re}.*FFNOutput.*"
|
40 |
+
}
|
41 |
+
]
|
42 |
+
},
|
43 |
+
{
|
44 |
+
"algorithm": "quantization",
|
45 |
+
"export_to_onnx_standard_ops": false,
|
46 |
+
"ignored_scopes": [
|
47 |
+
"{re}.*__add___[0-1]",
|
48 |
+
"{re}.*__truediv__*"
|
49 |
+
],
|
50 |
+
"initializer": {
|
51 |
+
"batchnorm_adaptation": {
|
52 |
+
"num_bn_adaptation_samples": 16
|
53 |
+
},
|
54 |
+
"range": {
|
55 |
+
"num_init_samples": 128,
|
56 |
+
"params": {
|
57 |
+
"max_percentile": 99.99,
|
58 |
+
"min_percentile": 0.01
|
59 |
+
},
|
60 |
+
"type": "percentile"
|
61 |
+
}
|
62 |
+
},
|
63 |
+
"overflow_fix": "disable",
|
64 |
+
"preset": "mixed",
|
65 |
+
"scope_overrides": {
|
66 |
+
"activations": {
|
67 |
+
"{re}.*matmul_0": {
|
68 |
+
"mode": "symmetric"
|
69 |
+
}
|
70 |
+
}
|
71 |
+
}
|
72 |
+
}
|
73 |
+
],
|
74 |
+
"input_info": [
|
75 |
+
{
|
76 |
+
"keyword": "input_ids",
|
77 |
+
"sample_size": [
|
78 |
+
32,
|
79 |
+
384
|
80 |
+
],
|
81 |
+
"type": "long"
|
82 |
+
},
|
83 |
+
{
|
84 |
+
"keyword": "token_type_ids",
|
85 |
+
"sample_size": [
|
86 |
+
32,
|
87 |
+
384
|
88 |
+
],
|
89 |
+
"type": "long"
|
90 |
+
},
|
91 |
+
{
|
92 |
+
"keyword": "attention_mask",
|
93 |
+
"sample_size": [
|
94 |
+
32,
|
95 |
+
384
|
96 |
+
],
|
97 |
+
"type": "long"
|
98 |
+
}
|
99 |
+
],
|
100 |
+
"log_dir": "/nvme2/yujiepan/workspace/jpqd-test/LOGS/optimum-mobilebert-qa/0127_ttev_ftz8ih_epo18lr2e-06teacher0.95cosDecayRestart",
|
101 |
+
"optimum_version": "1.6.1",
|
102 |
+
"save_onnx_model": false,
|
103 |
+
"transformers_version": "4.25.1"
|
104 |
+
}
|
openvino_model.mapping
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:acc4c474811935d0ef15b528efd6873ba34c4a5c0122b9d77c8a2e40156d1883
|
3 |
+
size 699863
|
openvino_model.xml
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fec9d0f0a4beaf0ff1e8e72c489dcc90d24a2e4adf375d66986ae20a5dab8d43
|
3 |
+
size 2281114
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:88f176b8eabfceb10310ab3474f79f8c340d38a88a23c6776062f82bff6bfe97
|
3 |
+
size 102725011
|
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,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cls_token": "[CLS]",
|
3 |
+
"do_lower_case": true,
|
4 |
+
"mask_token": "[MASK]",
|
5 |
+
"model_max_length": 1000000000000000019884624838656,
|
6 |
+
"name_or_path": "google/mobilebert-uncased",
|
7 |
+
"pad_token": "[PAD]",
|
8 |
+
"sep_token": "[SEP]",
|
9 |
+
"special_tokens_map_file": null,
|
10 |
+
"strip_accents": null,
|
11 |
+
"tokenize_chinese_chars": true,
|
12 |
+
"tokenizer_class": "MobileBertTokenizer",
|
13 |
+
"unk_token": "[UNK]"
|
14 |
+
}
|
trainer_states.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|