Views
No views yet
cargo build --release1# F16 (recommended)
2./target/release/moment-rs convert --model moment-research/MOMENT-1-large --dtype f16 --output gguf/moment-f16.gguf
3
4# Q8_0 (smallest)
5./target/release/moment-rs convert --dtype q8 --output gguf/moment-q8.gguf
6
7# F32 (full precision)
8./target/release/moment-rs convert --dtype f32 --output gguf/moment-f32.gguf./scripts/convert_all.shHF_TOKEN=hf_... ./scripts/convert_all.sh.safetensors checkpoint:./target/release/moment-rs inspect-tensors models/model.safetensors1echo '{"context": [1.0, 1.2, 1.5, 1.3, 1.8, 2.0, 1.9, 2.1], "horizon": 96}' \
2 | ./target/release/moment-rs infer --gguf gguf/moment-f16.gguf1{
2 "id": "forecast-000001932b7a1234",
3 "object": "forecast",
4 "created": 1749686400,
5 "model": "moment",
6 "choices": [{
7 "index": 0,
8 "forecast": {
9 "point": [2.1, 2.3, 2.5, "..."],
10 "quantiles": {}
11 },
12 "finish_reason": "stop"
13 }],
14 "usage": {"context_length": 8, "forecast_length": 96}
15}Choice per series, or use the batch mode to handle multiple variates of a multivariate dataset by submitting each variate as a separate item:1# Two independent series — one Choice each
2echo '{"context": [[1.0, 1.2, 1.5], [2.0, 2.2, 2.5]], "horizon": 96}' \
3 | ./target/release/moment-rs infer --gguf gguf/moment-f16.gguf1python -m venv .venv && source .venv/bin/activate
2pip install maturin
3maturin develop --features python1import moment_rs
2
3model = moment_rs.Moment("gguf/moment-f16.gguf")
4
5result = model.forecast([1.0, 1.2, 1.5, 1.3, 1.8, 2.0], horizon=96)
6point = result["choices"][0]["forecast"]["point"]
7
8# Batch — one Choice per series
9result = model.forecast([[1.0, 1.2, 1.5], [2.0, 2.2, 2.5]], horizon=96)forecast returns a Python dict in the same OpenAI-compatible format as the CLI.