Skip to content

Commit

Permalink
Merge pull request #477 from rhatdan/llama.cpp
Browse files Browse the repository at this point in the history
Revert "Switch to llama-simple-chat"
  • Loading branch information
rhatdan authored Nov 21, 2024
2 parents 0d1b98a + dec1738 commit b6c9492
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
15 changes: 13 additions & 2 deletions ramalama/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,19 @@ def run(self, args):
if not args.container:
exec_model_path = model_path

exec_args = ["llama-simple-chat", "-m", exec_model_path]
exec_args += self.common_params
exec_args = ["llama-cli", "-m", exec_model_path, "--in-prefix", "", "--in-suffix", ""]

if not args.debug:
exec_args += ["--no-display-prompt"]

exec_args += [
"-p",
prompt,
] + self.common_params

if not args.ARGS and sys.stdin.isatty():
exec_args.append("-cnv")

if args.gpu:
exec_args.extend(self.gpu_args())

Expand Down
2 changes: 1 addition & 1 deletion test/system/030-run.bats
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ load helpers
is "$output" ".*${image} /bin/sh -c" "verify image name"
else
run_ramalama --dryrun run ${model}
is "$output" 'llama-simple-chat -m /path/to/model.*' "dryrun correct"
is "$output" 'llama-cli -m /path/to/model --in-prefix --in-suffix --no-display-prompt -p.*' "dryrun correct"

run_ramalama 1 run --name foobar tiny
is "${lines[0]}" "Error: --nocontainer and --name options conflict. --name requires a container." "conflict between nocontainer and --name line"
Expand Down

0 comments on commit b6c9492

Please sign in to comment.