Instructions to use czxichen/timesfm3.0-f16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- TimesFM
How to use czxichen/timesfm3.0-f16 with TimesFM:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
简体中文 · English
TimesFM 3.0 · FP16 全量量化权重(纯 Rust 引擎版)
这是什么
- 基座模型:Google TimesFM 3.0 —— 约 3.3 亿参数、20 层双注意力(序列 + 变量)MixingTransformer,
model_dims=1280、16 头 × 80。 - 本仓库:官方 FP32 权重的 FP16 全量量化版(631 MB),由
timesfm3纯 Rust 推理引擎的quantize工具离线产出,体积较官方 减半。 - ⚠️ 兼容性说明:权重为 safetensors + 引擎私有
config.json格式,仅能被 timesfm3 引擎加载;无法用 PyTorch /transformers直接读取。请与引擎配套使用。
仓库文件
| 文件 | 体积 | 说明 |
|---|---|---|
model.safetensors |
631 MB | FP16 全量量化权重 |
config.json |
1.3 KB | 引擎模型配置(含 precision: "f16") |
LICENSE |
— | 权重许可声明 |
SHA256SUMS.txt |
— | 上传文件校验和 |
精度(与官方 PyTorch 对齐)
场景:ETTh1 · 7 变量 × ctx1024 → horizon 24,与官方 PyTorch 逐值对比:
| 指标 | 数值 |
|---|---|
| 中位数点预测 $\max|\Delta|$ | $3.7 \times 10^{-3}$ |
| 全分位网格 $\max|\Delta|$ | $6.1 \times 10^{-3}$ |
| Pearson 相关系数 | 1.0000000 |
| 相对误差 | ~0.03%(工程无损) |
Windows 10 同场景复测:$3.7 \times 10^{-3}$ / $6.1 \times 10^{-3}$,与 macOS 结论一致。155 场景矩阵中本档(vs 引擎 f32)worst $9.6 \times 10^{-3}$。详细报告见引擎仓库 report/accuracy_report.md。
使用
git clone https://github.com/czxichen/timesfm3
cd timesfm3 && cargo build --release
# 解压本仓库 → ./ckpt_f16 后:
cargo run --release --bin forecast -- ckpt_f16 96 path/to/context.csv
# 常用 flag:--seasonal <P> --robust-znorm --threads <N> --precision f16
自行量化(复现)
cargo run --release --bin quantize -- <官方FP32目录> ckpt_f16 f16
许可与致谢
- 权重为 TimesFM 官方权重的量化派生,遵循
timesfm-non-commercial-license-v1.0(仅限非商用研究),完整许可文本见官方下载源与本仓LICENSE;原权重 © Google。 - 量化/推理引擎源码为 Apache-2.0:
czxichen/timesfm3。
- Downloads last month
- 13
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support