←
Asterisk Labs

rumi

Stateless raster storage for AI4EO

rumi02 / 16

Rumi is one layer of the Asterisk stack for AI

training datasets files codecs bytes PyTorch, JAX, TensorFlow your model, fed tensors through DLPack on a CPU or a GPU TACO AI-ready datasets, one sample per example cozip a ZIP you open like a table Rumi tensors read by window, band and time GeoZL Earth observation codecs, on OpenZL Karu batched byte-range reads from files, HTTP, S3, GCS, Azure, Hugging Face and Source Cooperative holds
rumi03 / 16

GeoTIFF permits many layouts

A diagram of GeoTIFF's valid tile, interleave and compression arrangements.
rumi04 / 16

Rumi permits only one container profile

One fixed Rumi container profile. Ten frame units choose tile or cell sample layout without changing the file structure.
rumi05 / 16

Rumi follows its own data model

tile h × w one band or time step at one grid position w h cell (B, h, w) or (T, B, h, w) all samples at one grid position B, T Image (B, Y, X) one time step, cut into tiles or cells X Y B Cube (T, B, Y, X) time steps share the transform and CRS t = 0 t = 1 t = 2 T ImageCollection a set of Images that need not share a grid … [0] [N-1] CubeCollection a set of Cubes that need not share a grid … [0] [N-1]
rumi06 / 16

Cut, compress your way. Rumi just writes.

rumi07 / 16

Rumi writes an external header for stateless reads

Array (B, Y, X) rumi file external header
A write produces the file and a small external header that locates every frame in it.
From the file alone
GET the IFDround tripGET the frames
2 requests
With the external header
offsets from the external headerGET the frames
1 request
rumi08 / 16

Rumi's file header is predictable

Array rumi file external header
known from the tensor, 500 Bknown only after compressing
rumi09 / 16

Rumi's external header locates every frame

Array rumi file external header

fixed part, 32 bytes

frame sizes, 26 bytes, 13 bits per frame

+ 92,375 B in every frame, stored once as count_min

known from the tensor, 27 Bknown only after compressing, 31 B
rumi10 / 16

Rumi's external header stores sizes, not offsets

An image of shape (, , ) in 256 × 256 tiles

GeoTIFFBigTIFF, by GDAL
Rumifile header
Rumiexternal header
32 fixed bytes, then every frame size

GeoTIFF from GDAL, tiled 256 × 256, interleave band, uint16, ZSTD. External header frame sizes at 16 bits each.

The external header is 7.6× smaller than the GeoTIFF index and 7.1× smaller than Rumi's file header.

rumi11 / 16

On the CPU, frames decode in RAM

rumi.read(path, header, framework="torch")
HOST Rumiplans and places Karufetches the bytes OpenZL + GeoZLdecode the frames PyTorchgets the tensor 206 kB 524 kB plan the readexternal header only fetch 4 rangesone batch, I/O threads decode each frameby the graph in the frame place the cropsinto one buffer torch.TensorDLPack, no copy

One 256 by 256 tile of Lake Annecy, 4 bands in 4 frames. A local file skips Karu, each worker reads its own range.

rumi12 / 16

On a GPU, compressed bytes cross PCIe

HOST GPU Rumiplans and moves Karufetches the bytes GeoZLdecodes on the GPU PyTorchgets the tensor 206 kB 524 kB plan the readoutput on cuda:0 fetch every rangeinto pinned memory send to the GPUin groups, across PCIe decode on the GPUcrops written in place torch.Tensorstream waits, DLPack

The same tile. A frame the GPU cannot decode is decoded on the CPU and copied.

rumi13 / 16

A Sentinel-2 scene reaches the GPU in 61 ms

One CPU thread and an NVIDIA A100. Red, green and blue of one Sentinel-2 tile, 723 MB, already in memory.

time to a tensor on the GPU0.00 sfile size
JPEG2000
50.1 s350 MiB
GeoTIFF, ZSTD
1.60 s441 MiB
Rumi, PFOR
61 ms386 MiB
Rumi, PivCo
128 ms377 MiB
0 s1 s2 s

Rumi with PFOR is 26× faster than GeoTIFF and 828× faster than JPEG2000, from a file only 10 % larger than the JPEG2000.

rumi14 / 16

Rumi scales with every GPU you add

def __getitems__(self, indices):
    return rumi.read_many(sources, headers, windows=windows, framework="torch", device=f"cuda:{rank}")
HOST GPU rank 0, cuda:0 rank 1, cuda:1 rank 2, cuda:2 rank 3, cuda:3 PyTorch DataLoaderDistributedSampler splits the indices Rumi__getitems__ calls read_many Karufetches the byte ranges GeoZLdecodes on the rank's own GPU PyTorch DDPforward, backward, gradients averaged
rumi15 / 16

Five languages, one format

C librumi C++ core with a C ABI C calls it directly Pythoncffi RR.Call Juliaccall WA GeoZL wasm decodes frames JSJavaScriptown reader
header = open("scene.header", "rb").read()
chip = rumi.read("scene.rumi", header, window=(256, 512, 256, 256))
Asterisk Labs

Thank you