# Jabara > Jabara is a Python library that compresses the checkpoints of a training run: the model weights and the optimizer state. Lossless compression, deltas against an earlier checkpoint, and quantization all sit behind one codec interface. 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`. Jabara is for checkpoints that are kept and read back to resume or analyse a run, such as the checkpoints of seed and hyperparameter sweeps. It is not a format to serve a model from. A framework cannot memory-map an archive, and saves and loads take longer than without Jabara. Jabara needs Python 3.10 or newer. It is not on PyPI yet, so install it from a clone of https://github.com/iamtatsuki05/jabara. Use it from the `jabara` command, from Python, or through the adapters for the Hugging Face `Trainer` and PyTorch Lightning. The documentation is in English and in Japanese (https://jabara.iamtatsuki05.com/docs/ja/). ## Site - [Project page](https://jabara.iamtatsuki05.com/): install steps, the built-in codecs, and the three extension points - [About](https://jabara.iamtatsuki05.com/about/): what Jabara is, who it is for, how a checkpoint becomes an archive, its limits, its license, and how to cite it - [Live demo](https://jabara.iamtatsuki05.com/demo/): runs the library in the browser through Pyodide; needs JavaScript and WebAssembly - [Results viewer](https://jabara.iamtatsuki05.com/results/): reports of `jabara.bench` as tables; needs JavaScript - [Updates](https://jabara.iamtatsuki05.com/updates/): what changed, newest first, also as an RSS feed at https://jabara.iamtatsuki05.com/rss.xml ## Documentation - [Installation](https://jabara.iamtatsuki05.com/docs/getting-started/installation.html): install from a clone, with the extras `torch`, `hf`, `lightning`, and `zipnn` - [Tutorial](https://jabara.iamtatsuki05.com/docs/getting-started/tutorial.html): compress, inspect, verify, and restore a checkpoint with the command and from Python - [Hugging Face Trainer](https://jabara.iamtatsuki05.com/docs/how-to/hugging-face-trainer.html): compress every checkpoint a `Trainer` saves and resume from one - [PyTorch Lightning](https://jabara.iamtatsuki05.com/docs/how-to/pytorch-lightning.html): store Lightning checkpoints as archives with `JabaraCheckpointIO` - [Plain PyTorch loop](https://jabara.iamtatsuki05.com/docs/how-to/pytorch-loop.html): `save_state` and `load_state` in your own loop - [Many runs](https://jabara.iamtatsuki05.com/docs/how-to/compress-many-runs.html): compress and verify the checkpoints of every run of a sweep, and measure a delta against another run - [Choose codecs per role](https://jabara.iamtatsuki05.com/docs/how-to/choose-codecs.html): give the weights and each kind of optimizer state their own codec - [Delta checkpoints](https://jabara.iamtatsuki05.com/docs/how-to/delta-checkpoints.html): store a checkpoint as the difference against an earlier one, or against the one before it - [Lossy codecs](https://jabara.iamtatsuki05.com/docs/how-to/lossy.html): opt in to a lossy codec and read the recorded error - [Export weights](https://jabara.iamtatsuki05.com/docs/how-to/export-weights.html): write the weights of an archive as a safetensors file - [Run from a config file](https://jabara.iamtatsuki05.com/docs/how-to/run-from-a-config-file.html): read the options of a command from a JSON, YAML, or TOML file - [Compare codecs](https://jabara.iamtatsuki05.com/docs/how-to/compare-codecs.html): run codecs on your own checkpoint with `jabara bench` and read the report - [Use Jabara from an AI agent](https://jabara.iamtatsuki05.com/docs/how-to/use-from-an-agent.html): install the agent skill in Claude Code, Codex, GitHub Copilot, Gemini CLI, Cursor, and other agents, and what the command guarantees to an agent: no prompts, exit statuses, `-h`/`-H`/`jabara help COMMAND`, JSON output, which commands delete files - [Extend Jabara](https://jabara.iamtatsuki05.com/docs/how-to/extend.html): add a codec, an assigner, or a state schema - [Who Jabara is for](https://jabara.iamtatsuki05.com/docs/explanation/use-cases.html): the use cases, the measured sizes and costs, and what Jabara is not for - [Jabara and general-purpose archivers](https://jabara.iamtatsuki05.com/docs/explanation/archivers.html): how Jabara differs from `tar`, `zip`, `gzip`, and `zstd`, and where those tools are the better choice - [Tensor roles](https://jabara.iamtatsuki05.com/docs/explanation/tensor-roles.html): what a role is and where it comes from - [Lossless by default](https://jabara.iamtatsuki05.com/docs/explanation/lossless-by-default.html): what is verified, and when - [Inside a Trainer save](https://jabara.iamtatsuki05.com/docs/explanation/synchronous-save.html): what the Trainer adapter does inside a save - [Scope](https://jabara.iamtatsuki05.com/docs/explanation/scope.html): what Jabara does not do - [Command line](https://jabara.iamtatsuki05.com/docs/reference/cli.html): every `jabara` command and its arguments - [Built-in codecs](https://jabara.iamtatsuki05.com/docs/reference/codecs.html): every codec, its dtypes, parameters, and error bounds - [Checkpoint file formats](https://jabara.iamtatsuki05.com/docs/reference/formats.html): the file formats that `jabara compress` takes (safetensors, torch.save files of several frameworks, NumPy, GGUF, Keras and HDF5), restored byte for byte, and the formats it does not take with the reason - [Archive format](https://jabara.iamtatsuki05.com/docs/reference/archive-format.html): the `.jbr` file layout and its JSON index - [JSON schemas](https://jabara.iamtatsuki05.com/docs/reference/schemas.html): the schemas of the archive index and the comparison report - [Python API](https://jabara.iamtatsuki05.com/docs/reference/api.html): the modules, generated from the docstrings ## Source - [Repository](https://github.com/iamtatsuki05/jabara): the source, the tests, and the examples - [DESIGN.md](https://github.com/iamtatsuki05/jabara/blob/main/DESIGN.md): the data shapes and module boundaries that the code follows - [Agent skill](https://github.com/iamtatsuki05/jabara/blob/main/skills/jabara/SKILL.md): when to use Jabara, the safe order of commands, and the rules that keep a checkpoint from being lost, for an AI agent that runs the `jabara` command - [AGENTS.md](https://github.com/iamtatsuki05/jabara/blob/main/AGENTS.md): notes for an AI agent that changes the Jabara code base ## Optional - [llms-full.txt](https://jabara.iamtatsuki05.com/llms-full.txt): the English documentation in one Markdown file, generated from the sources - [Sitemap](https://jabara.iamtatsuki05.com/sitemap.xml): every page of the site, the documentation included