refactor: replace custom PEFT pipeline with Transformers+PEFT example

Remove the custom peft/ directory (LoRA/DoRA adapters, trainer, data
pipeline) in favor of a lightweight fine-tuning example that uses the
standard HuggingFace Transformers + PEFT ecosystem.

The new example at timesfm-forecasting/examples/finetuning/ demonstrates
LoRA fine-tuning via TimesFm2_5ModelForPrediction and the peft library,
based on the approach by @kashif at HuggingFace.

- Remove peft/ (8 files)
- Add timesfm-forecasting/examples/finetuning/finetune_lora.py
- Add timesfm-forecasting/examples/finetuning/README.md
- Update README.md to reference new example
- Clean up .gitignore (remove peft_checkpoints/)
This commit is contained in:
darkpowerxo
2026-04-09 11:15:58 -04:00
parent 18d5eb2d44
commit caddef1db8
12 changed files with 554 additions and 1693 deletions
+6 -6
View File
@@ -22,12 +22,12 @@ This open version is not an officially supported Google product.
install timesfm==1.3.0` to install an older version of this package to load
them.
## Update - Apr. 8, 2026
## Update - Apr. 9, 2026
Added PEFT (LoRA/DoRA) fine-tuning pipeline for TimesFM 2.5 with multi-GPU
support. See [`peft/`](peft/) for docs and usage. Also added unit tests
(`tests/`), fixed per-input ridge regression in XReg to prevent data leakage,
and incorporated several community fixes.
Added fine-tuning example using HuggingFace Transformers + PEFT (LoRA) — see
[`timesfm-forecasting/examples/finetuning/`](timesfm-forecasting/examples/finetuning/).
Also added unit tests (`tests/`), fixed per-input ridge regression in XReg to
prevent data leakage, and incorporated several community fixes.
## Update - Mar. 19, 2026
@@ -56,7 +56,7 @@ Since the Sept. 2025 launch, the following improvements have been completed:
1. ✅ Flax version of the model for faster inference.
2. ✅ Covariate support via XReg (see Oct. 2025 update).
3. ✅ Documentation, examples, and agent skill (see `timesfm-forecasting/`).
4. ✅ PEFT fine-tuning pipeline with LoRA/DoRA and multi-GPU support (see `peft/`).
4. ✅ Fine-tuning example with LoRA via HuggingFace Transformers + PEFT (see `timesfm-forecasting/examples/finetuning/`).
5. ✅ Unit tests for core layers, configs, and utilities (see `tests/`).
### Install