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
4c7db6b7
Unverified
Commit
4c7db6b7
authored
Apr 09, 2024
by
Daniel Hiltgen
Committed by
GitHub
Apr 09, 2024
Browse files
Merge pull request #3566 from dhiltgen/more_time
Handle very slow model loads
parents
c03f0e3c
c5ff443b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
llm/server.go
llm/server.go
+2
-1
No files found.
llm/server.go
View file @
4c7db6b7
...
@@ -383,7 +383,8 @@ func (s *LlamaServer) Ping(ctx context.Context) error {
...
@@ -383,7 +383,8 @@ func (s *LlamaServer) Ping(ctx context.Context) error {
func
(
s
*
LlamaServer
)
waitUntilRunning
()
error
{
func
(
s
*
LlamaServer
)
waitUntilRunning
()
error
{
start
:=
time
.
Now
()
start
:=
time
.
Now
()
expiresAt
:=
time
.
Now
()
.
Add
(
3
*
time
.
Minute
)
// be generous with timeout, large models can take a while to load
// TODO we need to wire up a better way to detect hangs during model load and startup of the server
expiresAt
:=
time
.
Now
()
.
Add
(
10
*
time
.
Minute
)
// be generous with timeout, large models can take a while to load
ticker
:=
time
.
NewTicker
(
50
*
time
.
Millisecond
)
ticker
:=
time
.
NewTicker
(
50
*
time
.
Millisecond
)
defer
ticker
.
Stop
()
defer
ticker
.
Stop
()
...
...
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