From 6f22376ebe26ec66e37636f3d4ecc3ae81dde71b Mon Sep 17 00:00:00 2001 From: Yagil Burowski Date: Thu, 10 Oct 2024 06:27:35 -0400 Subject: [PATCH] lmstudio deeplink for MLX models (#963) (Not yet tested) LM Studio 0.3.4 and newer supports MLX - [reference](https://lmstudio.ai/blog/lmstudio-v0.3.4) --------- Co-authored-by: Julien Chaumond --- 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 6ebde2592..c9efef2da 100644 --- a/packages/tasks/src/local-apps.ts +++ b/packages/tasks/src/local-apps.ts @@ -82,6 +82,10 @@ function isLlamaCppGgufModel(model: ModelData) { return !!model.gguf?.context_length; } +function isMlxModel(model: ModelData) { + return model.tags.includes("mlx"); +} + const snippetLlamacpp = (model: ModelData, filepath?: string): LocalAppSnippet[] => { const command = (binary: string) => [ @@ -218,7 +222,7 @@ export const LOCAL_APPS = { prettyLabel: "LM Studio", docsUrl: "https://lmstudio.ai", mainTask: "text-generation", - displayOnModelPage: isLlamaCppGgufModel, + displayOnModelPage: (model) => isLlamaCppGgufModel(model) || isMlxModel(model), deeplink: (model, filepath) => new URL(`lmstudio://open_from_hf?model=${model.id}${filepath ? `&file=${filepath}` : ""}`), },