From 80626503438b28db65348635100d12883c9a517f Mon Sep 17 00:00:00 2001 From: Francis Couture-Harpin Date: Wed, 21 Aug 2024 15:09:03 -0400 Subject: [PATCH] llama : fix simple splits when the batch contains embeddings --- src/llama.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/llama.cpp b/src/llama.cpp index 777e364b8..bd7f1508b 100644 --- a/src/llama.cpp +++ b/src/llama.cpp @@ -2818,7 +2818,7 @@ struct llama_sbatch { } } else { // simple split - ubatch.embd = batch->embd + seq.offset; + ubatch.embd = batch->embd + (n_embd * seq.offset); } } else { ubatch.embd = nullptr;