Skip to content

Commit

Permalink
Tasks: local apps: multiple snippets and build instructions for llama…
Browse files Browse the repository at this point in the history
….cpp (#683)

cc @Vaibhavs10
  • Loading branch information
krampstudio authored May 17, 2024
1 parent 6067ac5 commit 98c9c5a
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions packages/tasks/src/local-apps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,29 @@ export type LocalApp = {
/**
* And if not (mostly llama.cpp), snippet to copy/paste in your terminal
*/
snippet: (model: ModelData) => string;
snippet: (model: ModelData) => string | string[];
}
);

function isGgufModel(model: ModelData) {
return model.tags.includes("gguf");
}

const snippetLlamacpp = (model: ModelData): string => {
return `./main \\
const snippetLlamacpp = (model: ModelData): string[] => {
return [
`
## Install and build llama.cpp 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`;
-n 128`,
];
};

/**
Expand Down

0 comments on commit 98c9c5a

Please sign in to comment.