Abstract
Auto Times is an open-source Data Science project. Official implementation for "AutoTimes: Autoregressive Time Series Forecasters via Large Language Models". AutoTimes achieves state-of-the-art performance with 0.1% trainable parameters and over 5× training/inference speedup compared to advanced LLM-based forecasters. It is built using Python. The complete source code is publicly available on GitHub under the MIT License, making it a useful reference for students building a Data Science mini project or final-year project.
1. Introduction
AutoTimes achieves state-of-the-art performance with 0.1% trainable parameters and over 5× training/inference speedup compared to advanced LLM-based forecasters.
Official implementation: AutoTimes: Autoregressive Time Series Forecasters via Large Language Models. [[Slides]](https://cloud.tsinghua.edu.cn/f/7689d30f92594ded84f0/), [[Poster]](https://cloud.tsinghua.edu.cn/f/f2c18ae34fef4e74ad46/)
News (2024.10): AutoTimes has been accepted by NeurIPS 2024. A revised version (25 Pages) is now available, including prompt engineering of in-context forecasting, adaptation cost evaluations, textual embeddings of metadata, and low-rank adaptation techique.
2. Objective
Official implementation for "AutoTimes: Autoregressive Time Series Forecasters via Large Language Models"
This project demonstrates how Python can be applied to a real-world Data Science problem.
4. Technology Stack
5. System Requirements
General requirements for this technology stack — check the README for exact versions.
- Python 3.8 or later
- pip / virtualenv for dependencies
- VS Code, PyCharm or Jupyter Notebook
- Git (to clone the repository)
6. Installation & Setup
git clone https://github.com/thuml/AutoTimes.git
cd AutoTimes- Install Pytorch and necessary dependencies.
- Put the datasets [[Google Drive]](https://drive.google.com/file/d/1t7jOkctNJ0rt3VMwZaqmxSuA75TFEo96/view?usp=sharing)
- Download the large language models from Hugging Face. The default LLM is LLaMA-7B, you can change the llm_ckp_dir in run.py to use other LLMs.
- LLaMA-7B
- OPT Family
- data_provider
- config.json
- pytorch_model-00001-of-00002.bin
pip install -r requirements.txt# preprocess timestamps to generate text embedding
python ./preprocess.py --gpu 0 --dataset ETTh1# the default large language model is LLaMA-7B
# long-term forecasting
bash ./scripts/time_series_forecasting/long_term/AutoTimes_ETTh1.sh
# short-term forecasting
bash ./scripts/time_series_forecasting/short_term/AutoTimes_M4.sh
# zero-shot forecasting
# it's worth noting that sM4_tM3 utilizes models trained
# on short-term, you should run AutoTimes_M4 first
bash ./scripts/zero_shot_forecasting/sM4_tM3.sh
bash ./scripts/zero_shot_forecasting/sM3_tM4.sh
# in-context forecasting
bash ./scripts/in_context_forecasting/M3.sh
# try on other large language models
bash ./scripts/method_generality/opt.shFull setup instructions are in the project README.
7. Future Enhancements
Suggested extensions you can add to make this your own project.
- Turn the analysis into an interactive dashboard
- Automate data refresh with a scheduled job
- Add a predictive model on top of the analysis
8. Viva / Review Questions
Common questions examiners ask for projects in this domain.
- What is the source of the dataset and how was missing data handled?
- Which exploratory analysis steps revealed the most useful insight?
- Why were these particular charts chosen to present the data?
- Which statistical or ML technique supports the conclusions?
- How could the analysis be automated or refreshed with new data?
9. Source Code & License
This project is developed by thuml and published on GitHub under the MIT License. Please follow the license terms and credit the original author when you use or modify this code.
Want to build this as your internship project?
Work on a Data Science project like this with mentor guidance, weekly reviews and an internship certificate from Training Trains, Erode — online or offline.
Apply for Data Science Internship