This official repo includes instructions for running Resformer and SVformer introduced in the following paper Value Residual Learning.
pip install transformers=4.44.2.
The code for entropy analysis and token similarity analysis can be found in "analyze/get_entropy.py" and "analyze/get_simlarity.py" respectively.
mkdir logs, mkdir output
Modify the "CACHE" and "CODE_DIR" in the "*.sh" file, then run bash scripts/run_llama_baseline_82M.sh and bash scripts/run_llama_resformer_82M.sh.
Run analyze/plot_relative_loss.py.
15 commits
Python
95.7%
Shell
4.3%
This official repo includes instructions for running Resformer and SVformer introduced in the following paper Value Residual Learning.
pip install transformers=4.44.2.
The code for entropy analysis and token similarity analysis can be found in "analyze/get_entropy.py" and "analyze/get_simlarity.py" respectively.
mkdir logs, mkdir output
Modify the "CACHE" and "CODE_DIR" in the "*.sh" file, then run bash scripts/run_llama_baseline_82M.sh and bash scripts/run_llama_resformer_82M.sh.
Run analyze/plot_relative_loss.py.
15 commits
Python
95.7%
Shell
4.3%