Skip to main content

Overview

A .thx file is a JSON document with a CRC32 integrity seal. It is self-contained: everything needed to run inference — architecture, weights, resolved constants, target metadata — is in the file. No Python environment, no original model object. The format is human-readable in principle (it is JSON), but weights are base64-encoded little-endian f32 arrays. Use thrindex doctor --check model.thx --verbose to inspect the artifact in a human-readable form.

Structure

Fields

Layer types

Dense LIF Conv2d

The CRC32 seal

The CRC32 is computed over the serialized JSON body with the crc32 field set to "00000000" (a placeholder). After serialization, the CRC32 is computed and the placeholder is replaced with the hex digest. Verification: thrindex doctor --check model.thx recomputes the CRC32 and compares. Any byte-level modification to the artifact body fails this check with [E0004].

Format versioning policy

  • Format versions are integers with an m prefix: m1, m2, m3.
  • New fields are additive. A m3 reader can load an m2 artifact by filling new fields with defaults.
  • Removed fields are a breaking change and require a new major format version.
  • The current production format is m3.
  • m2 artifacts are read-only supported (can be run but not produced by THRINDEX 0.2).

Inspecting an artifact