{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/time-llm-time-series-forecasting-by","title":"Time-LLM: Time Series Forecasting by Reprogramming Large Language Models","arxiv_id":"2310.01728","date":"2023-10-03","proceeding":null,"authors":["Ming Jin","Shiyu Wang","Lintao Ma","Zhixuan Chu","James Y. Zhang","Xiaoming Shi","Pin-Yu Chen","Yuxuan Liang","Yuan-Fang Li","Shirui Pan","Qingsong Wen"],"abstract":"Time series forecasting holds significant importance in many real-world dynamic systems and has been extensively studied. Unlike natural language process (NLP) and computer vision (CV), where a single large model can tackle multiple tasks, models for time series forecasting are often specialized, necessitating distinct designs for different tasks and applications. While pre-trained foundation models have made impressive strides in NLP and CV, their development in time series domains has been constrained by data sparsity. Recent studies have revealed that large language models (LLMs) possess robust pattern recognition and reasoning abilities over complex sequences of tokens. However, the challenge remains in effectively aligning the modalities of time series data and natural language to leverage these capabilities. In this work, we present Time-LLM, a reprogramming framework to repurpose LLMs for general time series forecasting with the backbone language models kept intact. We begin by reprogramming the input time series with text prototypes before feeding it into the frozen LLM to align the two modalities. To augment the LLM's ability to reason with time series data, we propose Prompt-as-Prefix (PaP), which enriches the input context and directs the transformation of reprogrammed input patches. The transformed time series patches from the LLM are finally projected to obtain the forecasts. Our comprehensive evaluations demonstrate that Time-LLM is a powerful time series learner that outperforms state-of-the-art, specialized forecasting models. Moreover, Time-LLM excels in both few-shot and zero-shot learning scenarios.","url_abs":"https://arxiv.org/abs/2310.01728v2","url_pdf":"https://arxiv.org/pdf/2310.01728v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"time-llm-time-series-forecasting-by","repo_url":"https://github.com/kimmeen/time-llm","is_official":0,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"time-llm-time-series-forecasting-by","repo_url":"https://github.com/kwuking/TimeMixer","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"time-llm-time-series-forecasting-by","repo_url":"https://github.com/WenjieDu/PyPOTS","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"time-series-1","task_name":"Time Series"},{"task_slug":"time-series-forecasting","task_name":"Time Series Forecasting"},{"task_slug":"zero-shot-learning","task_name":"Zero-Shot Learning"}],"methods":[{"method_slug":"align","method_name":"ALIGN"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/time-series-forecasting-on-etth1-48-3","task":"Time Series Forecasting","dataset":"ETTh1 (48)","model":"Time-LLM","rank_in_archive_order":1,"of":1,"metrics":{"MSE":"0.408"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2310.01728","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2310.01728"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/KimMeen/Time-LLM","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/thuml/Time-Series-Library","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/kwuking/TimeMixer","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/kimmeen/time-llm","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/WenjieDu/PyPOTS","reach":null}],"summary":{"ran":7,"unverified":2},"by_repo_kind":{"named_in_paper":{"samples":4,"ran":3,"repositories":1},"listed":{"samples":5,"ran":4,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"0a074281125ca5a5","entry":"DFT_series_decomp","repo":"kwuking/TimeMixer","repo_kind":"listed","path":"models/TimeMixer.py","file_url":"https://github.com/kwuking/TimeMixer/blob/HEAD/models/TimeMixer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0a074281125ca5a5"}},{"code_sha256_prefix":"465c580fd0992455","entry":"DataEmbedding_wo_pos","repo":"kwuking/TimeMixer","repo_kind":"listed","path":"models/TimeMixer.py","file_url":"https://github.com/kwuking/TimeMixer/blob/HEAD/models/TimeMixer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"465c580fd0992455"}},{"code_sha256_prefix":"eeb89217fd030433","entry":"PastDecomposableMixing","repo":"kwuking/TimeMixer","repo_kind":"listed","path":"models/TimeMixer.py","file_url":"https://github.com/kwuking/TimeMixer/blob/HEAD/models/TimeMixer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"eeb89217fd030433"}},{"code_sha256_prefix":"65e5421c42a40f72","entry":"PatchEmbedding","repo":"kimmeen/time-llm","repo_kind":"named_in_paper","path":"models/TimeLLM.py","file_url":"https://github.com/kimmeen/time-llm/blob/HEAD/models/TimeLLM.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"65e5421c42a40f72"}},{"code_sha256_prefix":"e1e3098d7df12cad","entry":"ReplicationPad1d","repo":"kimmeen/time-llm","repo_kind":"named_in_paper","path":"models/TimeLLM.py","file_url":"https://github.com/kimmeen/time-llm/blob/HEAD/models/TimeLLM.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e1e3098d7df12cad"}},{"code_sha256_prefix":"a953bda973c76189","entry":"ReprogrammingLayer","repo":"kimmeen/time-llm","repo_kind":"named_in_paper","path":"models/TimeLLM.py","file_url":"https://github.com/kimmeen/time-llm/blob/HEAD/models/TimeLLM.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a953bda973c76189"}},{"code_sha256_prefix":"63fc414cb814609a","entry":"TimeFeatureEmbedding","repo":"kwuking/TimeMixer","repo_kind":"listed","path":"models/TimeMixer.py","file_url":"https://github.com/kwuking/TimeMixer/blob/HEAD/models/TimeMixer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"63fc414cb814609a"}},{"code_sha256_prefix":"03bf4bcc2362123e","entry":"Model","repo":"kwuking/TimeMixer","repo_kind":"listed","path":"models/TimeMixer.py","file_url":"https://github.com/kwuking/TimeMixer/blob/HEAD/models/TimeMixer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"03bf4bcc2362123e"}},{"code_sha256_prefix":"f6cfb297837e6d7c","entry":"Model","repo":"kimmeen/time-llm","repo_kind":"named_in_paper","path":"models/TimeLLM.py","file_url":"https://github.com/kimmeen/time-llm/blob/HEAD/models/TimeLLM.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f6cfb297837e6d7c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}