You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when I run the code ".pytho demo.py", the weight not same as the provided one
100%|███████████████████████████████████████| 241M/241M [01:38<00:00, 2.55MiB/s]
Loading LLaMA-Adapter from ckpts/7fa55208379faf2dd862565284101b0e4a2a72114d6490a95e432cf9d9b6c813_BIAS-7B.pth
Traceback (most recent call last):
File "demo.py", line 11, in
model, preprocess = llama.load("BIAS-7B", llama_dir, device)
File "/root/autodl-tmp/LLaMA-Adapter/llama_adapter_v2_multimodal7b/llama/llama_adapter.py", line 309, in load
model = LLaMA_adapter(
File "/root/autodl-tmp/LLaMA-Adapter/llama_adapter_v2_multimodal7b/llama/llama_adapter.py", line 30, in init
with open(os.path.join(llama_ckpt_dir, "params.json"), "r") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/path/to/LLaMA/cpu/params.json'
these code just download the base model,but it not provide tokenizer.model and params.json and so on!
could you please provide these files with me.
/path/to/llama_model_weights
├── 7B
│ ├── checklist.chk
│ ├── consolidated.00.pth
│ └── params.json
└── tokenizer.model
Activity
csuhan commentedon Nov 20, 2023
It seems that you forgot to pass the
llama_typeparam:https://github.com/OpenGVLab/LLaMA-Adapter/blob/b82e90bd31dc75d6fdca0a35b53ff00d1b96bc47/llama_adapter_v2_multimodal7b/llama/llama_adapter.py#L290C1-L291C26
fengmingfeng commentedon Nov 20, 2023
these code just download the base model,but it not provide tokenizer.model and params.json and so on!
could you please provide these files with me.
/path/to/llama_model_weights
├── 7B
│ ├── checklist.chk
│ ├── consolidated.00.pth
│ └── params.json
└── tokenizer.model
_MODELS = {
"BIAS-7B": "https://github.com/OpenGVLab/LLaMA-Adapter/releases/download/v.2.0.0/7fa55208379faf2dd862565284101b0e4a2a72114d6490a95e432cf9d9b6c813_BIAS-7B.pth",
"LORA-BIAS-7B": "https://github.com/OpenGVLab/LLaMA-Adapter/releases/download/v.2.0.0/1bcbffc43484332672092e0024a8699a6eb5f558161aebf98a7c6b1db67224d1_LORA-BIAS-7B.pth",
"CAPTION-7B": "https://github.com/OpenGVLab/LLaMA-Adapter/releases/download/v.2.0.0/5088aeb63a89746b90bcfd5cb819e1c7411b2771b267c6d131ce73e250a8abf0_CAPTION-7B.pth",
"LORA-BIAS-7B-v21": "https://github.com/OpenGVLab/LLaMA-Adapter/releases/download/v.2.1.0/d26d107eec32127ac86ef1997cf7169de1c56a59c539fc1258c6798b969e289c_LORA-BIAS-7B-v21.pth",
# "LORA16-7B": "",
# "PARTIAL-7B": ""
}
def available_models():
return list(_MODELS.keys())
def load(name, llama_dir, llama_type="7B", device="cuda" if torch.cuda.is_available() else "cpu", download_root='ckpts', max_seq_len=512,
phase="finetune"):
if name in _MODELS:
model_path = _download(_MODELS[name], download_root)
elif os.path.isfile(name):
model_path = name
else:
return RuntimeError(f"Model {name} not found; available models = {available_models()}"), None
Cheng909865905 commentedon Dec 2, 2023
你好 我也遇到同样的问题 找不到BIAS-7B 模型的相关tokenizer.model 和 params.json文件 ,请问您解决了嘛 我的q 909865905 将不甚感激
fengmingfeng commentedon Dec 4, 2023
抱歉,我也没有解决