From 7a3101f15fff2b0d7e582038dc07c94f396ddf1e Mon Sep 17 00:00:00 2001 From: laurent Date: Mon, 26 Jun 2023 07:07:56 +0100 Subject: [PATCH] Llama bugfix. --- examples/llama/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/llama/main.rs b/examples/llama/main.rs index fa8ec46f..df267002 100644 --- a/examples/llama/main.rs +++ b/examples/llama/main.rs @@ -300,7 +300,7 @@ impl CausalSelfAttention { let att = att.softmax(att.rank() - 1)?; // Convert to contiguous as matmul doesn't support strided vs for now. let y = att.matmul(&v.contiguous()?)?; - let y = y.transpose(1, 2)?.reshape(&[t, c])?; + let y = y.transpose(0, 1)?.reshape(&[t, c])?; let y = self.c_proj.forward(&y)?; Ok(y) }