Skip to content

Commit

Permalink
Pacify --temp flag when running in server mode
Browse files Browse the repository at this point in the history
This caused some confusion for the granite 34b llamafiles, which specify
the temperature flag in the .args file. While it worked fine for the CLI
mode of operation, if you ran the llamafile without arguments, then it'd
fail with an error message instead of running the server :'(
  • Loading branch information
jart committed Jun 24, 2024
1 parent 60404a8 commit 6d3590c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions llama.cpp/server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2220,6 +2220,15 @@ static void server_params_parse(int argc, char **argv, server_params &sparams,
}
sparams.hostname = argv[i];
}
else if (arg == "--temp")
{
if (++i >= argc)
{
invalid_param = true;
break;
}
// ignored
}
else if (arg == "--path")
{
if (++i >= argc)
Expand Down

0 comments on commit 6d3590c

Please sign in to comment.