timesfm-forecasting
Skill này làm gì
Skill này dự báo giá trị tương lai của một con số theo thời gian mà không cần huấn luyện mô hình tùy chỉnh. Skill dành cho nhà phân tích và người lập kế hoạch cần dự báo doanh số, năng lượng, cảm biến hoặc giá.
Khi nào nên dùng
- ✓Khi bạn muốn dự báo doanh số hoặc nhu cầu của tháng tới từ số liệu quá khứ.
- ✓Khi bạn cần dự báo kèm một khoảng kết quả có thể xảy ra, không chỉ một con số duy nhất.
- ✓Khi bạn muốn một dự báo nhanh mà không phải tự điều chỉnh mô hình.
Liên kết skill
https://github.com/google-research/timesfm/blob/master/timesfm-forecasting/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Dự báo doanh số hằng tháng của tôi trong sáu tháng tới từ cột số liệu trong bảng tính này.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill trước hết kiểm tra máy tính có đủ bộ nhớ và dung lượng đĩa, rồi tải một mô hình dự báo đã huấn luyện sẵn. Nó đưa các giá trị quá khứ của bạn vào và trả về dự báo cùng các khoảng tin cậy đã hiệu chỉnh.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
TimesFM Forecasting
Overview
TimesFM (Time Series Foundation Model) is a pretrained decoder-only foundation model developed by Google Research for time-series forecasting. It works zero-shot — feed it any univariate time series and it returns point forecasts with calibrated quantile prediction intervals, no training required.
This skill includes a mandatory preflight system checker that verifies RAM, GPU memory, and disk space before the model is ever loaded so the agent never crashes the user's machine.
Key numbers: TimesFM 2.5 uses 200M parameters (~800 MB on disk, ~1.5 GB in RAM on CPU, ~1 GB VRAM on GPU). The archived v1/v2 500M-parameter model needs ~32 GB RAM. Always run the system checker first.
When to Use This Skill
Use this skill when:
- Forecasting any univariate time series (sales, demand, sensor, vitals, price, weather)
- You need zero-shot forecasting without training a custom model
- You want probabilistic forecasts with calibrated prediction intervals (quantiles)
- You have time series of any length (the model handles 1–16,384 context points)
- You need to batch-forecast hundreds or thousands of series efficiently
- You want a foundation model approach instead of hand-tuning ARIMA/ETS parameters
- You need covariate forecasting with exogenous variables (price, promotions, holidays, day-of-week effects) → use
forecast_with_covariates()(TimesFM 2.5 +pip install timesfm[xreg])
Do not use this skill when:
- You need classical statistical models with coefficient interpretation → use
statsmodels - You need time series classification or clustering → use
aeon - You need multivariate vector autoregression or Granger causality → use
statsmodels - Your data is tabular (not temporal) → use
scikit-learn - You cannot install optional dependencies → XReg requires scikit-learn and JAX
Note on Anomaly Detection: TimesFM does not have built-in anomaly detection, but you can use the quantile forecasts as prediction intervals — values outside the 90% CI (q10–q90) are statistically unusual. See
examples/anomaly-detection/for a full example.
⚠️ Mandatory Preflight: System Requirements Check
CRITICAL — ALWAYS run the system checker before loading the model for the first time.
python scripts/check_system.py
This script checks:
- Available RAM — warns if below 4 GB, blocks if below 2 GB
- GPU availability — detects CUDA/MPS devices and VRAM
- Disk space — verifies room for the ~800 MB model download
- Python version — requires 3.10+
- Existing installation — checks if
timesfmandtorchare installed
Note: Model weights are NOT stored in this repository. TimesFM weights (
800 MB) download on-demand from HuggingFace on first use and cache in `/.cache/huggingface/`.
flowchart TD
start["🚀 Run check_system.py"] --> ram{"RAM ≥ 4 GB?"}
ram -->|"Yes"| gpu{"GPU available?"}
ram -->|"No (2-4 GB)"| warn_ram["⚠️ Warning: tight RAM<br/>CPU-only, small batches"]
ram -->|"No (< 2 GB)"| block["🛑 BLOCKED<br/>Insufficient memory"]
warn_ram --> disk
gpu -->|"CUDA / MPS"| vram{"VRAM ≥ 2 GB?"}
gpu -->|"CPU only"| cpu_ok["✅ CPU mode<br/>Slower but works"]
vram -->|"Yes"| gpu_ok["✅ GPU mode<br/>Fast inference"]
vram -->|"No"| cpu_ok
gpu_ok --> disk{"Disk ≥ 2 GB free?"}
cpu_ok --> disk
disk -->|"Yes"| ready["✅ READY<br/>Safe to load model"]
disk -->|"No"| block_disk["🛑 BLOCKED<br/>Need space for weights"]
Dataset Preflight (NEW)
Before loading your actual data, verify it will fit in memory:
# Quick estimate for your dataset
python scripts/check_system.py \
--num-series 1000 \
--context-length 1024 \
--horizon 24 \
--batch-size 32 \
--estimate-only
This will show you the estimated memory requirements and warn if your dataset is too large.
Memory Estimation Formula:
RAM ≈ 0.8 GB (model) + 0.5 GB (overhead) + (0.2 MB × num_series × context_length / 1000)
Example Outputs:
✅ Dataset Fits:
Total CPU memory: 2.34 GB
Total GPU memory: 2.15 GB
⚠️ Dataset Too Large:
Dataset requires ~12.5 GB RAM but system has 8.0 GB.
Try: context_length=512 or process in chunks of 50 series.
Hardware Requirements by Model Version
| Model | Parameters | RAM (CPU) | VRAM (GPU) | Disk | Context |
|---|---|---|---|---|---|
| **TimesF |
Câu hỏi thường gặp
Tôi có cần huấn luyện mô hình không?
Không. Mô hình hoạt động zero-shot, nghĩa là dự báo từ dữ liệu của bạn mà không cần huấn luyện.
Nó có chạy được trên máy tính yếu không?
Skill kiểm tra bộ nhớ và đĩa trước, và mô hình cần vài gigabyte RAM.
Nó có dùng các yếu tố khác như khuyến mãi không?
Có. Nó hỗ trợ dự báo với biến đồng hành (covariate) như khuyến mãi hoặc ngày lễ.
Chi tiết
Mô tả gốc của tác giả
Zero-shot time series forecasting with Google's TimesFM foundation model. Use this skill when forecasting ANY univariate time series — sales, sensor readings, stock prices, energy demand, patient vitals, weather, or scientific measurements — without training a custom model. Supports both basic forecasting and advanced covariate forecasting (XReg) with dynamic and static exogenous variables. Automatically checks system RAM/GPU before loading the model, validates dataset fit before processing, supports CSV/DataFrame/array inputs, and returns point forecasts with calibrated prediction intervals.
repo: google-research/timesfm
Độ phổ biến
- Sao GitHub
- 35k
- Vị trí xếp hạng
- #7589
- Giấy phép
- Apache-2.0
- Cập nhật
- 29/9/2026
Bình luận
- …
Skill tương tự
pytorch-patterns
280kGiúp agent của bạn dùng PyTorch cho các mô hình học máy. Áp dụng thực hành tốt nhất để huấn luyện mô hình hiệu quả và đảm bảo kết quả có thể lặp lại.
evm-token-decimals
280kGiúp agent tránh lỗi về số thập phân khi làm việc với các mạng blockchain khác nhau. Đảm bảo giá trị token chính xác trong giao dịch và phép tính.
ito-inference
280kGiúp agent kiểm tra xem các mô hình AI đã sẵn sàng để dùng chưa. Kết nối yêu cầu tài nguyên tính toán với dịch vụ mô hình đã sẵn sàng.