Skip to page content
SAVRN
Search Plan a project

Open-weight model

grouptok-en-sw-af-de-fr-es-zh-152k

by Henry Hale henryhale/grouptok-en-sw-af-de-fr-es-zh-152k

grouptok-en-sw-af-de-fr-es-zh-152k is an open-weight model from Henry Hale, released under Apache License 2.0. Its published files total 13.3 MB.

A byte-level BPE tokenizer of 151,665 tokens for English, Swahili, Afrikaans, German, French, Spanish and Chinese, whose vocabulary is grouped by translation with grouptok: a group gathers tokens that translate each other, across languages (e.g.

Parameters—
Context—
Weights13.3 MB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads—

Model Card

By Henry Hale, published under apache-2.0, revision 95091415d63b.

A byte-level BPE tokenizer of 151,665 tokens for English, Swahili, Afrikaans, German, French, Spanish and Chinese, whose vocabulary is grouped by translation with grouptok: a group gathers tokens that translate each other, across languages (e.g. water, Wasser, eau, agua, maji). Its tokenizer.json is exactly that of the baseline bpe-en-sw-af-de-fr-es-zh-152k, so the two split every text identically and differ only in groups.json. No pad, bos or eos token is declared; set them for your model if you need them. Each sentence pair is split by the BPE, and its language's aligner links the English subwords to the other side's. The links of all pairs and all languages are pooled and turned into…

Read Henry Hale's full model card

A byte-level BPE tokenizer of 151,665 tokens for English, Swahili, Afrikaans, German, French, Spanish and Chinese, whose vocabulary is grouped by translation with grouptok: a group gathers tokens that translate each other, across languages (e.g. water, Wasser, eau, agua, maji). Its tokenizer.json is exactly that of the baseline bpe-en-sw-af-de-fr-es-zh-152k, so the two split every text identically and differ only in groups.json.

Details

Vocabulary 151,665 tokens (the BPE baseline's, unchanged)
Model byte-level BPE, no prefix space, 256-byte alphabet
Groups translation groups of at most 14 members (twice the 7 languages); tokens without a translation link stay in groups of their own
Aligners awesome-align (layer 8) for German, French, Spanish and Chinese; XLM-R base (layer 8) for Swahili and Afrikaans
Trained with grouptok 0.5.0: GroupedTokenizer.train(..., tokenizer=<the BPE>), alignment and grouping only
Reserved tokens <\|im_start\|>, <\|im_end\|>, <think>, </think> (ids 0-3), never grouped
Training data the BPE's 1,000,000 English–X sentence pairs per language (below)

No pad, bos or eos token is declared; set them for your model if you need them.

How the groups are made

Each sentence pair is split by the BPE, and its language's aligner links the English subwords to the other side's. The links of all pairs and all languages are pooled and turned into groups, so one group can hold the word in several languages, although each aligner only ever saw English with one of them. English is the first side of every pair, so a group's member 0 is its English word.

Usage

Any library that reads tokenizer.json tokenizes text exactly as the BPE baseline:

from transformers import AutoTokenizer

tok = AutoTokenizer.from_pretrained("henryhale/grouptok-en-sw-af-de-fr-es-zh-152k")
tok("The water is cold").input_ids

The groups, with grouptok (pip install grouptok):

from huggingface_hub import snapshot_download
from grouptok import GroupedTokenizer

tok = GroupedTokenizer.from_pretrained(snapshot_download("henryhale/grouptok-en-sw-af-de-fr-es-zh-152k"))
groups = tok.readable_groups()
next(g for g in groups if " water" in g)

or from groups.json alone, each token's group and member slot:

import json
from huggingface_hub import hf_hub_download

groups = json.load(open(hf_hub_download("henryhale/grouptok-en-sw-af-de-fr-es-zh-152k", "groups.json")))
[(groups["token_group"][i], groups["token_member"][i]) for i in tok("The water is cold").input_ids]

Files

  • tokenizer.json, tokenizer_config.json: the tokenizer (and a chat template), identical to the BPE baseline's
  • groups.json: the translation groups, each token's group id and member slot

Training data

The BPE baseline's: 1,000,000 English–X sentence pairs per language. Where a language has two corpora, all of the smaller one and the first rows of the larger one.

Language Corpora
German Europarl (WMT14) de-en, first 776,847 pairs; News Commentary de-en, all 223,153
French Europarl (WMT14) fr-en, first 790,521 pairs; News Commentary en-fr, all 209,479
Spanish Europarl en-es, first 761,128 pairs; News Commentary en-es, all 238,872
Chinese News Commentary (WMT19) zh-en, first 311,500 pairs; UN Parallel Corpus en-zh, first 688,500
Swahili NLLB mined pairs, best-scored first 1,000,000
Afrikaans NLLB mined pairs, best-scored first 1,000,000

Limitations

  • The groups inherit the aligners' errors, and the aligners differ by language, so group quality differs by language too.
  • Groups link single subwords one to one: multi-word expressions and their one-word translations are never grouped.
  • The training text is mostly parliamentary, news, UN and web-mined text, and the languages are balanced by number of sentence pairs, not by amount of text.

Identity and Version

Repository
henryhale/grouptok-en-sw-af-de-fr-es-zh-152k
Publisher
Henry Hale
Task
Not stated by the source
Modality
Other
Library
tokenizers
Parameters
Not stated by the source
Languages
en, sw, af, de, fr, es, zh
Revision
95091415d63bc89c4ee5d6b03908acc376868f30
First published
2026-10-17
Last updated
2026-10-17

Files and Weights

6 files, 13.3 MB in total.

Configuration1 file · 1.5 MB
Tokenizer2 files · 11.8 MB
Documentation1 file · 5.0 KB
Other1 file · 13.9 KB
Repository1 file · 1.6 KB
Every file
FileTypeSizeSHA-256
groups.jsonConfiguration1.5 MB —
README.mdDocumentation5.0 KB —
log_gpu0.txtOther13.9 KB —
.gitattributesRepository1.6 KB —
tokenizer.jsonTokenizer11.8 MB a87af6c22e66
tokenizer_config.jsonTokenizer2.9 KB —

License and Download

License
apache-2.0
Access
Open weights, no gate
Download from Henry Hale

Released by Henry Hale through its official repository on Hugging Face. Read the license.

Questions About grouptok-en-sw-af-de-fr-es-zh-152k

Can I use grouptok-en-sw-af-de-fr-es-zh-152k commercially?

Yes. grouptok-en-sw-af-de-fr-es-zh-152k is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.