Upload folder using huggingface_hub
Browse files- .gitattributes +1 -0
- README.md +117 -0
- config.json +17 -0
- t0-alpha-q8_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-alpha-q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
tags:
|
| 4 |
+
- time-series
|
| 5 |
+
- forecasting
|
| 6 |
+
- webgpu
|
| 7 |
+
- wasm
|
| 8 |
+
- gguf
|
| 9 |
+
- q8_0
|
| 10 |
+
- burn
|
| 11 |
+
base_model: theforecastingcompany/t0-alpha
|
| 12 |
+
pipeline_tag: time-series-forecasting
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# t0-alpha Q8_0, WebGPU
|
| 16 |
+
|
| 17 |
+
Q8_0-quantized weights for [theforecastingcompany/t0-alpha](https://huggingface.co/theforecastingcompany/t0-alpha), 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, ~102M parameters.
|
| 20 |
+
|
| 21 |
+
[**Try the demo →**](https://idle-intelligence.github.io/t0-web/web/)
|
| 22 |
+
|
| 23 |
+
## What you gain, what you lose
|
| 24 |
+
|
| 25 |
+
Nothing is lost compared with the official INT8 export, and accuracy is slightly better: worst-case drift vs F32 is 0.20% for this Q8_0 file against 0.79% for the official INT8 ONNX export, at about the same size (109 MB), and the browser forecast is about 2x faster (34.5 ms vs 64.0 ms, single signal, Apple M2).
|
| 26 |
+
|
| 27 |
+
## Files
|
| 28 |
+
|
| 29 |
+
| File | Size | Description |
|
| 30 |
+
|------|------|-------------|
|
| 31 |
+
| `t0-alpha-q8_0.gguf` | 108.9 MB | Forecasting transformer weights (Q8_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-alpha-q8_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 |
+
- ~109 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 512
|
| 60 |
+
→ 32-step quantile decoder → 5 quantile levels
|
| 61 |
+
→ autoregressive rollout for longer horizons
|
| 62 |
+
```
|
| 63 |
+
|
| 64 |
+
## Benchmarks
|
| 65 |
+
|
| 66 |
+
### GIFT-Eval, official-protocol 8-config subset (dequantized back to f32 into the reference architecture)
|
| 67 |
+
|
| 68 |
+
| | f32 (original weights) | original INT8 export | **this Q8_0** |
|
| 69 |
+
|---|---|---|---|
|
| 70 |
+
| CRPS (aggregate, 8 configs) | 0.0818 | 0.0818 | **0.0818** |
|
| 71 |
+
|
| 72 |
+
Indistinguishable from f32 on this subset. The full 97-config GIFT-Eval run exists only for the Q4_0 export in this release; see [idle-intelligence/t0-alpha-q4_0-webgpu](https://huggingface.co/idle-intelligence/t0-alpha-q4_0-webgpu) for that table.
|
| 73 |
+
|
| 74 |
+
### Drift vs our own F32 reference (54 synthetic cases)
|
| 75 |
+
|
| 76 |
+
| quant | mean drift worst % | point drift worst % |
|
| 77 |
+
|---|---|---|
|
| 78 |
+
| **this Q8_0** | **0.53** | **1.78** |
|
| 79 |
+
|
| 80 |
+
Well inside typical acceptance gates for this checkpoint (2% mean / 10% point).
|
| 81 |
+
|
| 82 |
+
### Browser latency (Chrome, headless Chromium, Apple M2, single signal, context 512)
|
| 83 |
+
|
| 84 |
+
| | warm ms | batch-24 ms/signal |
|
| 85 |
+
|---|---|---|
|
| 86 |
+
| Official ONNX WebGPU export | 64.0 | 8.87 |
|
| 87 |
+
| **This file (Q8_0-resident WebGPU)** | **34.5** | **11.2** |
|
| 88 |
+
|
| 89 |
+
Single-call latency beats the official ONNX export (34.5 vs 64.0 ms). Batched throughput is slower on this file (11.2 vs 8.87 ms/signal).
|
| 90 |
+
|
| 91 |
+
## Model Details
|
| 92 |
+
|
| 93 |
+
- **Base model:** [theforecastingcompany/t0-alpha](https://huggingface.co/theforecastingcompany/t0-alpha) by [The Forecasting Company](https://theforecastingcompany.com/)
|
| 94 |
+
- **Architecture:** Patch transformer, time and group attention
|
| 95 |
+
- **Parameters:** ~101.6M
|
| 96 |
+
- **Quantization:** Q8_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
|
| 97 |
+
- **Quantile levels:** 5 (0.1, 0.25, 0.5, 0.75, 0.9)
|
| 98 |
+
- **License:** Apache-2.0 (same as original)
|
| 99 |
+
|
| 100 |
+
## Quantization
|
| 101 |
+
|
| 102 |
+
Weights-only quantization using standard GGUF Q8_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 1.2e-6 max-abs.
|
| 103 |
+
|
| 104 |
+
## Citation
|
| 105 |
+
|
| 106 |
+
```bibtex
|
| 107 |
+
@misc{tfc-t0,
|
| 108 |
+
title = {t0: A time-series forecasting foundation model},
|
| 109 |
+
author = {The Forecasting Company},
|
| 110 |
+
year = {2026},
|
| 111 |
+
url = {https://huggingface.co/theforecastingcompany/t0-alpha},
|
| 112 |
+
}
|
| 113 |
+
```
|
| 114 |
+
|
| 115 |
+
## Disclaimer
|
| 116 |
+
|
| 117 |
+
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,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"dropout": 0.1,
|
| 3 |
+
"embed_dim": 512,
|
| 4 |
+
"group_every_n": 3,
|
| 5 |
+
"mlp_hidden_dim": 2048,
|
| 6 |
+
"num_heads": 8,
|
| 7 |
+
"num_layers": 24,
|
| 8 |
+
"patch_size": 32,
|
| 9 |
+
"quantile_levels": [
|
| 10 |
+
0.1,
|
| 11 |
+
0.25,
|
| 12 |
+
0.5,
|
| 13 |
+
0.75,
|
| 14 |
+
0.9
|
| 15 |
+
],
|
| 16 |
+
"scaler_use_arcsinh": true
|
| 17 |
+
}
|
t0-alpha-q8_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:70e2be6ae6d8d463fb7153e2fa606baa9aba5848bcdef752caee5e10edf222b0
|
| 3 |
+
size 108936047
|