AI Cricket Commentary Generator is an end-to-end analytical and generative tool designed to produce professional, context-aware cricket broadcasting commentary from match delivery metadata. It processes complex match variables including batter/bowler dynamics, run rates, and dismissal types—to generate rich, sub-second commentary synced with high-fidelity regional voice synthesis.
Deployed: https://m-ahmad-butt-cricket-commentary.hf.space/format
---
title: Cricket Commentary AI
emoji: 🏏
colorFrom: green
colorTo: emerald
sdk: docker
model_id: m-ahmad-butt/cricket-commentary-model
dataset_id: m-ahmad-butt/cricket
space_url: https://huggingface.co/spaces/m-ahmad-butt/cricket-commentary
---The commentary engine (v1) utilizes Qwen2.5-1.5B with QLoRA optimization.
| Metric | Configuration | Impact |
|---|---|---|
| Quantization | NF4 (4-Bit) | 68% Reduction in VRAM usage |
| P-Precision | BF16/FP16 Mixed | Preserves 99%+ generation quality |
| Inference Speed | Unsloth Kernels | < 450ms Total Latency per delivery |
| VRAM Footprint | Specialized Adapters | Optimized for 8GB+ GPU environments |
| Component | Repository | Access |
|---|---|---|
| Dataset | cricket-commentary-dataset | 20,000+ Ball-by-ball logs |
| Model | cricket-commentary-model | Qwen2.5-1.5B Optimized Adapter |
| Space | Cricket-Commentary Demo | Interactive Web Interface |
- Base Model: Qwen2.5-1.5B-Instruct (Decoder-only Transformer)
- Fine-Tuning: Low-Rank Adaptation (LoRA) via Unsloth
- Inference Engine: FastAPI with custom Triton kernels
- Voice Synthesis: Microsoft Edge-TTS (Multi-regional accents: British, Indian, Australian)
- Frontend: React.js with Vite for high-performance HUD updates
Establish the local development environment:
# Create virtual environment
python -m venv venv
# Activate environment
venv\Scripts\activateDependencies, Pre processing and model training are handled within the core notebook. Execute the notebook cells sequentially to install the specialized kernels (Unsloth) and fine-tune the model:
- Open
Cricket-Commentary/model.ipynb. - Execute the Cells one by one.
Launch the full stack for local or remote inference.
Start the FastAPI server to handle metadata serialization and voice generation:
cd Cricket-Commentary
python server.pyServers live at http://localhost:8000
Initialize the React simulation interface:
cd frontend
npm install
npm run devAccess interface at http://localhost:5173
This project is developed for educational purposes only.








