Time-LLM reprograms an existing large language model for time-series forecasting. It combines historical values with a natural-language prompt, aligning numeric time-series patches with the LLM’s text modality. section 9.0 section 9.7
Figure 9.1 General architecture of Time-LLM. (Right) The raw series is fed to the framework and undergoes patching before entering the patch-reprogramming phase. (Left) A prompt is used to provide context about the data. The prompt and reprogrammed patches are joined as a patch embedding, which is sent to the LLM. Then the output is projected to create a forecast for our series.
Follow the data path: patch the raw series, reprogram patches into text-aligned representations, prepend contextual prompt information, run the LLM, and project its output into numeric forecasts. section 9.1
A practical Time-LLM workflow includes these decisions:
- Provide a prompt describing the series, such as store-sales trends or weekday and weekend seasonality. section 9.2.1 section 10.2.8
- Choose an open-source LLM available through Hugging Face, then provide its tokenizer, configuration, and hidden dimension. section 9.1 section 9.2.1
- Train the patch-reprogramming components and output projection; unlike zero-shot forecasters, Time-LLM always requires training steps. section 9.2.2 section 9.6
- Use NeuralForecast to manage fitting, prediction, frequency configuration, and cross-validation, while supplying univariate series data. section 9.2 section 10.2.8
Weekly store-sales forecasting
A weekly store-sales dataset can be forecast over an eight-step horizon after removing exogenous columns because the demonstrated Time-LLM setup supports only univariate forecasting. One evaluation reported MAE of $80,417 and sMAPE of 2.51% across four eight-week cross-validation windows. The result was better than direct LLM prompting in that experiment, but not better than every specialized forecasting model. section 9.2 section 9.4
Time-LLM is easy to access through NeuralForecast, but reprogramming can be computationally expensive, especially with large backbones or many training steps. Forecast quality and anomaly-detection performance depend on training effort and evaluation design; one anomaly experiment produced an F1 score of 0.15. section 9.6 section 9.5.2
