Skip to content
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

Support new hf.co/ format #377

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Support new hf.co/ format #377

wants to merge 1 commit into from

Conversation

ericcurtin
Copy link
Collaborator

This new format for hf has been implemented by Ollama.

@ericcurtin ericcurtin force-pushed the support-huggingface.co branch 3 times, most recently from 87809ef to ab63c05 Compare October 26, 2024 11:25
This new format for hf has been implemented by Ollama.

Signed-off-by: Eric Curtin <[email protected]>
@ericcurtin ericcurtin marked this pull request as draft October 26, 2024 12:14
@ericcurtin
Copy link
Collaborator Author

This doesn't work that well, but this is up for grabs if someone can figure it out

quantization = 'Q4_K_M' # Default quantization scheme

# Construct the new format
return f"hf://{username}/{model_name}/{model_name}-{quantization}.gguf"
Copy link
Contributor

@swarajpande5 swarajpande5 Oct 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ericcurtin I would like to take this up, the new format which is being returned might not always be correct.
For example, running the following,

ramalama pull hf.co/instructlab/merlinite-7b-lab-GGUF

will use the following new format,

hf://instructlab/merlinite-7b-lab-GGUF/merlinite-7b-lab-GGUF-Q4_K_M.gguf

And the above path does not exist.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah... Maybe there's a REST API to get the real filename if you pass it instructlab/merlinite-7b-lab-GGUF and Q4_K_M or something like that but I'm really guessing...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, there should be one to get the complete path. I'll explore this :)

@rhatdan
Copy link
Member

rhatdan commented Nov 6, 2024

Any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants