You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use module.register_forward_hook and module.register_backward_hook to check the forward and backward results, then I find the shapes are different in some layers. Here are some examples, I want to know why they are different.
Question
I use module.register_forward_hook and module.register_backward_hook to check the forward and backward results, then I find the shapes are different in some layers. Here are some examples, I want to know why they are different.
0 model.layers.0.self_attn.q_proj
forward_shape torch.Size([5, 1024, 24, 24])
backward_shape torch.Size([5, 576, 4096])
1 model.layers.0.self_attn.k_proj
forward_shape torch.Size([1, 577, 1024])
backward_shape torch.Size([1, 2691, 4096])
2 model.layers.0.self_attn.v_proj
forward_shape torch.Size([5, 577, 1024])
backward_shape torch.Size([1, 2691, 4096])
The text was updated successfully, but these errors were encountered: