ita-en-code-bpe-48k
A byte-level BPE tokenizer, vocab 49152 (48k), trained with
rustbpe on a 40% Italian / 40% English
/ 20% code mix (~4B chars), so it is efficient across all three:
- Italian β FineWeb-2
ita_Latn(filtered) - English β FineWeb-Edu
sample/100BT(int_score β₯ 3) - code β github-code-clean
Inference uses tiktoken β tokenizer.pkl
is a pickled tiktoken.Encoding. GPT-4 split pattern (cl100k). Italian stays
efficient (IT/EN share Latin script β shared merges) while English and code are
first-class.
Special tokens (aligned with DeepSeek-V4 / GLM-5.2)
33 special tokens, ids 49119β49151. Pretraining packs each doc <|bos|> β¦ <|eos|>.
| group | tokens |
|---|---|
| core | <|bos|> (49119), <|eos|> (49120), <|pad|> (49121) |
| chat | <|system|>, <|user|>, <|assistant|>, <|observation|> |
| turn | <|eot|> |
| reasoning | <think>, </think> |
| tools | <tool_call>, </tool_call>, <tool_response>, </tool_response> |
| code FIM | <|fim_begin|>, <|fim_hole|>, <|fim_end|> |
| reserved | <|reserved_0|> β¦ <|reserved_15|> |
Files
tokenizer.pklβ pickledtiktoken.Encoding.token_bytes.ptβ per-id UTF-8 byte length (0 for specials), for bits-per-byte eval.summary.jsonβ training config + stats.
Usage
import pickle
from huggingface_hub import hf_hub_download
enc = pickle.load(open(hf_hub_download("procmarco/ita-en-code-bpe-48k", "tokenizer.pkl"), "rb"))
ids = enc.encode_ordinary("def somma(a, b):\n return a + b # Ciao")
print(len(ids), enc.decode(ids))
pip install tiktoken runs it; training used rustbpe. Companion token dataset:
procmarco/ita-en-code-tokens-48k.
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support