Skip to content

Commit 83301b6

Browse files
committed
hexagon: add llama-completion runner script
1 parent ecd99d6 commit 83301b6

2 files changed

Lines changed: 55 additions & 2 deletions

File tree

scripts/snapdragon/windows/run-cli.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ if ($null -ne $env:NDEV) {
4646

4747
$env:ADSP_LIBRARY_PATH="$basedir\lib"
4848

49-
& "$basedir\bin\llama-completion.exe" `
50-
--no-mmap -no-cnv -m $basedir\..\..\gguf\$model `
49+
& "$basedir\bin\llama-cli.exe" `
50+
--no-mmap -m $basedir\..\..\gguf\$model `
5151
--poll 1000 -t 6 --cpu-mask 0xfc --cpu-strict 1 `
5252
--ctx-size 8192 --ubatch-size 128 -fa on `
5353
-ngl 99 --device $device $cli_opts
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
2+
#!/usr/bin/env pwsh
3+
4+
# Basedir on device
5+
$basedir=".\pkg-snapdragon"
6+
7+
$cli_opts=$args
8+
9+
$model="Llama-3.2-3B-Instruct-Q4_0.gguf"
10+
if ($null -ne $env:M) {
11+
$model=$env:M
12+
}
13+
14+
$device="HTP0"
15+
if ($null -ne $env:D) {
16+
$device=$env:D
17+
}
18+
19+
if ($null -ne $env:V) {
20+
$env:GGML_HEXAGON_VERBOSE=$env:V
21+
}
22+
23+
if ($null -ne $env:E) {
24+
$env:GGML_HEXAGON_EXPERIMENTAL=$env:E
25+
}
26+
27+
if ($null -ne $env:SCHED) {
28+
$env:GGML_SCHED_DEBUG=$env:SCHED; $cli_opts="$cli_opts -v"
29+
}
30+
31+
if ($null -ne $env:PROF) {
32+
$env:GGML_HEXAGON_PROFILE=$env:PROF; $env:GGML_HEXAGON_OPSYNC=1
33+
}
34+
35+
if ($null -ne $env:OPMASK) {
36+
$env:GGML_HEXAGON_OPMASK=$env:OPMASK
37+
}
38+
39+
if ($null -ne $env:NHVX) {
40+
$env:GGML_HEXAGON_NHVX=$env:NHVX
41+
}
42+
43+
if ($null -ne $env:NDEV) {
44+
$env:GGML_HEXAGON_NDEV=$env:NDEV
45+
}
46+
47+
$env:ADSP_LIBRARY_PATH="$basedir\lib"
48+
49+
& "$basedir\bin\llama-completion.exe" `
50+
--no-mmap -m $basedir\..\..\gguf\$model `
51+
--poll 1000 -t 6 --cpu-mask 0xfc --cpu-strict 1 `
52+
--ctx-size 8192 --batch-size 128 -fa on `
53+
-ngl 99 -no-cnv --device $device $cli_opts

0 commit comments

Comments
 (0)