Commit ·
f291eba
1
Parent(s): 86fc8dc
Update README.md
Browse files44 unmodified lines4546474849505152535444 unmodified linesYou need to install the following packages:```shellpip install transformers[torch]pip install mamba-ssm[causal-conv1d]pip install zuko```44 unmodified lines4546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929344 unmodified linesYou need to install the following packages:```shell# pip install transformers[torch]# pip install mamba-ssm[causal-conv1d]# pip install zuko```To make deterministic or probabilistic forecasts, just follow:```pythonfrom transformers import AutoModel, AutoConfigimport torchmodel_path = "path/to/your/model"config_path = "path/to/your/config"config = AutoConfig.from_pretrained(config_path)model = AutoModel.from_pretrained(model_path, config=config)model.eval()# The inputs need to be [batch_size, seq_len]. If multivariate, transform the inputs to [batch_size * n_vars, seq_len]inputs = torch.randn(batch_size, seq_length)# deterministic forecastingwith torch.no_grad():outputs = model.generate(inputs=inputs,max_length=96,revin=True,num_samples=1,inference_patch_len=48 # recommend to input the period length)# probabilistic forecastingwith torch.no_grad():outputs = model.generate(inputs=inputs,max_length=96,revin=True,num_samples=100)```
README.md+42-3