This is the repo for the submission One-Shot Safety Alignment for Large Language Models via Optimal Dualization.
We have also uploaded our collected scores to run our primal/dual optimization algorithms. Please find the collected results from this link: Collected data
conda / mamba:conda env create --file conda-recipe.yaml # or `mamba env create --file conda-recipe.yaml`
conda activate safe-rlhf
python dpo.py --lamb [LAMB] --output_dir [OUTPUT_DIR] for MoCAN
-- run ```python dpo_alg2.py --lamb [LAMB] --output_dir [OUTPUT_DIR]`` for PeCANPlease feel free to email us at Xinmeng Huamg, Shuo Li, or Dongsheng Ding. If you find this work useful in your own research, please consider citing our work:
@inproceedings{huang2024one,
title={One-Shot Safety Alignment for Large Language Models via Optimal Dualization},
author={Huang, Xinmeng and Li, Shuo and Dobriban, Edgar and Bastani, Osbert and Hassani, Hamed and Ding, Dongsheng},
booktitle={Proceedings of the Advances in Neural Information Processing Systems},
year={2024},
note={\textbf{Spotlight}}
}
10 commits
Jupyter Notebook
76.2%
Python
19.6%
Shell
3.8%
This is the repo for the submission One-Shot Safety Alignment for Large Language Models via Optimal Dualization.
We have also uploaded our collected scores to run our primal/dual optimization algorithms. Please find the collected results from this link: Collected data
conda / mamba:conda env create --file conda-recipe.yaml # or `mamba env create --file conda-recipe.yaml`
conda activate safe-rlhf
python dpo.py --lamb [LAMB] --output_dir [OUTPUT_DIR] for MoCAN
-- run ```python dpo_alg2.py --lamb [LAMB] --output_dir [OUTPUT_DIR]`` for PeCANPlease feel free to email us at Xinmeng Huamg, Shuo Li, or Dongsheng Ding. If you find this work useful in your own research, please consider citing our work:
@inproceedings{huang2024one,
title={One-Shot Safety Alignment for Large Language Models via Optimal Dualization},
author={Huang, Xinmeng and Li, Shuo and Dobriban, Edgar and Bastani, Osbert and Hassani, Hamed and Ding, Dongsheng},
booktitle={Proceedings of the Advances in Neural Information Processing Systems},
year={2024},
note={\textbf{Spotlight}}
}
10 commits
Jupyter Notebook
76.2%
Python
19.6%
Shell
3.8%