Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
d7eb05b9
Commit
d7eb05b9
authored
Nov 12, 2024
by
Jesse Gross
Committed by
Jesse Gross
Nov 12, 2024
Browse files
runner.go: Fix off-by-one for num predicted
parent
636a743c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
llama/runner/runner.go
llama/runner/runner.go
+1
-1
No files found.
llama/runner/runner.go
View file @
d7eb05b9
...
@@ -345,7 +345,7 @@ func (s *Server) processBatch(tokenBatch *llama.Batch, embedBatch *llama.Batch)
...
@@ -345,7 +345,7 @@ func (s *Server) processBatch(tokenBatch *llama.Batch, embedBatch *llama.Batch)
}
}
// if past the num predict limit
// 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"
)
s
.
removeSequence
(
seqIdx
,
"limit"
)
continue
continue
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment