Reported experiments
Streaming byte models
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:
- BPC (bits per character) — lower is better
- Parameters — lower is better
- Training FLOPS — lower is better
- Inference ms/token — lower is better
- Max context length — higher is better
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
| Model | BPC (enwik8) | Params |
|---|---|---|
| multi_scale_attn | 1.649 | 15.8M |
| AdaptiveDepthRefineAttnGRU | 1.711 | ~12M |
| Predictive coding 7L×512d | 1.860 | 56M |
| Per-layer memory 7L×512d | 1.865 | 28M |
| Shared memory 7L×512d | 1.944 | 28M |
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
- Kalman fusion — optimal signal fusion adds complexity without benefit at this scale.
- CVaR loss — worst-case optimization actively hurts; the full-stack combo lands at 11.7 BPC.
- Discrete hemisphere pattern hashing — no improvement over learned refinement.
- More components is worse. Stacking all known-good components (“full stack”) gives the worst scores. Simple beats complex.
Architecture lineage
The research archive preserves the evolution:
archive/experiments/beetle/— 107 beetle_*.py files, the long tail of attempts.archive/experiments/colab/— 17 colab_*.py, parallelized sweeps.archive/experiments/standalone/— sweep and fusion scripts.bytehan/streaming_byte.py— 127+ research models retained as code.bytehan/streaming/— the four distilled champion streaming models.
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.
Cite this page
Richard Hoekstra. Streaming byte models. https://richardhoekstra.nl/papers/streaming-byte-models.html