Skip to content

Code for paper 'Are We Falling in a Middle-Intelligence Trap? An Analysis and Mitigation of the Reversal Curse'

Notifications You must be signed in to change notification settings

trestad/mitigating-reversal-curse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mitigating-reversal-curse

This is the code for paper 'Are We Falling in a Middle-Intelligence Trap? An Analysis and Mitigation of the Reversal Curse'

Prepare data

Download the data folder from Berglund et al..

Enviornment

cd transformers
pip install -e .

Other dependencies: pytorch=1.13.0 bitsandbytes=0.41.1 peft=0.5.0

Train the model

Fine-tune Llama with NTP:

bash run.sh your-data-dir/reverse_experiments/june_version_7921032488/ your-model-save-dir your-llama-hf-save-dir

Fine-tune Llama with BICO:

bash run_mlm.sh your-data-dir/reverse_experiments/june_version_7921032488/ your-model-save-dir your-llama-hf-save-dir

Generate and Evaluate

python generate.py 

About

Code for paper 'Are We Falling in a Middle-Intelligence Trap? An Analysis and Mitigation of the Reversal Curse'

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published