
At least one L40s 48G GPU.
python3 -m experiments.evaluate --alg_name=Cake --model_name=meta-llama/Meta-Llama-3-8B-Instruct --hparams_fname=Llama3-8B.json --ds_name=mcf --dataset_size_limit=2000 --num_edits=100 --downstream_eval_steps=5
This command runs an evaluation script for the CAKE algorithm using the Llama3-8b-instruct. Below are the explanations for each argument:
--alg_name=Cake: Specifies the name of the algorithm being used, which is CAKE in this case.--model_name=meta-llama/Meta-Llama-3-8B-Instruct: Indicates the name of the model being evaluated, here it is Llama-3-8B-Instruct.--hparams_fname=Llama3-8B.json: Points to the JSON file containing hyperparameters specific to the Llama-3-8B-Instruct model.--ds_name=mcf: Specifies the dataset name, in this case, "mcf" (CounterFact).--dataset_size_limit=2000: Sets the total number of editing samples to 2000.--num_edits=100: Defines the batch size for each round of editing, meaning 100 edits will be performed in each batch.--downstream_eval_steps=5: Indicates that a test of general capabilities is conducted after every 5 rounds of editing.Results from each run are stored at results/<method_name>/run_<run_id> in a specific format:
results/
|__ Cake/
|__ run_<run_id>/
|__ params.json
|__ case_0.json
|__ case_1.json
|__ ...
|__ case_2000.json
To summarize the results, you can use experiments/summarize.py:
python summarize.py --dir_name=Cake --runs=run_<run1>,run_<run2>
Key hyperparameters in hparams/Cake/Llama3-8B.json:
layers: List of layer indices to edit (e.g., [4, 5, 6, 7, 8])causal_scores: Dictionary of causal importance scores for each layer (from causal tracing)temperature: Controls the sharpness of weight distributionExample configuration:
{
"layers": [4, 5, 6, 7, 8],
......
"causal_scores": {
"0": 0.4812439084,
"1": 0.4743820429,
"2": 0.4656370878,
"3": 0.4440660179,
"4": 0.4335190654
},
"temperature": 0.1
}
11 commits
Python
100.0%

At least one L40s 48G GPU.
python3 -m experiments.evaluate --alg_name=Cake --model_name=meta-llama/Meta-Llama-3-8B-Instruct --hparams_fname=Llama3-8B.json --ds_name=mcf --dataset_size_limit=2000 --num_edits=100 --downstream_eval_steps=5
This command runs an evaluation script for the CAKE algorithm using the Llama3-8b-instruct. Below are the explanations for each argument:
--alg_name=Cake: Specifies the name of the algorithm being used, which is CAKE in this case.--model_name=meta-llama/Meta-Llama-3-8B-Instruct: Indicates the name of the model being evaluated, here it is Llama-3-8B-Instruct.--hparams_fname=Llama3-8B.json: Points to the JSON file containing hyperparameters specific to the Llama-3-8B-Instruct model.--ds_name=mcf: Specifies the dataset name, in this case, "mcf" (CounterFact).--dataset_size_limit=2000: Sets the total number of editing samples to 2000.--num_edits=100: Defines the batch size for each round of editing, meaning 100 edits will be performed in each batch.--downstream_eval_steps=5: Indicates that a test of general capabilities is conducted after every 5 rounds of editing.Results from each run are stored at results/<method_name>/run_<run_id> in a specific format:
results/
|__ Cake/
|__ run_<run_id>/
|__ params.json
|__ case_0.json
|__ case_1.json
|__ ...
|__ case_2000.json
To summarize the results, you can use experiments/summarize.py:
python summarize.py --dir_name=Cake --runs=run_<run1>,run_<run2>
Key hyperparameters in hparams/Cake/Llama3-8B.json:
layers: List of layer indices to edit (e.g., [4, 5, 6, 7, 8])causal_scores: Dictionary of causal importance scores for each layer (from causal tracing)temperature: Controls the sharpness of weight distributionExample configuration:
{
"layers": [4, 5, 6, 7, 8],
......
"causal_scores": {
"0": 0.4812439084,
"1": 0.4743820429,
"2": 0.4656370878,
"3": 0.4440660179,
"4": 0.4335190654
},
"temperature": 0.1
}
11 commits
Python
100.0%