diff --git a/packages/tasks/src/local-apps.ts b/packages/tasks/src/local-apps.ts index 53f6880282..155d676bf2 100644 --- a/packages/tasks/src/local-apps.ts +++ b/packages/tasks/src/local-apps.ts @@ -301,6 +301,29 @@ const snippetDockerModelRunner = (model: ModelData, filepath?: string): string = return `docker model run hf.co/${model.id}${getQuantTag(filepath)}`; }; +const snippetLemonade = (model: ModelData, filepath?: string): LocalAppSnippet[] => { + const tagName = getQuantTag(filepath); + const modelName = model.id.split('/')[1]; + return [ + { + title: "Pull the model", + setup: "# Download Lemonade from https://lemonade-server.ai/", + content: [ + `lemonade-server pull user.${modelName} --checkpoint ${model.id}${tagName} --recipe llamacpp`, + "# Note: If you installed from source, use the lemonade-server-dev command instead.", + ].join("\n"), + }, + { + title: "Run and chat with the model", + content: `lemonade-server run user.${modelName}`, + }, + { + title: "List all available models", + content: "lemonade-server list", + }, + ]; +}; + /** * Add your new local app here. * @@ -478,6 +501,13 @@ export const LOCAL_APPS = { displayOnModelPage: isLlamaCppGgufModel, snippet: snippetDockerModelRunner, }, + lemonade: { + prettyLabel: "Lemonade", + docsUrl: "https://lemonade-server.ai", + mainTask: "text-generation", + displayOnModelPage: isLlamaCppGgufModel, + snippet: snippetLemonade, + }, } satisfies Record; export type LocalAppKey = keyof typeof LOCAL_APPS;