qcw2333 commited on
Commit
e65ba6b
·
verified ·
1 Parent(s): 2d22dbe

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +84 -3
README.md CHANGED
@@ -1,3 +1,84 @@
1
- ---
2
- license: cc-by-4.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ library_name: YingLong
4
+ tags:
5
+ - time-series
6
+ - forecasting
7
+ - foundation-models
8
+ - pretrained-models
9
+ - time-series-foundation-models
10
+ - large-time-series-models
11
+ ---
12
+
13
+
14
+ # YingLong
15
+
16
+ YingLong model is introduced in this [paper](xxxxxxxx) (coming soon). This version is pre-trained on **78B** time points. More details can be found at our [github](https://github.com/wxie9/YingLong/).
17
+
18
+
19
+
20
+ ## Quickstart
21
+
22
+ ```bash
23
+ pip install xformers transformers
24
+ pip install flash-attn --no-build-isolation
25
+ git clone https://github.com/Dao-AILab/flash-attention && cd flash-attention
26
+ cd csrc/rotary && pip install .
27
+ cd ../layer_norm && pip install .
28
+ ```
29
+ The flash attention is not required. If you use V100 or other GPU doesn't support flash attention, just change the FlashAttention2Available = RequirementCache("flash-attn>=2.0.0.post1") to
30
+ FlashAttention2Available = False in the model.py file. It should be able to run.
31
+
32
+ ```python
33
+ import torch
34
+ from transformers import AutoModelForCausalLM
35
+
36
+ # load pretrain model
37
+ model = AutoModelForCausalLM.from_pretrained('qcw2333/YingLong_110m', trust_remote_code=True,torch_dtype=torch.bfloat16).cuda()
38
+
39
+ # prepare input
40
+ batch_size, lookback_length = 1, 2880
41
+ seqs = torch.randn(batch_size, lookback_length).bfloat16().cuda()
42
+
43
+ # generate forecast
44
+ prediction_length = 96
45
+ output = model.generate(seqs, future_token=prediction_length)
46
+
47
+ print(output.shape)
48
+ ```
49
+
50
+ A notebook example is also provided [here](https://github.com/wxie9/YingLong/blob/main/quickstart_zero_shot.ipynb). The sample codes for long-term forecasting tasks and gift-eval tasks are provided at [link](https://github.com/wxie9/YingLong/tree/main).
51
+
52
+
53
+ <!-- ## Specification -->
54
+
55
+
56
+ ## Citation
57
+ Coming soon...
58
+ <!-- ```
59
+ @inproceedings{liutimer,
60
+ title={Timer: Generative Pre-trained Transformers Are Large Time Series Models},
61
+ author={Liu, Yong and Zhang, Haoran and Li, Chenyu and Huang, Xiangdong and Wang, Jianmin and Long, Mingsheng},
62
+ booktitle={Forty-first International Conference on Machine Learning}
63
+ }
64
+
65
+ @article{liu2024timer,
66
+ title={Timer-XL: Long-Context Transformers for Unified Time Series Forecasting},
67
+ author={Liu, Yong and Qin, Guo and Huang, Xiangdong and Wang, Jianmin and Long, Mingsheng},
68
+ journal={arXiv preprint arXiv:2410.04803},
69
+ year={2024}
70
+ }
71
+ ``` -->
72
+
73
+ ## Contact
74
+
75
+ If you have any questions or want to use the code, feel free to contact:
76
+
77
+ Xue Wang (xue.w@alibaba-inc.com)
78
+
79
+ Tian Zhou (an.zt@alibaba-inc.com)
80
+
81
+
82
+ ## License
83
+
84
+ This model is licensed under the cc-by-4.0 License.