$ account jthickstun
This repository provides the infrastructure for the Anticipatory Music Transformer, a research project for music generation using autoregressive transformers with anticipatory infilling. The codebase covers the full pipeline: preprocessing of MIDI files (Lakh MIDI dataset) into a compound token representation, tokenization into arrival-time or interarrival-time sequences with optional augmentation for anticipation training, and sampling from trained models using custom generation logic. It also includes scripts for human evaluation reproduction and model benchmarking. While primarily a research codebase for a specific paper, the library components in the `anticipation` package (particularly the conversion, ops, and sampling modules) are well-structured and could be reused in other music tokenization or generation projects. The repository does not include the training loop itself but provides configuration files for use with the Levanter training framework.