Skip to content

EleutherAI/unlearn

Repository files navigation

Development

pip install -e ".[dev]"
pre-commit install
pytest

Historical Code

This repository contains historical code from the Deep Ignorance project that may be useful for unlearning analysis. Other artifacts from this project are available at https://github.com/EleutherAI/deep-ignorance and https://github.com/EleutherAI/filtering_for_danger.

Environment

Create and/or activate a venv:

python3 -m venv .venv && source .venv/bin/activate

Claude Code

Run cmd-shift-P "install code/cursor command" if necessary.

Install the Claude Code extension

use /ide to connect to the IDE if disconnected.

Evaluation

python -m unlearn.evaluation.eval_wmdp_robust --model_path ./out/DeepIgnorance_CB --batch_size 8 --include_path unlearn/lm_eval_tasks
python -m unlearn.evaluation.eval_mmlu_stem --model_path ./out/DeepIgnorance_CB --batch_size 8

Circuit Breakers

bash /home/luciarosequirke/lucia/unlearning/unlearn/scripts/base_unlearn_cb.sh

Tuned Lens

  1. Download data
python -m bergson.bergson.unlearn.create_unlearn_data
  1. Train lens
torchrun --nproc_per_node=8 bergson/unlearn/algorithm/tuned_lens/train.py --batch_size 4 --gradient_accumulation_steps 1 --upload_to_hf True --hf_repo_id 'EleutherAI/deep-ignorance-unfiltered-lens'
  1. Run tuned lens unlearning
python -m bergson.unlearn.algorithm.lens_unlearn --lens_path runs/tuned_lens/final

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published