Code for the paper: Understanding the staged dynamics of of transformers in latent structure learning. This codebase contains the code to train and evaluate transformer based models on the DM Alchemy dataset.