Skip to content

LORAX_USE_GLOBAL_HF_TOKEN is not applied at the first time of calling adapter from huggingface private hub #541

@monologg

Description

@monologg

System Info

ghcr.io/predibase/lorax:24cb494

Information

  • Docker
  • The CLI directly

Tasks

  • An officially supported command
  • My own modifications

Reproduction

  • I've set HUGGING_FACE_HUB_TOKEN as environment when running docker container
  • Also set LORAX_USE_GLOBAL_HF_TOKEN=1 as environment
  • I'm pulling adapter from huggingface private hub.
curl http://XXXX/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "PRIVATE_HF_HUB_PATH", 
    "messages": [
      {
        "role": "system",
        "content": "You are a helpful assistant who gives detailed informations"
      },
      {
        "role": "user",
        "content": "Hello!"
      }
    ]
  }'

I've got the error below.

{"error":"Request failed during generation: Server error: No valid adapter config file found: tried None and None","error_type":"generation"}%

Reason why this happens

CleanShot 2024-07-16 at 13 01 13@2x

CleanShot 2024-07-16 at 13 01 59@2x

CleanShot 2024-07-16 at 13 02 19@2x

Expected behavior

I should return the result correctly even though I don't send api_token on request

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions