Downloads · 30 days
12
20% of all-time downloads
samarthruckstar/qwen-whatsapp-agent
qwen-whatsapp-agent is a text generation model from samarthruckstar. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
This repository contains the fine-tuned weights and quantized GGUF for the Mahadyuti Engineering Solution AI WhatsApp customer service and catalog agent.
Downloads · 30 days
12
20% of all-time downloads
All-time downloads
60
Public
Repo size
85.3 MB
Likes
0
Public
Click a slice to open those files.
.safetensors73.9 MB · 87%
From the Hugging Face model README
This repository contains the fine-tuned weights and quantized GGUF for the Mahadyuti Engineering Solution AI WhatsApp customer service and catalog agent.
PEFT LoRA Adapter (adapter_model.safetensors) (~73.9 MB)
Qwen/Qwen2.5-1.5B-Instructr=16, alpha=16q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_projOllama & llama.cpp GGUF (qwen_whatsapp_q4_k_m.gguf) (~986 MB)
Q4_K_M) for fast CPU/GPU inference.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))
Download qwen_whatsapp_q4_k_m.gguf:
hf download samarthruckstar/qwen-whatsapp-agent qwen_whatsapp_q4_k_m.gguf --local-dir .
Run in Ollama:
ollama create qwen-whatsapp -f Modelfile
ollama run qwen-whatsapp "Hi, tell me about your slipper making machines"