Installation

Jabara needs Python 3.10 or newer. It is not on PyPI yet, so install it from a clone into a virtual environment. Outside one, pip install . stops with externally-managed-environment on a Python that your operating system or Homebrew manages.

With uv, uv sync creates .venv and installs the locked dependencies of the core and of each extra that you name with --extra. --no-dev leaves out the test tools:

$ git clone https://github.com/iamtatsuki05/jabara
$ cd jabara
$ uv sync --no-dev --extra torch
$ source .venv/bin/activate

With pip, create and activate the virtual environment, then install:

$ git clone https://github.com/iamtatsuki05/jabara
$ cd jabara
$ python -m venv .venv
$ source .venv/bin/activate
$ pip install ".[torch]"

On Windows, run .venv\Scripts\activate in place of the source line. Later pages assume that the environment is active. With uv, you can instead start each command with uv run.

The core depends on numpy, zstandard, and pydantic. It does not import torch and needs no GPU.

Optional extras

Each optional feature needs its extra. Name it after --extra for uv, or in brackets for pip. uv sync --no-dev --extra hf --extra zipnn and pip install ".[hf,zipnn]" install the same two extras.

Extra

Installs

Needed for

torch

torch

jabara.torch (save_state, load_state), the names and roles of the tensors of a torch.save file when jabara compress or jabara bench reads one (without it they are storage/<key> with the role other), and jabara decompress of an archive that Jabara 0.1.0 wrote from a torch file

hf

torch, transformers, accelerate

jabara.hf, the Hugging Face Trainer adapter

lightning

torch, lightning

jabara.lightning, the PyTorch Lightning plugin

zipnn

zipnn

the zipnn/1 codec, which raises MissingDependencyError without it (jabara bench skips it with a notice on stderr)

yaml

pyyaml

--config with a .yaml or .yml file; without it the command prints how to install it and exits with status 1 (see Run from a config file)

hdf5

h5py

jabara compress and jabara bench on HDF5 files (*.h5, *.hdf5, a Keras *.weights.h5) and Keras *.keras files; without it they exit with status 1 and name the extra

Check the installation

jabara codecs lists the registered codecs:

$ jabara codecs
bytegroup-zstd/1
quant8-linear/1
quant8-log/1
raw/1
sub-delta/1
xor-delta/1
zipnn/1
zstd/1

Develop Jabara

uv sync in the clone installs the locked dependencies of the dev group, which holds the packages of every extra and the test tools. uv run tox runs the tests, Ruff, and mypy.

Next, follow the Tutorial: compress and restore a checkpoint.