Skip to content

Commit 4555dfe

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

File tree

1 file changed

+21
-16
lines changed

1 file changed

+21
-16
lines changed

packages/tasks/src/local-apps.ts

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,22 +48,27 @@ function isGgufModel(model: ModelData) {
4848

4949
const snippetLlamacpp = (model: ModelData): string[] => {
5050
return [
51-
`## Install llama.cpp via brew
52-
brew install llama.cpp
53-
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
61-
llama \\
62-
--hf-repo "${model.id}" \\
63-
--hf-file file.gguf \\
64-
-p "I believe the meaning of life is" \\
65-
-n 128`,
66-
];
51+
`# Option 1: use llama.cpp with brew
52+
brew install llama.cpp
53+
54+
# Load and run the model
55+
llama \\
56+
--hf-repo "${model.id}" \\
57+
--hf-file file.gguf \\
58+
-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" \\
70+
-n 128`,
71+
]
6772
};
6873

6974
/**

0 commit comments

Comments
 (0)