NCM-TinyStories-87M-MLX
An 87.4M-parameter Next-Concept Modeling (NCM) generator trained from scratch on TinyStories with ncm-mlx, together with the frozen 15.5M-value codec it generates in. Instead of writing one token per model call, NCM writes a whole level of discrete latent codes per call, coarse to fine: a 128-token story takes 11 generator calls. The method is by Kumbong et al. (arXiv:2610.14162); this model and the training code are an independent MLX implementation, not affiliated with HazyResearch or Stanford.
A research artifact, not a good text generator. This is the best NCM trained in this project, and it still has about 2.13 times the GPT-2-large perplexity of AR-TinyStories-91M-MLX, an autoregressive baseline built from the same blocks and trained on the same windows.
Previously published as janmusic/ncm-tinystories-87m-x4-mlx; the old name redirects here.
At a glance
| Generator | 87,426,059 parameters: 12 blocks, width 768, 12 heads, block-diagonal attention, codebook-tied output heads |
| Codec | 15,508,096 values, frozen (the codec trained for the 12M experiments, E21) |
| Tokenizer | 8,192-token BPE, 128-token windows |
| Hierarchy | 12 levels: 1, 8, 16, 24, 32, 40, 52, 64, 76, 92, 108, 128; level 0 is drawn from a stored unigram, then 11 generator calls |
| Conditioning | none: unconditional generation from a one-token start prefix |
| Training | 60,000 updates at batch 64 (3,840,000 windows, four times the original 960,000), bf16 with fp32 master weights, seed 0 |
| Format | float32 safetensors, loaded by ncm_mlx; not a Transformers or mlx_lm checkpoint |
Quick start
pip install "ncm-mlx==0.4.0" huggingface-hub # Apple Silicon, Python 3.12
hf download janmusic/NCM-TinyStories-87M-MLX --local-dir ncm-tinystories-87m
python -m ncm_mlx official generate --task tinystories --weights ncm-tinystories-87m --n 2 --levels
--levels prints the decode after every level. Intermediate decodes can be incoherent and are not a trace of model reasoning. Apple Silicon runs on Metal; add --cpu to run on the CPU. On Linux with an NVIDIA GPU, install ncm-mlx[cuda] instead (platforms).
Results
| NCM-TinyStories-87M-MLX (this model) | AR-TinyStories-91M-MLX | |
|---|---|---|
| Parameters | 87,426,059 (generator) | 91,348,992 |
| GPT-2-large generative perplexity, mean (SD) over 5 sampling seeds, lower is better | 24.404 (0.848) | 11.484 (0.341) |
| Ratio NCM / AR | 2.13 | |
| Clean teacher-forced loss | 1.51620 nats per code | 1.01081 nats per BPE token |
| Model calls per 128-token sample | 11 (plus the stored level-0 unigram) | 128 |
For reference under the same scorer: held-out real text 8.529, and the released TinyStories checkpoint of Kumbong et al. 16.259 (a model with a much larger training budget; see NCM-TinyStories-89M-Upstream-MLX). Generative perplexity uses 1,280 unconditional samples per model (5 sampling seeds × 256), temperature 1, no top-k or top-p, scored by GPT-2 large (openai-community/gpt2-large@32b71b1) with no BOS token, up to 1,024 tokens. The code loss and the token loss are different targets and are not compared with each other. Fewer model calls does not mean faster generation: an NCM call is larger than an AR call, and NCM adds a codec decode.
How the gap changed with size and data
The ratio falls with both size and data but stays above 2. The step from 50M to 87M (26.148 to 24.404 at 4x data) is smaller than the seed-to-seed difference measured at 12M, so it is not distinguishable from training-seed variation.
One level at a time vs one token at a time
A real unconditional sample of this model (sample 0 of seed 0, the first of its seed whose first sentence is well formed). The AR panel is AR-TinyStories-91M-MLX replaying the same 128 tokens one call per token (forced decoding); it is not an independent AR sample. The counter counts model calls, not time.
The first sentence of the same sample after each of the 12 levels, shown without selection. The rest of that sample is rougher than its first sentence.
An unselected sample
The first sample of sampling seed 0 (temperature 1, no filtering), shown in full and not chosen for fluency:
Once was a time, a little dog named Max lived near a little house. The house had a big fireplace that had many things to play with. Max liked to play in the house and look fun. One day, Max went to the fireplace with his mom to the park. He saw a big tree with red cherries. He thought, "I want to eat that tree!" Max wanted to climb the tree, so jumped in his mouth and started to climb. But the tree was hard. Max ran and ran until he big. tree. Max a top of the tree. He was not scared anymore. Instead of,
Honest limits
- Clearly worse than autoregression. The ratio to the matched AR baseline is 2.13. The text has broken words and sentences that lose their thread.
- One training seed. The 12M version of this recipe differs by 2.2 perplexity between two training seeds. No repeat exists at this size.
- Precision and data change together. This model was trained in bf16 on four times the windows of the earlier fp32 runs. bf16 parity with fp32 was checked only for the 12M generator at the original data.
- Frozen codec. The codec is the one trained for the 12M experiments (E21) and was never retrained or enlarged with the generator.
- Compute is not matched. The NCM and the AR baseline see the same 3,840,000 windows but not the same compute; an NCM stage costs more per window.
- Narrow evaluation. TinyStories is synthetic GPT-4 prose. Samples are 128-token openings with no prompt. One external scorer, no human rating. Generative perplexity rewards fluent, repetitive text and is not a quality proof.
- No instructions, no chat. The model does not take prompts.
Files
| File | Contents | Size |
|---|---|---|
generator.safetensors | NCM generator | 349.7 MB |
codec.safetensors | Frozen codec | 62.0 MB |
inference.safetensors | Level-0 unigram | 8.3 kB |
spec.json | Architecture, full training configuration and history | 103 kB |
config.json | Metadata for the Hub (it lets the Hub count downloads); not read by ncm-mlx | 0.6 kB |
bpe.json | 8,192-token BPE tokenizer | 296 kB |
SHA256SUMS | SHA-256 of every weight file | |
assets/ | Banner and figures for this card |
The files are in the native export format of ncm-mlx text training, not a converted upstream checkpoint.
Training
Trained with ncm-mlx from configs/tinystories-ladder-87m-x4-bf16.json: bf16 compute with fp32 master weights, 60,000 updates at batch 64, conditioning-code corruption falling from 0.75 to 0.25, seed 0, on one rented NVIDIA RTX PRO 6000 through MLX's CUDA backend (22,440 s of generator training). The run is E32 in the experiment log and "87M, 4x" in Section 11 of the working paper.
Related models
| Model | What it is | Provenance |
|---|---|---|
| NCM-TinyStories-87M-MLX | Best NCM text model of this project (this model) | Trained here |
| AR-TinyStories-91M-MLX | Autoregressive baseline for this model | Trained here |
| NCM-TinyStories-89M-Upstream-MLX | Released TinyStories checkpoint, converted to MLX | Port, weights by HazyResearch |
| NCM-Sudoku-25M-Upstream-MLX | Released Sudoku checkpoints, converted to MLX | Port, weights by HazyResearch |
| NCM-Sudoku-6.4M-MLX | Small Sudoku model | Trained here |
| NCM-TinyWorld-5M-MLX | Quickstart model on a synthetic grammar | Trained here |
All of them are in the Next-Concept Modeling in MLX collection.
Citation
Please cite the method, and the software if you use these weights or the code.
@misc{kumbong2026ncm,
title = {Next-Concept Modeling: Fast, Parallel Coarse-to-Fine Text Generation},
author = {Hermann Kumbong and Ishan S. Khare and Iddah Mlauzi and Andrew Woen and Charles Ding and E. Kelly Buchanan and Simran Arora and Azalia Mirhoseini and Christopher R\'e},
year = {2026},
eprint = {2610.14162},
archivePrefix = {arXiv},
primaryClass = {cs.CL},
url = {https://arxiv.org/abs/2610.14162}
}
@software{music_ncm_mlx,
title = {{NCM-MLX}: Next-Concept Modeling in {MLX}},
author = {Music, Jan},
year = {2026},
version = {0.4.0},
doi = {10.5281/zenodo.23781233},
note = {Version 0.4.0: doi:10.5281/zenodo.23953482},
url = {https://github.com/janmus1c/ncm-mlx}
}
@misc{music_ncm_mlx_paper,
title = {Coarse-to-Fine Text Generation on a Laptop: A Native {MLX} Study of Next-Concept Modeling},
author = {Music, Jan},
year = {2026},
version = {0.13},
publisher = {Zenodo},
doi = {10.5281/zenodo.23953213},
note = {Working paper, not peer reviewed}
}
The software DOI 10.5281/zenodo.23781233 resolves to the latest version; 10.5281/zenodo.23953482 is version 0.4.0, which these weights were released with.
License and data
Code and weights: MIT, see the ncm-mlx repository. The training data, TinyStories (V2, GPT-4 stories), is declared CDLA-Sharing-1.0 by its authors; this repository does not contain the data. Check that licence and the terms of the models that generated the stories before reusing outputs in ways it covers.