Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions easyeditor/models/rome/rome_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def set_min_to_zero(pos_matrix, matrix, possibility):
indices_to_zero = np.argpartition(flattened_pos_matrix, num_zeros)[:num_zeros]
flattened_matrix[indices_to_zero] = 0
modified_matrix = flattened_matrix.reshape(matrix.shape)
return modified_matrix

def apply_rome_to_model(
model: AutoModelForCausalLM,
Expand Down