-
Notifications
You must be signed in to change notification settings - Fork 441
[local-apps] deeplink
can take an optional filepath inside the repo
#738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thanks to recent updates on HF models hub, for local apps, it would be possible to specify an exact file in a repo rather than the entire repo (which can be a collection of different models/quants). Therefore, I think the proposed change would be a nice one 🤗 |
packages/tasks/src/local-apps.ts
Outdated
return [ | ||
`# Option 1: use llama.cpp with brew | ||
brew install llama.cpp | ||
|
||
# Load and run the model | ||
llama \\ | ||
--hf-repo "${model.id}" \\ | ||
--hf-file file.gguf \\ | ||
--hf-file ${filepath ?? "file.gguf"} \\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is nice!! 🔥
@@ -95,7 +95,8 @@ export const LOCAL_APPS = { | |||
docsUrl: "https://lmstudio.ai", | |||
mainTask: "text-generation", | |||
displayOnModelPage: isGgufModel, | |||
deeplink: (model) => new URL(`lmstudio://open_from_hf?model=${model.id}`), | |||
deeplink: (model, filepath) => | |||
new URL(`lmstudio://open_from_hf?model=${model.id}` + filepath ? `&file=${filepath}` : ""), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome addition. What would be the format of filepath
? [filename].[ext]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep sir, the full filepath (including any potential directory) inside the model repo
e.g. inside https://huggingface.co/bartowski/Codestral-22B-v0.1-GGUF it could be Codestral-22B-v0.1-IQ2_M.gguf
or Codestral-22B-v0.1-f32.gguf/Codestral-22B-v0.1-f32-00001-of-00003.gguf
for instance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it, thanks 👍
@mishig25 want to help me get this merged? (there's a conflict :) ) |
No description provided.