|
Download README.md from birlaailabs/yug: direct link, hf CLI and curl.
- Browser
- Download file 5.64 kB
-
https://huggingface.co/birlaailabs/yug/resolve/main/README.md
- Command line
-
hf download hf://birlaailabs/yug/README.md
-
curl -L -o README.md https://huggingface.co/birlaailabs/yug/resolve/main/README.md
5.64 kB
| license: cc-by-nc-4.0 | |
| tags: | |
| - time series | |
| - forecasting | |
| - foundation models | |
| - pretrained models | |
| - safetensors | |
| datasets: | |
| - autogluon/chronos_datasets | |
| - Salesforce/GiftEvalPretrain | |
| pipeline_tag: time-series-forecasting | |
| library_name: yug | |
| model-index: | |
| - name: Yug | |
| results: | |
| - task: | |
| type: time-series-forecasting | |
| dataset: | |
| name: GIFT-Eval | |
| type: GIFT-Eval | |
| metrics: | |
| - type: CRPS | |
| value: 0.529 | |
| name: CRPS | |
| - type: MASE | |
| value: 0.744 | |
| name: MASE | |
| source: | |
| url: https://huggingface.co/spaces/Salesforce/GIFT-Eval | |
| name: GIFT-Eval Time Series Forecasting Leaderboard | |
| # Yug | |
| **Yug** is a 271.8M-parameter time series foundation model developed by Birla AI Labs for **zero-shot probabilistic forecasting**. A single checkpoint forecasts a previously unseen series without task-specific training or per-series tuning: given a historical context and a forecast horizon, it returns a predictive distribution summarised by quantile levels. It supports **univariate** and **covariate-informed** forecasting within a single architecture. | |
| ## Links | |
| - π» [GitHub](https://github.com/birla-ai-labs/yug) | |
| - π [Quickstart notebook](https://github.com/birla-ai-labs/yug/blob/main/notebooks/quickstart.ipynb) | |
| - π [Issues and questions](https://github.com/birla-ai-labs/yug/issues) | |
| <!-- TODO(release): add a technical report / paper link here once public. --> | |
| ## Overview | |
| | Capability | Yug | | |
| |---|---| | |
| | Univariate forecasting | β | | |
| | Covariates | β | | |
| | Probabilistic (quantile) output | β | | |
| | Max context length | 2048 | | |
| | Quantile levels | 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9 | | |
| ## Model architecture | |
| | | | | |
| |---|---| | |
| | Parameters | 271,845,260 | | |
| | Model dimension | 960 | | |
| | Decoder layers | 12 | | |
| | Attention heads | 8 | | |
| | MLP expansion | 1.25 | | |
| | Patch length | 16 | | |
| | Block size (points per forward pass) | 64 | | |
| | Precision | float32 | | |
| | Format | `safetensors` | | |
| ## Running the model locally | |
| Install the package: | |
| ```bash | |
| pip install yug | |
| ``` | |
| Optional extras: | |
| ```bash | |
| pip install 'yug[pandas]' # needed for forecast.to_dataframe() | |
| pip install 'yug[gluonts]' # GluonTS predictor for benchmark harnesses | |
| ``` | |
| Check the machine can run it before downloading weights: | |
| ```bash | |
| yug-check | |
| ``` | |
| Make zero-shot predictions: | |
| ```python | |
| import numpy as np | |
| from yug import YugPipeline | |
| pipeline = YugPipeline.from_pretrained( | |
| "birlaailabs/yug", device_map="cuda" | |
| ) | |
| # Synthetic signal: trend + 64-step season + 12-step season + noise | |
| CONTEXT, HORIZON, PERIOD = 2000, 256, 64 | |
| rng = np.random.default_rng([20240902, 315595964, 0]) | |
| t = np.arange(CONTEXT + HORIZON) | |
| trend = np.linspace(0.0, rng.uniform(50, 150), len(t)) | |
| phase1, amp1 = rng.uniform(0, 6), rng.uniform(10, 30) | |
| phase2, amp2 = rng.uniform(0, 6), rng.uniform(2, 8) | |
| signal = ( | |
| trend # trend | |
| + amp1 * np.sin(2 * np.pi * t / PERIOD + phase1) # 64-step season | |
| + amp2 * np.sin(2 * np.pi * t / 12 + phase2) # 12-step season | |
| + rng.normal(0, 1.0, len(t)) # noise | |
| ).astype(np.float32) | |
| context, truth = signal[:CONTEXT], signal[CONTEXT:] | |
| forecast = pipeline.predict( | |
| context, | |
| prediction_length=HORIZON, | |
| freq="D", # a model input, not metadata: pandas offset alias | |
| seed=0, # makes the call reproducible | |
| ) | |
| print(forecast.median) # (256,) point forecast | |
| print(forecast.quantile(0.9)) # (256,) | |
| print(forecast.interval()) # {"lower": (256,), "upper": (256,)} | |
| print(forecast.to_dataframe().head()) | |
| ``` | |
| Several series at once (lengths and frequencies may differ): | |
| ```python | |
| forecast = pipeline.predict( | |
| [series_a, series_b, series_c], | |
| prediction_length=48, | |
| freq=["D", "D", "H"], | |
| item_ids=["a", "b", "c"], | |
| ) | |
| forecast.values # (3, n_quantiles, 48) | |
| ``` | |
| With covariates β stack channels into a 2-D array, target first: | |
| ```python | |
| multivariate = np.stack([target, covariate_1, covariate_2]) | |
| forecast = pipeline.predict([multivariate], prediction_length=48) | |
| ``` | |
| Covariate forecasts degrade faster with horizon than univariate ones. For | |
| long horizons the univariate path is often the better answer β measure both. | |
| In a GluonTS benchmark: | |
| ```python | |
| from yug.gluonts_adapter import YugPredictor | |
| predictor = YugPredictor.from_pretrained( | |
| "birlaailabs/yug", freq="H", prediction_length=48 | |
| ) | |
| forecasts = list(predictor.predict(dataset)) | |
| ``` | |
| ## Training data | |
| - Subset of [Chronos Datasets](https://huggingface.co/datasets/autogluon/chronos_datasets) | |
| - Subset of [GIFT-Eval Pretrain](https://huggingface.co/datasets/Salesforce/GiftEvalPretrain) | |
| - Proprietary synthetic data | |
| ## Citation | |
| If you find Yug useful for your research, please consider citing it: | |
| ```bibtex | |
| @software{yug_2026, | |
| title = {Yug: a foundation model for zero-shot probabilistic time-series forecasting}, | |
| author = {Aaditya Jain* and Debdeep Sanyal* and Aaryan Nagpal and Dhruv Kumar and Murari Mandal and Saurabh Deshpande}, | |
| year = {2026}, | |
| organization = {Birla AI Labs}, | |
| url = {https://github.com/birla-ai-labs/yug} | |
| } | |
| ``` | |
| *Equal contribution. | |
| ## Acknowledgements | |
| We thank Karthik Sridhar, Deepak Lenka, Akash Kokare, Manya Pandey, and Varya Srivastava, as well as the extended Birla AI Labs team for their support. | |
| ## License | |
| Model weights : [CC-BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/) | |
| Code : licensed separately β see [GitHub repository](https://github.com/birla-ai-labs/yug) for its license. | |