HazyResearch/ncm

NCM: Next Concept Modeling

Next‑Concept Modeling (NCM)

What it is – NCM is a research‑grade framework for parallel text generation. It works in two stages:

  1. Multiscale residual VQ tokenizer – converts a sequence into a hierarchy of discrete codes (coarse → fine).
  2. Next‑concept transformer – predicts each level of the hierarchy in parallel, so only one forward pass per level is needed.

Why it matters – By generating whole chunks of a level at once, NCM can produce high‑quality text 9‑31× faster than strong diffusion baselines while matching or beating their scores on tasks such as summarisation (XSum), machine translation (WMT‑14), language modelling (LM1B, TinyStories, OpenWebText) and even structured generation (Sudoku).


Highlights

  • Coarse‑to‑fine generation – The model first emits a rough sketch, then refines it over a few levels.
  • Speed‑quality trade‑off – Benchmarks show comparable ROUGE, BLEU, chrF and Sudoku solving rates at a fraction of the wall‑clock time.
  • Released checkpoints – Pre‑trained tokenizers and generators for many datasets are hosted on Hugging Face.

Quick start

# Clone and install
git clone https://github.com/HazyResearch/ncm.git
cd ncm
pip install -r requirements.txt   # Python ≥3.10, CUDA‑enabled PyTorch recommended

Running evaluation (example for XSum)

# Download model and data
hf download hazyresearch/ncm-checkpoints --local-dir artifacts
hf download hazyresearch/ncm-datasets --repo-type dataset --local-dir data

# Generate and score
python evaluate.py \
  --config config/eval/xsum.yaml \
  --checkpoint-dir artifacts/xsum \
  --data-dir data/xsum

Add --cfg <scale> for classifier‑free guidance (e.g., --cfg 1.0 on WMT‑14).


Repository layout

  • evaluate.py – entry point for generation and metric computation.
  • scripts/ – per‑GPU generation shards and a merge script.
  • config/eval/ – evaluation configs mirroring the shipped config.yaml for each checkpoint.
  • models/, tokenization/ – implementation of the next‑concept generator and the multiscale VQ tokenizer.

Available models (Hugging Face collection)

Task Model variant Tokenizer Generator Config
XSum – tokenizer.pt generator.pt config.yaml
WMT14 De‑En – tokenizer.pt generator.pt config.yaml
Sudoku easy / medium / hard tokenizer.pt generator.pt config.yaml
LM1B small / medium / large tokenizer.pt generator.pt config.yaml
TinyStories, OpenWebText – tokenizer.pt generator.pt config.yaml

Citation

If you use NCM in research, please cite:

@misc{kumbong2026nextconcept,
  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é},
  year={2026},
  eprint={2610.14162},
  archivePrefix={arXiv},
  primaryClass={cs.CL},
  url={https://arxiv.org/abs/2610.14162}
}

License

MIT – see LICENSE.


Bottom line – NCM offers a novel, fast, parallel approach to text generation that scales across many tasks. The repo provides code, pretrained checkpoints, and evaluation scripts to reproduce the reported results.

Related

  • Project
  • Project
  • Project
  • Project