TimesFM (Time Series Foundation Model) is a pretrained time-series foundation model developed by Google Research for time-series forecasting.
이 번역은 AI가 원문 README를 옮긴 것입니다. 원문이 항상 우선합니다.
TimesFM(Time Series Foundation Model)은 Google Research에서 시계열 예측을 위해 개발한 사전 학습된 시계열 기반 모델입니다.
이 오픈 버전은 공식적으로 지원되는 Google 제품이 아닙니다.
최신 모델 버전: TimesFM 2.5
보관된 모델 버전:
v1에 보관되어 있습니다. pip install timesfm==1.3.0을 실행하여 이전 버전의 패키지를 설치하면 해당 모델을 로드할 수 있습니다.PyPI를 timesfm=2.0.0으로 업데이트했습니다. 설치를 참조하세요.
HuggingFace Transformers + PEFT(LoRA)를 사용한 파인튜닝 예제가 추가되었습니다. timesfm-forecasting/examples/finetuning/을 참조하세요. 또한 단위 테스트(tests/)가 추가되었고 여러 커뮤니티 수정 사항이 통합되었습니다.
@kashif와 @darkpowerxo에게 감사드립니다.
@borealBytes가 AGENTS 지원을 추가해 주셨습니다! TimesFM SKILL.md가 공개되었습니다.
TimesFM 2.5에 XReg를 통한 공변량 지원이 다시 추가되었습니다.
TimesFM 2.5가 출시되었습니다!
TimesFM 2.0과 비교하여 새로운 2.5 모델은:
frequency 표시자를 제거했습니다.2025년 9월 출시 이후 다음과 같은 개선이 완료되었습니다:
timesfm-forecasting/ 참조).timesfm-forecasting/examples/finetuning/ 참조).tests/ 참조).PyPI에서# torch로 패키지 설치
pip install timesfm[torch]
# 또는 Flax로 설치
pip install timesfm[flax]
# XReg가 필요한 경우
pip install timesfm[xreg]
git clone https://github.com/google-research/timesfm.git
cd timesfm
uv를 사용하여 의존성을 설치합니다: # 가상 환경 생성
uv venv
# 환경 활성화
source.venv/bin/activate
# torch로 패키지를 편집 가능 모드로 설치
uv pip install -e.[torch]
# 또는 flax로 설치
uv pip install -e.[flax]
# XReg가 필요한 경우
uv pip install -e.[xreg]
torch / jax 백엔드를 설치합니다:import torch
import numpy as np
import timesfm
torch.set_float32_matmul_precision("high")
model = timesfm.TimesFM_2p5_200M_torch.from_pretrained("google/timesfm-2.5-200m-pytorch")
model.compile(
timesfm.ForecastConfig(
max_context=1024,
max_horizon=256,
normalize_inputs=True,
use_continuous_quantile_head=True,
force_flip_invariance=True,
infer_is_positive=True,
fix_quantile_crossing=True,
)
)
point_forecast, quantile_forecast = model.forecast(
horizon=12,
inputs=[
np.linspace(0, 1, 100),
np.sin(np.linspace(0, 20, 67)),
], # 두 개의 더미 입력
)
point_forecast.shape # (2, 12)
quantile_forecast.shape # (2, 12, 10): 평균, 10번째부터 90번째 분위수까지.