Harryx2025 commited on
Commit
f209def
·
verified ·
1 Parent(s): 303bbc0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +5 -4
README.md CHANGED
@@ -16,11 +16,11 @@ You can find more details about the model on [GitHub page](https://github.com/an
16
  ## 🚀 Quick Start
17
  ```python
18
  import torch
19
- from transformers import AutoModelForCausalLM, AutoConfig
20
 
21
  # Load pre-trained model (when available)
22
- model = AutoModelForCausalLM.from_pretrained(
23
- 'ant-intl/Falcon-TST_Large',
24
  trust_remote_code=True
25
  )
26
 
@@ -32,8 +32,9 @@ time_series = torch.randn(batch_size, lookback_length, channels)
32
  device = torch.cuda.current_device() if torch.cuda.is_available() else 'cpu'
33
  model = model.to(device)
34
  time_series = time_series.to(device)
 
35
 
36
  # Generate forecasts
37
  forecast_length = 96
38
- predictions = model.generate(time_series, max_new_tokens=forecast_length)
39
  ```
 
16
  ## 🚀 Quick Start
17
  ```python
18
  import torch
19
+ from transformers import AutoModel
20
 
21
  # Load pre-trained model (when available)
22
+ model = AutoModel.from_pretrained(
23
+ 'ant-intl/Falcon-TST_Large',
24
  trust_remote_code=True
25
  )
26
 
 
32
  device = torch.cuda.current_device() if torch.cuda.is_available() else 'cpu'
33
  model = model.to(device)
34
  time_series = time_series.to(device)
35
+ print(f'device: {device}')
36
 
37
  # Generate forecasts
38
  forecast_length = 96
39
+ predictions = model.predict(time_series, forecast_horizon=forecast_length)
40
  ```