No project description provided
Project description
AI21 Labs Tokenizer
Installation
pip
pip install ai21-tokenizer
poetry
poetry add ai21-tokenizer
Usage
Tokenizer Creation
from ai21_tokenizer import Tokenizer
tokenizer = Tokenizer.get_tokenizer()
# Your code here
Another way would be to use our Jurassic model directly:
from ai21_tokenizer import JurassicTokenizer
model_path = "<Path to your vocabs file. This is usually a binary file that end with .model>"
config = {} # "dictionary object of your config.json file"
tokenizer = JurassicTokenizer(model_path=model_path, config=config)
For more examples, please see our examples folder.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ai21_tokenizer-0.3.5.tar.gz
(2.6 MB
view hashes)
Built Distribution
Close
Hashes for ai21_tokenizer-0.3.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e13174160daef380a017b60eba77e27e7b8df6139d671a3af718117c0eb3bb2 |
|
MD5 | 1e4637aaf9323602afe782f110c8baa4 |
|
BLAKE2b-256 | 869cafb983569d46623659c2658d824e68a4405ee89d408f906277bae12a24a0 |