Commit 5f68fcab authored by Jesse Gross's avatar Jesse Gross Committed by Jesse Gross
Browse files

runner.go: Use correct index when retrieving embedding results

This doesn't have any impact currently because NUM_PARALLEL is forced
to 1 for embeddings, so both indicies will always be 0.
parent ecf41eed
...@@ -454,7 +454,7 @@ func (s *Server) processBatch(tokenBatch *llama.Batch, embedBatch *llama.Batch) ...@@ -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 done processing the prompt, generate an embedding and return
if seq.embeddingOnly { if seq.embeddingOnly {
embed := s.lc.GetEmbeddingsSeq(i) embed := s.lc.GetEmbeddingsSeq(seq.cache.Id)
if embed == nil { if embed == nil {
embed = s.lc.GetEmbeddingsIth(seq.iBatch) embed = s.lc.GetEmbeddingsIth(seq.iBatch)
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment