Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 08eaa76

Browse files
committedAug 29, 2024·
docs: Document how to use the conversion script
Provide a detailed instruction on how to use the script
1 parent 99130a9 commit 08eaa76

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed
 

‎src/timesfm_torch/README.md

+24-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,29 @@
11
# Official Pytorch implementation of TimesFM
22

3-
TimesFM (Time Series Foundation Model) is a pretrained time-series foundation model developed by Google
3+
TimesFM (Time Series Foundation Model) is a pretrained time-series foundation model developed by Google
44
Research for time-series forecasting.
55

6-
* Paper: [A decoder-only foundation model for time-series forecasting](https://arxiv.org/abs/2310.10688), to appear in ICML 2024.
7-
* [Google Research blog](https://research.google/blog/a-decoder-only-foundation-model-for-time-series-forecasting/)
6+
- Paper: [A decoder-only foundation model for time-series forecasting](https://arxiv.org/abs/2310.10688), to appear in ICML 2024.
7+
- [Google Research blog](https://research.google/blog/a-decoder-only-foundation-model-for-time-series-forecasting/)
88

9-
## Stay tuned for all of the functionalities as that of the pax version.
9+
---
10+
11+
## Converting the model from pax to torch
12+
13+
Before you start, make sure you are in the `timesfm` directory. If not, navigate to the `timesfm` directory. Do not forget to install the required specified in the `experiments/environment.yaml` or `experiments/environment_cpu.yaml`.
14+
15+
1. Download the model checkpoint from the [official repository](https://huggingface.co/google/timesfm-1.0-200m) if you haven't already.
16+
```bash
17+
git lfs install
18+
git clone https://huggingface.co/google/timesfm-1.0-200m
19+
```
20+
2. Run the convertion script. You can specify the `model_path` and `output_path` as per your requirement. Here is an example (also the default values):
21+
```bash
22+
# In `timesfm` directory
23+
python3 -m src.timesfm_torch.convert_weights --model_path=timesfm-1.0-200m/checkpoints --output_path=ckpt/timesfm-1.0-200m.pth
24+
```
25+
3. The converted model will be saved in the `timesfm/ckpt/timesfm-1.0-200m.pth`.
26+
27+
---
28+
29+
## Stay tuned for all of the functionalities as that of the pax version.

0 commit comments

Comments
 (0)
Please sign in to comment.