Skyloom Karachi AQI Forecasting
This is a fine‑tuned version of google/timesfm-2.5-200m-transformers for hourly Air Quality Index (AQI) forecasting in Karachi, Pakistan.
The model is optimised for a 24‑step forecast horizon (next 24 hours).
Model summary
| Item | Value |
|---|---|
| Base model | google/timesfm-2.5-200m-transformers |
| Task | Univariate time‑series forecasting |
| Target variable | Hourly AQI |
| Location | Karachi, Pakistan |
| Forecast horizon (training) | 24 hours |
| Forecast horizon (evaluation) | 24 hours |
| Test MAE | 5.178 |
| Test sMAPE | 5.456% |
| Test MASE | 0.4687 |
Data
- Source:
Syed110-3/karachi-aqi-predictor - After cleaning: 26,208 hourly records (2023-01-02 to 2025-12-28)
- Split: chronological (no future leakage)
- Seasonal period for MASE: 24 hours
Evaluation results (24‑step ahead)
| Model | MAE | RMSE | sMAPE | MASE |
|---|---|---|---|---|
| Skyloom | 5.178 | 8.859 | 5.456 | 0.4687 |
| ValidationWeightedEnsemble | 5.170 | 8.824 | 5.449 | 0.4679 |
| TimesFM‑ZeroShot | 5.279 | 9.023 | 5.546 | 0.4778 |
| HGBDirectLagCalendar | 6.899 | 10.597 | 7.390 | 0.6244 |
| SeasonalDrift24h | 10.238 | 15.391 | 10.867 | 0.9266 |
| RollingMean24h | 10.749 | 15.926 | 11.281 | 0.9729 |
| SeasonalNaive | 11.008 | 16.520 | 11.629 | 0.9962 |
| SameHourMean7D | 13.962 | 19.036 | 15.142 | 1.2636 |
| ETS_Additive24h | 13.962 | 19.036 | 15.142 | 1.2636 |
Note: The ensemble assigned 90% weight to the model and 0% to the zero‑shot model, confirming that fine‑tuning was essential for this dataset.
Usage
import torch
import numpy as np
from transformers import TimesFm2_5ModelForPrediction
model_id = "mahwizzzz/skyloom"
device = "cuda" if torch.cuda.is_available() else "cpu"
model = TimesFm2_5ModelForPrediction.from_pretrained(
model_id,
torch_dtype=torch.bfloat16 if device == "cuda" else torch.float32,
device_map=device
)
model.eval()
# Provide the last 1024 hourly AQI values
past_aqi = np.array([...], dtype=np.float32)
with torch.no_grad():
batch = torch.tensor(past_aqi[-1024:][None, :], dtype=torch.float32).to(device)
output = model(past_values=batch, forecast_context_len=1024)
forecast_24h = output.mean_predictions[0, :24].float().cpu().numpy()
forecast_24h = np.clip(forecast_24h, 0, None)
print(forecast_24h)
Limitations
- Only AQI history is used no weather, traffic, or other covariates.
- Performance may degrade during unexpected pollution events or sensor anomalies.
- The reported metrics are from historical backtesting, not live operation.
Citation
If you use this model, cite the base TimesFM work and this model repository:
@misc{skyloom2026,
title = {Skyloom: TimesFM 2.5 for Karachi AQI Forecasting},
author = {Mahwiz khalil},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/mahwizzzz/skyloom}}
}