yug 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- yug-0.1.0/.gitignore +63 -0
- yug-0.1.0/CITATION.cff +34 -0
- yug-0.1.0/LICENSE +201 -0
- yug-0.1.0/NOTICE +15 -0
- yug-0.1.0/PKG-INFO +224 -0
- yug-0.1.0/README.md +178 -0
- yug-0.1.0/pyproject.toml +126 -0
- yug-0.1.0/src/yug/__about__.py +5 -0
- yug-0.1.0/src/yug/__init__.py +57 -0
- yug-0.1.0/src/yug/__main__.py +162 -0
- yug-0.1.0/src/yug/base.py +171 -0
- yug-0.1.0/src/yug/configs.py +228 -0
- yug-0.1.0/src/yug/engine.py +416 -0
- yug-0.1.0/src/yug/forecaster.py +485 -0
- yug-0.1.0/src/yug/gluonts_adapter.py +168 -0
- yug-0.1.0/src/yug/model.py +997 -0
- yug-0.1.0/src/yug/pipeline.py +608 -0
- yug-0.1.0/src/yug/utils.py +239 -0
- yug-0.1.0/tests/conftest.py +65 -0
- yug-0.1.0/tests/test_config.py +126 -0
- yug-0.1.0/tests/test_forecaster.py +168 -0
- yug-0.1.0/tests/test_model.py +152 -0
- yug-0.1.0/tests/test_pipeline.py +277 -0
- yug-0.1.0/tests/test_utils.py +202 -0
yug-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# --- Model weights and data: these must never enter git history -------------
|
|
2
|
+
# Weights live on the Hugging Face Hub; datasets and results live outside the
|
|
3
|
+
# repo. A single stray checkpoint here bloats every future clone permanently.
|
|
4
|
+
*.safetensors
|
|
5
|
+
*.pt
|
|
6
|
+
*.pth
|
|
7
|
+
*.ckpt
|
|
8
|
+
*.bin
|
|
9
|
+
*.onnx
|
|
10
|
+
*.npy
|
|
11
|
+
*.npz
|
|
12
|
+
*.parquet
|
|
13
|
+
*.arrow
|
|
14
|
+
data/
|
|
15
|
+
datasets/
|
|
16
|
+
checkpoints/
|
|
17
|
+
results/
|
|
18
|
+
results_*/
|
|
19
|
+
outputs/
|
|
20
|
+
wandb/
|
|
21
|
+
lightning_logs/
|
|
22
|
+
|
|
23
|
+
# --- Python -----------------------------------------------------------------
|
|
24
|
+
__pycache__/
|
|
25
|
+
*.py[cod]
|
|
26
|
+
*$py.class
|
|
27
|
+
*.so
|
|
28
|
+
build/
|
|
29
|
+
dist/
|
|
30
|
+
*.egg-info/
|
|
31
|
+
.eggs/
|
|
32
|
+
.installed.cfg
|
|
33
|
+
pip-wheel-metadata/
|
|
34
|
+
|
|
35
|
+
# --- Environments -----------------------------------------------------------
|
|
36
|
+
.venv/
|
|
37
|
+
venv/
|
|
38
|
+
env/
|
|
39
|
+
ENV/
|
|
40
|
+
.python-version
|
|
41
|
+
.env
|
|
42
|
+
notebooks/.env
|
|
43
|
+
notebooks/.local_checkpoint/
|
|
44
|
+
|
|
45
|
+
# --- Tooling caches ---------------------------------------------------------
|
|
46
|
+
.pytest_cache/
|
|
47
|
+
.mypy_cache/
|
|
48
|
+
.ruff_cache/
|
|
49
|
+
.coverage
|
|
50
|
+
.coverage.*
|
|
51
|
+
htmlcov/
|
|
52
|
+
coverage.xml
|
|
53
|
+
.hypothesis/
|
|
54
|
+
|
|
55
|
+
# --- Notebooks --------------------------------------------------------------
|
|
56
|
+
.ipynb_checkpoints/
|
|
57
|
+
|
|
58
|
+
# --- Editors and OS ---------------------------------------------------------
|
|
59
|
+
.idea/
|
|
60
|
+
.vscode/
|
|
61
|
+
*.swp
|
|
62
|
+
.DS_Store
|
|
63
|
+
Thumbs.db
|
yug-0.1.0/CITATION.cff
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# GitHub reads this file natively and renders a "Cite this repository" button.
|
|
2
|
+
cff-version: 1.2.0
|
|
3
|
+
title: "Yug: a foundation model for zero-shot probabilistic time-series forecasting"
|
|
4
|
+
message: "If you use this software or model, please cite it as below."
|
|
5
|
+
type: software
|
|
6
|
+
# Note - Aaditya Jain and Debdeep Sanyal contributed equally.
|
|
7
|
+
authors:
|
|
8
|
+
- given-names: "Aaditya"
|
|
9
|
+
family-names: "Jain"
|
|
10
|
+
affiliation: "Birla AI Labs"
|
|
11
|
+
- given-names: "Debdeep"
|
|
12
|
+
family-names: "Sanyal"
|
|
13
|
+
affiliation: "Birla AI Labs"
|
|
14
|
+
- given-names: "Aaryan"
|
|
15
|
+
family-names: "Nagpal"
|
|
16
|
+
affiliation: "Birla AI Labs"
|
|
17
|
+
- given-names: "Dhruv"
|
|
18
|
+
family-names: "Kumar"
|
|
19
|
+
affiliation: "Birla AI Labs"
|
|
20
|
+
- given-names: "Murari"
|
|
21
|
+
family-names: "Mandal"
|
|
22
|
+
affiliation: "Birla AI Labs"
|
|
23
|
+
- given-names: "Saurabh"
|
|
24
|
+
family-names: "Deshpande"
|
|
25
|
+
affiliation: "Birla AI Labs"
|
|
26
|
+
repository-code: "https://github.com/birla-ai-labs/yug"
|
|
27
|
+
license: Apache-2.0
|
|
28
|
+
version: 0.1.0
|
|
29
|
+
keywords:
|
|
30
|
+
- time series
|
|
31
|
+
- forecasting
|
|
32
|
+
- foundation model
|
|
33
|
+
- probabilistic forecasting
|
|
34
|
+
- transformer
|
yug-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or Derivative
|
|
95
|
+
Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 Birla AI Labs
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
yug-0.1.0/NOTICE
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Yug
|
|
2
|
+
Copyright 2026 Birla AI Labs
|
|
3
|
+
|
|
4
|
+
This product includes software developed at Birla AI Labs.
|
|
5
|
+
|
|
6
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you
|
|
7
|
+
may not use this file except in compliance with the License. You may obtain a
|
|
8
|
+
copy of the License at
|
|
9
|
+
|
|
10
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
|
|
12
|
+
Unless required by applicable law or agreed to in writing, software distributed
|
|
13
|
+
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
14
|
+
CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
|
15
|
+
specific language governing permissions and limitations under the License.
|
yug-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: yug
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Yug — a foundation model for zero-shot probabilistic time-series forecasting
|
|
5
|
+
Project-URL: Homepage, https://github.com/birla-ai-labs/yug
|
|
6
|
+
Project-URL: Repository, https://github.com/birla-ai-labs/yug
|
|
7
|
+
Project-URL: Issues, https://github.com/birla-ai-labs/yug/issues
|
|
8
|
+
Author: Birla AI Labs
|
|
9
|
+
License-Expression: Apache-2.0
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
License-File: NOTICE
|
|
12
|
+
Keywords: forecasting,foundation-model,probabilistic-forecasting,pytorch,time-series,transformer
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
22
|
+
Requires-Python: >=3.10
|
|
23
|
+
Requires-Dist: huggingface-hub>=0.23
|
|
24
|
+
Requires-Dist: numpy>=1.24
|
|
25
|
+
Requires-Dist: safetensors>=0.4
|
|
26
|
+
Requires-Dist: scipy>=1.10
|
|
27
|
+
Requires-Dist: torch>=2.4
|
|
28
|
+
Provides-Extra: dev
|
|
29
|
+
Requires-Dist: gluonts>=0.14; extra == 'dev'
|
|
30
|
+
Requires-Dist: mypy>=1.10; extra == 'dev'
|
|
31
|
+
Requires-Dist: pandas>=2.0; extra == 'dev'
|
|
32
|
+
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
|
|
33
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
34
|
+
Requires-Dist: ruff>=0.6; extra == 'dev'
|
|
35
|
+
Provides-Extra: gluonts
|
|
36
|
+
Requires-Dist: gluonts>=0.14; extra == 'gluonts'
|
|
37
|
+
Requires-Dist: pandas>=2.0; extra == 'gluonts'
|
|
38
|
+
Provides-Extra: pandas
|
|
39
|
+
Requires-Dist: pandas>=2.0; extra == 'pandas'
|
|
40
|
+
Provides-Extra: test
|
|
41
|
+
Requires-Dist: pytest-cov>=5.0; extra == 'test'
|
|
42
|
+
Requires-Dist: pytest>=8.0; extra == 'test'
|
|
43
|
+
Provides-Extra: typecheck
|
|
44
|
+
Requires-Dist: mypy>=1.10; extra == 'typecheck'
|
|
45
|
+
Description-Content-Type: text/markdown
|
|
46
|
+
|
|
47
|
+
# Yug
|
|
48
|
+
|
|
49
|
+
Yug is a pretrained time-series foundation model developed by Birla AI Labs
|
|
50
|
+
for **zero-shot probabilistic forecasting**. A single checkpoint forecasts a
|
|
51
|
+
previously unseen series without task-specific training or per-series tuning:
|
|
52
|
+
given a historical context and a forecast horizon, it returns a predictive
|
|
53
|
+
distribution summarised by quantile levels.
|
|
54
|
+
|
|
55
|
+
- Model weights: [`birlaailabs/yug`](https://huggingface.co/birlaailabs/yug)
|
|
56
|
+
- Package: `pip install yug`
|
|
57
|
+
- Issues and questions: [GitHub Issues](https://github.com/birla-ai-labs/yug/issues)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
**Latest version: Yug 0.1.0**
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Update — October 2026
|
|
65
|
+
|
|
66
|
+
First public release of Yug.
|
|
67
|
+
|
|
68
|
+
**Key highlights:**
|
|
69
|
+
|
|
70
|
+
- **Zero-shot forecasting.** One pretrained checkpoint forecasts any evenly
|
|
71
|
+
spaced numeric series, across domains and frequencies, without fitting.
|
|
72
|
+
- **Probabilistic by default.** Every forecast comes back as quantile levels,
|
|
73
|
+
not a single line, so intervals are available at no extra cost.
|
|
74
|
+
- **Fast direct multi-step decoding.** A patch-based decoder emits a whole block
|
|
75
|
+
of future points per forward pass; there is no per-step generation loop.
|
|
76
|
+
- **Covariate support.** Optional additional channels alongside the target.
|
|
77
|
+
- **Drop-in benchmarking.** A GluonTS predictor for existing evaluation
|
|
78
|
+
harnesses.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Available models
|
|
83
|
+
|
|
84
|
+
| Model | Parameters | Quantile levels | Context length |
|
|
85
|
+
|---|---|---|---|
|
|
86
|
+
| [`birlaailabs/yug`](https://huggingface.co/birlaailabs/yug) | 271.8M | 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9 | 2048 |
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Install
|
|
92
|
+
|
|
93
|
+
From PyPI:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
pip install yug
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Optional extras:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
pip install 'yug[pandas]' # used in the example below
|
|
103
|
+
pip install 'yug[gluonts]' # GluonTS predictor for benchmark harnesses
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Check the machine can run it before downloading weights:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
yug-check
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Weights are cached locally on first use (`~/.cache/huggingface/hub` by
|
|
113
|
+
default, or `HF_HOME` if set).
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Code examples
|
|
118
|
+
|
|
119
|
+
### 1. Forecast one series
|
|
120
|
+
|
|
121
|
+
```python
|
|
122
|
+
import numpy as np
|
|
123
|
+
from yug import YugPipeline
|
|
124
|
+
|
|
125
|
+
pipeline = YugPipeline.from_pretrained(
|
|
126
|
+
"birlaailabs/yug", device_map="cuda"
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
# Synthetic signal: trend + 64-step season + 12-step season + noise
|
|
130
|
+
CONTEXT, HORIZON, PERIOD = 2000, 256, 64
|
|
131
|
+
rng = np.random.default_rng([20240902, 315595964, 0])
|
|
132
|
+
t = np.arange(CONTEXT + HORIZON)
|
|
133
|
+
trend = np.linspace(0.0, rng.uniform(50, 150), len(t))
|
|
134
|
+
phase1, amp1 = rng.uniform(0, 6), rng.uniform(10, 30)
|
|
135
|
+
phase2, amp2 = rng.uniform(0, 6), rng.uniform(2, 8)
|
|
136
|
+
signal = (
|
|
137
|
+
trend # trend
|
|
138
|
+
+ amp1 * np.sin(2 * np.pi * t / PERIOD + phase1) # 64-step season
|
|
139
|
+
+ amp2 * np.sin(2 * np.pi * t / 12 + phase2) # 12-step season
|
|
140
|
+
+ rng.normal(0, 1.0, len(t)) # noise
|
|
141
|
+
).astype(np.float32)
|
|
142
|
+
|
|
143
|
+
context, truth = signal[:CONTEXT], signal[CONTEXT:]
|
|
144
|
+
|
|
145
|
+
forecast = pipeline.predict(
|
|
146
|
+
context,
|
|
147
|
+
prediction_length=HORIZON,
|
|
148
|
+
freq="D", # a model input, not metadata: pandas offset alias
|
|
149
|
+
seed=0, # makes the call reproducible
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
print(forecast.median) # (256,) point forecast
|
|
153
|
+
print(forecast.quantile(0.9)) # (256,)
|
|
154
|
+
print(forecast.interval()) # {"lower": (256,), "upper": (256,)}
|
|
155
|
+
print(forecast.to_dataframe().head())
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### 2. Several series at once
|
|
159
|
+
|
|
160
|
+
Lengths and frequencies may differ.
|
|
161
|
+
|
|
162
|
+
```python
|
|
163
|
+
forecast = pipeline.predict(
|
|
164
|
+
[series_a, series_b, series_c],
|
|
165
|
+
prediction_length=48,
|
|
166
|
+
freq=["D", "D", "H"],
|
|
167
|
+
item_ids=["a", "b", "c"],
|
|
168
|
+
)
|
|
169
|
+
forecast.values # (3, n_quantiles, 48)
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### 3. With covariates
|
|
173
|
+
|
|
174
|
+
Stack channels into a 2-D array, target first, and pass it as a single series:
|
|
175
|
+
|
|
176
|
+
```python
|
|
177
|
+
multivariate = np.stack([target, covariate_1, covariate_2])
|
|
178
|
+
forecast = pipeline.predict([multivariate], prediction_length=48)
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
### 4. In a GluonTS benchmark
|
|
183
|
+
|
|
184
|
+
```python
|
|
185
|
+
from yug.gluonts_adapter import YugPredictor
|
|
186
|
+
|
|
187
|
+
predictor = YugPredictor.from_pretrained(
|
|
188
|
+
"birlaailabs/yug", freq="H", prediction_length=48
|
|
189
|
+
)
|
|
190
|
+
forecasts = list(predictor.predict(dataset))
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Examples
|
|
196
|
+
|
|
197
|
+
- [`notebooks/quickstart.ipynb`](notebooks/quickstart.ipynb) — forecast, plot
|
|
198
|
+
and score a series end to end. Self-contained; generates its own data.
|
|
199
|
+
- [`notebooks/gift_eval.ipynb`](notebooks/gift_eval.ipynb) — run the GIFT-Eval benchmark to reproduce the published scores.
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
## Citation
|
|
204
|
+
|
|
205
|
+
```bibtex
|
|
206
|
+
@software{yug_2026,
|
|
207
|
+
title = {Yug: a foundation model for zero-shot probabilistic time-series forecasting},
|
|
208
|
+
author = {Aaditya Jain* and Debdeep Sanyal* and Aaryan Nagpal and Dhruv Kumar and Murari Mandal and Saurabh Deshpande},
|
|
209
|
+
year = {2026},
|
|
210
|
+
organization = {Birla AI Labs},
|
|
211
|
+
url = {https://github.com/birla-ai-labs/yug},
|
|
212
|
+
license = {Apache-2.0}
|
|
213
|
+
}
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Note: Aaditya Jain and Debdeep Sanyal contributed equally.
|
|
217
|
+
|
|
218
|
+
## License
|
|
219
|
+
|
|
220
|
+
Code in this repository is licensed under the [Apache License 2.0](LICENSE). Model weights on Hugging Face are licensed separately under a noncommercial license, see the [model card](https://huggingface.co/birlaailabs/yug) for terms.
|
|
221
|
+
|
|
222
|
+
[](LICENSE)
|
|
223
|
+
[](pyproject.toml)
|
|
224
|
+
[](https://github.com/birla-ai-labs/yug/actions/workflows/ci.yaml)
|