Skip to content

Commit 2ced59e

Browse files
committed
Debug
1 parent 68ead1b commit 2ced59e

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

examples/models/llama/attention.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,8 @@ def forward(
221221
bsz, seqlen, _ = x.shape
222222

223223
# QKV
224+
# breakpoint()
225+
print("Calculating q_proj")
224226
q, k, v = self.wq(x), self.wk(x), self.wv(x)
225227
# We need view_copy elimination
226228
q = q.view(bsz, seqlen, self.n_local_heads, self.head_dim)

examples/models/llama/export_llama_lib.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,11 @@ def _prepare_for_llama_export(args) -> LLMEdgeManager:
620620
)
621621

622622
quantized = torch.load("/home/jackzhxng/torchrepos/executorch/fake_quantized_weights.pt")
623-
breakpoint()
623+
# Test run the model to trace.
624+
edge_manager.model(
625+
torch.tensor([[2, 3, 4]], dtype=torch.long),
626+
{"input_pos": torch.tensor([0], dtype=torch.long)},
627+
)
624628
# torch.testing.assert_close()
625629

626630
# We want to do compute the actual ops in the precision of the dtype_override.

0 commit comments

Comments
 (0)