lorax icon indicating copy to clipboard operation
lorax copied to clipboard

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

Open monologg opened this issue 1 year ago • 0 comments

System Info

ghcr.io/predibase/lorax:24cb494

Information

  • [X] Docker
  • [ ] The CLI directly

Tasks

  • [X] 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

monologg avatar Jul 16 '24 04:07 monologg