NCM-TinyStories-89M-Upstream-MLX
The released TinyStories checkpoint of Next-Concept Modeling (NCM), converted to MLX safetensors so it runs on the Apple Silicon GPU without PyTorch. NCM writes text coarse to fine: each of 11 generator calls predicts a whole level of discrete latent codes in parallel, instead of one token per call (Kumbong et al., arXiv:2610.14162).
Credit. The weights, configuration and reference PyTorch implementation are by HazyResearch (original checkpoints, code), released under the MIT license, Copyright (c) 2025 Hermann Kumbong. This repository only changes the file format and tensor layout. The conversion is lossless (float32 to float32), not quantization, and no training was done here. The MLX inference code is an independent port, ncm-mlx, not affiliated with or endorsed by HazyResearch.
The -Upstream suffix marks the authors' released weights. Models trained from scratch in this project do not carry it. Previously published as janmusic/ncm-tinystories-mlx; the old name redirects here.
At a glance
| Generator | 88,605,707 float32 values: 12 blocks, width 768, 12 heads, block-diagonal attention, codebook-tied output heads |
| Codec | 36,434,816 float32 values: lookup encoder, GroupNorm, learned level-0 resampling, one decoder block |
| Level-0 unigram | 4,096 float32 values |
| Tokenizer | 8,192-token BPE, up to 128 token positions |
| Hierarchy | 12 levels: 1, 8, 16, 24, 32, 40, 52, 64, 76, 92, 108, 128; level 0 from the stored unigram, then 11 generator calls |
| Conditioning | none: unconditional generation from a one-token start prefix |
| Source | hazyresearch/ncm-checkpoints revision d342ce8aaea58830eef3b8ad473664673e41f692, converted with ncm-mlx 0.2.0 |
| Weights | 500.2 MB (decimal), excluding tokenizer and metadata |
Quick start
pip install "ncm-mlx==0.4.0" huggingface-hub # Apple Silicon, Python 3.12
hf download janmusic/NCM-TinyStories-89M-Upstream-MLX --local-dir ncm-tinystories-89m-upstream
python -m ncm_mlx official generate --task tinystories --weights ncm-tinystories-89m-upstream --n 2 --levels
--levels prints the decode of the accumulated latent after every level. Intermediate text can be incoherent and is not a trace of model reasoning. Sampling defaults to temperature 1.0 with the level-0 code drawn from the stored unigram. Add --cpu to run on the CPU.
To redo the conversion yourself from the original release (pinned revision, SHA-256 checked):
python -m ncm_mlx official fetch --task tinystories
python -m ncm_mlx official convert --task tinystories
What it looks like
A recorded generation of this checkpoint in MLX. The replay demo steps through all 12 recorded samples level by level.
Parity with upstream PyTorch
Upstream PyTorch 2.15 on CPU against the MLX port on mx.cpu, identical inputs (upstream code revision c702742, checkpoint revision d342ce8):
| Check | Result |
|---|---|
| BPE pre-tokenization, ids, round trip (13 cases) | identical |
| Codec embedding, max abs diff | 2.9e-6 |
| Codec codes from real inputs | 97.4–100% per level (near-tie cascades) |
| Per-level logits, fp32, max abs diff | 0.10 at logit scale up to 853 (1.2e-4 relative) |
| Same, both sides in exact fp64 | 3.2e-10 |
| Greedy generation, codes and decoded text | identical, 8/8 samples |
The fp32 difference is float32 rounding, amplified by residual activations near 435 and the tied head's large |E|^2 terms; the fp64 row shows the computation is the same function. Sampled (non-greedy) outputs use MLX's random number generator, so they do not match upstream sample for sample. The converter fails on any unmapped or missing tensor and drops only the EMA training state and two derived buffers.
Speed (Apple M5 Pro, 64 GB, MLX 0.32.3)
| p50 / p95 ms | batch 1 | batch 16 |
|---|---|---|
| MLX, Metal GPU | 39.8 / 40.8 | 519 / 742 |
| Upstream PyTorch, CPU | 280 / 290 | 3,883 / 4,076 |
Synchronized through a host copy of the decoded tokens, on a busy desktop (GPU utilisation 0–33% around the runs, with brief higher readings). These historical rows use the eager reference path without prefix caching or compilation. They compare a Metal GPU with a CPU, not matched implementations, and do not measure an architecture-level speedup.
Honest limits
- Inference only. No fine-tuning; nothing about the training is changed or re-audited here. Training recipe, data provenance, seeds and budget belong to HazyResearch's pinned configuration.
- Parity is not quality. The parity tests show the port computes the same function as upstream; they say nothing about fluency or coherence. Upstream's generative-perplexity protocol is not reproduced here. Under this project's own scorer (GPT-2 large, 1,280 samples) this checkpoint scores 16.259.
- Short synthetic stories. A model trained for short TinyStories openings; no prompts, no instruction following, no chat interface.
- Platforms. These measurements establish Apple Silicon and CPU behaviour only. Linux CUDA setup is documented in platforms.
Files
| File | Contents |
|---|---|
generator.safetensors | Generator |
codec.safetensors | Codec |
inference.safetensors | Level-0 unigram |
spec.json | Pinned architecture, source file SHA-256 values and the full upstream revision |
config.json | Metadata for the Hub (it lets the Hub count downloads); not read by ncm-mlx |
bpe.json | 8,192-token BPE tokenizer |
LICENSE | Upstream MIT license |
assets/ | Banner and figures for this card |
Use the model through ncm_mlx.official; it is not a Transformers AutoModelForCausalLM or mlx_lm checkpoint.
Related models
| Model | What it is | Provenance |
|---|---|---|
| NCM-TinyStories-87M-MLX | Best NCM text model trained in this project | Trained here |
| AR-TinyStories-91M-MLX | Autoregressive baseline for the 87M NCM | Trained here |
| NCM-TinyStories-89M-Upstream-MLX | Released TinyStories checkpoint, converted to MLX (this model) | 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
Cite the original method and checkpoints first. If the MLX port helped, cite the software as well.
@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}
}
The software DOI 10.5281/zenodo.23781233 resolves to the latest version; 10.5281/zenodo.23953482 is version 0.4.0, the version the Quick start uses. The NCM-MLX working paper (v0.13, unreviewed) describes the port and its parity tests.
License
MIT. The weights are HazyResearch's MIT-licensed release (Copyright (c) 2025 Hermann Kumbong; see LICENSE); the MLX port is MIT. The upstream training corpus is TinyStories, synthetic short stories; it is distinct from this project's TinyWorld grammar.