Fedor Krasnov commited on
Commit
4121962
·
1 Parent(s): 768080d

Correct svg URL, Correct MASK_ID

Browse files
Files changed (3) hide show
  1. README.md +2 -2
  2. special_tokens_map.json +2 -2
  3. 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/blob/main/bvf_recall1k_query_len_eng.svg)|
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>3)[0][0,0]
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": "[PAD]",
7
  "sep_token": "[SEP]",
8
  "unk_token": {
9
- "content": "[UNK]",
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
- "2": {
4
- "content": "[CLS]",
5
  "lstrip": false,
6
  "normalized": false,
7
  "rstrip": false,
8
  "single_word": false,
9
  "special": true
10
  },
11
- "3": {
12
- "content": "[SEP]",
13
  "lstrip": false,
14
- "normalized": false,
15
  "rstrip": false,
16
  "single_word": false,
17
  "special": true
18
  },
19
- "4": {
20
- "content": "[MASK]",
21
  "lstrip": false,
22
  "normalized": false,
23
  "rstrip": false,
24
  "single_word": false,
25
  "special": true
26
  },
27
- "32000": {
28
- "content": "[UNK]",
29
  "lstrip": false,
30
- "normalized": true,
31
  "rstrip": false,
32
  "single_word": false,
33
  "special": true
34
  },
35
- "32001": {
36
- "content": "[PAD]",
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": "[PAD]",
52
  "sep_token": "[SEP]",
53
  "sp_model_kwargs": {},
54
  "split_by_punct": false,
55
  "tokenizer_class": "DebertaV2Tokenizer",
56
- "unk_token": "[UNK]"
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
  }