Aravind2701's picture
Upload README.md with huggingface_hub
31c9797 verified
|
Raw
History Blame Contribute Delete
3.69 kB
---
language:
- en
task_categories:
- text-generation
tags:
- logistics
- fine-tuning
- synthetic
- gemma
- lora
- mlx
- supply-chain
- india
pretty_name: AI Logistics Copilot Dataset
size_categories:
- 10K<n<100K
---
# AI Logistics Copilot Dataset
A synthetic dataset of **50,000 instruction-following examples** for fine-tuning
a Logistics Copilot that helps small-scale manufacturers in India prevent
missed pickups, predict SLA breaches, and automate operational decisions.
## Problem Statement
Small-scale manufacturers frequently miss delivery deadlines when logistics
providers fail to arrive for scheduled pickups — with no backup plan,
no early warning, and no automated communication to customers.
This dataset trains a model to be the **intelligence layer** that solves this.
## Dataset Details
- **Total examples**: 50,000
- **Train split**: 47,500
- **Validation split**: 2,500
- **Format**: Instruction-following (`### User:` / `### Assistant:`)
- **Base model used for fine-tuning**: Gemma 4B (MLX)
- **Fine-tuning method**: LoRA (rank 8)
## Task Categories
| Category | Count | % |
|----------|-------|---|
| Pickup Risk Assessment | ~9,100 | 18% |
| SLA Breach Prediction | ~6,000 | 12% |
| Root Cause Analysis | ~6,000 | 12% |
| Carrier Selection | ~5,000 | 10% |
| Backup Carrier Recommendation | ~5,000 | 10% |
| Customer Notification Drafting | ~5,000 | 10% |
| Delay Escalation Handling | ~4,000 | 8% |
| Optimal Pickup Time Suggestion | ~3,000 | 6% |
| Historical Pattern Analysis | ~3,000 | 6% |
| Operational Shift Summary | ~2,000 | 4% |
| Conversational Follow-ups | ~2,000 | 4% |
## Domain Coverage
- **15 carriers** with distinct reliability profiles (42% to 98%)
- **20 Indian cities** as origin/destination (Chennai, Bangalore, Mumbai, etc.)
- **30 manufacturing customers** (Toyota, Bosch, Tata Motors, JSW Steel, etc.)
- **20 delay reasons** (driver unavailable, breakdown, weather, traffic, etc.)
- **Vehicle types**: Mini Truck to 40ft Container
- **Cargo types**: Auto components, pharmaceuticals, steel, textiles, etc.
## Sample
```json
{
"text": "### User:\nAssess pickup risk for this shipment.\n\nCarrier: ABC Logistics\nReliability: 42%\nFactory: Chennai\nDestination: Bangalore\nPickup Time: 9:00 AM\nDay: Monday\nDriver Status: Not Assigned\nHistorical Failures (last 90 days): 6\nCargo Weight: 8.5 tons\nWeather: Heavy Rain\nCustomer: Toyota\nPriority: Critical\n\n### Assistant:\nRisk Level: Critical\n\nReason:\n- Carrier reliability is low at 42%\n- Carrier has 6 failures in the last 90 days\n- Driver status is 'Not Assigned'\n- Adverse weather: Heavy Rain\n\nRecommended Actions:\n1. Immediately assign a backup transporter.\n2. Notify warehouse to prepare for delayed dispatch.\n3. Inform Toyota about potential delay.\n4. Escalate to operations manager."
}
```
## Fine-Tuning Usage
```python
from datasets import load_dataset
dataset = load_dataset("Aravind2701/logistics-copilot-dataset")
```
Train with MLX + LoRA:
```bash
python -m mlx_lm lora \
--model ./gemma4-e4b-mlx \
--data ./data_logistics \
--adapter-path ./adapters_logistics \
--train \
--iters 1000 \
--batch-size 1 \
--learning-rate 1e-5 \
--num-layers 16
```
## What the Fine-Tuned Model Learns
1. **Risk scoring** — Maps carrier reliability + driver status + weather → risk level
2. **Decision logic** — When to escalate (P1/P2/P3/P4) vs monitor vs assign backup
3. **Domain language** — SLA breach, carrier blacklisting, escalation tiers
4. **Structured responses** — Risk Level, Reason, Recommended Actions format
5. **Pattern recognition** — "Carrier A fails on Mondays", "avoid pickups after 5 PM"
## License
MIT