A single Transformer model called Dualformer is presented, which integrates both fast and slow reasoning modes.
Dualformer is trained on data with randomized reasoning traces, dropping different parts of the traces during training.
At inference time, Dualformer can be configured to output only solutions (fast mode), reasoning chain and solution (slow mode), or automatically decide which mode to engage (auto mode).
In terms of performance and computational efficiency, Dualformer outperforms corresponding baseline models, showing improved performance in maze navigation tasks and math problems.