Downloads · 30 days
0
nntsuzu/CJK-Phi-3.5-tokenizer
CJK-Phi-3.5-tokenizer is a machine learning model from nntsuzu. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
Phi-3.5-mini-instruct Tokenizer supporting Simplified Chinese, Traditional Chinese, Japanese, and Korean.
Downloads · 30 days
0
Access
Public
Updated Mar 3, 2026
Repo size
2.2 MB
Likes
0
Public
Click a slice to open those files.
.model2.2 MB · 100%
From the Hugging Face model README
Phi-3.5-mini-instruct Tokenizer supporting Simplified Chinese, Traditional Chinese, Japanese, and Korean.
from transformers import LlamaTokenizer
base_tokenizer = LlamaTokenizer.from_pretrained("microsoft/Phi-3.5-mini-instruct")
new_tokenizer = LlamaTokenizer.from_pretrained("nntsuzu/CJK-Phi-3.5-tokenizer")
text = (
"Hello. This sentence is written in English." \
"你好。这句话是用简体中文写的。" \
"你好。這句話是用繁體中文寫的。" \
"こんにちは。これは日本語で書かれた文章です。" \
"안녕하세요. 이 문장은 한국어로 쓰여졌습니다."
)
print("----------- Tokenzier test -----------")
print(f"Phi_3.5_mini_instruct: {base_tokenizer.tokenize(text)}\n")
print(f"new tokenizer: {new_tokenizer.tokenize(text)}\n")
This tokenizer supports many Traditional Chinese and Korean characters, so it can likely be used for Korean mixed scripts as well.
from transformers import LlamaTokenizer
base_tokenizer = LlamaTokenizer.from_pretrained("microsoft/Phi-3.5-mini-instruct")
new_tokenizer = LlamaTokenizer.from_pretrained("nntsuzu/CJK-Phi-3.5-tokenizer")
text = "이 토크나이저는 많은 繁体字나 한글을 支援하기 때문에 한글과 漢字가 混用한 文章에도 使用할 수 있는 可能性이 있습니다."
print("----------- Tokenzier test -----------")
print(f"Phi_3.5_mini_instruct: {base_tokenizer.tokenize(text)}\n")
print(f"new tokenizer: {new_tokenizer.tokenize(text)}\n")