Comments (4)
It seems that you forgot to pass the llama_type
param:
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")
from llama-adapter.
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
# BIAS-7B or https://xxx/sha256_BIAS-7B.pth -> 7B
# llama_type = name.split('.')[0].split('-')[-1]
llama_ckpt_dir = os.path.join(llama_dir, llama_type)
llama_tokenzier_path = os.path.join(llama_dir, 'tokenizer.model')
# load llama_adapter weights and model_cfg
print(f'Loading LLaMA-Adapter from {model_path}')
ckpt = torch.load(model_path, map_location='cpu')
model_cfg = ckpt.get('config', {})
model = LLaMA_adapter(
llama_ckpt_dir, llama_tokenzier_path,
max_seq_len=512, max_batch_size=1,
clip_model='ViT-L/14',
v_embed_dim=768, v_depth=8,
v_num_heads=16, v_mlp_ratio=4.0,
query_len=10, query_layer=31,
w_bias=model_cfg.get('w_bias', False),
w_lora=model_cfg.get('w_lora', False),
lora_rank=model_cfg.get('lora_rank', 16),
w_new_gate=model_cfg.get('w_lora', False), # for compatibility
phase=phase)
from llama-adapter.
你好 我也遇到同样的问题 找不到BIAS-7B 模型的相关tokenizer.model 和 params.json文件 ,请问您解决了嘛 我的q 909865905 将不甚感激
from llama-adapter.
你好 我也遇到同样的问题 找不到BIAS-7B 模型的相关tokenizer.model 和 params.json文件 ,请问您解决了嘛 我的q 909865905 将不甚感激
抱歉,我也没有解决
from llama-adapter.
Related Issues (20)
- Not able to reproduce results of llama-adapter-v2 HOT 1
- How to fine-tune the llama-adapter-v2 for llama-2 7b models. HOT 1
- I have problem with downloading 7B_chinese in imagebind_LLM. HOT 1
- Could you please provide these weight with me? HOT 2
- Unable to produce the result between LLaMA-Adapter V1 and Alpaca HOT 1
- question about Pretrained LLAMA applicable to Llama_adapter model. thanks HOT 1
- I don't know which data to use to reproduce the model llama-adapter-multimodal-v2.
- Does storage space in the paper mean the capacity of checkpoint file? HOT 2
- Inquiry on Loading LLaMa-2 Model Parameters HOT 1
- how to set llama adapter max_seq_len = 4096
- [LLaMA Adapter V2] Evaluation on multiple choice questions. HOT 1
- AssertionError: Loading a checkpoint for MP=0 but world size is 1 HOT 2
- Don't find save path"ADAPTER_PATH" HOT 1
- Getting error "AF_UNIX path too long"
- Loss is nan, stopping training, while trying to reproduce alpaca_finetuning_v1 results. HOT 1
- Simple question about llama adapter v1 transformer forward function
- imagebind_LLM中的get_chinese_llama.py文件丢失,可以补充一下吗? HOT 1
- Getting weird output for multimodal 7B adapter HOT 3
- Assertation Error start_pos- AdapterV2 Multimodal
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from llama-adapter.