rerank-english-v3.0 / README.md
calpt's picture
Add tokenizer
9fe3a18
|
raw
history blame contribute delete
No virus
535 Bytes
# Cohere `rerank-english-v3.0` tokenizer
This is the tokenizer for the [Cohere Rerank](https://cohere.com/rerank) English v3 model.
You can load it with the tokenizers library like this:
```python
from tokenizers import Tokenizer
tokenizer = Tokenizer.from_pretrained("Cohere/rerank-english-v3.0")
text = "Hello World, this is my input string!"
enc = tokenizer.encode(text)
print("Encoded input:")
print(enc.ids)
print("Tokens:")
print(enc.tokens)
number_of_tokens = len(enc.ids)
print("Number of tokens:", number_of_tokens)
```