Skip to content

Commit

Permalink
lmstudio deeplink for MLX models (#963)
Browse files Browse the repository at this point in the history
(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 <julien@huggingface.co>
  • Loading branch information
yagil and julien-c authored Oct 10, 2024
1 parent e201d55 commit 6f22376
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/tasks/src/local-apps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) =>
[
Expand Down Expand Up @@ -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}` : ""}`),
},
Expand Down

0 comments on commit 6f22376

Please sign in to comment.