Downloads · 30 days
7
7% of all-time downloads
m4xx101/llama-3.2-3b-lora
llama-3.2-3b-lora is a text generation model from m4xx101. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
A QLoRA adapter fine-tuning Meta's Llama 3.2 3B Instruct on OpenHermes 2.5 — one of the largest and most diverse instruction-tuning datasets available. This adapter punches well above its 97 MB weight class: load it a…
Downloads · 30 days
7
7% of all-time downloads
All-time downloads
103
Public
Repo size
115 MB
Likes
0
Public
Click a slice to open those files.
.safetensors97.3 MB · 85%
From the Hugging Face model README
A QLoRA adapter fine-tuning Meta's Llama 3.2 3B Instruct on OpenHermes 2.5 — one of the largest and most diverse instruction-tuning datasets available. This adapter punches well above its 97 MB weight class: load it alongside the 4-bit base model and you get a compact, fast, and surprisingly capable chat model that runs comfortably on a single consumer GPU or even CPU with quantization.
import torch
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "m4xx101/llama-3.2-3b-lora"
base_model = "unsloth/Llama-3.2-3B-Instruct-bnb-4bit"
model = AutoModelForCausalLM.from_pretrained(
base_model,
load_in_4bit=True,
torch_dtype=torch.bfloat16,
device_map="auto",
)
model = PeftModel.from_pretrained(model, model_id)
tokenizer = AutoTokenizer.from_pretrained(model_id)
messages = [
{"role": "system", "content": "You are a helpful AI assistant."},
{"role": "user", "content": "Explain quantum computing in one paragraph."},
]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt").to("cuda")
outputs = model.generate(inputs, max_new_tokens=256, temperature=0.7)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
merged = model.merge_and_unload()
merged.save_pretrained("./llama-3.2-3b-openhermes-merged")
tokenizer.save_pretrained("./llama-3.2-3b-openhermes-merged")
| Parameter | Value |
|---|---|
| Base model | unsloth/Llama-3.2-3B-Instruct (4-bit BnB) |
| Dataset | teknium/OpenHermes-2.5 |
| Method | QLoRA (4-bit NF4 + LoRA) |
| LoRA rank (r) | 16 |
| LoRA alpha | 16 |
| Target modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
| Training steps | 30 |
| Final loss | 0.72 |
| Framework | Unsloth + PEFT 0.18.1 |
Apache 2.0 — same as the base Llama 3.2 model. Use it, merge it, stack it, ship it.
Built with Unsloth — the fastest way to fine-tune open LLMs on consumer hardware.