CoolFace
Modelpublic

samarthruckstar/qwen-whatsapp-agent

sourceHugging Faceapache-2.0updated 6d agoView on Hugging Face
0likes35downloads
Model Card

๐Ÿค– Qwen2.5-1.5B WhatsApp Customer Service Agent (Mahadyuti Engineering Solution)

This repository contains the fine-tuned weights and quantized GGUF for the Mahadyuti Engineering Solution AI WhatsApp customer service and catalog agent.

๐ŸŽฏ Model Capabilities

  • โ€”Direct Catalog Precision: Grounded responses on industrial machinery (Slipper making machines, camphor slab dies, sambrani cup machines, papad rolling machines).
  • โ€”Tax Accuracy: Consistently enforces and declares +18% GST Extra on all machinery price quotes.
  • โ€”Image Attribution: Generates verified product image markdown references.
  • โ€”Anti-Hallucination: Rejects inquiries for unstocked or unmanufactured goods (e.g. aircraft, electronics, consumer gadgets) without inventing products or pricing.

๐Ÿ“ฆ Formats Included in This Repository

  1. 1.PEFT LoRA Adapter (`adapter_model.safetensors`) (~73.9 MB)
  2. 2.Base model: Qwen/Qwen2.5-1.5B-Instruct
  3. 3.Rank: r=16, alpha=16
  4. 4.Target modules: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
  1. 1.Ollama & llama.cpp GGUF (`qwen_whatsapp_q4_k_m.gguf`) (~986 MB)
  2. 2.4-bit medium K-quantization (Q4_K_M) for fast CPU/GPU inference.

๐Ÿ’ป Usage with PEFT & Transformers

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

BASE_MODEL_ID = "Qwen/Qwen2.5-1.5B-Instruct"
LORA_REPO_ID = "samarthruckstar/qwen-whatsapp-agent"

tokenizer = AutoTokenizer.from_pretrained(BASE_MODEL_ID)
base_model = AutoModelForCausalLM.from_pretrained(
    BASE_MODEL_ID,
    torch_dtype=torch.bfloat16,
    device_map="auto"
)
model = PeftModel.from_pretrained(base_model, LORA_REPO_ID)
model.eval()

prompt = "What is the price, power, and capacity of H-ASM15T Automatic Slipper Making Machine?"
messages = [
    {"role": "system", "content": "You are the official WhatsApp AI assistant for Mahadyuti Engineering Solution."},
    {"role": "user", "content": prompt}
]

inputs = tokenizer.apply_chat_template(messages, tokenize=True, return_tensors="pt").to(model.device)
outputs = model.generate(inputs, max_new_tokens=256, do_sample=False)
print(tokenizer.decode(outputs[0][inputs.shape[1]:], skip_special_tokens=True))

๐Ÿฆ™ Usage with Ollama or llama.cpp

Download qwen_whatsapp_q4_k_m.gguf:

bash
hf download samarthruckstar/qwen-whatsapp-agent qwen_whatsapp_q4_k_m.gguf --local-dir .

Run in Ollama:

bash
ollama create qwen-whatsapp -f Modelfile
ollama run qwen-whatsapp "Hi, tell me about your slipper making machines"