TECHNOLOGY

ONNX external data: release the graph and relative tensor files together

In this article
THE QUICK TAKE

An ONNX graph that references external tensors is a multi-file artifact; its relative paths and byte ranges belong to the release.

A small graph file hides a large dependency

A container image contains the expected model file, but loading fails after moving it into a different directory. The graph may be intact while the external tensor file stayed behind. Treat this as an artifact-layout failure before assuming the GPU lacks memory. External storage separates tensor bytes from the serialized graph; it does not make those bytes optional or authorize a loader to substitute another file with a similar name.

Relative locations are part of tensor identity

The external data specification describes a location relative to the model directory, with optional byte offsets and lengths. Preserve that directory relationship during packaging. A shared tensor file can contain several ranges, so merely confirming that the file exists is insufficient: its contents must belong to the same export. Avoid independently updating graph and weight files through mutable deployment paths that expose an intermediate mismatched state.

Loading APIs need the intended base directory

The external data helper API exposes operations for loading and converting external data. Review which step resolves files and which step changes the in-memory representation. Loading a graph without materializing tensor bytes is useful for inspection, but it is not proof that the final package can run. The release-manifest guide provides a comparable reason to identify every required companion artifact rather than only the principal filename.

Structural checks have a scope

The ONNX checker API documents model validation. Run checks against the packaged location with the intended files available, then load and evaluate the model in the deployment environment. Keep a separate digest inventory of graph and data files. An optional checksum field in a format does not establish that every consumer automatically verifies your chosen release policy. Specify the verification procedure rather than inferring it from the presence of metadata.

Publish a coherent directory snapshot

Stage a complete immutable directory, validate it, and only then switch the active release reference. A rollback must restore the matching graph and tensor files together. Use artifact signature verification to bind this directory inventory to the reviewed release. A useful failure report includes the resolved model directory and missing or mismatched relative dependency, while excluding confidential tensor contents. This narrows diagnosis without treating storage packaging and numerical correctness as the same check.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles