Skip to content

Commit

Permalink
Add examples for LLama-2 & 3
Browse files Browse the repository at this point in the history
  • Loading branch information
VainF committed Jun 4, 2024
1 parent fdef3cb commit c2135e5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion torch_pruning/dependency.py
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,10 @@ def _update_expand_index_mapping(self, node: Node):
return
if out_channels is not None: # =0 if there is a residual connection to model inputs
break
assert hasattr(node.grad_fn, '_saved_self_sym_sizes'), "New version of PyTorch is required for expand operation."
if not hasattr(node.grad_fn, '_saved_self_sym_sizes'):
#warnings.warn("Expand operation detected but the shape information is not available")
return

if len(node.grad_fn._saved_self_sym_sizes) != 5:
return

Expand Down

0 comments on commit c2135e5

Please sign in to comment.