mirror of
https://github.com/ollama/ollama.git
synced 2025-11-10 22:20:14 +01:00
fixed failing lint
This commit is contained in:
@@ -136,7 +136,6 @@ func (s *Server) NewSequence(prompt string, images []llm.ImageData, params NewSe
|
|||||||
|
|
||||||
// TODO: EOG token handling should be moved to tokenizer
|
// TODO: EOG token handling should be moved to tokenizer
|
||||||
if params.embedding {
|
if params.embedding {
|
||||||
|
|
||||||
// If the original prompt ended with an EOG token, add it back after truncation
|
// If the original prompt ended with an EOG token, add it back after truncation
|
||||||
lastIsEOG := false
|
lastIsEOG := false
|
||||||
|
|
||||||
@@ -163,7 +162,6 @@ func (s *Server) NewSequence(prompt string, images []llm.ImageData, params NewSe
|
|||||||
if lastIsEOG {
|
if lastIsEOG {
|
||||||
newInputs = append(newInputs, input{token: eogToken})
|
newInputs = append(newInputs, input{token: eogToken})
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// Otherwise, truncate in the middle
|
// Otherwise, truncate in the middle
|
||||||
newInputs = inputs[:params.numKeep]
|
newInputs = inputs[:params.numKeep]
|
||||||
|
|||||||
@@ -140,7 +140,6 @@ func (s *Server) NewSequence(prompt string, images []llm.ImageData, params NewSe
|
|||||||
var newInputs []*input.Input
|
var newInputs []*input.Input
|
||||||
|
|
||||||
if params.embedding {
|
if params.embedding {
|
||||||
|
|
||||||
var lastIsEOG bool
|
var lastIsEOG bool
|
||||||
|
|
||||||
eogToken := int32(0)
|
eogToken := int32(0)
|
||||||
@@ -170,7 +169,6 @@ func (s *Server) NewSequence(prompt string, images []llm.ImageData, params NewSe
|
|||||||
if lastIsEOG {
|
if lastIsEOG {
|
||||||
newInputs = append(newInputs, &input.Input{Token: eogToken})
|
newInputs = append(newInputs, &input.Input{Token: eogToken})
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// Otherwise, truncate in the middle
|
// Otherwise, truncate in the middle
|
||||||
promptStart := params.numKeep + discard
|
promptStart := params.numKeep + discard
|
||||||
|
|||||||
Reference in New Issue
Block a user