Tenzro
Tutorial — AI

Train and finalize

The full Tenzro Train flow: post a TimesFM task, enroll as a trainer, run the Python reference trainer, submit an outer gradient, and finalize a sync round.
Level
Advanced
Time
~45 min
Prerequisites
tenzro-node + Python trainer; one GPU recommended
Stack
CLI + Python
01

Post a training task

tenzro train post-task \
  --modality timeseries \
  --architecture timesfm-2.5 \
  --tier open \
  --aggregation mean \
  --target-rounds 64
02

Enroll as a trainer

tenzro train enroll-trainer --task <task-id>
03

Run the Python reference trainer

The Python trainer wraps PyTorch FSDP2 and Hivemind. It talks to the Rust syncer over JSON-RPC and the gossip topics.

pip install "tenzro-trainer"
tenzro-trainer run --task <task-id> --shard <shard-uri>
04

Submit the outer gradient

The trainer computes an outer gradient, serializes it to safetensors, hashes it (SHA-256), and publishes via IrohGradientStore. The on-wire submission is small — just the SHA-256 + signature.

tenzro train submit-gradient --task <task-id> --round <r>
05

Finalize the round (witness committee)

SyncerState::finalize_round is idempotent — k-of-N witnesses can submit the same (round, state_root) concurrently with no double-finalize hazard. Conflicting state_roots return TrainingError::ConflictingFinalize for fork detection. If the committee cannot assemble a quorum within grace_window_ms, build_nec_sync_round emits a no-endorsement-cert sync round and the run advances carrying forward the prior state_root.

06

Ask the syncer for its round decision

Trainers run on heterogeneous, variably-reachable hardware, so a round does not wait for every enrolled trainer — it is bound by a wall-clock grace window. Ask the syncer what it will do with the current round instead of guessing: decide-round returns wait (with remaining grace-window ms), finalize (enough gradients arrived), or no_quorum (the window elapsed; the run advances carrying the prior state root forward under a no-endorsement certificate).

tenzro train decide-round --task-id <task-id>
# Decision: wait | finalize | no_quorum
# wait     -> Grace window remaining (ms): <n>
# finalize -> Round: <r>
# no_quorum -> Round: <r>
07

Read the receipt

tenzro train get-receipt --task <task-id> --round <r>
← All tutorials