rlx-pkg
RLX ship format (.rlxp): flat mmap by default with hybrid hot / warm /
cold storage, optional ZIP / directory layouts, and an optional executable
MIR graph (ONNX-style graph + weights, or weight-only).
Spec: docs/rlxp.md.
| Container | Use |
|---|---|
Flat (.rlxp) |
Deploy / serve — one RLXPFLAT mmap, tiny TOC |
ZIP (.zip) |
Inspect with unzip -l |
| Dir | Edit as a tree during development |
| Tier | Codec | API |
|---|---|---|
| Hot | raw | tensor_mmap |
| Warm | zstd_blocks |
tensor_bytes / tensor_warm_block |
| Cold | zstd | sidecar |
Warm compression is for rarely touched host blobs — not a substitute for
GGUF-class quants (Q4_K, …). Keep active LLM weights hot + packed.
Usage
use ;
let mut opts = WriteOptions ;
opts.sidecars.push;
write_package?;
let pack = open?;
pack.advise_hot_willneed; // optional page prefetch
let _ = pack.tensor_mmap?; // zero-copy hot
let _ = pack.tensor_bytes?; // inflate warm (parallel for large)
let g = pack.graph?; // materializes hot Constants by default
Runtime compile:
use ;
use compile_rlxp;
let session = new;
let compiled = compile_rlxp?;
CLI
ONNX → RLXP (optional executable graph) is on rlx-bake:
Features
| Feature | Enables |
|---|---|
| (default) | Flat / ZIP / dir, hybrid tiers, GGUF import, verify, CLI |
encrypt |
seal_bytes / unseal_bytes (RLXSEAL1) for cold blobs |
remote |
HTTP(S) Range RemoteFlat (TOC + on-demand tensors) |
Benches / examples
RLX_ALLOW_THROTTLE=1
RLX_ALLOW_THROTTLE=1
RLX_ALLOW_THROTTLE=1
# MNIST end-to-end (bake + RLXP load/compile/run):
RLX_ALLOW_THROTTLE=1
Python (pyrlx)
License
MIT OR Apache-2.0.