← all repositories

facebookresearch/coconut

A research implementation for training large language models to perform chain-of-thought reasoning directly in a continuous latent space rather than discrete tokens.

1.7k stars Python Language ModelsML Frameworks
coconut
Not currently ranked — collecting fresh signals.
star history

The repository implements a method for training large language models to reason by operating in a continuous latent space instead of generating discrete tokens at each reasoning step. It builds on chain-of-thought prompting approaches but eliminates the need for explicit text-based intermediate steps. The code supports training on reasoning datasets like GSM8K with configurable model architectures, training modes (Coconut, CoT, no-thoughts), and standard logging via wandb.

Frequently asked

What is facebookresearch/coconut?
A research implementation for training large language models to perform chain-of-thought reasoning directly in a continuous latent space rather than discrete tokens.
Is coconut open source?
Yes — facebookresearch/coconut is open source, released under the MIT license.
What language is coconut written in?
facebookresearch/coconut is primarily written in Python.
How popular is coconut?
facebookresearch/coconut has 1.7k stars on GitHub.
Where can I find coconut?
facebookresearch/coconut is on GitHub at https://github.com/facebookresearch/coconut.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.