Downloads · 30 days
0
vominhmanh/qwen3-4b-vihsd-lora
qwen3-4b-vihsd-lora is a machine learning model from vominhmanh. 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.
This repository contains the Supervised Fine-Tuning (SFT) LoRA adapter for Vietnamese hate speech detection with explanations, trained on the ViHSD Explainable dataset.
Downloads · 30 days
0
Access
Public
Updated Feb 23, 2026
Repo size
144 MB
Likes
0
Public
Click a slice to open those files.
.safetensors132 MB · 92%
From the Hugging Face model README
This repository contains the Supervised Fine-Tuning (SFT) LoRA adapter for Vietnamese hate speech detection with explanations, trained on the ViHSD Explainable dataset.
⚠️ Important:
This repo ONLY contains the LoRA adapter weights, NOT a full merged model.
For the fully merged model (ready for inference), see:
👉 https://huggingface.co/vominhmanh/qwen3-4b-vihsd
Vietnamese content moderation with explainability:
CLEAN | OFFENSIVE | HATEOutput format (JSON):
{
"explanation": "...",
"evidence": ["..."],
"label": "CLEAN | OFFENSIVE | HATE"
}
unsloth/Qwen3-4B-Instruct-2507vominhmanh/vihsd-explainablehtdung167/ViHSDtrain / validation / testEach sample contains:
textlabelexplanationevidencer = 1632512bfloat164-bit base modelThis SFT stage focuses on:
Evaluation was performed on the ViHSD test split (3-class classification):
| Model | Macro F1 |
|---|---|
| Base Qwen3-4B-Instruct-2507 | ~0.51 |
| Qwen3-4B ViHSD (SFT LoRA) | ~0.64 |
Note: Explanation and evidence quality were evaluated qualitatively. Preference optimization is handled in a subsequent DPO stage.
from unsloth import FastLanguageModel
from peft import PeftModel
import torch
# Load base model
model, tokenizer = FastLanguageModel.from_pretrained(
"unsloth/Qwen3-4B-Instruct-2507",
max_seq_length=512,
dtype=torch.bfloat16,
load_in_4bit=True,
)
# Attach SFT LoRA
model = PeftModel.from_pretrained(
model,
"vominhmanh/qwen3-4b-vihsd-lora",
)
model.eval()
This SFT LoRA adapter is intended to be used as the initial policy for:
The DPO dataset is available at: 👉 https://huggingface.co/datasets/vominhmanh/vihsd-explainable-dpo
Apache-2.0