Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could you please provide these weight with me? #132

Open
fengmingfeng opened this issue Nov 21, 2023 · 2 comments
Open

Could you please provide these weight with me? #132

fengmingfeng opened this issue Nov 21, 2023 · 2 comments

Comments

@fengmingfeng
Copy link

/path/to/llama_model_weights
├── 7B
│ ├── checklist.chk
│ ├── consolidated.00.pth
│ └── params.json
└── tokenizer.model

I just want to run the fineturn code.

import cv2
import llama
import torch
from PIL import Image

device = "cuda" if torch.cuda.is_available() else "cpu"

llama_dir = "/path/to/LLaMA/"

choose from BIAS-7B, LORA-BIAS-7B, LORA-BIAS-7B-v21

model, preprocess = llama.load("BIAS-7B", llama_dir, llama_type="7B", device=device)
model.eval()

prompt = llama.format_prompt("Please introduce this painting.")
img = Image.fromarray(cv2.imread("../docs/logo_v1.png"))
img = preprocess(img).unsqueeze(0).to(device)

result = model.generate(img, [prompt])[0]

print(result)

@csuhan
Copy link
Collaborator

csuhan commented Nov 21, 2023

You need to request LLaMA's official weights. Our weights such as BIAS-7B will be automatically downloaded.

@Cheng909865905
Copy link

您好,问题解决了吗 我也是同样的问题 找不到BIAS-7B的params.json 和 tokenizer.model文件

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants