This folder contains the VGG retrain attack workflow.
Install dependencies before running the examples:
pip install -r requirements.txtDownload LlamaFactory from the released repository, then place it under src/LlamaFactory:
git clone <ANONYMOUS_LLAMAFACTORY_URL> src/LlamaFactoryIf you receive LlamaFactory as an archive instead, extract it so that the package root is src/LlamaFactory.
Run both IND and OOD retrain attacks:
bash run_vgg_retrain.shRun one side only:
bash run_vgg_retrain.sh ind
bash run_vgg_retrain.sh oodExtra arguments are passed to the Python entrypoints:
bash run_vgg_retrain.sh ind --overwrite
METHOD_NAMES="UNDIAL SatImp" bash run_vgg_retrain.sh oodscripts/vgg/vgg_test_retrain_ind.shscripts/vgg/vgg_test_retrain_ood.shsrc/test/vgg_test_retrain_ind.pysrc/test/vgg_test_retrain_ood.pyrequirements.txt
By default, the launch scripts look for datasets and models under project-local folders:
DATA_ROOT=./dataMODEL_ROOT=./models/unlearnINPUT_PARQUET=${DATA_ROOT}/facerec/facerec_test.parquetFORGET_PARQUET=${DATA_ROOT}/facerec/qwen2.5_vl_3b_train_forget.parquetSFT_PARQUET=${DATA_ROOT}/pacs/qwen2.5_vl_3b_train_1over20.parquetMODEL_PATH=${MODEL_ROOT}/rec_Qwen2.5-VL-3B-Instruct_${METHOD_NAME}
Place each already-trained unlearned model under the matching MODEL_PATH directory, for example ./models/unlearn/rec_Qwen2.5-VL-3B-Instruct_mmunlearner.
The PACS SFT parquet above is a 1/20-size subset used as a lightweight example.
You can override them with environment variables before running the script.