notrito commited on
Commit
4939391
·
1 Parent(s): d07685c
Files changed (1) hide show
  1. utils.py +2 -2
utils.py CHANGED
@@ -98,10 +98,10 @@ def extract_single_transformation(
98
  input_vector = normalized_input[0, 0].detach().cpu().float().numpy()
99
 
100
  # Weight matrix
101
- weight_matrix = layer_module.self_attn.q_proj.weight.cpu().numpy()
102
 
103
  # Output vector
104
- output_vector = layer_module.self_attn.q_proj(normalized_input)[0, 0].cpu().numpy()
105
 
106
  component_name = f"Layer {layer} - Q Projection"
107
 
 
98
  input_vector = normalized_input[0, 0].detach().cpu().float().numpy()
99
 
100
  # Weight matrix
101
+ weight_matrix = layer_module.self_attn.q_proj.weight.detach().cpu().numpy()
102
 
103
  # Output vector
104
+ output_vector = layer_module.self_attn.q_proj(normalized_input)[0, 0].detach().cpu().numpy()
105
 
106
  component_name = f"Layer {layer} - Q Projection"
107