Skip to content

Commit 0abe683

Browse files
committed
[llama.cpp snippet] Present both options
1 parent 50efc40 commit 0abe683

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

packages/tasks/src/local-apps.ts

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,25 @@ function isGgufModel(model: ModelData) {
4848

4949
const snippetLlamacpp = (model: ModelData): string[] => {
5050
return [
51-
`## Install llama.cpp via brew
51+
`# Option 1: use llama.cpp with brew
5252
brew install llama.cpp
5353
54-
## or from source with curl support
55-
## see llama.cpp README for compilation flags to optimize for your hardware
56-
git clone https://github.com/ggerganov/llama.cpp
57-
cd llama.cpp
58-
LLAMA_CURL=1 make
59-
`,
60-
`## Load and run the model
54+
# Load and run the model
6155
llama \\
6256
--hf-repo "${model.id}" \\
6357
--hf-file file.gguf \\
6458
-p "I believe the meaning of life is" \\
59+
-n 128`,
60+
`# Option 2: build llama.cpp from source with curl support
61+
git clone https://github.com/ggerganov/llama.cpp.git
62+
cd llama.cpp
63+
LLAMA_CURL=1 make
64+
65+
# Load and run the model
66+
./main \\
67+
--hf-repo "${model.id}" \\
68+
-m file.gguf \\
69+
-p "I believe the meaning of life is" \\
6570
-n 128`,
6671
];
6772
};

0 commit comments

Comments
 (0)