modernize
This commit is contained in:
@@ -577,10 +577,7 @@ func (s *Server) processBatch(tokenBatch *llama.Batch, embedBatch *llama.Batch)
|
||||
if seq.logprobs {
|
||||
origLogprobsLen := len(seq.pendingLogprobs)
|
||||
numTokensRemoved := origLen - newLen
|
||||
newLogprobsLen := origLogprobsLen - numTokensRemoved
|
||||
if newLogprobsLen < 0 {
|
||||
newLogprobsLen = 0
|
||||
}
|
||||
newLogprobsLen := max(origLogprobsLen-numTokensRemoved, 0)
|
||||
seq.pendingLogprobs = seq.pendingLogprobs[:newLogprobsLen]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user