Skip to content

icip-cas/DeltaParameterEdit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

On the Editability of Delta Parameters in Post-Trained Models

Official code for the ACL 2026 Findings paper On the Editability of Delta Parameters in Post-Trained Models.

Usage

All experiments use build_model.py to produce an edited model checkpoint at --output_dir, which is then evaluated with lm-evaluation-harness.

Shared arguments in every command below:

COMMON="--pretrained_model_path ${PRETRAINED} \
        --finetuned_model_path  ${FINETUNED} \
        --output_dir ./generated_models"

Main experiments — Fig 2 (magnitude edit) & Fig 6 (sign edit)

The generalized DARE formulation (paper Eq. 3) covers both. One command, differing only in the sign of --changed_sign_rescale_rate:

python build_model.py ${COMMON} \
    --sign_change_method inverse \
    --sign_change_rate ${P} \
    --unchange_sign_rescale_rate auto \
    --changed_sign_rescale_rate ${NEG_K} \
    --distribution scaling --scale 1.0
  • --sign_change_rate ${P} = paper p (drop / flip rate)
  • --unchange_sign_rescale_rate auto auto-computes γ = (1-kp)/(1-p)
  • --changed_sign_rescale_rate ${NEG_K} = negated paper k.

Fig 3 — Distribution shape × magnitude-mean scale

Replace |ΔW| with samples from a chosen distribution, scaling the mean by --auto_scale (x-axis of Fig 3, paper range 0.1–3.0):

# normal
python build_model.py ${COMMON} --distribution normal     --mean auto --std auto --auto_scale ${SCALE}
# uniform
python build_model.py ${COMMON} --distribution uniform    --low 0 --high auto    --auto_scale ${SCALE}
# degenerate (single value)
python build_model.py ${COMMON} --distribution degenerate --value auto           --auto_scale ${SCALE}

Fig 4 — Shuffle

python build_model.py ${COMMON} --distribution shuffle --shuffle_ratio ${R}

${R} = paper shuffle proportion r.

Fig 5 — BitDelta K-bin

python build_model.py ${COMMON} --distribution bin --bins ${K} --value_type mean

${K} = paper number of bins.

Table 1 — Power transform

python build_model.py ${COMMON} --distribution pow_and_rescale --power ${ALPHA}

${ALPHA} = paper power exponent α (0.5 or 1.5).

Evaluation

The main eval process is based on lm-evaluation-harness.

About

Official code for the ACL 2026 Findings paper "On the Editability of Delta Parameters in Post-Trained Models".

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages