containers / podman-desktop-extension-ai-lab

Work with LLMs on a local environment using containers
https://podman-desktop.io/extensions/ai-lab
Apache License 2.0
170 stars 31 forks source link

Download of ibm granite-8b-code-instruct-GGUF model fails #1651

Closed alxlenc closed 3 weeks ago

alxlenc commented 3 weeks ago

Bug description

The download of ibm-granite/granite-8b-code-instruct-GGUF fails.

image

This might be caused by the extension not handling redirects.

❯ curl https://huggingface.co/ibm-granite/granite-8b-code-instruct-GGUF/resolve/main/granite-8b-code-instruct.Q4_K_M.gguf
Temporary Redirect. Redirecting to /ibm-granite/granite-8b-code-instruct-4k-GGUF/resolve/main/granite-8b-code-instruct.Q4_K_M.gguf%

Operating system

Fedora 40

Installation Method

from Podman-Desktop extension page

Version

1.0.0

Steps to reproduce

Reopen Podman Desktop and click the download button for the ibm-granite/granite-8b-code-instruct-GGUF model.

Relevant log output

No response

Additional context

Podman AI Lab extesion v1.2.3

axel7083 commented 3 weeks ago

When calling the url https://huggingface.co/ibm-granite/granite-8b-code-instruct-GGUF/resolve/main/granite-8b-code-instruct.Q4_K_M.gguf we are getting the following headers

{
  'content-type': 'text/plain; charset=utf-8',
  'content-length': '130',
  connection: 'keep-alive',
  date: 'Tue, 03 Sep 2024 13:41:28 GMT',
  'x-powered-by': 'huggingface-moon',
  'cross-origin-opener-policy': 'same-origin',
  'referrer-policy': 'strict-origin-when-cross-origin',
  'x-request-id': 'Root=1-66d71208-22931bc4582cf0b917fac1b5',
  'access-control-allow-origin': 'https://huggingface.co',
  vary: 'Origin, Accept',
  'access-control-expose-headers': 'X-Repo-Commit,X-Request-Id,X-Error-Code,X-Error-Message,X-Total-Count,ETag,Link,Accept-Ranges,Content-Range',
  location: '/ibm-granite/granite-8b-code-instruct-4k-GGUF/resolve/main/granite-8b-code-instruct.Q4_K_M.gguf',
  'x-cache': 'Miss from cloudfront',
  via: '1.1 6bbb2da0f4f203dadcd8f0ae1073d674.cloudfront.net (CloudFront)',
  'x-amz-cf-pop': 'CDG52-P4',
  'x-amz-cf-id': '4hrDDhVPrDveHj4134HdFetJiKnjSvLH7H5pSyPhpCPLZhohBrxjfQ=='
}

And the location does not contains the base url, so we are failing to redirect as we are using it to redirect.