Views
No views yet
unsloth/llama-3-8b-bnb-4bit, fine-tuned on the Stanford Alpaca dataset (52K instructions). Lightweight, efficient, and open. Built with Unsloth, HF PEFT, and 🤗 Datasets for low-resource, instruction-following tasks. Adapter weights only. Reproducible and ready to deploy.1from transformers import AutoTokenizer, AutoModelForCausalLM
2from peft import PeftModel
3
4BASE_MODEL = "unsloth/llama-3-8b-bnb-4bit"
5ADAPTER = "Cre4T3Tiv3/unsloth-llama3-alpaca-lora"
6
7# Load base model and adapter
8base_model = AutoModelForCausalLM.from_pretrained(BASE_MODEL, device_map="auto", load_in_4bit=True)
9model = PeftModel.from_pretrained(base_model, ADAPTER)
10model = model.merge_and_unload()
11
12tokenizer = AutoTokenizer.from_pretrained(ADAPTER)
13
14# Run inference
15prompt = """### Instruction:
16What is QLoRA?
17
18### Response:"""
19inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
20outputs = model.generate(**inputs, max_new_tokens=128)
21print(tokenizer.decode(outputs[0], skip_special_tokens=True))| Parameter | Value |
|---|---|
| Base Model | unsloth/llama-3-8b-bnb-4bit |
| r | 16 |
| alpha | 16 |
| dropout | 0.05 |
| Bits | 4-bit (bnb) |
| Framework | Unsloth + HuggingFace PEFT |
| Adapter Format | LoRA (merged post-training) |
yahma/alpaca-cleanedeval_adapter.py in the GitHub repo for reproducibility.@software{unsloth-llama3-alpaca-lora,
author = {Jesse Moses, Cre4T3Tiv3},
title = {Unsloth LoRA Adapter for LLaMA 3 (8B)},
year = {2025},
url = {https://huggingface.co/Cre4T3Tiv3/unsloth-llama3-alpaca-lora},
}