Skip to content

Format specification

Tetration stores chunked tensor data in a single .tet file with a mmap-friendly layout. The current on-disk format is layout v1.

What a .tet file contains

RegionPurpose
SuperblockMagic, version, dataset count, chunk index pointer
Dataset directoryNamed datasets with dtype, shape, and chunk grid
Chunk indexFixed-size rows mapping grid coordinates → payload offsets
Chunk payloadsRaw or zstd-compressed tensor bytes
History footer (optional)Provenance events and axis metadata (dim_names, coords, attrs)

All multi-byte integers are little-endian. The file magic is ASCII TETR.

Supported wire dtypes

Tags 110, row-major within each chunk:

TagType
1f32
2f64
3i32
4i64
5u8
6u16
7i16
8u32
9f16
10u64

Booleans from HDF5, Zarr, and similar sources import as u8 (0/1).

Sections in this spec

Canonical source

The Rust crate in Latka-Industries/tetration is the reference implementation. The upstream docs/layout_v1.md tracks byte-level details as the format evolves.

Pre-1.0

Layout v1 and query JSON/TOML may change before the 1.0 release. Check the tetration repo for the latest guarantees.

Latka Industries