diff --git a/runner/llamarunner/runner.go b/runner/llamarunner/runner.go index cb36c5af89..c8b8b6e7ec 100644 --- a/runner/llamarunner/runner.go +++ b/runner/llamarunner/runner.go @@ -136,7 +136,6 @@ func (s *Server) NewSequence(prompt string, images []llm.ImageData, params NewSe // TODO: EOG token handling should be moved to tokenizer if params.embedding { - // If the original prompt ended with an EOG token, add it back after truncation lastIsEOG := false @@ -163,7 +162,6 @@ func (s *Server) NewSequence(prompt string, images []llm.ImageData, params NewSe if lastIsEOG { newInputs = append(newInputs, input{token: eogToken}) } - } else { // Otherwise, truncate in the middle newInputs = inputs[:params.numKeep] diff --git a/runner/ollamarunner/runner.go b/runner/ollamarunner/runner.go index 409a6cb0cd..455aba0aa4 100644 --- a/runner/ollamarunner/runner.go +++ b/runner/ollamarunner/runner.go @@ -140,7 +140,6 @@ func (s *Server) NewSequence(prompt string, images []llm.ImageData, params NewSe var newInputs []*input.Input if params.embedding { - var lastIsEOG bool eogToken := int32(0) @@ -170,7 +169,6 @@ func (s *Server) NewSequence(prompt string, images []llm.ImageData, params NewSe if lastIsEOG { newInputs = append(newInputs, &input.Input{Token: eogToken}) } - } else { // Otherwise, truncate in the middle promptStart := params.numKeep + discard