Aditya369 โ€” Qwen3-4B emotion classifier (LoRA adapter)

by AGK FIRE INC

LoRA adapter (r=16) fine-tuning Qwen/Qwen3-4B for emotion classification on the dair-ai/emotion dataset. For the merged all-in-one model, see agk4444/aditya369.

Labels

id emotion
0 sadness
1 joy
2 love
3 anger
4 fear
5 surprise

Usage

from peft import PeftModel
from transformers import AutoModelForSequenceClassification, AutoTokenizer

base = AutoModelForSequenceClassification.from_pretrained(
    "Qwen/Qwen3-4B", num_labels=6, load_in_4bit=True
)
model = PeftModel.from_pretrained(base, "agk4444/aditya369-lora")
tok = AutoTokenizer.from_pretrained("agk4444/aditya369-lora")

labels = ["sadness", "joy", "love", "anger", "fear", "surprise"]

text = "I am so happy today!"
inputs = tok(text, return_tensors="pt")
pred = model(**inputs).logits.argmax(-1).item()
print(labels[pred])  # joy

Requires peft, bitsandbytes, and transformers.

Evaluation

Test-set results on dair-ai/emotion (2k held-out examples):

metric score
accuracy 0.9350
macro F1 0.8907
weighted F1 0.9341
test loss 0.2754
Per-class results (test set)
emotion precision recall f1 n
sadness 0.968 0.979 0.973 581
joy 0.941 0.964 0.952 695
love 0.856 0.786 0.820 159
anger 0.942 0.942 0.942 275
fear 0.905 0.893 0.899 224
surprise 0.810 0.712 0.758 66

Training

  • Base: Qwen/Qwen3-4B, 4-bit (bitsandbytes); LoRA r=16 on attention layers
  • Data: dair-ai/emotion โ€” 16k train / 2k val / 2k test
  • 3 epochs (~1,500 steps), gradient checkpointing on, single T4 (Kaggle)
  • Adapter is ~70MB; the same weights fused into the base live at agk4444/aditya369

Limitations

  • English short-form text (tweets); untested on long documents or other languages.
  • Six coarse emotions only โ€” no intensity scores, no mixed-emotion output.
  • Inherits the biases of the base model and the tweet dataset.

ยฉ 2026 AGK FIRE INC. Released under Apache 2.0.

Downloads last month
26
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for agk4444/aditya369-lora

Finetuned
Qwen/Qwen3-4B
Adapter
(1178)
this model