rome icon indicating copy to clipboard operation
rome copied to clipboard

Code for computing the right vector for the rank-1 update

Open QZH-777 opened this issue 1 year ago • 1 comments

In the compute_v function of rome/compute_v.py, you use the get_module_input_output_at_word function to get cur_input and cur_output. image In details, cur_input and cur_output are obtained by inputting “Steve Jobs was the founder of” to gpt2-xl. So cur_input, cur_output are not equal to k*, and W_{proj} k*, but you seem to use cur_input and cur_output as k* and W_{proj} k* when calculating the right vector for the rank-1 update, which is slightly different from your proposed equation (2) in the paper. I wonder why you use this method to approximate k*, and W_{proj} k*?

QZH-777 avatar Mar 17 '23 13:03 QZH-777