Views
No views yet



1# python >= 3.10
2$ pip install aurora-model==0.2.01from aurora import load_model
2import os
3import torch
4# os.environ['HF_ENDPOINT'] = 'https://hf-mirror.com'
5model = load_model()
6
7# prepare input
8batch_size, lookback_length = 1, 528
9seqs = torch.randn(batch_size, lookback_length).cuda()
10
11# Note that Aurora can generate multiple probable predictions
12forecast_length = 96
13num_samples = 100
14
15
16# For inference_token_len, you can refer to LightGTS (Periodic Patching).
17# We recommend to use the period length as the inference_token_len.
18output = model.generate(inputs=seqs, max_output_length=forecast_length, num_samples=num_samples, inference_token_len=48)
19
20
21# use raw predictions for mean/quantiles/confidence-interval estimation
22print(output.shape)
231from aurora import load_model
2from einops import rearrange
3import os
4import torch
5# os.environ['HF_ENDPOINT'] = 'https://hf-mirror.com'
6model = load_model()
7tokenizer = model.tokenizer
8
9# prepare input
10batch_size, n_vars, lookback_length, max_text_length = 1, 10, 528, 200
11seqs = torch.randn(batch_size, lookback_length, n_vars).cuda()
12
13text = "1983-09-12: The Federal Register provides a uniform system for making available to the public regulations and legal notices issued by federal agencies in the United States."
14
15tokenized_text = tokenizer(text, padding='max_length', truncation=True, max_length=max_text_length, return_tensors="pt")
16text_input_ids = tokenized_text['input_ids'].cuda()
17text_attention_mask = tokenized_text['attention_mask'].cuda()
18text_token_type_ids = tokenized_text.get('token_type_ids', torch.zeros_like(text_input_ids)).cuda()
19
20batch_input_ids = text_input_ids.repeat(n_vars, 1)
21batch_attention_mask = text_attention_mask.repeat(n_vars, 1)
22batch_token_type_ids = text_token_type_ids.repeat(n_vars, 1)
23batch_x = rearrange(seqs, "b l c -> (b c) l")
24
25# Note that Aurora can generate multiple probable predictions
26forecast_length = 96
27num_samples = 100
28
29
30# For inference_token_len, you can refer to LightGTS (Periodic Patching).
31# We recommend to use the period length as the inference_token_len.
32output = model.generate(inputs=batch_x,text_input_ids=batch_input_ids,
33 text_attention_mask=batch_attention_mask,
34 text_token_type_ids=batch_token_type_ids,
35 max_output_length=forecast_length,
36 num_samples=num_samples,
37 inference_token_len=48)
38
39
40# use raw predictions for mean/quantiles/confidence-interval estimation
41print(output.shape) 1$ pip install torch==2.4.0
2$ pip install torchvision==0.19.0
3$ pip install transformers[torch]1from huggingface_hub import snapshot_download
2import os
3import torch
4# os.environ['HF_ENDPOINT'] = 'https://hf-mirror.com'
5
6# --- Configuration ---
7repo_id = "DecisionIntelligence/Aurora"
8
9# Target directory for the download. "." represents the current working directory.
10local_dir = "./work_dir"
11
12# Optional: Set repo_type to "dataset" or "space" if you are not downloading a model.
13repository_type = "model"
14# ---------------------
15
16# Ensure the local directory exists before starting the download
17if not os.path.exists(local_dir):
18 os.makedirs(local_dir)
19 print(f"Created directory: {local_dir}")
20
21print(f"Starting download from '{repo_id}' to '{local_dir}'...")
22
23try:
24 # snapshot_download handles the download of all files in the repository
25 download_path = snapshot_download(
26 repo_id=repo_id,
27 local_dir=local_dir,
28 # Set to False to download actual files instead of symbolic links
29 local_dir_use_symlinks=False,
30 repo_type=repository_type,
31 # Use your HF access token for private/gated repositories
32 token=None
33 )
34 print(f"\nSuccess! All files downloaded to: {download_path}")
35
36except Exception as e:
37 print(f"\nAn error occurred during download: {e}")
38
39# Then you can easily make zero-shot forecasts using Aurora
40
41from modeling_aurora import AuroraForPrediction
42
43model = AuroraForPrediction.from_pretrained("./",trust_remote_code=True)
44
45# prepare input
46batch_size, lookback_length = 1, 528
47seqs = torch.randn(batch_size, lookback_length).cuda()
48
49# Note that Aurora can generate multiple probable predictions
50forecast_length = 96
51num_samples = 100
52
53
54# For inference_token_len, you can refer to LightGTS (Periodic Patching).
55# We recommend to use the period length as the inference_token_len.
56output = model.generate(inputs=seqs, max_output_length=forecast_length, num_samples=num_samples, inference_token_len=48)
57
58
59# use raw predictions for mean/quantiles/confidence-interval estimation
60print(output.shape) 1# TimeMMD
2TimeMMD/scripts/run_aurora_timemmd_zero_shot.sh
3
4# EPF
5EPF/scripts/run_aurora_short_term_zero_shot.sh
6
7# ProbTS
8ProbTS/scripts/run_aurora_probts.sh
9
10# TSFM-Bench
11TFB/scripts/run_aurora_tfb.sh
12
13# TFB univariate
14TFB/scripts/run_aurora_uni.sh




1@inproceedings{wu2026aurora,
2 title = {Aurora: Towards Universal Generative Multimodal Time Series Forecasting},
3 author = {Wu, Xingjian and Jin, Jianxin and Qiu, Wanghui and Chen, Peng and Shu, Yang and Yang, Bin and Guo, Chenjuan},
4 booktitle = {ICLR},
5 year = {2026}
6}