Upload folder using huggingface_hub
Browse files- .gitattributes +1 -0
- README.md +118 -0
- config.json +36 -0
- t0-beta-q4_0.gguf +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
t0-beta-q4_0.gguf filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
tags:
|
| 4 |
+
- time-series
|
| 5 |
+
- forecasting
|
| 6 |
+
- webgpu
|
| 7 |
+
- wasm
|
| 8 |
+
- gguf
|
| 9 |
+
- q4_0
|
| 10 |
+
- burn
|
| 11 |
+
base_model: theforecastingcompany/t0-beta
|
| 12 |
+
pipeline_tag: time-series-forecasting
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# t0-beta Q4_0, WebGPU
|
| 16 |
+
|
| 17 |
+
Q4_0-quantized weights for [theforecastingcompany/t0-beta](https://huggingface.co/theforecastingcompany/t0-beta), packaged for client-side browser forecasting via WASM + WebGPU.
|
| 18 |
+
|
| 19 |
+
Runs entirely in the browser, no server required. Probabilistic multi-horizon time-series forecasting, 256M parameters, smallest/fastest quant in this release.
|
| 20 |
+
|
| 21 |
+
[**Try the demo →**](https://idle-intelligence.github.io/t0-web/web/)
|
| 22 |
+
|
| 23 |
+
## What you gain, what you lose
|
| 24 |
+
|
| 25 |
+
You trade more accuracy than on t0-alpha for a much smaller file: 149.5 MB, 0.14x the F32 weights. Point drift worst-case against our F32 reference is 14.6%, looser than t0-alpha's own Q4_0 (8.4%) and looser than either quant level of this checkpoint should be for production use. There is no full-97-config GIFT-Eval run for t0-beta at any quant level, only the 8-config subset below. Use Q8_0 for this checkpoint unless file size is the binding constraint.
|
| 26 |
+
|
| 27 |
+
## Files
|
| 28 |
+
|
| 29 |
+
| File | Size | Description |
|
| 30 |
+
|------|------|-------------|
|
| 31 |
+
| `t0-beta-q4_0.gguf` | 149.5 MB | Forecasting transformer weights (Q4_0 quantized) |
|
| 32 |
+
| `config.json` | <1 KB | Model architecture and quantile-level configuration |
|
| 33 |
+
|
| 34 |
+
## Usage
|
| 35 |
+
|
| 36 |
+
These weights are consumed by [t0-web](https://github.com/idle-intelligence/t0-web), a Rust/WASM + WebGPU forecasting engine built with [Burn](https://burn.dev).
|
| 37 |
+
|
| 38 |
+
```js
|
| 39 |
+
await t0wasm.initBackend();
|
| 40 |
+
const modelBuf = await fetch('t0-beta-q4_0.gguf').then(r => r.arrayBuffer());
|
| 41 |
+
const model = t0wasm.T0Wasm.load(new Uint8Array(modelBuf));
|
| 42 |
+
|
| 43 |
+
const context = series.slice(-512);
|
| 44 |
+
const quantiles = await model.forecast(context, 32);
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
Weights are fetched from this repo and cached by the browser.
|
| 48 |
+
|
| 49 |
+
## Requirements
|
| 50 |
+
|
| 51 |
+
- Chrome 113+ or Edge 113+ (WebGPU required)
|
| 52 |
+
- HTTPS (required for WebGPU)
|
| 53 |
+
- ~150 MB download on first load (cached afterward)
|
| 54 |
+
|
| 55 |
+
## Pipeline
|
| 56 |
+
|
| 57 |
+
```
|
| 58 |
+
Series → patches of 32 (96-vector each)
|
| 59 |
+
→ 24 transformer blocks [WASM, WebGPU] → time and group attention, embed 1024
|
| 60 |
+
→ 32-step quantile decoder → 21 quantile levels
|
| 61 |
+
→ autoregressive rollout for longer horizons
|
| 62 |
+
```
|
| 63 |
+
|
| 64 |
+
## Benchmarks
|
| 65 |
+
|
| 66 |
+
### Drift vs our own F32 reference, and vs the official published t0-beta INT8 card
|
| 67 |
+
|
| 68 |
+
| quant | mean drift worst % | point drift worst % |
|
| 69 |
+
|---|---|---|
|
| 70 |
+
| **this Q4_0** | **2.55** | **14.58** |
|
| 71 |
+
| Official published t0-beta INT8 card | 0.23 | 9.39 |
|
| 72 |
+
|
| 73 |
+
Q4_0's point drift exceeds the official published INT8 card's on this checkpoint. Wider `embed_dim` (1024 vs t0-alpha's 512) gives Q8_0's per-channel blocks more values to average error over, but Q4_0's fixed 32-value block granularity does not scale with that width the same way.
|
| 74 |
+
|
| 75 |
+
### GIFT-Eval, official-protocol 8-config subset (dequantized back to f32 into the reference architecture)
|
| 76 |
+
|
| 77 |
+
| | f32 (original weights) | **this Q4_0** |
|
| 78 |
+
|---|---|---|
|
| 79 |
+
| CRPS (aggregate, 8 configs) | 0.0749 | **0.0752** |
|
| 80 |
+
| MASE (aggregate, 8 configs) | 1.0522 | **1.0552** |
|
| 81 |
+
|
| 82 |
+
Within 0.4% relative of the f32 reference on this small subset, a looser signal than the drift table above. This 8-config subset is not comparable to the published 97-config headline numbers (CRPS 0.4738 / MASE 0.6865); no full-97-config run exists for this checkpoint.
|
| 83 |
+
|
| 84 |
+
### Latency (native Metal only, no browser measurement)
|
| 85 |
+
|
| 86 |
+
| quant | single (ms/signal) | batch-24 (ms/signal) |
|
| 87 |
+
|---|---|---|
|
| 88 |
+
| **this Q4_0** | **145.3** | **54.5** |
|
| 89 |
+
|
| 90 |
+
Measured with `t0-fast` on raw `wgpu`/Apple Metal, context 512, horizon 32. No headless-Chromium browser run exists for t0-beta; do not read this as a browser latency figure.
|
| 91 |
+
|
| 92 |
+
## Model Details
|
| 93 |
+
|
| 94 |
+
- **Base model:** [theforecastingcompany/t0-beta](https://huggingface.co/theforecastingcompany/t0-beta) by [The Forecasting Company](https://theforecastingcompany.com/)
|
| 95 |
+
- **Architecture:** Patch transformer, time and group attention
|
| 96 |
+
- **Parameters:** ~256M
|
| 97 |
+
- **Quantization:** Q4_0 for `attention.wQKV.weight`, `attention.wO.weight`, `mlp.0.weight`, `mlp.2.weight` per layer; norms, embeddings, biases, and the quantile head kept at f16
|
| 98 |
+
- **Quantile levels:** 21
|
| 99 |
+
- **License:** Apache-2.0 (same as original)
|
| 100 |
+
|
| 101 |
+
## Quantization
|
| 102 |
+
|
| 103 |
+
Weights-only quantization using standard GGUF Q4_0 blocks (32 values per block, fp16 scale), in ggml-compatible layout, dequantized on-GPU inside the WGSL matmul with F32 compute. Exported from the F32 safetensors by t0-web's own packer. The F32 path itself matches the PyTorch reference to 3.2e-6 max-abs.
|
| 104 |
+
|
| 105 |
+
## Citation
|
| 106 |
+
|
| 107 |
+
```bibtex
|
| 108 |
+
@misc{tfc-t0,
|
| 109 |
+
title = {t0: A time-series forecasting foundation model},
|
| 110 |
+
author = {The Forecasting Company},
|
| 111 |
+
year = {2026},
|
| 112 |
+
url = {https://huggingface.co/theforecastingcompany/t0-beta},
|
| 113 |
+
}
|
| 114 |
+
```
|
| 115 |
+
|
| 116 |
+
## Disclaimer
|
| 117 |
+
|
| 118 |
+
This is an independent port by ilnmtlbnm@idle-intelligence, not affiliated with or endorsed by The Forecasting Company. Forecast values may differ slightly from the original PyTorch implementation due to quantization.
|
config.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"dropout": 0.1,
|
| 3 |
+
"dtype": null,
|
| 4 |
+
"embed_dim": 1024,
|
| 5 |
+
"group_every_n": 3,
|
| 6 |
+
"mlp_hidden_dim": 2048,
|
| 7 |
+
"num_heads": 8,
|
| 8 |
+
"num_layers": 24,
|
| 9 |
+
"patch_size": 32,
|
| 10 |
+
"quantile_levels": [
|
| 11 |
+
0.01,
|
| 12 |
+
0.05,
|
| 13 |
+
0.1,
|
| 14 |
+
0.15,
|
| 15 |
+
0.2,
|
| 16 |
+
0.25,
|
| 17 |
+
0.3,
|
| 18 |
+
0.35,
|
| 19 |
+
0.4,
|
| 20 |
+
0.45,
|
| 21 |
+
0.5,
|
| 22 |
+
0.55,
|
| 23 |
+
0.6,
|
| 24 |
+
0.65,
|
| 25 |
+
0.7,
|
| 26 |
+
0.75,
|
| 27 |
+
0.8,
|
| 28 |
+
0.85,
|
| 29 |
+
0.9,
|
| 30 |
+
0.95,
|
| 31 |
+
0.99
|
| 32 |
+
],
|
| 33 |
+
"scaler_eps": 0.01,
|
| 34 |
+
"scaler_eps_mode": "std_clamp",
|
| 35 |
+
"scaler_use_arcsinh": true
|
| 36 |
+
}
|
t0-beta-q4_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:afbfd5bb4e6917755780baba20b1772b7edf68e1c79db48949bfa4c86cb1dd51
|
| 3 |
+
size 149494729
|