Fedor Krasnov
commited on
Commit
·
4121962
1
Parent(s):
768080d
Correct svg URL, Correct MASK_ID
Browse files- README.md +2 -2
- special_tokens_map.json +2 -2
- tokenizer_config.json +14 -14
README.md
CHANGED
@@ -12,7 +12,7 @@ DeBERTaV2 with a short context length to save the memory.
|
|
12 |
|
13 |
The data set for validation with manual markup consisted of 362 thousand examples.
|
14 |
|
15 |
-
|![Validation results](https://huggingface.co/fkrasnov2/SBE/
|
16 |
|
17 |
|
18 |
```python
|
@@ -24,7 +24,7 @@ tokenizer = AutoTokenizer.from_pretrained('fkrasnov2/SBE')
|
|
24 |
input_ids = tokenizer.encode("чёрное платье", max_length=model.config.max_position_embeddings, truncation=True, return_tensors='pt')
|
25 |
|
26 |
model.eval()
|
27 |
-
vector = model(input_ids=input_ids, attention_mask=input_ids>
|
28 |
|
29 |
assert model.config.hidden_size == vector.shape[0]
|
30 |
```
|
|
|
12 |
|
13 |
The data set for validation with manual markup consisted of 362 thousand examples.
|
14 |
|
15 |
+
|![Validation results](https://huggingface.co/fkrasnov2/SBE/resolve/main/bvf_recall1k_query_len_eng.svg)|
|
16 |
|
17 |
|
18 |
```python
|
|
|
24 |
input_ids = tokenizer.encode("чёрное платье", max_length=model.config.max_position_embeddings, truncation=True, return_tensors='pt')
|
25 |
|
26 |
model.eval()
|
27 |
+
vector = model(input_ids=input_ids, attention_mask=input_ids>tokenizer.mask_token_id)[0][0,0]
|
28 |
|
29 |
assert model.config.hidden_size == vector.shape[0]
|
30 |
```
|
special_tokens_map.json
CHANGED
@@ -3,10 +3,10 @@
|
|
3 |
"cls_token": "[CLS]",
|
4 |
"eos_token": "[SEP]",
|
5 |
"mask_token": "[MASK]",
|
6 |
-
"pad_token": "
|
7 |
"sep_token": "[SEP]",
|
8 |
"unk_token": {
|
9 |
-
"content": "
|
10 |
"lstrip": false,
|
11 |
"normalized": true,
|
12 |
"rstrip": false,
|
|
|
3 |
"cls_token": "[CLS]",
|
4 |
"eos_token": "[SEP]",
|
5 |
"mask_token": "[MASK]",
|
6 |
+
"pad_token": "<pad>",
|
7 |
"sep_token": "[SEP]",
|
8 |
"unk_token": {
|
9 |
+
"content": "<unk>",
|
10 |
"lstrip": false,
|
11 |
"normalized": true,
|
12 |
"rstrip": false,
|
tokenizer_config.json
CHANGED
@@ -1,39 +1,39 @@
|
|
1 |
{
|
2 |
"added_tokens_decoder": {
|
3 |
-
"
|
4 |
-
"content": "
|
5 |
"lstrip": false,
|
6 |
"normalized": false,
|
7 |
"rstrip": false,
|
8 |
"single_word": false,
|
9 |
"special": true
|
10 |
},
|
11 |
-
"
|
12 |
-
"content": "
|
13 |
"lstrip": false,
|
14 |
-
"normalized":
|
15 |
"rstrip": false,
|
16 |
"single_word": false,
|
17 |
"special": true
|
18 |
},
|
19 |
-
"
|
20 |
-
"content": "[
|
21 |
"lstrip": false,
|
22 |
"normalized": false,
|
23 |
"rstrip": false,
|
24 |
"single_word": false,
|
25 |
"special": true
|
26 |
},
|
27 |
-
"
|
28 |
-
"content": "[
|
29 |
"lstrip": false,
|
30 |
-
"normalized":
|
31 |
"rstrip": false,
|
32 |
"single_word": false,
|
33 |
"special": true
|
34 |
},
|
35 |
-
"
|
36 |
-
"content": "[
|
37 |
"lstrip": false,
|
38 |
"normalized": false,
|
39 |
"rstrip": false,
|
@@ -48,10 +48,10 @@
|
|
48 |
"eos_token": "[SEP]",
|
49 |
"mask_token": "[MASK]",
|
50 |
"model_max_length": 1000000000000000019884624838656,
|
51 |
-
"pad_token": "
|
52 |
"sep_token": "[SEP]",
|
53 |
"sp_model_kwargs": {},
|
54 |
"split_by_punct": false,
|
55 |
"tokenizer_class": "DebertaV2Tokenizer",
|
56 |
-
"unk_token": "
|
57 |
}
|
|
|
1 |
{
|
2 |
"added_tokens_decoder": {
|
3 |
+
"0": {
|
4 |
+
"content": "<pad>",
|
5 |
"lstrip": false,
|
6 |
"normalized": false,
|
7 |
"rstrip": false,
|
8 |
"single_word": false,
|
9 |
"special": true
|
10 |
},
|
11 |
+
"1": {
|
12 |
+
"content": "<unk>",
|
13 |
"lstrip": false,
|
14 |
+
"normalized": true,
|
15 |
"rstrip": false,
|
16 |
"single_word": false,
|
17 |
"special": true
|
18 |
},
|
19 |
+
"2": {
|
20 |
+
"content": "[CLS]",
|
21 |
"lstrip": false,
|
22 |
"normalized": false,
|
23 |
"rstrip": false,
|
24 |
"single_word": false,
|
25 |
"special": true
|
26 |
},
|
27 |
+
"3": {
|
28 |
+
"content": "[SEP]",
|
29 |
"lstrip": false,
|
30 |
+
"normalized": false,
|
31 |
"rstrip": false,
|
32 |
"single_word": false,
|
33 |
"special": true
|
34 |
},
|
35 |
+
"4": {
|
36 |
+
"content": "[MASK]",
|
37 |
"lstrip": false,
|
38 |
"normalized": false,
|
39 |
"rstrip": false,
|
|
|
48 |
"eos_token": "[SEP]",
|
49 |
"mask_token": "[MASK]",
|
50 |
"model_max_length": 1000000000000000019884624838656,
|
51 |
+
"pad_token": "<pad>",
|
52 |
"sep_token": "[SEP]",
|
53 |
"sp_model_kwargs": {},
|
54 |
"split_by_punct": false,
|
55 |
"tokenizer_class": "DebertaV2Tokenizer",
|
56 |
+
"unk_token": "<unk>"
|
57 |
}
|