Skip to content

[llama.cpp snippet] Present both options #737

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions packages/tasks/src/local-apps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,25 @@ function isGgufModel(model: ModelData) {

const snippetLlamacpp = (model: ModelData): string[] => {
return [
`## Install llama.cpp via brew
`# Option 1: use llama.cpp with brew
brew install llama.cpp

## or from source with curl support
## see llama.cpp README for compilation flags to optimize for your hardware
git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp
LLAMA_CURL=1 make
`,
`## Load and run the model
# Load and run the model
llama \\
--hf-repo "${model.id}" \\
--hf-file file.gguf \\
-p "I believe the meaning of life is" \\
-n 128`,
`# Option 2: build llama.cpp from source with curl support
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
LLAMA_CURL=1 make

# Load and run the model
./main \\
--hf-repo "${model.id}" \\
-m file.gguf \\
-p "I believe the meaning of life is" \\
-n 128`,
];
};
Expand Down
Loading