TECHNOLOGY

Saving TabICL estimators: pretrained weights, training rows and KV cache are separate artifacts

In this article
THE QUICK TAKE

Excluding raw training rows from a saved estimator does not mean excluding every representation derived from its fitted context.

Identify what must survive serialization

A fitted TabICL estimator contains more than a generic pretrained weight identifier. Its prediction problem also depends on prepared context and associated state. The project saving example exposes separate choices for weights, training data and KV cache. Treat these as different artifacts with different restoration requirements. One small pickle file can still rely on an external checkpoint or retain dataset-derived representations that are essential to future predictions.

Separate embedded weights from checkpoint references

The serialization implementation can include pretrained weights or reload them from a checkpoint when the estimator is restored. Omitting weights reduces file size but does not make their future availability or revision irrelevant. Preserve the intended checkpoint identity and a compatible runtime. A saved estimator should be called self-contained only when the required model state and supported restoration dependencies are actually present.

Preserve an available context path

The save contract permits excluding training rows only when the needed cache exists and is saved, because prediction requires a valid representation of labeled context. The model implementation maintains that cache as model state. Excluding one raw-data representation is different from eliminating all information derived from the dataset. Describe the file’s actual contents and purpose rather than treating a save flag as proof that the artifact contains no context-related state.

Keep cache compatibility tied to the fit

Context representations belong to the fitted schema, preparation settings, labeled examples and model implementation. They cannot be attached indiscriminately to a different dataset because the pretrained family name matches. The TabPFN cache guide provides a related distinction. Record cache provenance with the release so a restored estimator uses the intended inference problem, instead of mixing new feature preparation with old context representations.

Verify restoration in a clean local process

Compare a reviewed prediction before and after restoration, covering the supported combinations of included weights and context state. The artifact-manifest guide supports packaging. Inspect the resulting dependency inventory and file contents according to the chosen options; do not infer them from file size alone. Serialization succeeds when the intended state is restored and its predictions remain consistent, preserving the difference between smaller packaging, removed raw rows and absence of dataset-derived information.

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