From d6a8e7642a323f050341302eaf684c1b9deaae3d Mon Sep 17 00:00:00 2001 From: Daniel Holanda Date: Thu, 17 Jul 2025 18:07:24 -0400 Subject: [PATCH 1/3] Add Lemonade to local apps --- packages/tasks/src/local-apps.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/packages/tasks/src/local-apps.ts b/packages/tasks/src/local-apps.ts index 53f6880282..f894e93caf 100644 --- a/packages/tasks/src/local-apps.ts +++ b/packages/tasks/src/local-apps.ts @@ -301,6 +301,24 @@ 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); + return [ + { + title: "Run and chat with the model", + content: `lemonade-server run ${model.id}${tagName}`, + }, + { + title: "Install the model ahead of time", + content: `lemonade-server pull ${model.id}${tagName}`, + }, + { + title: "List all available models", + content: "lemonade-server list", + }, + ]; +}; + /** * Add your new local app here. * @@ -478,6 +496,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; From 414a5f4f8df452313bca7d8d462e94ebc5705786 Mon Sep 17 00:00:00 2001 From: Daniel Holanda Date: Thu, 17 Jul 2025 18:38:33 -0400 Subject: [PATCH 2/3] Add notes --- packages/tasks/src/local-apps.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/tasks/src/local-apps.ts b/packages/tasks/src/local-apps.ts index f894e93caf..d5e02729f2 100644 --- a/packages/tasks/src/local-apps.ts +++ b/packages/tasks/src/local-apps.ts @@ -306,7 +306,11 @@ const snippetLemonade = (model: ModelData, filepath?: string): LocalAppSnippet[] return [ { title: "Run and chat with the model", - content: `lemonade-server run ${model.id}${tagName}`, + setup: "# Download Lemonade from https://lemonade-server.ai/", + content: [ + `lemonade-server run ${model.id}${tagName}`, + "# Note: If you installed from source, use the lemonade-server-dev command instead." + ], }, { title: "Install the model ahead of time", From 28f274612b11d581a74f2123bee0f5489e13b2b9 Mon Sep 17 00:00:00 2001 From: Daniel Holanda Date: Fri, 18 Jul 2025 17:28:31 -0400 Subject: [PATCH 3/3] Improve pull instructions --- packages/tasks/src/local-apps.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/tasks/src/local-apps.ts b/packages/tasks/src/local-apps.ts index d5e02729f2..155d676bf2 100644 --- a/packages/tasks/src/local-apps.ts +++ b/packages/tasks/src/local-apps.ts @@ -303,18 +303,19 @@ const snippetDockerModelRunner = (model: ModelData, filepath?: string): string = const snippetLemonade = (model: ModelData, filepath?: string): LocalAppSnippet[] => { const tagName = getQuantTag(filepath); + const modelName = model.id.split('/')[1]; return [ { - title: "Run and chat with the model", + title: "Pull the model", setup: "# Download Lemonade from https://lemonade-server.ai/", content: [ - `lemonade-server run ${model.id}${tagName}`, - "# Note: If you installed from source, use the lemonade-server-dev command instead." - ], + `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: "Install the model ahead of time", - content: `lemonade-server pull ${model.id}${tagName}`, + title: "Run and chat with the model", + content: `lemonade-server run user.${modelName}`, }, { title: "List all available models",