Richard Hoekstra

Reported experiments

Streaming byte models

What you can do with one-pass recurrent state on enwik8
Richard Hoekstra · 2026

The premise

This is a systematic autoresearch program: build many streaming byte-level models, measure them along a five-dimensional Pareto frontier, and let the winners drive the next round. The constraint is pure streaming — read each byte exactly once, no attention over past tokens, no KV cache, only recurrent state.

The question is whether learned components can beat random frozen reservoirs at this constraint. The underlying design principles: multi-timescale processing, predictive coding, frozen reservoirs, precision gating.

The frontier

Every model is scored on five axes:

Streaming constraints rule out attention over the full context. What remains is architecture-level creativity: how do you get attention-like expressiveness out of recurrent state alone?

Results

Best reported predictive score

ModelBPC (enwik8)Params
multi_scale_attn1.64915.8M
AdaptiveDepthRefineAttnGRU1.711~12M
Predictive coding 7L×512d1.86056M
Per-layer memory 7L×512d1.86528M
Shared memory 7L×512d1.94428M

The cited PPM-C result is 2.16 bits per byte. Comparing a trained predictor’s held-out log loss with an actual coded stream requires the same evaluation bytes, model-cost convention and coding overhead. This table reports the original predictive scores.

What worked

Iterative entropy refinement. Make an initial prediction, compute entropy features, adjust, repeat. This single mechanism drives most of the gain from ~2.1 BPC to sub-2.0.

Learned entropy features over hand-crafted. Start with softmax entropy, top-k mass, and logit variance; then let the model learn which features actually matter. The learned version dominates.

Multi-timescale reservoirs. ESN cores with different leak rates (α) at spectral radius ~0.95 capture short and long dynamics in one pass.

Per-layer memory beats shared memory. At 7 layers × 512d, per-layer memory banks (1.865 BPC) beat a shared memory (1.944 BPC) at the same parameter count.

CRT memory for algorithmic tasks. Chinese Remainder Theorem decomposition (2×3×5×7 = 210 states) gives hard attention over small discrete spaces. Copy/reverse/add/parity tasks: 95% accuracy with CRT hard attention vs 0% with soft attention over many slots.

What didn’t work

Architecture lineage

The research archive preserves the evolution:

A registry-based factory lets experiments reload any historical variant:

from bytehan.streaming import get_model
model = get_model('adaptive_depth_refine_attn_gru')

Methodology

Training data is enwik8 (100MB Wikipedia XML): 90MB train, 5MB validation, 5MB test. Each architectural variant goes through a fixed evaluation harness to keep numbers comparable.

For smaller-scale ablations a combined math+language benchmark is used (27K bytes synthetic arithmetic + 8K enwik8). The winner at that scale: [worldmodel_refine, refinement] at 2.96 combined BPC.

Modal Cloud handles training at scale via modal_runner.py.

The streaming constraint as a forcing function

The 15.8M-parameter model uses multi-scale attention and has the lowest reported score here. Other variants explore refinement of recurrent state. Bounded or streaming access and absence of attention are different experimental conditions.

To isolate the contribution of refinement, compare otherwise identical models with comparable state, data and compute, then ablate refinement and attention separately.

The program is pareto-oriented: no single axis of the frontier dominates. The champion at 1.649 BPC uses 15.8M parameters and multi-scale attention; a smaller variant at 12M reaches 1.711. Choosing between them depends on which of the five dimensions matter most for a deployment.
Cite this page

Richard Hoekstra. Streaming byte models. https://richardhoekstra.nl/papers/streaming-byte-models.html