add
Browse files- .gitattributes +2 -0
- README.md +22 -0
- added_tokens.json +3 -0
- special_tokens_map.json +9 -0
- spm.model +3 -0
- tokenizer.json +3 -0
- tokenizer_config.json +16 -0
.gitattributes
CHANGED
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
spm.model filter=lfs diff=lfs merge=lfs -text
|
37 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Cohere `rerank-multilingual-v2.0` tokenizer
|
2 |
+
|
3 |
+
This is the tokenizer for the [Cohere Rerank Model](https://txt.cohere.com/rerank/).
|
4 |
+
|
5 |
+
You can load it with the transformers library like this:
|
6 |
+
```python
|
7 |
+
from transformers import AutoTokenizer
|
8 |
+
|
9 |
+
tokenizer = AutoTokenizer.from_pretrained("Cohere/rerank-multilingual-v2.0")
|
10 |
+
text = "Hello World, this is my input string!"
|
11 |
+
enc = tokenizer(text)
|
12 |
+
print("Encoded input:")
|
13 |
+
print(enc)
|
14 |
+
|
15 |
+
inv_vocab = {v: k for k, v in tokenizer.vocab.items()}
|
16 |
+
tokens = [inv_vocab[token_id] for token_id in enc['input_ids']]
|
17 |
+
print("Tokens:")
|
18 |
+
print(tokens)
|
19 |
+
|
20 |
+
number_of_tokens = len(enc['input_ids'])
|
21 |
+
print("Number of tokens:", number_of_tokens)
|
22 |
+
```
|
added_tokens.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"[MASK]": 250101
|
3 |
+
}
|
special_tokens_map.json
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": "[CLS]",
|
3 |
+
"cls_token": "[CLS]",
|
4 |
+
"eos_token": "[SEP]",
|
5 |
+
"mask_token": "[MASK]",
|
6 |
+
"pad_token": "[PAD]",
|
7 |
+
"sep_token": "[SEP]",
|
8 |
+
"unk_token": "[UNK]"
|
9 |
+
}
|
spm.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:13c8d666d62a7bc4ac8f040aab68e942c861f93303156cc28f5c7e885d86d6e3
|
3 |
+
size 4305025
|
tokenizer.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6f06fc3bbcbbc8f07be861b9a6a69e177247bc549b2bcbf0483e4dd98c06b6f6
|
3 |
+
size 16331301
|
tokenizer_config.json
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": "[CLS]",
|
3 |
+
"clean_up_tokenization_spaces": true,
|
4 |
+
"cls_token": "[CLS]",
|
5 |
+
"do_lower_case": false,
|
6 |
+
"eos_token": "[SEP]",
|
7 |
+
"mask_token": "[MASK]",
|
8 |
+
"model_max_length": 512,
|
9 |
+
"pad_token": "[PAD]",
|
10 |
+
"sep_token": "[SEP]",
|
11 |
+
"sp_model_kwargs": {},
|
12 |
+
"split_by_punct": false,
|
13 |
+
"tokenizer_class": "DebertaV2Tokenizer",
|
14 |
+
"unk_token": "[UNK]",
|
15 |
+
"vocab_type": "spm"
|
16 |
+
}
|