Objective With the development of new power systems, wind power forecasting faces dual challenges in forecasting accuracy and model generalization. The inherent volatility, intermittency, and complex uncertainties of wind power output are difficult to characterize effectively using conventional modeling approaches. Meanwhile, the application of large language models (LLMs) to wind power forecasting remains constrained by significant adaptability limitations. To address these issues, a short-term wind power forecasting method based on pre-trained large language models was proposed to improve forecasting accuracy. Furthermore, the SHAP (SHapley Additive exPlanations) algorithm was employed to systematically interpret the model predictions, thereby enhancing the credibility and practical applicability of the forecasting model for power system operation and decision support. Methods First, mainstream LLM architectures were analyzed, and the superiority of decoder-only models was demonstrated through mathematical derivation to determine the base model framework. Subsequently, the neural network architecture of the Qwen series of LLMs and their input-output transformation processes were examined in detail, providing the foundation for the proposed wind power forecasting architecture. In this process, the input representation is first transformed into word vectors through an embedding layer. These word vectors are then processed through multiple stacked Decoder layers with residual connections. Each Decoder consists of RMSNorm (root mean square layer normalization), an attention module, and a multilayer perceptron (MLP). Unlike conventional attention mechanisms, the Qwen attention module incorporates rotary position embedding (RoPE) to encode sequential relationships among tokens. Finally, the intermediate hidden states are mapped through a linear layer to generate the final output representation. Second, a wind power forecasting architecture based on pre-trained large language models was proposed for short-term wind power time-series forecasting. Given the significant differences between wind power numerical sequences and natural language sequences, the original input representation layer of Qwen was redesigned. Specifically, the embedding layer was replaced with a fully connected layer to project time-series data into the input dimensionality required by the pre-trained model. Additionally, reversible instance normalization (RevIN) was applied independently to each variable channel to normalize the data while preserving the integrity of variable features. The input sequence was partitioned into sub-blocks via patching to enhance the extraction of local temporal features. Following the principle of feature transfer, the attention and MLP modules of the pre-trained Qwen Decoder layers were retained, and their parameters were frozen during training because these modules store the primary knowledge acquired during pre-training. Finally, the output representation layer was redesigned to project the hidden states into the output dimensionality required for wind power forecasting. The proposed architecture achieves deterministic day-ahead wind power point forecasting through a joint frozen-fine-tuning training strategy. Third, to improve the interpretability of the deep learning model, a feature contribution analysis method based on SHAP values was employed. Derived from the Shapley value in game theory, SHAP quantifies the marginal contribution of each input feature by considering all possible feature subsets while satisfying the axioms of local accuracy, feature symmetry, and missingness. SHAP values were estimated using Monte Carlo sampling and applied to quantify the contributions of key meteorological features to wind power forecasting, thereby revealing the underlying feature contribution mechanisms. Results and Discussions Two years of data from two wind farms (Oregon and Nevada) provided by the National Renewable Energy Laboratory (NREL) were used for validation, with an 80%‒20% train‒test split and a raw time resolution of 5 min. Autoformer, DLinear, and PatchTST were selected as benchmark models, and the proposed method was implemented using the Qwen2-0.5B model. Experiments on the number of retained Decoder layers showed that the model achieved optimal performance with six Decoder layers (Qwen(6)), whereas retaining more than eight layers led to overfitting. In terms of training efficiency, Qwen(6) outperformed the benchmark models, requiring 0.147 s per training step and converging within 10 epochs, compared with PatchTST (0.552 s/step, 15 epochs) and Autoformer (0.271 s/step, 12 epochs). For forecasting horizons of 24, 96, and 144 time steps, Qwen(6) achieved the lowest mean squared error (MSE) on both wind farms. For example, at the 24-step forecasting horizon, the MSE was reduced by more than 11.53% compared with the benchmark models. In few-shot experiments using only 25% of the training data, Qwen(6) demonstrated superior generalization capability: its MSE increased by 15.9%, whereas the error of PatchTST increased by 25.8%. A comparison between the pre-fine-tuned and fine-tuned models showed that the untuned Qwen model exhibited an MSE more than three times higher than that of the fine-tuned model, demonstrating the effectiveness of the proposed architecture in overcoming the prediction limitations of LLMs. SHAP analysis revealed that the 100 m wind speed feature had the greatest influence on the predictions, with an average absolute SHAP value of 5.112 9 and a contribution ratio exceeding 78%. The 100 m wind direction also had a positive effect, whereas the 40 m wind parameters and temperature had negligible effects, providing a quantitative basis for feature selection and model interpretation. Conclusions This study explored the potential of LLMs for time-series forecasting and proposed a short-term wind power forecasting method integrated with interpretability analysis. The main contributions are threefold: 1) the superiority of the decoder-only architecture was demonstrated through mathematical derivation, leading to the selection of the Qwen model as the base model; 2) a joint frozen-fine-tuning strategy was designed by freezing the attention and MLP modules while fine-tuning the input/output layers and RMSNorm, thereby balancing training efficiency and prediction accuracy; and 3) SHAP was integrated to quantify the contributions of meteorological features, enhancing model transparency. Experimental results demonstrated that the proposed method outperformed the benchmark models in training efficiency, prediction accuracy, and generalization capability while effectively capturing both long- and short-term temporal dependencies in wind power output. Nevertheless, several limitations remain, including reduced stability under extreme weather conditions and the difficulty of estimating dynamic SHAP contributions for multi-step forecasting. Future work will focus on multimodal data fusion and lightweight model adaptation to further improve the engineering applicability of the proposed method.
归一化后,隐藏状态向量进入注意力模块进行计算。由于注意力计算只根据向量相关性来计算得分,故没有考虑序列的顺序关系。因此,需要对输入序列进行位置编码,使模型能够识别令牌在序列中的位置信息。Qwen架构中,使用旋转位置编码(RoPE)来表达令牌间的顺序关系。令函数表示位置编码,则集成位置信息的查询向量 q 和键向量 k 分别表示如下:
式(5)、(6)中,m、n分别为序列中令牌位置,、分别为中第m、n个令牌对应的词向量。根据空间向量的几何性质和复数的性质, q 和 k 的旋转位置编码表示为:
HuanJiafei, ZhangWeitao, JiangJixuan,et al.A multi-step short-term wind power prediction based on two-stage sequence decomposition and reconstruction[J].Distribution & Utilization,2025,42(12):101-110.
ChenHao, ZhangJianzhong, XuChao,et al.Short-term wind power forecast based on MOSTAR model[J].Power System Protection and Control,2019,47(1):73-79. doi:10.7667/PSPC171866
ShengSiqing, JinHang, LiuChangrong.Short-term and mid-short-term wind power forecasting based on VMD-WSGRU[J].Power System Technology,2022,46(3):897-904.
YunlongLü, HuQin, XiongJunjie,et al.Ultra-short-term wind power prediction based on spatiotemporal attention convolution model[J].Power System Technology,2024,48(5):2064-2073.
FuYang, RenZixu, WeiShurong,et al.Ultra-short-term power prediction of offshore wind power based on improved LSTM-TCN model[J].Proceedings of the CSEE,2022,42(12):4292-4303.
DaiZihang, YangZhilin, YangYiming,et al.Transformer-XL:Attentive language models beyond a fixed-length context[C]//Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics.Florence:Association for Computational Linguistics,2019:2978-2988. doi:10.18653/v1/p19-1285
[14]
VaswaniA, ShazeerN, ParmarN,et al. Attention is all you need[EB/OL].[2025-06-01].doi:10.1007/978-3-031-84300-6_13
[15]
HuangXiaohan, JiangAihua.Wind power generation forecast based on multi-step informer network[J].Energies,2022,15(18):6642. doi:10.3390/en15186642
[16]
WuHaixu, XuJiehui, WangJianmin,et al.Autoformer:Decomposition transformers with auto-correlation for long-term series forecasting[EB/OL].[2025-06-01].
[17]
JiangYuqi, GaoTianlu, DaiYuxin,et al.Very short-term residential load forecasting based on deep-autoformer[J].Applied Energy,2022,328:120120. doi:10.1016/j.apenergy.2022.120120
[18]
ZengAiling, ChenMuxi, ZhangLei,et al.Are transformers effective for time series forecasting[J].Proceedings of the AAAI Conference on Artificial Intelligence,2023,37(9):11121-11128. doi:10.1609/aaai.v37i9.26317
[19]
NieYuqi, NguyenN H, SinthongP,et al.A time series is worth 64 words:Long-term forecasting with transformers[EB/OL].[2025-06-01].
[20]
WangMeng, ZhangJiahong, LiYu.From AIGC to AIGV:The integrated development of scientific journals and AI⁃generated technologies[J].Acta Editologica,2025,37(Su-pp1):137-141.
XueHao, SalimF D.PromptCast:A new prompt-based learning paradigm for time series forecasting[J].IEEE Transactions on Knowledge and Data Engineering,2024,36(11):6851-6864. doi:10.1109/tkde.2023.3342137
[23]
GruverN, FinziM, QiuShikai,et al.Large language models are zero-shot time series forecasters[EB/OL].[2025-06-01].doi:10.52202/075280-0861
[24]
ZhouTian, NiuPeisong, WangXue,et al.One fits all:Power general time series analysis by pretrained LM[EB/OL].[2025-06-01].doi:10.52202/075280-1877
[25]
JinMing, WangShiyu, MaLintao,et al.Time-LLM:Time series forecasting by reprogramming large language models[EB/OL].[2025-06-01].doi:10.1007/979-8-8688-1276-7_4
[26]
LaiZefeng, WuTangjie, FeiXihong,et al.BERT4ST:Fine-tuning pre-trained large language model for wind power forecasting[J].Energy Conversion and Management,2024,307:118331. doi:10.1016/j.enconman.2024.118331
[27]
ZhuGuopeng, JiaWeiqing, XingZhitai,et al.CMLLM:A novel cross-modal large language model for wind power forecasting[J].Energy Conversion and Management,2025,330:119673. doi:10.1016/j.enconman.2025.119673
[28]
SuXiangjing, ZhouWenxin, LiChaojie,et al.Interpretable offshore wind power output forecasting based on long short-term memory neural network with dual-stage attention[J].Automation of Electric Power Systems,2022,46(7):141-151.
ZhuLi, XuWanru, GaoJingkai,et al.Interpretable diffusion model for multivariate time series generation[J/OL].Computer Engineering,(2025-05-13)[2025-06-01].
LiaoShengli, WangZaineng, ChengChuntian,et al.Coupling meteorological information and interpretable deep learning methods for daily runoff forecasting[J].Journal of Hydraulic Engineering,2025,56(7):831-843.
LiangRui, JinMohan, ZhuHuijun,et al.Net load interval forecasting in rural areas based on multi-scenario clustering and explainable temporal fusion transformers network[J].Power System Technology,2025,49(12):5019-5027.
AlthoffT, GuptaV, HartvigsenT,et al.Are language models actually useful for time series forecasting[C]//Proceedings of the 2024 Advances in Neural Information Processing Systems 37.Vancouver:NIPS,2024:60162-60191. doi:10.52202/079017-1922
[37]
HanK, XiaoA, WuE,et al.Transformer in transformer[C]//Proceedings of the 2021 Advances in neural information processing systems.Vancouver:NIPS,2021:15908-15919.
[38]
DongYihe, CordonnierJ B, LoukasA.Attention is not all you need:Pure attention loses rank doubly exponentially with depth[EB/OL].[2025-06-01].
AkinciT C, NogayH S, PenchevM,et al.A hybrid approach to wind power intensity classification using decision trees and large language models[J].Renewable Energy,2025,250:123388. doi:10.1016/j.renene.2025.123388