File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -48,20 +48,25 @@ function isGgufModel(model: ModelData) {
48
48
49
49
const snippetLlamacpp = ( model : ModelData ) : string [ ] => {
50
50
return [
51
- `## Install llama.cpp via brew
51
+ `# Option 1: use llama.cpp with brew
52
52
brew install llama.cpp
53
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
54
+ # Load and run the model
61
55
llama \\
62
56
--hf-repo "${ model . id } " \\
63
57
--hf-file file.gguf \\
64
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" \\
65
70
-n 128` ,
66
71
] ;
67
72
} ;
You can’t perform that action at this time.
0 commit comments