Instructions to use SatyamGhosh/qlora-consumer-complaint-extractor with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use SatyamGhosh/qlora-consumer-complaint-extractor with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-3B-Instruct") model = PeftModel.from_pretrained(base_model, "SatyamGhosh/qlora-consumer-complaint-extractor") - Notebooks
- Google Colab
- Kaggle
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:
productissuedisputed_amountsummary
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