Versioning and format stability
This page describes how kLLM versions are numbered, which interfaces a version number covers, and how the formats of sealed checkpoints and key files are identified.
Version numbers
kLLM intends to follow Semantic Versioning. A version has the form
MAJOR.MINOR.PATCH:
MAJORincreases for incompatible changes to a stable interface;MINORincreases for new, backward-compatible functionality;PATCHincreases for backward-compatible fixes.
Development versions carry a .devN suffix, as defined by
PEP 440. The version is set in pyproject.toml and in
src/kllm/__init__.py, and kllm version prints it:
$ kllm version
kllm 0.1.0.dev0
A release is a Git tag of the form vMAJOR.MINOR.PATCH. The release workflow builds the
package for each such tag and publishes it to PyPI.
Note
No version has been tagged or published on PyPI yet. pip install kllm becomes available
with the first tagged release; until then, install from a source checkout. See
Installation guide.
Pre-1.0 status
kLLM is in its 0.x series. Following Semantic Versioning, a 0.x minor release may contain incompatible changes. kLLM’s intent for the 0.x series is:
a patch release does not change the command-line interface, the environment variables or the sealed-checkpoint and key-file formats in an incompatible way;
a minor release may change them; the release notes then state the change and the action it requires, such as resealing a model;
a development version (
.devN) carries no compatibility commitment.
The interfaces that a version number covers are:
Interface |
Reference |
|---|---|
The |
|
The environment variables that kLLM reads or sets |
|
The |
|
The layout of sealed checkpoints and the key-file format |
This page and Sealed checkpoint format |
Other Python modules of the kllm package are internal. They may change in any release
before 1.0.
The engine extras require SGLang 0.5 or later (serve) and vLLM 0.11 or later (vllm).
The published measurements were made with SGLang 0.5.21 and vLLM 0.31.0. A new engine release
can change engine behavior independently of kLLM’s version.
Sealed-format compatibility
Every artifact that kLLM writes carries an explicit format identifier. kLLM checks the identifier before it uses the artifact and refuses an artifact whose identifier it does not recognize, instead of serving it incorrectly.
Artifact |
Identifier in 0.1.0.dev0 |
Where it is recorded |
|---|---|---|
Sealed LLM |
scheme |
|
Sealed MiniMax H3 pipeline |
scheme |
|
Keyed Z-Image pipeline |
scheme |
|
Client-keyed Z-Image pipeline |
scheme |
|
Encrypted tokenizer and trusted tensors |
magic bytes |
The first bytes of |
Key file |
|
The JSON key file, by default |
The checks in 0.1.0.dev0 behave as follows:
kllm serve --keyserves only sealed LLMs and MiniMax H3 pipelines with schemel1. For any other scheme it stops with a message that names the scheme. A model sealed for client-keyed mode is directed tokllm serve --client.A model sealed under a different key is refused; the message names both key fingerprints.
A
trusted.kllmfile without theKLLMBLOB1magic is rejected as not being a kLLM trusted blob. A modified, reordered or truncated file fails authentication and is rejected.A key file whose
formatis notkllm-keyor whoseversionis not1is rejected as not being a kLLM v1 key file.
Everything secret in a sealed model is derived from the 256-bit key with HKDF-SHA256 and the
salt kllm/v1. A change to the transforms or to this derivation changes the sealed weights
that a given key produces.
kLLM’s intent for format changes is:
a change that alters how an existing artifact must be read, including a change to the transforms or to the key derivation, receives a new identifier; an existing identifier does not change its meaning;
key files of version 1 remain loadable, so that a model can be resealed under the same key after a format change;
when a minor release stops accepting an identifier, the release notes say so, and the model is resealed from its original checkpoint with
kllm seal.
Important
Keep the original checkpoint and the key file. Resealing requires both. Without the key file and its passphrase, a sealed model cannot be served, and kLLM provides no way to recover a lost key.
A sealed checkpoint does not record the kLLM version or the engine version that produced or served it. The engine loads a sealed LLM with its stock model class, so an engine upgrade does not change the sealed format; the engine must still support the model architecture.
Note
Part of the upcoming 0.2 line: a store record per model in the local store
(.DIRECTORY.kllm-store.json, next to the model directory), which records the source
repository and revision, the digest of every file and, for a sealed model, the transform
and key fingerprint (Store record and manifests). A catalog model also carries its published
kllm-manifest.json, which records the kLLM version that built it. Recording the
engine version and a test report is planned. See Roadmap.