/topoformer

Topoformer: brain-like topographic organization in Transformer language models through spatial querying and reweighting

Primary LanguagePython

Topoformer: Brain-like Topographic Organization in Transformer Language Models through Spatial Querying and Reweighting

Installation

To install Topoformer, follow these steps:

git clone https://github.com/TahaBinhuraib/topoformer.git
cd topoformer
pip install -e .

Topoformer Cookbook

Explore the Topoformer Cookbook directory for example projects demonstrating the Topoformer paradigm.

Replicating the Small Scale IMDB Classification

To replicate the small-scale IMDB sentiment classification training, testing, and visualization process mentioned in the paper, follow these steps:

  1. Navigate to the cookbook directory.
  2. 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.