Halo Competition / opt-hf / data-processing

Halo prepares
training data
faster

Halo prepares the same raw-text training data faster. The candidate improved all 16 official CPU16 reference rows with exact output digests.

Qwen3 4B · 16 pinned CPUs

4.50×

Higher preparation throughput

Base3,384.0 rows/s
Candidate15,236.9 rows/s
Reference comparisons
16 / 16
Geometric mean gain
4.09×
Pinned tokenizer configurations
8
Qwen3 whole launch
48.1 → 24.7 s

01 / Method

The path from text to packed rows

Halo decodes the input, tokenizes and filters documents, packs their IDs into bounded sequences, then writes the artifact that training reads. This work removes intermediate Python objects from that path.

  1. 01

    Encode and filter

    Read contiguous Arrow text buffers, encode BPE, and apply Halo’s row filter in the same pass. Unsupported tokenizer configurations take the Hugging Face path.

    Native tokenizer source
  2. 02

    Preserve tokenizer semantics

    Whole-piece vocabulary lookup handles six ByteLevel configurations. Gemma uses normalized spans and byte fallback. The merge queue uses priority rank and leftmost position.

  3. 03

    Pack Arrow buffers

    Keep TRL’s 1,000-row grouping, tie order and document lengths while packing directly from typed Arrow buffers.

    Arrow packer source
  4. 04

    Write ordered shards

    Write independently produced shards and publish their index in input order. The reference row writes one shard; concurrent writes apply to larger multi-shard exports.

What this adds to prior work

The contribution is the integration inside Halo: exact encoding and filtering from Arrow text buffers, followed by native packing and ordered publication. Eligibility comes from tokenizer behavior, so the same path can serve several model families.

The encoder follows Hugging Face Tokenizers 0.23.1 ↗ semantics. The native packer preserves TRL 1.14.2 ↗ best-fit grouping, segment-tree selection and tie behavior. Ding et al. ↗ published best-fit document packing, and Apache Arrow ↗ defines the exchanged buffers.

tiktoken ↗ and Gigatoken ↗ are native BPE precedents. @peal333’s public Halo report ↗ uses Hugging Face’s offset-free encoder and an Arrow filter fast path, without changing packing.

02 / Results

Every measured row improved

Gains ranged from 2.41× to 4.93× against each row’s own baseline. Qwen3 full preparation is the submitted row. The other 15 results document coverage.

Benchmark explorer

Choose a row to inspect its three repeats and pinned tokenizer.

Download CSV
Family / workloadGainBase / candidateEvidence
Qwen3 4BFull preparationSubmitted row
4.503×
3,384.0 rows/s
15,236.9 rows/s
JSON
Qwen3 4BTokenization
4.810×
3.498M tokens/s
16.826M tokens/s
JSON
GPT-OSS 20BFull preparation
3.832×
3,902.1 rows/s
14,954.4 rows/s
JSON
GPT-OSS 20BTokenization
3.871×
3.852M tokens/s
14.912M tokens/s
JSON
Gemma 4 26BFull preparation
2.406×
3,100.7 rows/s
7,461.6 rows/s
JSON
Gemma 4 26BTokenization
2.526×
3.338M tokens/s
8.430M tokens/s
JSON
Mistral Small 4Full preparation
4.632×
3,672.6 rows/s
17,009.7 rows/s
JSON
Mistral Small 4Tokenization
4.368×
4.640M tokens/s
20.264M tokens/s
JSON
Nemotron 3.5 LightningFull preparation
4.359×
4,252.4 rows/s
18,535.7 rows/s
JSON
Nemotron 3.5 LightningTokenization
4.874×
4.367M tokens/s
21.289M tokens/s
JSON
Inkling 2 SmallFull preparation
4.486×
2,269.7 rows/s
10,181.2 rows/s
JSON
Inkling 2 SmallTokenization
4.803×
4.568M tokens/s
21.940M tokens/s
JSON
Muse Glimmer 30BFull preparation
3.758×
3,719.1 rows/s
13,978.2 rows/s
JSON
Muse Glimmer 30BTokenization
4.139×
4.044M tokens/s
16.740M tokens/s
JSON
Muse Spark OpenFull preparation
4.933×
3,133.4 rows/s
15,458.3 rows/s
JSON
Muse Spark OpenTokenization
4.339×
4.440M tokens/s
19.263M tokens/s
JSON

03 / Evidence

Where Qwen3 saved time

The 4.5027× throughput gain held up in the full process launch. Tokenization accounted for the largest stage saving. Filtering moved inside tokenization, leaving no separate filter stage on the candidate.

Preparation stages

Median seconds per stage. All bars share a 22-second scale.

Load

Base2.55 s
Candidate2.07 s

Tokenize

Base20.89 s
Candidate3.94 s

Filter

Base4.82 s
Candidate0.00 s

Pack

Base0.97 s
Candidate0.34 s

Write

Base0.32 s
Candidate0.17 s

Whole Qwen3 launch

Process start to exit, including setup and teardown.

Base48.1 s
Candidate24.7 s

Reference checks passed

  • Pinned inputs and CPU affinity
  • Exact ordered output digests
  • Isolated launch caches
  • Whole-launch time saved
Supporting diagnostics and correctness checks

Tokenizer ablation

3.45 s native vs 31.76 s for the tested HF batched path. Three launches per arm, identical token ID and mask digests. This isolates encoding and Arrow output from the rest of the pipeline.

Tokenizer ablation runs

Host collation

On 32 real-text documents, median assembly went from 1.615 → 0.567 ms padding-free and 2.867 → 0.824 ms packed. The digests matched. This measures host assembly only.

Collator measurements

Distributed parity

Both ranks matched packed IDs, labels and document lengths across the two commits for BFD and BFD-split. Earlier H100 checks also confirmed that FlashAttention kept packed documents isolated.

Two-rank parity outputs

04 / Reproduction

One command in two checkouts

Use the public Halo Hopper 1.3.0 image on an idle host with 16 usable CPUs. Run from each checkout with separate empty scratch and Hugging Face caches.

python scripts/benchmarks/reference/compare.py measure qwen3-4b-data-processing-cpu16

Cold reproduction

87.34 s base → 64.60 s candidate, including public downloads. Both REFERENCE_RESULT lines reported this batch_digests_sha256:

67589e2129ce273b4c4fe5f8ac9929d8f921432493d29c87711ccf27cf3023ee

Cold reproduction JSON

Code and evidence

Measured snapshot
07dab6df4c7c286f9388403ffbe12d3fc9516ff3

The measured snapshot and published tree match for Halo code, tests, benchmark scripts and agent docs. The scored comparison uses compare.py run with three interleaved repeats and one discarded warm-up per side.

05 / Scope

Inputs, platforms and limits

Pinned inputs

Qwen/Qwen3-4B-Instruct-2507 cdbee75f17c01a7cc42f958dc650907174af0554

The first 100,000 documents of FineWeb-Edu · sample-10BT, revision 87f09149ef4734204d70ed1d046ddc9ca3f2b8f9. The explorer links the exact tokenizer revision for every row.

Team lead: @1-ARIjitS

Platforms used

Modal ran the 16 reference comparisons on one H100 host per row with 16 pinned CPU cores. It also ran the cold reproduction and correctness probes. Hugging Face hosted the public models, dataset and this report.

Measurement limits

The official results cover offline raw-text preparation and tokenization. They do not measure GPU training step time or other tokenizer configurations. Focused CPU checks passed; Modal’s networking and /proc restrictions prevented completion of the broader port-dependent CPU suite.