Consumer Complaint Structured Extraction (QLoRA Adapter)

LoRA adapter fine-tuned on Qwen/Qwen2.5-3B-Instruct using 4-bit QLoRA.

The model converts consumer complaint narratives into structured JSON:

  • product
  • issue
  • disputed_amount
  • summary

Data

The dataset uses real complaints from the CFPB Consumer Complaint Database.

product and issue are the categories present in the CFPB complaint data.

disputed_amount and summary were extracted using deterministic regex/rule-based methods.

No LLM was used to construct the dataset.

Results

Held-out validation set: 60 examples

Metric Baseline Fine-tuned
JSON validity 100.0% 100.0%
Field accuracy 60.0% 69.2%

Usage

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

bnb_config = BitsAndBytesConfig(
    load_in_4bit=True,
    bnb_4bit_quant_type="nf4",
    bnb_4bit_compute_dtype=torch.bfloat16
)

base = AutoModelForCausalLM.from_pretrained(
    "Qwen/Qwen2.5-3B-Instruct",
    quantization_config=bnb_config,
    device_map="auto"
)

model = PeftModel.from_pretrained(
    base,
    "SatyamGhosh/qlora-consumer-complaint-extractor"
)

tokenizer = AutoTokenizer.from_pretrained(
    "SatyamGhosh/qlora-consumer-complaint-extractor"
)
Downloads last month
13
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for SatyamGhosh/qlora-consumer-complaint-extractor

Base model

Qwen/Qwen2.5-3B
Adapter
(1391)
this model