Skip to content

Commit

Permalink
add moirai-1.1 config files
Browse files Browse the repository at this point in the history
  • Loading branch information
gorold authored and liu-jc committed Aug 22, 2024
1 parent 901a987 commit 4660d25
Show file tree
Hide file tree
Showing 7 changed files with 126 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Uni2TS also provides tools for fine-tuning, inference, and evaluation for time s

## 🎉 What's New

* Jun 2024: Released Moirai-1.1-R model weights in [small](https://huggingface.co/Salesforce/moirai-1.1-R-small), [base](https://huggingface.co/Salesforce/moirai-1.1-R-base), and [large](https://huggingface.co/Salesforce/moirai-1.1-R-large).

* May 2024: The Uni2TS paper has been accepted to ICML 2024 as an Oral presentation!

* Mar 2024: Release of Uni2TS library, along with [Moirai-1.0-R](https://huggingface.co/collections/Salesforce/moirai-10-r-models-65c8d3a94c51428c300e0742) and [LOTSA data](https://huggingface.co/datasets/Salesforce/lotsa_data/)!
Expand Down
7 changes: 7 additions & 0 deletions cli/conf/eval/model/moirai_1.1_R_base.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
_target_: uni2ts.model.moirai.MoiraiForecast
module:
_target_: uni2ts.model.moirai.MoiraiModule.from_pretrained
pretrained_model_name_or_path: Salesforce/moirai-1.1-R-base
num_samples: 100
patch_size: ???
context_length: ???
7 changes: 7 additions & 0 deletions cli/conf/eval/model/moirai_1.1_R_large.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
_target_: uni2ts.model.moirai.MoiraiForecast
module:
_target_: uni2ts.model.moirai.MoiraiModule.from_pretrained
pretrained_model_name_or_path: Salesforce/moirai-1.1-R-large
num_samples: 100
patch_size: ???
context_length: ???
7 changes: 7 additions & 0 deletions cli/conf/eval/model/moirai_1.1_R_small.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
_target_: uni2ts.model.moirai.MoiraiForecast
module:
_target_: uni2ts.model.moirai.MoiraiModule.from_pretrained
pretrained_model_name_or_path: Salesforce/moirai-1.1-R-small
num_samples: 100
patch_size: ???
context_length: ???
33 changes: 33 additions & 0 deletions cli/conf/finetune/model/moirai_1.1_R_base.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# load a pretrained checkpoint from huggingface hub
_target_: uni2ts.model.moirai.MoiraiFinetune
module:
_target_: uni2ts.model.moirai.MoiraiModule.from_pretrained
pretrained_model_name_or_path: Salesforce/moirai-1.1-R-base
module_kwargs:
_target_: builtins.dict
distr_output:
_target_: uni2ts.distribution.MixtureOutput
components:
- _target_: uni2ts.distribution.StudentTOutput
- _target_: uni2ts.distribution.NormalFixedScaleOutput
- _target_: uni2ts.distribution.NegativeBinomialOutput
- _target_: uni2ts.distribution.LogNormalOutput
d_model: 768
num_layers: 12
patch_sizes: ${as_tuple:[8, 16, 32, 64, 128]}
max_seq_len: 512
attn_dropout_p: 0.0
dropout_p: 0.0
scaling: true
min_patches: 2
min_mask_ratio: 0.15
max_mask_ratio: 0.5
max_dim: 128
loss_func:
_target_: uni2ts.loss.packed.PackedNLLLoss
lr: 1e-3
weight_decay: 1e-1
beta1: 0.9
beta2: 0.98
num_training_steps: ${mul:${trainer.max_epochs},${train_dataloader.num_batches_per_epoch}}
num_warmup_steps: 0
33 changes: 33 additions & 0 deletions cli/conf/finetune/model/moirai_1.1_R_large.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# load a pretrained checkpoint from huggingface hub
_target_: uni2ts.model.moirai.MoiraiFinetune
module:
_target_: uni2ts.model.moirai.MoiraiModule.from_pretrained
pretrained_model_name_or_path: Salesforce/moirai-1.1-R-large
module_kwargs:
_target_: builtins.dict
distr_output:
_target_: uni2ts.distribution.MixtureOutput
components:
- _target_: uni2ts.distribution.StudentTOutput
- _target_: uni2ts.distribution.NormalFixedScaleOutput
- _target_: uni2ts.distribution.NegativeBinomialOutput
- _target_: uni2ts.distribution.LogNormalOutput
d_model: 1024
num_layers: 24
patch_sizes: ${as_tuple:[8, 16, 32, 64, 128]}
max_seq_len: 512
attn_dropout_p: 0.0
dropout_p: 0.0
scaling: true
min_patches: 2
min_mask_ratio: 0.15
max_mask_ratio: 0.5
max_dim: 128
loss_func:
_target_: uni2ts.loss.packed.PackedNLLLoss
lr: 1e-3
weight_decay: 1e-1
beta1: 0.9
beta2: 0.98
num_training_steps: ${mul:${trainer.max_epochs},${train_dataloader.num_batches_per_epoch}}
num_warmup_steps: 0
37 changes: 37 additions & 0 deletions cli/conf/finetune/model/moirai_1.1_R_small.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# load a pretrained checkpoint from huggingface hub
_target_: uni2ts.model.moirai.MoiraiFinetune
module:
_target_: uni2ts.model.moirai.MoiraiModule.from_pretrained
pretrained_model_name_or_path: Salesforce/moirai-1.1-R-small
module_kwargs:
_target_: builtins.dict
distr_output:
_target_: uni2ts.distribution.MixtureOutput
components:
- _target_: uni2ts.distribution.StudentTOutput
- _target_: uni2ts.distribution.NormalFixedScaleOutput
- _target_: uni2ts.distribution.NegativeBinomialOutput
- _target_: uni2ts.distribution.LogNormalOutput
d_model: 384
num_layers: 6
patch_sizes: ${as_tuple:[8, 16, 32, 64, 128]}
max_seq_len: 512
attn_dropout_p: 0.0
dropout_p: 0.0
scaling: true
min_patches: 2
min_mask_ratio: 0.15
max_mask_ratio: 0.5
max_dim: 128
loss_func:
_target_: uni2ts.loss.packed.PackedNLLLoss
val_metric:
- _target_: uni2ts.loss.packed.PackedMSELoss
- _target_: uni2ts.loss.packed.PackedNRMSELoss
normalize: absolute_target_squared
lr: 1e-3
weight_decay: 1e-1
beta1: 0.9
beta2: 0.98
num_training_steps: ${mul:${trainer.max_epochs},${train_dataloader.num_batches_per_epoch}}
num_warmup_steps: 0

0 comments on commit 4660d25

Please sign in to comment.