Downloads · 30 days
0
baruga/alpaca-lora-13b
alpaca-lora-13b is a machine learning model from baruga. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
This repo contains a low-rank adapter for LLaMA-13b fit on the Stanford Alpaca dataset.
Downloads · 30 days
0
Access
Public
Updated Mar 18, 2023
Repo size
26.3 MB
Likes
7
Public
Click a slice to open those files.
.bin26.3 MB · 100%
From the Hugging Face model README
This repo contains a low-rank adapter for LLaMA-13b fit on the Stanford Alpaca dataset.
import torch
from peft import PeftModel
from transformers import LlamaTokenizer, LlamaForCausalLM, GenerationConfig
tokenizer = LlamaTokenizer.from_pretrained("decapoda-research/llama-13b-hf")
model = LlamaForCausalLM.from_pretrained(
"decapoda-research/llama-13b-hf",
load_in_8bit=True,
torch_dtype=torch.float16,
device_map="auto",
)
model = PeftModel.from_pretrained(
model, "baruga/alpaca-lora-13b",
torch_dtype=torch.float16
)
For further information, check out this Github repo: https://github.com/tloen/alpaca-lora.