|
Download benchmark/README.md from Samai-sa/SamAI-Tokenizer: direct link, hf CLI and curl.
- Browser
- Download file 1.5 kB
-
https://huggingface.co/Samai-sa/SamAI-Tokenizer/resolve/main/benchmark/README.md
- Command line
-
hf download hf://Samai-sa/SamAI-Tokenizer/benchmark/README.md
-
curl -L -o README.md https://huggingface.co/Samai-sa/SamAI-Tokenizer/resolve/main/benchmark/README.md
1.5 kB
Benchmark reproduction
The benchmark compares SamAI-Tokenizer with Arabic-focused and recent multilingual tokenizers on four datasets. It downloads tokenizer assets only, not model weights.
Run
From the repository root:
python -m venv .venv
source .venv/bin/activate
pip install -r benchmark/requirements.txt
python benchmark/benchmark.py
Generated files are written to results/generated/. Override paths when
needed:
SAMAI_TOKENIZER_PATH=/path/to/tokenizer.json \
SAMAI_BENCHMARK_OUTPUT=/path/to/results \
python benchmark/benchmark.py
Third-party remote code is disabled by default. Some custom tokenizers will be skipped unless you review their repositories and explicitly opt in:
SAMAI_TRUST_REMOTE_CODE=1 python benchmark/benchmark.py
Gated repositories also require accepting their terms and authenticating with Hugging Face before running the script.
Published files
arabic_4bench_macro_average.csv: equal 25% weight per benchmark; primary ranking.arabic_4bench_pooled_overall.csv: all tokens and words pooled together.arabic_4bench_by_benchmark.csv: result for every tokenizer and benchmark.arabic_4bench_by_category.csv: detailed subject, dialect, and intent breakdowns.arabicmmlu_summary.csvandarabicmmlu_by_subject.csv: the original ArabicMMLU-only comparison.
The script also produces document-level results locally. Those results are not published because they contain copies of benchmark text.