SatyamSinghal/taskmind-1.1b-chat-lora
111
TaskMind — TinyLlama 1.1B Chat LoRA
A LoRA adapter fine-tuned on TinyLlama/TinyLlama-1.1B-Chat-v1.0 for WhatsApp message intent classification and structured task extraction in English and Hinglish (Hindi–English code-switch).
Trained entirely on Apple Silicon MPS (M5 Max) — no cloud GPU, no cost, 2 minutes 12 seconds.
📦 Full pipeline, production API server, test suite, and deployment docs → github.com/vijendradhanotiya/taskmind-ai
What It Does
Given a raw WhatsApp team message, the model extracts structured intent as JSON — the model itself outputs valid JSON, no regex hacks needed.
Input:
@Neha the design review is pending from your endOutput:
{
"intent": "TASK_ASSIGN",
"assigneeName": "Neha",
"project": null,
"title": "Design review",
"deadline": null,
"priority": "normal",
"progressPercent": null
}Supported Intents
Quick Start
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch, json
BASE_MODEL = "TinyLlama/TinyLlama-1.1B-Chat-v1.0"
ADAPTER = "SatyamSinghal/taskmind-1.1b-chat-lora"
tokenizer = AutoTokenizer.from_pretrained(BASE_MODEL)
model = AutoModelForCausalLM.from_pretrained(BASE_MODEL, torch_dtype=torch.float32)
model = PeftModel.from_pretrained(model, ADAPTER)
model.eval()
SYSTEM_PROMPT = (
"You are TaskMind, an AI that reads WhatsApp messages and extracts structured task data. "
"Always respond with valid JSON only. No explanation. No markdown."
)
def classify(message: str) -> dict:
chat = [
{"role": "system", "content": SYSTEM_PROMPT},
{"role": "user", "content": message},
]
ids = tokenizer.apply_chat_template(chat, return_tensors="pt", add_generation_prompt=True)
with torch.no_grad():
out = model.generate(ids, max_new_tokens=150, do_sample=False, pad_token_id=tokenizer.eos_token_id)
text = tokenizer.decode(out[0][ids.shape[-1]:], skip_special_tokens=True).strip()
try:
return json.loads(text)
except json.JSONDecodeError:
return {"raw": text, "parse_success": False}
print(classify("@Agrim fix the growstreams deck ASAP"))Training Details
Performance
Before vs After — Real Examples
API Server
A production-ready FastAPI server wrapping this adapter is available in the companion repo.
git clone https://github.com/vijendradhanotiya/taskmind-ai
pip install -r requirements.txt
python3 -m uvicorn api.main:app --host 0.0.0.0 --port 8001OpenAI-compatible endpoints included:
# Classify a WhatsApp message
curl -X POST http://localhost:8001/v1/classify \
-H "Content-Type: application/json" \
-d '{"message": "@Vijendra deploy karo production pe aaj raat tak, urgent hai!"}'
# Generic chat completion
curl -X POST http://localhost:8001/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"messages": [{"role": "user", "content": "What is LoRA?"}], "max_tokens": 150}'Framework Versions
Contributors
Full source, deployment guide, hardware benchmarks, and test suite: [github.com/vijendradhanotiya/taskmind-ai](https://github.com/vijendradhanotiya/taskmind-ai)
Citation
If you use this model or the TaskMind pipeline in your work:
@misc{taskmind2025,
title = {TaskMind: WhatsApp Intent Classification via LoRA Fine-tuning on TinyLlama},
author = {Singhal, Satyam and Dhanotiya, Vijendra},
year = {2025},
url = {https://huggingface.co/SatyamSinghal/taskmind-1.1b-chat-lora},
note = {LoRA adapter for TinyLlama-1.1B-Chat-v1.0, trained on Apple Silicon MPS}
}@software{vonwerra2020trl,
title = {{TRL: Transformers Reinforcement Learning}},
author = {von Werra, Leandro and Belkada, Younes and Tunstall, Lewis and Beeching, Edward
and Thrush, Tristan and Lambert, Nathan and Huang, Shengyi and Rasul, Kashif
and Gallouedec, Quentin},
license = {Apache-2.0},
url = {https://github.com/huggingface/trl},
year = {2020}
}