rerank-v3.5 / README.md
tomaarsen's picture
tomaarsen HF Staff
Update model metadata to set pipeline tag to the new `text-ranking`
5976354 verified
|
raw
history blame
559 Bytes
---
pipeline_tag: text-ranking
---
# Cohere `rerank-v3.5` tokenizer
This is the tokenizer for the [Cohere Rerank v3.5 model](https://cohere.com/blog/rerank-3pt5) .
You can load it with the tokenizers library like this:
```python
from tokenizers import Tokenizer
tokenizer = Tokenizer.from_pretrained("Cohere/rerank-v3.5")
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)
```