LightThinker
A family of methods that compress or actively manage a language model's long reasoning traces into compact representations, cutting the cost of retaining and attending to them during inference.
LightThinker addresses the cost of long chain-of-thought reasoning in LLMs, where retaining and attending to a large intermediate reasoning trace makes inference expensive, by compressing or actively managing that intermediate state instead of keeping it around in full. The original LightThinker method compresses intermediate thoughts into compact gist-token representations, with its implementation and a baseline preserved in the repository. Its successor, LightThinker++, goes further with explicit adaptive memory management: the model uses memory primitives such as commit, expand, fold, and final answer to actively control its own reasoning scratchpad.
The repository is organized into separate modules for LightThinker++'s general-reasoning setting, covering math and other general reasoning tasks, LightThinker++'s agentic-reasoning setting, covering agentic deep-research tasks, and the original LightThinker code, each with its own README documenting model links, data links, environment variables, script parameters, and evaluation options. LightThinker was accepted to EMNLP 2025, and LightThinker++ is described in a follow-up paper.