Skip to content

Conversation

@mintyleaf
Copy link
Contributor

Description

This PR possibly fixes an inability to download file in subfolder from huggingface
for example to download that model i was forced to use https:// prefix instead of huggingface://
https://huggingface.co/huihui-ai/Huihui-gpt-oss-20b-BF16-abliterated-v2/blob/main/GGUF/Huihui-gpt-oss-20b-BF16-abliterated-v2-Q4_K_M.gguf

the huggingface://huihui-ai/Huihui-gpt-oss-20b-BF16-abliterated-v2/GGUF/Huihui-gpt-oss-20b-BF16-abliterated-v2-Q4_K_M.gguf is invalid, and localai tries to download file named GGUF and gets 404

is that done on purpose, or just overlooked?

Signed-off-by: mintyleaf <mintyleafdev@gmail.com>
@netlify
Copy link

netlify bot commented Dec 18, 2025

Deploy Preview for localai ready!

Name Link
🔨 Latest commit 3fce35a
🔍 Latest deploy log https://app.netlify.com/projects/localai/deploys/6943691dea69180008113a53
😎 Deploy Preview https://deploy-preview-7634--localai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@mudler
Copy link
Owner

mudler commented Dec 18, 2025

good catch. this was an oversight, just as a note you don't need to specify the GGUF file even if it's in a subfolder. During the import process you should be able to just specify huggingface://huihui-ai/Huihui-gpt-oss-20b-BF16-abliterated-v2 (and if you want a different quantization, just specify it in the preferences) or even just huihui-ai/Huihui-gpt-oss-20b-BF16-abliterated-v2

@mudler mudler changed the title Update uri.go fix(uri): consider subfolders when expanding huggingface URLs Dec 18, 2025

branch := "main"
filepath := repoPieces[2]
filepath := strings.Join(repoPieces[2:], "/")
Copy link
Owner

Choose a reason for hiding this comment

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

would be great if we could cover this in our unit tests in pkg/downloader/uri_test.go

@mudler mudler merged commit 2479832 into mudler:master Dec 18, 2025
29 of 31 checks passed
sredman pushed a commit to sredman/LocalAI that referenced this pull request Dec 20, 2025
…#7634)

Update uri.go

Signed-off-by: mintyleaf <mintyleafdev@gmail.com>
Signed-off-by: Simon Redman <simon@ergotech.com>
@mudler mudler added the bug Something isn't working label Dec 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants