Qwen3.5-0.8B CommonsenseQA LoRA

LoRA adapter fine-tuned on CommonsenseQA on top of Qwen/Qwen3.5-0.8B.

This repository contains adapter weights only. Load them on the official base model.

Intended use

Multiple-choice commonsense question answering (A–E letter answers), following the CommonsenseQA format.

Training summary

Item Value
Base model Qwen/Qwen3.5-0.8B
Dataset tau/commonsense_qa
Method QLoRA (4-bit NF4) + SFT
Objective Completion-only loss on the assistant answer letter
LoRA rank (r) 16
LoRA alpha 32
LoRA dropout 0.05
Target modules q_proj, v_proj
Train split CommonsenseQA train
Eval protocol CommonsenseQA validation (official public labels)

How to use

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel

base_id = "Qwen/Qwen3.5-0.8B"
adapter_id = "RehmanKhalid/Qwen3.5-0.8B-CommonsenseQA-LoRA"

tokenizer = AutoTokenizer.from_pretrained(base_id)
model = AutoModelForCausalLM.from_pretrained(
    base_id,
    torch_dtype="auto",
    device_map="auto",
)
model = PeftModel.from_pretrained(model, adapter_id)
model.eval()

messages = [
    {
        "role": "system",
        "content": "You are a helpful assistant. Answer with only the letter (A, B, C, D, or E).",
    },
    {
        "role": "user",
        "content": (
            "Question: A revolving door is convenient for two direction travel, "
            "but it also serves as a security measure at a what?\n"
            "A) bank\n"
            "B) library\n"
            "C) department store\n"
            "D) mall\n"
            "E) new york\n"
            "Answer:"
        ),
    },
]

prompt = tokenizer.apply_chat_template(
    messages, tokenize=False, add_generation_prompt=True
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)

with torch.no_grad():
    outputs = model.generate(**inputs, max_new_tokens=4, do_sample=False)

print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))

Evaluation notes

  • Report accuracy on the CommonsenseQA validation split.
  • The CommonsenseQA test split does not include public labels.
  • Do not mix scores from other benchmarks (OpenBookQA, ARC, GSM8K) into the CommonsenseQA result.

Framework versions

  • PEFT 0.19.1
  • TRL 1.8.0
  • Transformers 5.13.0
  • PyTorch 2.13.0
  • Datasets 5.0.0
  • Tokenizers 0.22.2

License

Adapter weights follow the base model license: Apache 2.0. Dataset terms for CommonsenseQA apply separately.

Downloads last month
14
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for RehmanKhalid/Qwen3.5-0.8B-CommonsenseQA-LoRA

Adapter
(448)
this model

Dataset used to train RehmanKhalid/Qwen3.5-0.8B-CommonsenseQA-LoRA