A playground for implementing transformer architectures.
Download the dataset to data/wiki-data.txt:
python dataset.py downloadProcess the dataset from data/wiki-data.txt:
python dataset.py preprocessSample data from the dataset:
python dataset.py sampleTrain the model:
python transformer.py --trainInference the model:
python transformer.py --prompt "Hello World"Train model with customer hyperparameters:
python transformer.py --bs 32 --seq_len 16 --hidden_dim 512 --num_heads 8 --trainMove groups are saved to data/mg/
Each move group has a data.json
Download and preprocess the first 20 move groups:
python mg.py download 20Then download all the videos
python mg.py download_videosThen process all the frames
python mg.py process_framesView info for mg with id 0:
python mg.py mg 0 printDownload a video for mg with id 0:
python mg.py mg 0 videoProcess all the frames for mg with id 0:
python mg.py mg 0 processLaunch the labeler
python mg-labeler.py