Downloads · 30 days
0
kevin009/llama313
llama313 is a machine learning model from kevin009. 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 apache-2.0.
A LoRA (Low-Rank Adaptation) fine-tuned adapter for the Llama-3.1-8B language model.
Downloads · 30 days
0
Access
Public
Updated Dec 26, 2024
Repo size
5.6 GB
Likes
0
Public
Click a slice to open those files.
.safetensors83.9 MB · 100%
From the Hugging Face model README
A LoRA (Low-Rank Adaptation) fine-tuned adapter for the Llama-3.1-8B language model.
q_proj (Query projection)k_proj (Key projection)v_proj (Value projection)o_proj (Output projection)up_proj (Upsampling projection)down_proj (Downsampling projection)gate_proj (Gate projection)This adapter must be used in conjunction with the base Llama-3.1-8B model.
from peft import PeftModel, PeftConfig
from transformers import AutoModelForCausalLM, AutoTokenizer
# Load base model
base_model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.1-8B-instruct")
tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.1-8B-instruct")
# Load LoRA adapter
model = PeftModel.from_pretrained(base_model, "path_to_adapter")