From 8a031bd4c8b6286f701b25c99ca7c9727ca439cc Mon Sep 17 00:00:00 2001 From: Foke Singh Date: Fri, 15 Dec 2023 12:06:42 +0000 Subject: [PATCH] Update Llama example to use the simplified transpose implementation and increase default profiler size to 1,000,000 events. --- examples/llama/llama.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/llama/llama.zig b/examples/llama/llama.zig index d24324e..f13e080 100644 --- a/examples/llama/llama.zig +++ b/examples/llama/llama.zig @@ -194,7 +194,7 @@ pub const Llama = struct { pub fn embed(embed_tokens_: zml.nn.TokenEmbedding, tokens_: Tensor, token_index: ?Tensor) Tensor { const tokens = if (token_index) |idx| - tokens_.dynamicSlice1d(-1, 1, idx) + tokens_.dynamicSlice1d(-1, .{ .start = idx, .len = 1 }) else tokens_; return zml.call(embed_tokens_, .forward, .{tokens}).withPartialTags(.{ .s, .d });