Open amyeroberts opened 6 days ago
🫠 sounds like kwargs getting lost maybe?
It's being triggered here in the PEFT library cc @BenjaminBossan
Essentially, path
built assumes that if the adapters weight path is local, then it's in the form model_id/adapter_model.safetensors
. However, if we've already downloaded the model, it'll be under path/to/cache/.cache/huggingface/hub/models--{REPO_ID}-{MODEL_ID}/snapshots/{COMMIT_REF}/{WEIGHT_NAME}.safetensors
Thanks for flagging this, indeed, this breaks with offline mode. @Wauplin do you have a suggestion how we can correctly check if the file has already been locally cached?
System Info
transformers
version: 4.42.0.dev0Who can help?
Probably me @amyeroberts or @ArthurZucker.
PEFT weight loading code was originally added by @younesbelkada
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
Unable to load models in offline model, even when the adapter weights are cache locally
This model uses
haoranxu/ALMA-13B-Pretrain
as adapter weights.If you first load the model s.t. the model and adapter weights are available in the cache, and then re-run in offline mode, the following error occurs:
Expected behavior
Can load the model in online and offline mode