Skip to content

Commit 028d98a

Browse files
committed
Add install instructions for llama-cpp-python.
1 parent f762b25 commit 028d98a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/tasks/src/model-libraries-snippets.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,8 +678,14 @@ model.score("query", ["doc1", "doc2", "doc3"])`,
678678

679679
export const llama_cpp_python = (model: ModelData): string[] => {
680680
const snippets = [
681-
`from llama_cpp import Llama
681+
`# !pip install llama-cpp-python
682+
683+
from llama_cpp import Llama
682684
685+
# Download model from Hugging Face Hub
686+
model_path = "hf://${model.id}"
687+
688+
# Load model
683689
llm = Llama.from_pretrained(
684690
repo_id="${model.id}",
685691
filename="{{GGUF_FILE}}",

0 commit comments

Comments
 (0)