Explorar o código

runner.go: Fix off-by-one for num predicted

Jesse Gross hai 5 meses
pai
achega
d7eb05b936
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      llama/runner/runner.go

+ 1 - 1
llama/runner/runner.go

@@ -345,7 +345,7 @@ func (s *Server) processBatch(tokenBatch *llama.Batch, embedBatch *llama.Batch)
 		}
 
 		// if past the num predict limit
-		if seq.numPredict > 0 && seq.numPredicted > seq.numPredict {
+		if seq.numPredict > 0 && seq.numPredicted >= seq.numPredict {
 			s.removeSequence(seqIdx, "limit")
 			continue
 		}