ModelUpstage (Solar)Upstage (Solar)published May 2, 2024seen 5d

upstage/solar-1-mini-tokenizer

Open original ↗

Captured source

source ↗
published May 2, 2024seen 5dcaptured 15hhttp 200method plainlicense apache-2.0downloads 0likes 14

Upstage solar-1-mini tokenizer

  • Vocab size: 64,000
  • Langauge support: English, Korean, Japanese and more

Please use this tokenizer for tokenizing inputs for the Upstage solar-1-mini-chat model.

You can load it with the tokenizer library like this:

from tokenizers import Tokenizer

tokenizer = Tokenizer.from_pretrained("upstage/solar-1-mini-tokenizer")
text = "Hi, how are you?"
enc = tokenizer.encode(text)
print("Encoded input:")
print(enc)

inv_vocab = {v: k for k, v in tokenizer.get_vocab().items()}
tokens = [inv_vocab[token_id] for token_id in enc.ids]
print("Tokens:")
print(tokens)

number_of_tokens = len(enc.ids)
print("Number of tokens:", number_of_tokens)