N-gram hinted language modeling: NanoGPT Speedrun in 6.7s An author reports cutting the NanoGPT Speedrun record from 39.9 seconds to 6.7 seconds by using retrieval-augmented n-gram hints, a larger improvement than all prior gains since 2025 combined. The method builds a lookup table on otherwise idle CPUs recording which tokens follow each n-gram in the training data, then feeds the most common next tokens to the model as hints so it learns how much to trust them. The author reports that for a 20-gram appearing in training the most common next token is correct 98% of the time, versus 54% for 6-grams, and that hints are built only from training data, never validation tokens. TLDR; How I improve the NanoGPT Speedrun world record from 39.9s to 6.7s with retrieval-augmented n-gram hints. This is a larger improvement than all prior improvements since 2025 combined. Introduction The NanoGPT Speedrun challenges you to train a model to GPT-2-level loss on an 8xH100 node as fast as possible. Since its start in May ‘24, it has seen nearly 100 records, cutting training time from 45 minutes to 39.9 seconds. Language models struggle to learn from text they have seen only a few times