Skip to content

Commit f39dcb2

Browse files
committed
docs: add note about jamba 1.5s
1 parent 1e09db1 commit f39dcb2

File tree

5 files changed

+34
-0
lines changed

5 files changed

+34
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@
1717

1818
---
1919

20+
## Prerequisites
21+
22+
- If you wish to use the tokenizers for `Jamba 1.5 Mini` or `Jamba 1.5 Large`, you will need to request access to the relevant model's HuggingFace repo:
23+
- [Jamba 1.5 Mini](https://huggingface.co/ai21labs/AI21-Jamba-1.5-Mini)
24+
- [Jamba 1.5 Large](https://huggingface.co/ai21labs/AI21-Jamba-1.5-Large)
25+
2026
## Installation
2127

2228
### pip

examples/async_jamba_1_5_tokenizer.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
from ai21_tokenizer import Tokenizer, PreTrainedTokenizers
44

5+
"""
6+
If you wish to use the tokenizers for `Jamba 1.5 Mini` or `Jamba 1.5 Large`,
7+
you will need to request access to the relevant model's HuggingFace repo:
8+
* https://huggingface.co/ai21labs/AI21-Jamba-1.5-Mini
9+
* https://huggingface.co/ai21labs/AI21-Jamba-1.5-Large
10+
"""
11+
512

613
async def main():
714
tokenizer = await Tokenizer.get_async_tokenizer(PreTrainedTokenizers.JAMBA_1_5_MINI_TOKENIZER)

examples/jamba_1_5_tokenizer.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
from ai21_tokenizer import Jamba1_5Tokenizer
22

3+
"""
4+
If you wish to use the tokenizers for `Jamba 1.5 Mini` or `Jamba 1.5 Large`,
5+
you will need to request access to the relevant model's HuggingFace repo:
6+
* https://huggingface.co/ai21labs/AI21-Jamba-1.5-Mini
7+
* https://huggingface.co/ai21labs/AI21-Jamba-1.5-Large
8+
"""
9+
310
model_path = "ai21labs/AI21-Jamba-1.5-Mini"
411

512
tokenizer = Jamba1_5Tokenizer(model_path=model_path)

examples/use_async_tokenizer.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
from ai21_tokenizer import Tokenizer
44

5+
"""
6+
If you wish to use the tokenizers for `Jamba 1.5 Mini` or `Jamba 1.5 Large`,
7+
you will need to request access to the relevant model's HuggingFace repo:
8+
* https://huggingface.co/ai21labs/AI21-Jamba-1.5-Mini
9+
* https://huggingface.co/ai21labs/AI21-Jamba-1.5-Large
10+
"""
11+
512

613
async def main():
714
tokenizer = await Tokenizer.get_async_tokenizer()

examples/use_tokenizer.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
from ai21_tokenizer import Tokenizer
22

3+
"""
4+
If you wish to use the tokenizers for `Jamba 1.5 Mini` or `Jamba 1.5 Large`,
5+
you will need to request access to the relevant model's HuggingFace repo:
6+
* https://huggingface.co/ai21labs/AI21-Jamba-1.5-Mini
7+
* https://huggingface.co/ai21labs/AI21-Jamba-1.5-Large
8+
"""
9+
310
tokenizer = Tokenizer.get_tokenizer()
411
example_sentence = "This sentence should be encoded and then decoded. Hurray!!"
512
encoded = tokenizer.encode(example_sentence)

0 commit comments

Comments
 (0)