Downloads · 30 days
0
muditbaid/llama3.1-8b-Instruct-qlora-hatexplain
llama3.1-8b-Instruct-qlora-hatexplain is a text classification model from muditbaid. Use it when you need a label for a piece of text. It is set up for peft. The card lists the license as llama3.
QLoRA adapter trained on the HateXplain dataset using Meta-Llama-3.1-8B-Instruct as the base model. The adapter is provided together with the training recipe and a lightweight inference script.
Downloads · 30 days
0
Access
Public
Updated Nov 12, 2025
Repo size
353 MB
Likes
0
Public
Click a slice to open those files.
.safetensors420 MB · 83%
From the Hugging Face model README
QLoRA adapter trained on the HateXplain dataset using Meta-Llama-3.1-8B-Instruct as the base model. The adapter is provided together with the training recipe and a lightweight inference script.
adapter/ – QLoRA checkpoint folder exported from LLaMA-Factory (adapter_model.safetensors, tokenizer files, training metrics).config/llama31_hatexplain_qlora_sft.yaml – Training configuration used for supervised fine-tuning.scripts/qlora_inference.py – Minimal inference helper that loads the base model, merges the adapter weights, and runs generation.transformers>=4.42, peft, bitsandbytes, accelerate).from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model = "meta-llama/Meta-Llama-3.1-8B-Instruct"
adapter_path = "muditbaid/llama3.1-8b-Instruct-qlora-hatexplain"
model = AutoModelForCausalLM.from_pretrained(base_model, device_map="auto")
model = PeftModel.from_pretrained(model, adapter_path)
tokenizer = AutoTokenizer.from_pretrained(adapter_path)
python scripts/qlora_inference.py \
--adapter-path muditbaid/llama3.1-8b-Instruct-qlora-hatexplain \
--system-prompt "Classify the text as hate or not." \
--user-input "Example post here."
Refer to config/llama31_hatexplain_qlora_sft.yaml for the full set of hyperparameters.