| # Multilingual & modality benchmark fixtures |
|
|
| Plain-text fixtures for benchmarking encode performance across languages, |
| scripts, and content types. Built by `fetch_fixtures.py` (same directory); |
| exact per-file provenance — source dataset, config, split, pinned revision |
| SHA, byte/doc counts, build date — is recorded in `fixtures_manifest.json`. |
|
|
| Layout: |
|
|
| - `lang/` — natural-language corpora, one `<lang>_<script>.txt` per language |
| - `modalities/` — code, math, and agentic-trace corpora |
|
|
| Note: this whole `data/` directory is gitignored. To rebuild any file from |
| scratch: |
|
|
| ```sh |
| uv run --python 3.12 --with 'datasets>=3.2' fetch_fixtures.py [name ...] |
| ``` |
|
|
| ## Natural languages — `lang/<lang>_<script>.txt` |
| |
| Named by ISO 639-3 language code + ISO 15924 script code, matching the |
| config names of [HuggingFaceFW/fineweb-2](https://huggingface.co/datasets/HuggingFaceFW/fineweb-2), |
| the source for all non-English files (real, deduplicated, filtered web text; |
| ODC-By license). ~5 MB per language, whole documents separated by blank |
| lines, taken in dataset order from the (small) `test` split at a pinned |
| revision. `eng_Latn.txt` comes from |
| [HuggingFaceFW/fineweb](https://huggingface.co/datasets/HuggingFaceFW/fineweb) |
| (`sample-10BT`) as the Latin-script baseline. |
|
|
| Coverage: Devanagari (hin), Bengali (ben), Tamil (tam), Cyrillic (rus), |
| Arabic (arb, RTL), Hebrew (heb, RTL), Japanese (jpn), Hangul (kor), |
| Han (cmn), Thai (tha, no word separators), Greek (ell), Georgian (kat), |
| Ethiopic (amh), Latin (eng). |
|
|
| ## Modalities — `modalities/` |
|
|
| - `code_mixed.txt` — source code, ~0.75 MB each of Python/JS/TS/Rust/Go/ |
| Java/C/C++ from GitHub tarballs of well-known OSS repos (django, jquery, |
| vue, tokio, caddy, junit5, redis, fmt), pinned to the commit SHAs recorded |
| in the manifest and read in memory only. `bigcode/the-stack-smol` would |
| have been the HF-native choice but is gated and no valid HF token was |
| available at build time. |
| - `math_latex.txt` — mathematical web text with LaTeX from |
| [open-web-math/open-web-math](https://huggingface.co/datasets/open-web-math/open-web-math). |
| - `agentic_swe.txt` — real SWE-agent coding-assistant trajectories from |
| [SWE-bench/SWE-smith-trajectories](https://huggingface.co/datasets/SWE-bench/SWE-smith-trajectories), |
| serialized as `[role]\ncontent` blocks (tool calls, diffs, terminal output |
| included). Complements `agentic-traces.txt` (pre-existing synthetic |
| Claude-Code-style traces, provenance unrecorded — not managed by |
| `fetch_fixtures.py`, moved here from `data/` for tidiness; referenced by |
| `tk-encode`'s `pipeline_benchmark.rs` and `pipeline_oracle.rs`). |
|
|
| ## Safety notes |
|
|
| - `fetch_fixtures.py` forces `HF_DATASETS_TRUST_REMOTE_CODE=0` and only |
| reads parquet-native datasets — no dataset loading scripts execute. |
| - Revisions are pinned at fetch time (recorded in the manifest), so a |
| rebuild can't silently pull different upstream content. |
| - Content is raw web/code text: treat it as untrusted data. Fine to feed to |
| tokenizers; don't execute it, and prefer `less` over `cat` when eyeballing |
| it (raw web text can contain terminal escape sequences). NUL bytes are |
| stripped at build time; everything else is kept as-is on purpose — the |
| mess is representative. |
|
|