Adapting Large Language Models for Time Series Modeling via a Novel Parameter-efficient Adaptation Method

Juyuan Zhang, Wei Zhu, Jiechao GaoarXiv 2025 · DOI

Abstract

Large Language Models (LLMs) have demonstrated remarkable capabilities in natural language processing and computer vision, yet their application to time series forecasting remains challenging due to data sparsity and modality mismatches. This paper introduces Time-LlaMA, a novel framework designed to adapt LLMs for time series modeling. Time-LlaMA treats each variable as a distinct token and utilizes a Dynamic Low-Rank Adaptation (D-LoRA) mechanism. By employing a mixture-of-experts approach to dynamically select adaptation modules, Time-LlaMA achieves state-of-the-art performance across various forecasting benchmarks while utilizing less than 1% of the backbone's parameters.

1. Introduction

The application of LLMs to time series data is often hindered by two primary obstacles: effective alignment between numerical sequences and text tokens, and the need for flexible adaptation without losing pre-trained knowledge. Existing methods often rely on "patching" techniques that increase latency or keep the backbone frozen, limiting task-specific specialization. Time-LlaMA addresses these issues by rethinking tokenization and introducing a dynamic adaptation strategy.

2. Methodology

The Time-LlaMA framework is built upon three primary innovations: channel-as-token embedding, a modality alignment module, and Dynamic LoRA.

Overview of the Time-LlaMA architecture, featuring channel-as-token embedding and modality alignment.

2.1 Channel-as-Token Embedding

Unlike traditional patching methods that segment a single sequence, Time-LlaMA treats the entire historical sequence of a single variable (channel) as a single token. This approach allows the model to process multivariate data simultaneously in a single forward pass, significantly improving efficiency.

2.2 Modality Alignment Module

To bridge the gap between numerical time series and natural language, a trainable multi-head cross-attention mechanism is employed. This module aligns time series tokens with text prompt embeddings that describe the dataset. Notably, the text prompt is not passed through the main Transformer backbone, reducing inference overhead.

2.3 Dynamic LoRA (D-LoRA)

The core of Time-LlaMA's adaptation is D-LoRA. Instead of a static adaptation, D-LoRA uses a router to dynamically select the most appropriate LoRA modules (e.g., Query, Key, Value) for each input at every layer.

The Dynamic LoRA (D-LoRA) mechanism, showing the MOE router and possible LoRA placements within the Transformer block.

3. Experiments and Results

Time-LlaMA was evaluated on several benchmarks, including ETTh1, ETTm1, Weather, ECL, Traffic, and the M4 short-term forecasting suite.

3.1 Forecasting Performance

Time-LlaMA achieved state-of-the-art results, outperforming established baselines such as Time-LLM and PatchTST in long-term forecasting. On the M4 benchmark, it secured the best scores in SMAPE, MSAE, and OWA.

3.2 Few-Shot Learning and Efficiency

In scenarios with only 5% training data, Time-LlaMA demonstrated significant superiority over non-LLM methods like DLinear, highlighting the transferability of LLM pre-training. Furthermore, the model maintains competitive inference speeds, processing 5.32 samples per second on the Traffic dataset due to its efficient channel-wise tokenization.

4. Discussion and Conclusion

Time-LlaMA provides a parameter-efficient way to leverage LLMs for time series tasks. While highly effective, the model's performance is sensitive to the number of selected LoRA experts, indicating a trade-off between adaptation capacity and over-parameterization. Future work will explore more robust routing strategies and scaling to larger foundational models.

Summary updated

BibTeX
@misc{zhang2025adapting,
  author = {Juyuan Zhang and Wei Zhu and Jiechao Gao},
  title = {{Adapting Large Language Models for Time Series Modeling via a Novel Parameter-efficient Adaptation Method}},
  year = {2025},
  eprint = {2502.13725},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.13725},
}
Figure