Scope

Jabara is a library for storing checkpoints and for comparing ways to store them.

What Jabara does not do

  • It does not introduce a compression method. Zstandard, byte grouping, XOR and subtraction deltas, and 8-bit quantization are known techniques. Jabara puts them behind one interface, so you can use, compare, and extend them in the same way. It does not aim to beat other codecs on stored size.

  • It does not compress on a GPU. It needs no GPU and runs on CPU in the training loop.

  • It does not support multi-process training, DeepSpeed, or FSDP in the Hugging Face Trainer adapter. attach refuses all three. DeepSpeed and FSDP save and load sharded state with their own code, which never calls the loaders that the adapter wraps. Weights that save_pretrained splits over several *.safetensors files are a different case: attach compresses each file.

  • It does not read or write remote paths in the PyTorch Lightning plugin. A URL path is refused.

  • It runs no pickle. save_state and the Lightning plugin store tensors, plain values, and dicts, lists, and tuples of them, and refuse a tensor subclass or a custom object, so their archives hold no pickle data. A file that torch.save wrote is a pickle, because PyTorch's file format uses one. jabara compress takes such a file apart without running it: it reads the storages from the zip and keeps the pickle's bytes as they are, and jabara decompress writes them back. Only the names and roles of the tensors need torch.load(..., weights_only=True), which unpickles only tensors and plain types; for a file that it refuses, the tensors keep the role other. Loading a restored file is up to you, as it was before compression.

  • It does not code several tensors jointly. The codec interface sees one chunk of one tensor at a time. A method that prunes or quantizes weights together with their optimizer moments, as ExCP does, does not fit this interface. Whether one interface can cover such methods is an open question, and Jabara does not claim to.

  • It does not measure a whole save or load in bench. The report times the codec's share, in memory.

What it keeps replaceable

The codec, the assigner, the state schema, the checkpoint file format, and the framework adapter can each change without touching the rest (see Add a codec, an assigner, a state schema, or a file format).