Jabara¶
Jabara compresses the checkpoints of a training run: the model weights and the optimizer state. Lossless compression, deltas against an earlier checkpoint, and quantization all implement one codec interface, so you can use, compare, and add codecs in the same way.
Jabara is for checkpoints that you keep and read back, to resume a run or to analyse it, such as the checkpoints of a seed sweep. It is not a format to serve a model from. Who Jabara is for describes each case, what Jabara does in it, and what it costs.
By default, every tensor is restored bit for bit, and every read checks a CRC-32 per chunk. Writing an archive with a lossy codec requires allow_lossy=True, and the archive records the largest error that the codec introduced.
You can use Jabara from the jabara command, from Python, or through the adapters for the Hugging Face Trainer and PyTorch Lightning.
Getting started
How-to guides
- Use Jabara with the Hugging Face Trainer
- Use Jabara with PyTorch Lightning
- Save and load state in a plain PyTorch loop
- Compress the checkpoints of many runs
- Choose codecs per role
- Store a checkpoint as a difference against a base
- Before you start
- Make a second checkpoint
- Use the command line
- Compress a whole checkpoint directory
- Code a whole run against its first checkpoint
- Code each checkpoint against the one before it
- Use Python
- What the archive records about its base
- When the base is missing or different
- Tensors the base does not match
- Opt in to a lossy codec and read the recorded error
- Export weights to a standard safetensors file
- Run from a config file
- Compare codecs on your own checkpoint
- Use Jabara from an AI agent
- Add a codec, an assigner, a state schema, or a file format
Explanation