Skip to content

improve user experience when trying to pull models from Hugging Face #2524

Description

@miabbott

I tried running some models from HF using ramalama and was encountering errors about the HF CLI not being installed. Like so:

$ ramalama run huggingface://Qwen/Qwen2.5-7B-Instruct-GGUF/qwen2.5-7b-instruct-q4_k_m.gguf                                                                           
Downloading hf://Qwen/Qwen2.5-7B-Instruct-GGUF/qwen2.5-7b-instruct-q4_k_m.gguf ...                                                                             
Trying to pull hf://Qwen/Qwen2.5-7B-Instruct-GGUF/qwen2.5-7b-instruct-q4_k_m.gguf ...                                                                          
Error: huggingface cli download not available

I knew this was incorrect as I had done pip install huggingface_hub, so I fed the debug output from my attempts to OpenCode + Sonnet 4.6 to diagnose the error and suggest changes.

It found that when HF returned 404 errors, the errors were not properly caught and raised the generic message about the missing CLI.

I think it would be better if the actual error was surfaced to the user, so that they could explore next steps on how to resolve it.

I made an attempt (with the help of OpenCode + Sonnet) to implement a fix in #2519, but it looks like I was too optimistic.

I think the idea of showing what other GGUF files are available for an org/repo would be a nice touch, but perhaps that is too costly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions