Jabara
English / 日本語
Jabara compresses training checkpoints: model weights and optimizer state. Lossless compression, deltas against an earlier checkpoint, and quantization all sit behind one codec interface. By default Jabara restores every tensor bit for bit, every read checks a CRC-32, and an archive gets a lossy codec only when you opt in.
- Live demo: https://jabara.iamtatsuki05.com/demo/ (runs in your browser and uploads nothing)
- Project page: https://jabara.iamtatsuki05.com/
- Results viewer: https://jabara.iamtatsuki05.com/results/
- Documentation: English / 日本語
Who it is for
Jabara is for checkpoints that you keep and read back later: the checkpoints of seed and hyperparameter sweeps, intermediate checkpoints kept for analysis, and runs that resume after an interruption or that someone else resumes. Saves and loads take longer than without Jabara, and a framework cannot memory-map an archive, so it is not a format to serve a model from. Who Jabara is for gives the measured sizes and costs, and Compress the checkpoints of many runs shows the commands for a finished sweep. Jabara and general-purpose archivers compares it with tar, zip, gzip, and zstd.
What you can do
- Take many file formats through one registry.
jabara compressreads safetensors,torch.savefiles (without unpickling them), NumPy, GGUF, Keras and HDF5, ONNX, TensorFlow and MindSpore checkpoints, Core ML weight files, and Flax msgpack files, and a lossless archive restores each file byte for byte. A new format is oneCheckpointFormatsubclass plus the code that finds the tensor bytes in the file, and the built-in format modules are 86 to 290 lines each (Checkpoint file formats). - Split an archive by size or by count, and join it back.
--part-size 2GBor--parts 4cuts each archive, andjabara splitandjabara joinchange an archive that exists without encoding it again (Split an archive into parts and join it back). - Handle a whole run.
--recursivetakes every checkpoint directory of a run, andcompress --dry-runlists what it would do before it changes anything (Compress the checkpoints of many runs). - Store deltas.
--delta firstcodes each later checkpoint against the first one and--delta previousagainst the one before it, which saves only a few points more and restores slower.--basetakes a directory too, andjabara.hf.attach(trainer, delta="first")saves deltas from aTrainer(Delta checkpoints). - Read options from a file.
--config FILEtakes JSON, YAML, or TOML, and--show-configprints the settings without running the command (Run from a config file). - Find your way in the command.
-hand-Hprint the short and the full help,jabara man COMMANDshows the manual page, andjabara codecs --longlists each codec with the works it builds on (Command-line reference). - Hand it to an agent. The repository ships an agent skill for Claude Code, Codex CLI, GitHub Copilot CLI, Cursor, and Gemini CLI, an
AGENTS.md, and a test of the command's contract (Use Jabara from an AI agent).
Install
Jabara needs Python 3.10 or newer. Install it from PyPI into a virtual environment:
$ python -m venv .venv
$ source .venv/bin/activate
$ pip install "jabara[torch]"
In a uv project, run uv add "jabara[torch]" instead.
The extras are torch (PyTorch state, and the tensor names and roles of .pt files), hf (the Hugging Face Trainer adapter), lightning (the PyTorch Lightning plugin), zipnn (the zipnn/1 codec), yaml (YAML config files), and hdf5 (HDF5 and Keras files). See Installation.
Quickstart
Compress a checkpoint directory, check it, and restore it. compress replaces each *.safetensors file and optimizer.pt with a verified .jbr archive and leaves the other files alone. It also takes the files that Accelerate, PyTorch Lightning, DeepSpeed, and Megatron-LM write with torch.save, without unpickling them, TensorFlow data shards, MindSpore .ckpt files, and a Flax model's flax_model.msgpack, and, when you name the file, NumPy .npy and .npz, GGUF, Keras .keras and HDF5 files, ONNX models and their external data, Core ML weight.bin files, and any Flax .msgpack file. Each format is one class in a registry, and a lossless archive restores the file byte for byte (see Checkpoint file formats).
$ jabara compress checkpoint-1000
checkpoint-1000/model.safetensors.jbr: ... -> ... bytes (...% of original)
checkpoint-1000/optimizer.pt.jbr: ... -> ... bytes (...% of original)
$ jabara verify checkpoint-1000
ok checkpoint-1000/model.safetensors.jbr
ok checkpoint-1000/optimizer.pt.jbr
$ jabara decompress checkpoint-1000
checkpoint-1000/model.safetensors
checkpoint-1000/optimizer.pt
Save and load a PyTorch state from Python:
import torch
from jabara.torch import load_state, save_state
model = torch.nn.Linear(16, 16)
optimizer = torch.optim.AdamW(model.parameters())
model(torch.randn(4, 16)).sum().backward()
optimizer.step()
save_state(optimizer.state_dict(), "optimizer.jbr")
optimizer.load_state_dict(load_state("optimizer.jbr"))
The tutorial explains both examples. Every command that has options also reads them from a JSON, YAML, or TOML file with --config FILE; see Run from a config file.
An archive can also be written as several files, parts of at most a given size (jabara compress --part-size 2GiB) or a given number of parts (--parts 4). Every command reads the parts as one archive, and jabara join gives back the archive byte for byte; see Split an archive into parts and join it back.
Codecs
| Codec | Type | Needs a base |
|---|---|---|
bytegroup-zstd/1 |
lossless | no |
quant8-linear/1 |
lossy | no |
quant8-log/1 |
lossy | no |
raw/1 |
lossless | no |
sub-delta/1 |
lossless | yes |
xor-delta/1 |
lossless | yes |
zipnn/1 |
lossless | no |
zstd/1 |
lossless | no |
A codec that needs a base stores each tensor as its difference from the same tensor in an earlier archive. The codec reference gives the dtypes, the parameters, and the error bounds of the lossy codecs.
Extend Jabara
To extend Jabara, subclass one of these abstract base classes. You change no other code. Each example is a complete script, and a test runs all of them.
Codecturns one chunk of one tensor into bytes and back: examples/extend/custom_codec.py, and with a validated parameter, examples/extend/codec_with_params.py.Assignerchooses the codec for each tensor: examples/extend/custom_assigner.py.StateSchemanames the role of each tensor from its path in the nested state: examples/extend/custom_schema.py.
Documentation
Read the documentation on the published site. GitHub shows its MyST sources as raw text.
- Installation and the tutorial
- Command-line reference, and Use Jabara from an AI agent with the agent skill in skills/jabara/ for Claude Code, Codex, GitHub Copilot, Gemini CLI, Cursor, and other agents
- Built-in codecs
- Archive format and JSON schemas
- Python API
- DESIGN.md sets the data shapes and module boundaries.
To build the site from the clone, run uv run --group docs sphinx-build -W --keep-going -b html docs docs/_build/html and open docs/_build/html/index.html. docs/README.md gives the Japanese build and explains how the sources are tested.
To work on Jabara, run uv sync in the clone to install the locked dev group, then uv run tox to run the tests, ruff, and mypy.
License
MIT. See LICENSE.
Metadata
Release files for jabara 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jabara-0.2.1.tar.gz | 135.3 kB | With provenance | Details for jabara-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jabara-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for jabara-0.2.1-py3-none-any.whl |
Total release size: 295.5 kB
Release files / jabara-0.2.1.tar.gz
| Download URL | jabara-0.2.1.tar.gz |
|---|---|
| Size | 135.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f7dfa451efbc5589a23d06aa3aa7b8b411d87bf0b172a46c741487654dad5063
|
|
BLAKE2b-256 checksum How to use checksums |
154bc21ecf386ace9c8c0184c05c54850c2839b9cc65d7a039c3bbc78dafc6fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logRelease files / jabara-0.2.1-py3-none-any.whl
| Download URL | jabara-0.2.1-py3-none-any.whl |
|---|---|
| Size | 160.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f3b2474ae75eba5aa51d7fe4e54e5324013897a665913ab3ec70b65c4cf562d4
|
|
BLAKE2b-256 checksum How to use checksums |
8d8f91f7fa747806b0eaef519adfcddeb67fa31b881c8d57fca22fb9dabd8c0e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logSecurity for jabara 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for jabara-0.2.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.