Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -25,8 +25,8 @@ This is an ONNX export of the [Chronos-2](amazon/chronos-2) time series forecast
|
|
| 25 |
|
| 26 |
## Files
|
| 27 |
|
| 28 |
-
- `model.onnx` - FP32 ONNX model (456.
|
| 29 |
-
|
| 30 |
- `config.json` - Model configuration
|
| 31 |
- `generation_config.json` - Generation parameters
|
| 32 |
- `onnx/` - transformers.js-compatible directory structure
|
|
@@ -69,6 +69,30 @@ const outputs = await forecaster(batch);
|
|
| 69 |
// Returns array of forecasts, one per input series
|
| 70 |
```
|
| 71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
## Performance
|
| 73 |
|
| 74 |
- **Inference Time:** ~35-80ms per series (CPU, Node.js)
|
|
|
|
| 25 |
|
| 26 |
## Files
|
| 27 |
|
| 28 |
+
- `model.onnx` - FP32 ONNX model (456.3 MB)
|
| 29 |
+
- `model_quantized.onnx` - INT8 quantized model (124.7 MB, ~70% size reduction). transformers.js symlinks point to this file by default.
|
| 30 |
- `config.json` - Model configuration
|
| 31 |
- `generation_config.json` - Generation parameters
|
| 32 |
- `onnx/` - transformers.js-compatible directory structure
|
|
|
|
| 69 |
// Returns array of forecasts, one per input series
|
| 70 |
```
|
| 71 |
|
| 72 |
+
### Forecast with Covariates
|
| 73 |
+
|
| 74 |
+
```javascript
|
| 75 |
+
const result = await forecaster(
|
| 76 |
+
{
|
| 77 |
+
target: salesSeries,
|
| 78 |
+
past_covariates: {
|
| 79 |
+
temperature: pastTemps,
|
| 80 |
+
promo: pastPromoFlags,
|
| 81 |
+
},
|
| 82 |
+
future_covariates: {
|
| 83 |
+
temperature: futureTemps,
|
| 84 |
+
promo: futurePromoFlags,
|
| 85 |
+
},
|
| 86 |
+
},
|
| 87 |
+
{
|
| 88 |
+
prediction_length: 24,
|
| 89 |
+
quantile_levels: [0.1, 0.5, 0.9],
|
| 90 |
+
},
|
| 91 |
+
);
|
| 92 |
+
|
| 93 |
+
console.log(result.forecast[0]); // Quantile matrix for the target series
|
| 94 |
+
```
|
| 95 |
+
|
| 96 |
## Performance
|
| 97 |
|
| 98 |
- **Inference Time:** ~35-80ms per series (CPU, Node.js)
|