File size: 460 Bytes
708f4a3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from crayon import CrayonVocab

tokenizer = CrayonVocab(device="auto")

print("--- Testing Standard ---")
tokenizer.load_profile("standard")
tokens_std = tokenizer.tokenize("that is a test for the standard profile and lite profile and god")
print(tokens_std)
print(tokenizer.decode(tokens_std))

print("--- Testing Lite ---")
tokenizer.load_profile("lite")
tokens_lite = tokenizer.tokenize("my daughter")
print(tokens_lite)
print(tokenizer.decode(tokens_lite))