PK-RestoQwen3-4B

A QLoRA fine-tuned Qwen3-4B-Instruct-2507 adapter tailored for Pakistani restaurant customer support across English, Roman Urdu, Urdu script, and code-switched Urdu-English.

Key Capabilities

  • Fluent, concise customer support in English, Roman Urdu, Urdu script, and mixed Urdu-English (including informal Pakistani texting like tk, ni, kb, yar, bhai).
  • Anti-hallucination guardrails: Refuses to invent live order statuses, menu prices, delivery fees, ETAs, JazzCash/EasyPaisa phone numbers, or promo codes—asks clarifying questions and states when verification is required.
  • Reliable human escalation: Transfers payment disputes (JazzCash/EasyPaisa/SadaPay/card), food quality complaints, and explicit human-agent requests cleanly to a human support agent.

Training Configuration

  • Base Model: Qwen/Qwen3-4B-Instruct-2507
  • Method: 4-bit NF4 QLoRA (r=16, lora_alpha=16, all attention & MLP projections, FP32 trainable LoRA weights)
  • Loss Masking: completion_only_loss=True (assistant completions only)
  • Schedule: paged_adamw_8bit, lr=5e-5, cosine schedule, weight_decay=0.01, effective batch size 16 (1 x 16), 1 epoch, load_best_model_at_end=True.

Data Sources

Trained on ~1,500 balanced, deduplicated, zero-leakage restaurant support turns combining:

  • Curated & balanced Pakistani restaurant customer support dialogues (English, Roman Urdu, Urdu script, multi-turn chats, human-agent escalations, and adversarial anti-hallucination traps).
  • Sanitized & strictly filtered restaurant support subsets from bitext/Bitext-restaurants-llm-chatbot-training-dataset (CDLA-Sharing-1.0) and nassimjp/Polyglot-Restaurant-Reasoning-Dataset (MIT).

Quick Usage

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

base_id = "Qwen/Qwen3-4B-Instruct-2507"
adapter_id = "AliHaider1/PK-RestoQwen3-4B"

tokenizer = AutoTokenizer.from_pretrained(base_id)
bnb_config = BitsAndBytesConfig(
    load_in_4bit=True,
    bnb_4bit_quant_type="nf4",
    bnb_4bit_compute_dtype=torch.float16,
    bnb_4bit_use_double_quant=True,
)
base_model = AutoModelForCausalLM.from_pretrained(
    base_id, quantization_config=bnb_config, torch_dtype=torch.float16, device_map="auto"
)
model = PeftModel.from_pretrained(base_model, adapter_id)
model.eval()
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for AliHaider1/PK-RestoQwen3-4B

Adapter
(5,879)
this model