Skip to content

Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.

runner.go: Use correct index when retrieving embedding results

Jesse Gross5f68fcab127b
diff --git a/llama/runner/runner.go b/llama/runner/runner.go
index a2da546fa..b8fc7cc66 100644
--- a/llama/runner/runner.go
+++ b/llama/runner/runner.go
@@ -454,7 +454,7 @@ func (s *Server) processBatch(tokenBatch *llama.Batch, embedBatch *llama.Batch)
// if done processing the prompt, generate an embedding and return
if seq.embeddingOnly {
- embed := s.lc.GetEmbeddingsSeq(i)
+ embed := s.lc.GetEmbeddingsSeq(seq.cache.Id)
if embed == nil {
embed = s.lc.GetEmbeddingsIth(seq.iBatch)
}