Topoformer: Brain-like Topographic Organization in Transformer Language Models through Spatial Querying and Reweighting
To install Topoformer, follow these steps:
git clone https://github.com/TahaBinhuraib/topoformer.git
cd topoformer
pip install -e .
Explore the Topoformer Cookbook directory for example projects demonstrating the Topoformer paradigm.
To replicate the small-scale IMDB sentiment classification training, testing, and visualization process mentioned in the paper, follow these steps:
- Navigate to the cookbook directory.
- Run the
train_imdb.py
file.
Inside the cookbook folder, you'll find all the code related to training, data preparation, and visualization for this project.