Skip to content

Commit

Permalink
docs: Document how to use the conversion script
Browse files Browse the repository at this point in the history
Provide a detailed instruction on how to use the script
  • Loading branch information
TeddyHuang-00 committed Aug 29, 2024
1 parent 99130a9 commit 08eaa76
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions src/timesfm_torch/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,29 @@
# Official Pytorch implementation of TimesFM

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

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

## Stay tuned for all of the functionalities as that of the pax version.
---

## Converting the model from pax to torch

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`.

1. Download the model checkpoint from the [official repository](https://huggingface.co/google/timesfm-1.0-200m) if you haven't already.
```bash
git lfs install
git clone https://huggingface.co/google/timesfm-1.0-200m
```
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):
```bash
# In `timesfm` directory
python3 -m src.timesfm_torch.convert_weights --model_path=timesfm-1.0-200m/checkpoints --output_path=ckpt/timesfm-1.0-200m.pth
```
3. The converted model will be saved in the `timesfm/ckpt/timesfm-1.0-200m.pth`.

---

## Stay tuned for all of the functionalities as that of the pax version.

0 comments on commit 08eaa76

Please sign in to comment.