mobot-ghana-complete / MODEL_CARD.md
CHATMOBOT's picture
Update MODEL_CARD.md - MOBOT v2.0 documentation
7e8eb6f verified
metadata
license: apache-2.0
base_model: mistralai/Mistral-7B-v0.1
tags:
  - finance
  - conversational-ai
  - ghana
  - multilingual
  - multimodal
  - fintech
  - whatsapp
  - telegram
  - twi
  - pidgin
  - hausa
  - ga
  - ewe
language:
  - en
  - ak
  - ha
  - ee
  - mul
pipeline_tag: text-generation
inference: true

MOBOT - Ghana Financial Assistant

Model Description

MOBOT is a fine-tuned conversational AI assistant specialized for Ghanaian financial services. Built on Mistral-7B, MOBOT understands and responds in multiple Ghanaian languages (English, Twi, Pidgin, Hausa, Ga, Ewe) with a friendly, empathetic tone tailored for financial assistance.

Key Features

  • 🇬🇭 Ghana-Focused: Trained on Ghanaian financial knowledge, local terminology, and cultural context
  • 💬 Multilingual: Supports English, Twi, Pidgin, Hausa, Ga, and Ewe
  • 🎤 Multimodal: Handles text, voice (STT), images (OCR), and voice replies (TTS)
  • 💰 Finance-Specialized: Optimized for bill payments, money transfers, balance checks, and financial advice
  • 🤝 Empathetic: Trained with emotional intelligence for sensitive financial situations
  • 🔒 Safe: Built-in safety patterns and refusal mechanisms for sensitive information

Model Details

Model Information

  • Model Name: CHATMOBOT/mobot-ghana-complete
  • Base Model: mistralai/Mistral-7B-v0.1
  • Fine-tuning Method: LoRA (Low-Rank Adaptation)
  • Training Dataset: 15,264 high-quality conversational examples
  • Languages: English, Twi, Pidgin, Hausa, Ga, Ewe
  • Context Length: 2048 tokens

Training Configuration

  • LoRA Rank: 128
  • LoRA Alpha: 32
  • Learning Rate: 2e-4
  • Batch Size: 4 (effective: 32 with gradient accumulation)
  • Epochs: 3
  • Optimizer: AdamW
  • Scheduler: Cosine with warmup

Training Data

Dataset Composition

  • Current Training Set: 15,264 examples (quality-filtered)
  • Training Split: 13,737 examples (90%)
  • Validation Split: 1,527 examples (10%)
  • Total Available Dataset: 509,438+ examples (from larger corpus)

Data Sources

  • Original conversational dataset: 15,286 examples
  • Safety/refusal patterns: 50 examples
  • Quality-filtered and validated
  • Additional sources: Style-augmented (1M+), conversational expansions (36K+)

Intent Coverage

  • Send money / Transfer
  • Pay bills (ECG, GWCL, Hospital, etc.)
  • Check balance
  • Buy airtime / data
  • Expense summaries
  • Financial advice
  • Fraud warnings
  • Savings coaching
  • Debt planning
  • Receipt processing
  • Transaction history

Usage

Basic Usage

from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "CHATMOBOT/mobot-ghana-complete"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)

# Format input
system_msg = "You are MOBOT, Ghana's friendly financial assistant."
user_input = "Hey Mobot, send 50 cedis to Ama for hospital bill"

prompt = f"<s>[INST] {system_msg}\n\nUser: {user_input} [/INST]"

# Generate response
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.2)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)

print(response)

With Hugging Face Pipeline

from transformers import pipeline

mobot = pipeline(
    "text-generation",
    model="CHATMOBOT/mobot-ghana-complete",
    tokenizer="CHATMOBOT/mobot-ghana-complete"
)

response = mobot(
    "User: Hey Mobot, how much did I spend this week?",
    max_new_tokens=512,
    temperature=0.2,
    top_p=0.95
)

print(response[0]['generated_text'])

Multilingual Examples

English:

User: Send 50 cedis to Kwame
Mobot: Sure! I'll send ₵50 to Kwame. Please confirm?

Pidgin:

User: Chale send 20 ghs to Ama
Mobot: Okay boss, sending ₵20 to Ama. Confirm?

Twi:

User: Mepa wo kyew, ma me balance
Mobot: Me check balance wo ma wo...

Integration Examples

WhatsApp Integration

# See: integrations/whatsapp_webhook_example.py
# Handles text, images (OCR), and voice notes (STT)

Telegram Integration

# See: integrations/telegram_bot_example.py
# Interactive bot with confirmation buttons

Agent Orchestration

# See: agents/orchestrator.py
# Multi-step workflows with safety checks

Multimodal Capabilities

OCR (Bill Processing)

  • Processes bill images (ECG, GWCL, Hospital, Pharmacy, School)
  • Extracts structured fields (merchant, amount, date, reference)
  • Creates conversation examples from OCR results

STT (Voice Input)

  • Transcribes voice notes using Whisper
  • Ghanaian accent corrections
  • Intent detection from voice

TTS (Voice Reply)

  • Text-to-speech with Ghanaian-friendly voices
  • Multiple language support
  • Audio caching for performance

Safety & Compliance

Safety Features

  • Refusal patterns for sensitive information (PINs, passwords)
  • Consent management for transactions
  • Audit logging for all actions
  • Fraud detection patterns

Compliance

  • Ghana Data Protection Act compliant
  • PII redaction in datasets
  • Secure transaction handling
  • User consent tracking

Evaluation

Metrics

  • Intent Accuracy: ≥95% (target)
  • Slot Extraction F1: ≥92% (target)
  • Empathy Score: ≥4.0/5.0 (human evaluation)
  • Language Fluency: High (native speaker validation)

Stress Test Scenarios

  • Fraud reports
  • Emergency situations
  • Multi-turn conversations
  • Code-switching
  • Edge cases

Limitations

  • Model size: 7B parameters (requires GPU for inference)
  • Context window: 2048 tokens
  • Some low-resource languages may have lower accuracy
  • Requires fine-tuning for domain-specific financial products

Citation

@misc{mobot-ghana-2024,
  title={MOBOT: Ghana Financial Assistant},
  author={MOBOT Team},
  year={2024},
  publisher={Hugging Face},
  howpublished={\url{https://huggingface.co/CHATMOBOT/mobot-ghana-complete}}
}

License

Apache 2.0

Contact

Social Media

Acknowledgments

  • Base model: Mistral AI
  • Training infrastructure: RunPod
  • Multimodal tools: Coqui TTS, OpenAI Whisper, PaddleOCR
  • Integration platforms: WhatsApp Business API, Telegram Bot API

Version: 2.0
Last Updated: 2024
Status: Production Ready