
Time-Anchor ModernBERT 32M重新定義時間序列預測的革命性模型【免費下載鏈接】time-anchor-modernbert-32m項目地址: https://ai.gitcode.com/hf_mirrors/K-Iwa/time-anchor-modernbert-32mTime-Anchor ModernBERT 32M是一款基于32M參數ModernBERT骨干構建的緊湊型時間序列模型加上時間序列輸入/輸出頭總共33.4M參數。一次調用即可返回三項核心功能分位數預測、變量/時間影響分析和錨定預測為時間序列預測領域帶來了革命性的突破。 核心功能亮點 精準的分位數預測提供任意請求分位數水平的概率預測讓你對未來數據的分布有清晰的認識。在東京每小時溫度Open-Meteo檔案64小時的預測中中位數MAE為0.57°C且每個實際值都在q10–q90范圍內。 深入的變量/時間影響分析展示每個輸入變量在每個時間步的標準化貢獻幫助你理解各因素對預測結果的影響程度。通過對東京一周天氣數據的分析可以清晰看到每個氣象變量每小時的貢獻情況且對于每個時間索引所有變量的影響總和為1。 靈活的錨定預測允許你根據指定的已知未來點進行條件預測。在月度航空乘客Box Jenkins24個月的預測中固定6個已知月份可將中位數預測MAE從46千乘客降至10千乘客極大提高了預測的準確性。 簡單快速的安裝步驟只需一行命令即可完成安裝pip install time-anchorpredict_time_anchor接受Hugging Face Hub模型ID或本地 checkpoint 目錄。 輕松上手的使用示例分位數預測示例import pandas as pd from time_anchor import predict_time_anchor url ( https://archive-api.open-meteo.com/v1/archive ?latitude35.69longitude139.69start_date2024-10-01end_date2024-12-31 hourlytemperature_2m,relative_humidity_2m,surface_pressure,wind_speed_10mformatcsv ) weather pd.read_csv(url, skiprows3) temperature weather.iloc[:, 1].astype(float32) result predict_time_anchor( K-Iwa/time-anchor-modernbert-32m, target_contexttemperature[:1440], prediction_length64, quantile_levels(0.1, 0.5, 0.9), ) print(pd.DataFrame(result.forecast_rows))變量/時間步影響示例result predict_time_anchor( K-Iwa/time-anchor-modernbert-32m, target_contexttemperature[:168], explanatory_contexts[weather.iloc[:168, i].astype(float32) for i in (2, 3, 4)], gaf{enabled: True, topk_time_steps: 0}, ) print(pd.DataFrame(result.variable_impact_rows))錨定預測示例url https://raw.githubusercontent.com/jbrownlee/Datasets/master/airline-passengers.csv passengers pd.read_csv(url)[Passengers].astype(float32) result predict_time_anchor( K-Iwa/time-anchor-modernbert-32m, target_contextpassengers[:-24], prediction_length24, anchor{ mode: observed, positions: [4, 8, 12, 16, 20, 24], values: [396, 559, 405, 461, 606, 432], }, ) print(pd.DataFrame(result.forecast_rows))? 強大的命令行工具除了Python API還提供了便捷的命令行工具time-anchor-infer --checkpoint K-Iwa/time-anchor-modernbert-32m \ --input data.csv --target-column Target \ --exogenous-columns Feature1,Feature2,Feature3該命令會生成output/forecast.csv、output/variable_impact.csv和output/result.json文件。添加--no-impact可僅進行預測或使用--anchor-mode observed --anchor-positions 12,24 --anchor-values 0.2,0.4進行錨定預測。 模型詳細信息項目詳情骨干網絡ModernBERT編碼器10層隱藏層3846個頭部參數數量總計33.4M 31.9M ModernBERT骨干名稱中的32M 1.5M時間序列頭float32safetensors最大上下文長度3,463步預測 horizon64步訓練分位數0.1 – 0.9九個級別歸因方法Generalized Attention Flow (GAF) 通過障礙法最大流錨定模式observed,auto,forward,inverted,sparse,hierarchical,hybrid 相關參考Ansari et al. Chronos: Learning the Language of Time Series. TMLR 2024 (OpenReview) — 為預測/ tokenization 設計提供參考。Azarkhalili and Libbrecht. Generalized Attention Flow: Feature Attribution for Transformer Models via Maximum Flow. 2025 — 變量/時間影響方法GAF。 許可證本項目采用 Apache-2.0 許可證。圖表使用來自 Open-MeteoCC BY 4.0的歷史天氣數據和經典的航空乘客數據集Box Jenkins, 1976。要開始使用這個強大的時間序列預測模型請克隆倉庫git clone https://gitcode.com/hf_mirrors/K-Iwa/time-anchor-modernbert-32m【免費下載鏈接】time-anchor-modernbert-32m項目地址: https://ai.gitcode.com/hf_mirrors/K-Iwa/time-anchor-modernbert-32m創作聲明:本文部分內容由AI輔助生成(AIGC),僅供參考