Views
No views yet
cargo build --release1# F16 (recommended — good precision/size trade-off)
2./target/release/chronos-rs convert --model amazon/chronos-2 --dtype f16 --output gguf/chronos-f16.gguf
3
4# Q8_0 (smallest, ~2.8× compression vs F16)
5./target/release/chronos-rs convert --dtype q8 --output gguf/chronos-q8.gguf
6
7# F32 (full precision)
8./target/release/chronos-rs convert --dtype f32 --output gguf/chronos-f32.gguf./scripts/convert_all.shHF_TOKEN=hf_... ./scripts/convert_all.sh.safetensors checkpoint:./target/release/chronos-rs inspect-tensors models/model.safetensors1echo '{"context": [1.0, 1.2, 1.5, 1.3, 1.8, 2.0, 1.9, 2.1], "horizon": 64}' \
2 | ./target/release/chronos-rs infer \
3 --gguf gguf/chronos-f16.gguf \
4 --config models/config.json1{
2 "id": "forecast-000001932b7a1234",
3 "object": "forecast",
4 "created": 1749686400,
5 "model": "chronos",
6 "choices": [{
7 "index": 0,
8 "forecast": {
9 "point": [2.1, 2.3, 2.5, "..."],
10 "quantiles": {
11 "0.10": [1.8, 2.0, 2.2, "..."],
12 "0.50": [2.1, 2.3, 2.5, "..."],
13 "0.90": [2.4, 2.6, 2.8, "..."]
14 }
15 },
16 "finish_reason": "stop"
17 }],
18 "usage": {"context_length": 8, "forecast_length": 64}
19}point is the median (q0.5) forecast; all quantile levels from config.json are included.Choice per series:1echo '{"context": [[1.0, 1.2, 1.5], [2.0, 2.2, 2.5]], "horizon": 64}' \
2 | ./target/release/chronos-rs infer \
3 --gguf gguf/chronos-f16.gguf \
4 --config models/config.json1python -m venv .venv && source .venv/bin/activate
2pip install maturin
3maturin develop --features python1import chronos_rs
2
3model = chronos_rs.Chronos("gguf/chronos-f16.gguf", "models/config.json")
4
5result = model.forecast([1.0, 1.2, 1.5, 1.3, 1.8, 2.0], horizon=64)
6fc = result["choices"][0]["forecast"]
7point = fc["point"] # median forecast
8q10 = fc["quantiles"]["0.10"] # 10th-percentile
9q90 = fc["quantiles"]["0.90"] # 90th-percentile
10
11# Batch — one Choice per series
12result = model.forecast([[1.0, 1.2, 1.5], [2.0, 2.2, 2.5]], horizon=64)forecast returns a Python dict in the same OpenAI-compatible format as the CLI.TimeSelfAttention + GroupSelfAttention + FeedForward blocks, all with T5-style RMSNorm[-x[half:], x[:half]]), unlike Toto which uses xPos1/√d scaling, per the original implementation)n_output_patches hidden states → ResidualBlock → quantile predictionsGroupSelfAttention reduces to a position-wise v → o projection.