https://github.com/nixtla/nixtla
TimeGPT-1: production ready pre-trained Time Series Foundation Model for forecasting and anomaly detection. Generative pretrained transformer for time series trained on over 100B data points. It's capable of accurately predicting various domains such as retail, electricity, finance, and IoT with just a few lines of code π.
Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
βCITATION.cff file
-
βcodemeta.json file
Found codemeta.json file -
β.zenodo.json file
Found .zenodo.json file -
βDOI references
-
βAcademic publication links
Links to: arxiv.org -
βCommitters with academic emails
-
βInstitutional organization owner
-
βJOSS paper metadata
-
βScientific vocabulary similarity
Low similarity (12.6%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
TimeGPT-1: production ready pre-trained Time Series Foundation Model for forecasting and anomaly detection. Generative pretrained transformer for time series trained on over 100B data points. It's capable of accurately predicting various domains such as retail, electricity, finance, and IoT with just a few lines of code π.
Basic Info
- Host: GitHub
- Owner: Nixtla
- License: other
- Language: Jupyter Notebook
- Default Branch: main
- Homepage: https://www.nixtla.io/docs
- Size: 284 MB
Statistics
- Stars: 2,904
- Watchers: 34
- Forks: 240
- Open Issues: 57
- Releases: 38
Topics
Metadata Files
README.md
Nixtla

TimeGPT-1
The first foundation model for forecasting and anomaly detection
[](https://github.com/Nixtla/nixtla/actions/workflows/ci.yaml) [](https://pypi.org/project/nixtla/) [](https://github.com/Nixtla/nixtla/blob/main/LICENSE) [](https://docs.nixtla.io) [](https://pepy.tech/project/nixtla) [](https://pepy.tech/project/nixtla) [](https://pepy.tech/project/nixtla) **TimeGPT** is a production ready, generative pretrained transformer for time series. It's capable of accurately predicting various domains such as retail, electricity, finance, and IoT with just a few lines of code π.π Quick Start
https://github.com/Nixtla/nixtla/assets/4086186/163ad9e6-7a16-44e1-b2e9-dab8a0b7b6b6
Install nixtla's SDK
python
pip install nixtla>=0.7.0
Import libraries and load data
python
import pandas as pd
from nixtla import NixtlaClient
Forecast using TimeGPT in 3 easy steps
```python
Get your API Key at dashboard.nixtla.io
1. Instantiate the NixtlaClient
nixtlaclient = NixtlaClient(apikey = 'YOUR API KEY HERE')
2. Read historic electricity demand data
df = pd.read_csv('https://raw.githubusercontent.com/Nixtla/transfer-learning-time-series/main/datasets/electricity-short.csv')
3. Forecast the next 24 hours
fcstdf = nixtlaclient.forecast(df, h=24, level=[80, 90])
4. Plot your results (optional)
nixtlaclient.plot(df, fcstdf, level=[80, 90])
```

Anomaly detection using TimeGPT in 3 easy steps
```python
Get your API Key at dashboard.nixtla.io
1. Instantiate the NixtlaClient
nixtlaclient = NixtlaClient(apikey = 'YOUR API KEY HERE')
2. Read Data # Wikipedia visits of NFL Star (
df = pd.read_csv('https://datasets-nixtla.s3.amazonaws.com/peyton-manning.csv')
3. Detect Anomalies
anomaliesdf = nixtlaclient.detectanomalies(df, timecol='timestamp', target_col='value', freq='D')
4. Plot your results (optional)
nixtlaclient.plot(df, anomaliesdf,timecol='timestamp', targetcol='value') ```

π€ API support for other languages
Explore our API Reference to discover how to leverage TimeGPT across various programming languages including JavaScript, Go, and more.
π₯ Features and Capabilities
Zero-shot Inference: TimeGPT can generate forecasts and detect anomalies straight out of the box, requiring no prior training data. This allows for immediate deployment and quick insights from any time series data.
Fine-tuning: Enhance TimeGPT's capabilities by fine-tuning the model on your specific datasets, enabling the model to adapt to the nuances of your unique time series data and improving performance on tailored tasks.
API Access: Integrate TimeGPT seamlessly into your applications via our robust API. Upcoming support for Azure Studio will provide even more flexible integration options. Alternatively, deploy TimeGPT on your own infrastructure to maintain full control over your data and workflows.
Add Exogenous Variables: Incorporate additional variables that might influence your predictions to enhance forecast accuracy. (E.g. Special Dates, events or prices)
Multiple Series Forecasting: Simultaneously forecast multiple time series data, optimizing workflows and resources.
Custom Loss Function: Tailor the fine-tuning process with a custom loss function to meet specific performance metrics.
Cross Validation: Implement out of the box cross-validation techniques to ensure model robustness and generalizability.
Prediction Intervals: Provide intervals in your predictions to quantify uncertainty effectively.
Irregular Timestamps: Handle data with irregular timestamps, accommodating non-uniform interval series without preprocessing.
π Documentation with examples and use cases
Dive into our comprehensive documentation to discover examples and practical use cases for TimeGPT. Our documentation covers a wide range of topics, including:
Getting Started: Begin with our user-friendly Quickstart Guide and learn how to set up your API key effortlessly.
Advanced Techniques: Master advanced forecasting methods and learn how to enhance model accuracy with our tutorials on anomaly detection, fine-tuning models using specific loss functions, and scaling computations across distributed frameworks such as Spark, Dask, and Ray.
Specialized Topics: Explore specialized topics like handling exogenous variables, model validation through cross-validation, and strategies for forecasting under uncertainty.
Real-World Applications: Uncover how TimeGPT is applied in real-world scenarios through case studies on forecasting web traffic and predicting Bitcoin prices.
ποΈ TimeGPT-1: Revolutionizing Forecasting and Anomaly Detection
Time series data is pivotal across various sectors, including finance, healthcare, meteorology, and social sciences. Whether it's monitoring ocean tides or tracking the Dow Jones's daily closing values, time series data is crucial for forecasting and decision-making.
Traditional analysis methods such as ARIMA, ETS, MSTL, Theta, CES, machine learning models like XGBoost and LightGBM, and deep learning approaches have been standard tools for analysts. However, TimeGPT introduces a paradigm shift with its standout performance, efficiency, and simplicity. Thanks to its zero-shot inference capability, TimeGPT streamlines the analytical process, making it accessible even to users with minimal coding experience.
TimeGPT is user-friendly and low-code, enabling users to upload their time series data and either generate forecasts or detect anomalies with just a single line of code. As the only foundation model for time series analysis out of the box, TimeGPT can be integrated via our public APIs, through Azure Studio (coming soon), or deployed on your own infrastructure.
βοΈ TimeGPT's Architecture
Self-attention, the revolutionary concept introduced by the paper βAttention is all you needβ, is the basis of the this foundational model. The TimeGPT model is not based on any existing large language model(LLMs). It is independently trained on vast timeseries dataset as a large transformer model and is designed so as to minimize the forecasting error.
The architecture consists of an encoder-decoder structure with multiple layers, each with residual connections and layer normalization. Finally, a linear layer maps the decoderβs output to the forecasting window dimension. The general intuition is that attentionbased mechanisms are able to capture the diversity of past events and correctly extrapolate potential future distributions.

TimeGPT was trained on, to our knowledge, the largest collection of publicly available time series, collectively encompassing over 100 billion data points. This training set incorporates time series from a broad array of domains, including finance, economics, demographics, healthcare, weather, IoT sensor data, energy, web traffic, sales, transport, and banking. Due to this diverse set of domains, the training dataset contains time series with a wide range of characteristics
β‘οΈ Zero-shot Results
Accuracy
TimeGPT has been tested for its zero-shot inference capabilities on more than 300K unique series, which involve using the model without additional fine-tuning on the test dataset. TimeGPT outperforms a comprehensive range of well-established statistical and cutting-edge deep learning models, consistently ranking among the top three performers across various frequencies.
Ease of use
TimeGPT also excels by offering simple and rapid predictions using a pre-trained model. This stands in stark contrast to other models that typically require an extensive training and prediction pipeline.

Efficiency and Speed
For zero-shot inference, our internal tests recorded an average GPU inference speed of 0.6 milliseconds per series for TimeGPT, which nearly mirrors that of the simple Seasonal Naive.
π How to cite?
If you find TimeGPT useful for your research, please consider citing the associated paper:
@misc{garza2023timegpt1,
title={TimeGPT-1},
author={Azul Garza and Max Mergenthaler-Canseco},
year={2023},
eprint={2310.03589},
archivePrefix={arXiv},
primaryClass={cs.LG}
}
π Features and Mentions
TimeGPT has been featured in many publications and has been recognized for its innovative approach to time series forecasting. Here are some of the features and mentions:
- TimeGPT Revolutionizing Time Series Forecasting
- TimeGPT: The First Foundation Model for Time Series Forecasting
- TimeGPT: Revolutionising Time Series Forecasting with Generative Models
- TimeGPT on Turing Post
- TimeGPT Presentation at AWS Events
- TimeGPT: Machine Learning for Time Series Made Accessible - Podcast
- TimeGPT on The Data Exchange
- How TimeGPT Transforms Predictive Analytics with AI
- TimeGPT: The First Foundation Model - AI Horizon Forecast
π License
TimeGPT is closed source. However, this SDK is open source and available under the Apache 2.0 License. Feel free to contribute (check out the Contributing guide for more details).
π Get in touch
For any questions or feedback, please feel free to reach out to us at ops [at] nixtla.io.
Owner
- Name: Nixtla
- Login: Nixtla
- Kind: organization
- Email: ops@nixtla.io
- Location: United States of America
- Website: https://www.nixtla.io/
- Twitter: nixtlainc
- Repositories: 13
- Profile: https://github.com/Nixtla
Open Source Time Series Ecosystem
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| FedericoGarza | f****z@g****m | 524 |
| JosΓ© Morales | j****2@g****m | 62 |
| mergenthaler | m****m@g****m | 31 |
| Olivier Sprangers | 4****t | 28 |
| MMenchero | m****o@g****m | 28 |
| Marco | m****o@n****o | 21 |
| KielRodriguez | k****0@g****m | 16 |
| Nikhil Gupta | 3****3 | 16 |
| dependabot[bot] | 4****] | 13 |
| Yibei Hu | 1****6 | 12 |
| cristianchallu | c****u@g****m | 11 |
| Tracy Teal | t****l@g****m | 11 |
| allcontributors[bot] | 4****] | 10 |
| fern-api | 1****] | 10 |
| dsinghvi | d****p@u****m | 7 |
| Eduardo LΓ³pez | l****8@g****m | 3 |
| Han Wang | g****n@g****m | 3 |
| Hahnbee Lee | 5****e | 2 |
| Ubuntu | u****u@i****l | 1 |
| Ubuntu | u****u@i****l | 1 |
| Boje Deforce | 7****e | 1 |
| Danny Sheridan | 8****n | 1 |
| Eduardo Flores | e****v@g****m | 1 |
| Michael Manganiello | a****e | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 199
- Total pull requests: 655
- Average time to close issues: 4 months
- Average time to close pull requests: 12 days
- Total issue authors: 115
- Total pull request authors: 36
- Average comments per issue: 1.54
- Average comments per pull request: 2.79
- Merged pull requests: 481
- Bot issues: 1
- Bot pull requests: 70
Past Year
- Issues: 56
- Pull requests: 223
- Average time to close issues: 15 days
- Average time to close pull requests: 5 days
- Issue authors: 29
- Pull request authors: 17
- Average comments per issue: 0.43
- Average comments per pull request: 1.83
- Merged pull requests: 167
- Bot issues: 1
- Bot pull requests: 30
Top Authors
Issue Authors
- tracykteal (17)
- AzulGarza (16)
- ngupta23 (14)
- FedericoGarza (11)
- mergenthaler (10)
- Yibei990826 (5)
- fiksdano (3)
- MMenchero (3)
- sdmishra123 (3)
- kestlermai (2)
- Mohan16071996 (2)
- kdgutier (2)
- ben10ben (2)
- elephaint (2)
- Mzakery (2)
Pull Request Authors
- AzulGarza (112)
- jmoralez (106)
- elephaint (60)
- FedericoGarza (56)
- marcopeix (47)
- MMenchero (41)
- dependabot[bot] (34)
- ngupta23 (33)
- tracykteal (32)
- Yibei990826 (30)
- fern-api[bot] (30)
- mergenthaler (14)
- loama (12)
- goodwanghan (7)
- allcontributors[bot] (5)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 5
-
Total downloads:
- pypi 94,612 last-month
-
Total dependent packages: 3
(may contain duplicates) -
Total dependent repositories: 19
(may contain duplicates) - Total versions: 127
- Total maintainers: 2
pypi.org: nixtlats
Python SDK for Nixtla API (TimeGPT)
- Homepage: https://github.com/Nixtla/nixtla
- Documentation: https://nixtlats.readthedocs.io/
- License: MIT License
-
Latest release: 0.5.2
published over 1 year ago
Rankings
proxy.golang.org: github.com/Nixtla/nixtla
- Documentation: https://pkg.go.dev/github.com/Nixtla/nixtla#section-documentation
- License: other
-
Latest release: v0.7.0
published 6 months ago
Rankings
proxy.golang.org: github.com/nixtla/nixtla
- Documentation: https://pkg.go.dev/github.com/nixtla/nixtla#section-documentation
- License: other
-
Latest release: v0.6.3
published over 1 year ago
Rankings
pypi.org: autotimeseries
Scalable time series processing
- Homepage: https://github.com/Nixtla/nixtla/tree/main/sdk/python-autotimeseries
- Documentation: https://autotimeseries.readthedocs.io/
- License: MIT License
-
Latest release: 0.0.7
published almost 4 years ago
Rankings
Maintainers (1)
pypi.org: nixtla
Python SDK for Nixtla API (TimeGPT)
- Homepage: https://github.com/Nixtla/nixtla/
- Documentation: https://nixtla.readthedocs.io/
- License: Apache Software License 2.0
-
Latest release: 5.3.7
published about 11 years ago
Rankings
Dependencies
- actions/checkout v2 composite
- actions/setup-python v2 composite
- mamba-org/provision-with-micromamba main composite
- actions/checkout v3 composite
- actions/setup-python v3 composite
- pypa/gh-action-pypi-publish 27b31702a0e7fc50959f5ad993c78deac1bdfc29 composite
- requests *
- actions/checkout v3 composite
- actions/setup-python v4 composite
- peaceiris/actions-gh-pages v3 composite
- actions/checkout v2 composite
- mamba-org/setup-micromamba v1 composite
- readmeio/rdme v8 composite
- actions/checkout v2 composite
- actions/github-script v6 composite
- mamba-org/setup-micromamba v1 composite
- dask
- jupyterlab
- pandas
- plotly
- prophet
- pyspark >=3.3