Open wygao8 opened 2 months ago
Hi @wygao8, thanks for opening this issue!
I'm able to run the following without issue on main and v4.41.2:
import os
import torch
os.environ['HF_HUB_OFFLINE'] = '1'
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained(
"haoranxu/ALMA-13B",
torch_dtype=torch.float16,
device_map="auto",
local_files_only=True
)
Interestingly, I can't run the same with "haoranxu/ALMA-13B-R"
in offline mode, it's unable to load the adapter weights locally (it always tries to load from the hub)
I've opened up #31700 for the offline mode issue if there's adapter weights
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.
System Info
Copy-and-paste the text below in your GitHub issue and FILL OUT the two last points.
transformers
version: 4.41.2Who can help?
Hi I used
huggingface-cli
to download bothhaoranxu/ALMA-13B-R
andALMA-13B
in the same cache directory (my_cache_dir).I can load ALMA-13B-R successfully with the following command:
but failed to load ALMA-13B
The error log show as follows:
After downgrading
transformers
to4.39.3
, ALMA-13B can be loaded with the same command.Since ALMA-13B-R has
.safetensors
files whereas ALMA-13B only haspytorch.bin
files, I believe some bugs still need to be fixed.Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
import torch from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("haoranxu/ALMA-13B", cache_dir=your_cache_dir, torch_dtype=torch.float16, device_map="auto")
Expected behavior
The model is successfully loaded. The command-line log probably show as follows: