Model / persist · All operations

Save or load a model

Store, load, export or import a trained model.

Status

In arcform

Not built yet

arcform does not do this yet; it would live in how a Protocol runs. Its place on the roadmap

Shape of the result
a model or a file, not a table
Level
not a step

Variants

Convert a model to another format or code

Turn a trained model into another framework's model, a rule set, SQL, or standalone source code or a container that runs it.

Edit a trained model

Change parts of a trained model in place, such as its trees, bias, labels or appended transformations.

Hold a model in a table

Store a model in a table cell, or unpack a model into rows and pack rows back into a model.

Register or fetch a model in a registry

Register, version, stage, list, download or delete models held in a model registry or hosted model service.

Write or read a model file

Write a trained model to a file, directory or bytes in its own format or PMML, and read it back.

What other tools call it

Meridian's classification; an independent blind rating agreed on 86.2% of 312 rows (exact class, version 2).

Azure Data Factory (1)
Duckle (2)
  • Model Cardread 2026-09-25

    register a trained model card from the upstream row at the end of a successful run

  • Model Cardread 2026-09-25

    read a registered model card back as one row via read_json_auto

KNIME Analytics Platform (18)
mlpack (3)
  • BINread 2026-09-27

    Load or save a model or object in a packed binary format

  • JSONread 2026-09-27

    Load or save a model or object as JSON

  • XMLread 2026-09-27

    Load or save a model or object as XML; documented as possibly very large

RapidMiner Studio (11)
  • Create Modelread 2026-09-27

    Register a new model on an MLflow server

  • Create Model Versionread 2026-09-27

    Create a model version from an MLflow run, which acts as a deployment

  • Delete Modelread 2026-09-27

    Delete a locally stored Huggingface model directory

  • Delete Model (OpenAI)read 2026-09-27

    Delete a fine-tuned OpenAI model by id

  • Download Modelread 2026-09-27

    Download a model from the Huggingface hub to a local directory

  • Get Model Informationread 2026-09-27

    Fetch the details of a registered MLflow model

  • Get Models (OpenAI)read 2026-09-27

    List the models available to the organisation on OpenAI

  • Load Modelread 2026-09-27

    Load a Huggingface model from a local directory

  • Retrieve Modelread 2026-09-27

    Download a model from MLflow into the process

  • Transition Stageread 2026-09-27

    Move a registered MLflow model version to another stage (manual page is blank; from name)

  • Write PMMLread 2026-09-27

    Export a trained model to a PMML 4.0 XML file

Yggdrasil Decision Forests (21)
  • NodeFormatread 2026-09-27

    Enum of tree-node storage formats: BLOB_SEQUENCE and BLOB_SEQUENCE_GZIP

  • deserialize_modelread 2026-09-27

    Rebuild a model from bytes produced by serialize

  • edit_modelread 2026-09-27

    Rename a model's label, weights or file prefix, or strip it to pure serving

  • from_sklearnread 2026-09-27

    Convert a scikit-learn tree, forest, boosting or isolation-forest model to a YDF model

  • Load a TensorFlow Decision Forests SavedModel as a YDF model

  • Read or overwrite the model bias added before any tree

  • load_modelread 2026-09-27

    Load a YDF model directory, or a TensorFlow Decision Forests SavedModel, from disk

  • saveread 2026-09-27

    Write the model as a directory of protobuf files; pure_serving drops training metadata

  • serializeread 2026-09-27

    Return the model as bytes, equivalent to a saved directory

  • set_node_formatread 2026-09-27

    Choose the on-disk node encoding: BLOB_SEQUENCE or BLOB_SEQUENCE_GZIP

  • Replace, append or delete a tree in a trained model

  • to_cppread 2026-09-27

    Generate a C++ header that loads the model and runs it on the YDF C++ library

  • to_dockerread 2026-09-27

    Write a directory with a Dockerfile, the model and support files to serve it over HTTP

  • to_jax_functionread 2026-09-27

    Convert the model to a JAX function, optionally with parameters open to fine-tuning

  • to_standalone_ccread 2026-09-27

    Generate dependency-free C++ source with the trees compiled in as routing or if-else code

  • to_standalone_javaread 2026-09-27

    Generate dependency-free Java source with the model compiled in

  • to_tensorflow_functionread 2026-09-27

    Wrap the model as a callable TensorFlow module

  • Export the model as a TensorFlow SavedModel for TF Serving or Vertex AI

  • update_with_jax_paramsread 2026-09-27

    Write parameters fine-tuned in JAX back into the model

  • write_embedread 2026-09-27

    Read a model directory and write standalone C++ or Java source with the model compiled in

  • ydf.tree (group)read 2026-09-27

    20 classes to read and build trees: Tree, 3 node, 10 condition and 5 value classes, PlotOptions

Background

In scikit-learn, persisting a trained model keeps it for future use without having to retrain it.[1] Serialization translates an object's state into a format that can be stored or transmitted and reconstructed later.[2] The Predictive Model Markup Language (PMML) is an XML-based format for describing and exchanging predictive models between applications.[3]

When to use it

In scikit-learn, choosing a persistence method starts from whether the Python object is needed again or the model is only served for predictions.[1] The Python pickle module is not secure, and only data that is trusted should be unpickled.[4] In scikit-learn, pickle, joblib and cloudpickle all use the pickle protocol, so loading a file saved by any of them can execute arbitrary code.[1] Treat a saved model file as code rather than data: load one only from a source you trust. (Meridian's view)

scikit-learn has no supported way to load a model trained with a different version of scikit-learn.[1] To rebuild a similar model under a later scikit-learn version, scikit-learn advises saving a reference to the training data, the source code, the dependency versions and the cross-validation score alongside the model.[1] Keep a note of the library versions that wrote a model next to the model itself. (Meridian's view)

The MLflow Model Registry tracks the versions of each registered model and links each version to the MLflow run, logged model or notebook that produced it.[5] When more than one version of a model is in use, keep them in a registry rather than in loose files, so each result can be traced to the version that produced it. (Meridian's view)

The method

Deserialization is the opposite of serialization: it extracts a data structure from a series of bytes.[2] Serialization of objects does not include the methods they were linked with.[2] In scikit-learn, a model saved with skops.io, pickle, joblib or cloudpickle should be loaded in a Python environment with the same packages and versions it was trained in.[1]

In mlpack, a model is saved with Save() and loaded with Load(), and serialization is done by the cereal serialization toolkit in binary, JSON or XML.[6] In mlpack, objects in the binary format may be an order of magnitude or more smaller than JSON, while JSON and XML files are human-readable but may be quite large.[6] Yggdrasil Decision Forests (YDF) saves a model in a proprietary format of multiple files in a single directory.[7] In YDF, a model serialized to bytes is equivalent to one saved to a directory.[7] In YDF, saving with pure_serving removes training-specific metadata and debug information, so the model on disk is smaller.[7]

PMML was conceived by Robert Lee Grossman, then the director of the National Center for Data Mining at the University of Illinois at Chicago.[3] PMML version 0.9 was published in 1998, and later versions have been developed by the Data Mining Group.[3] A PMML file's components include a header, a data dictionary, data transformations, the model and a mining schema.[3] The Open Neural Network Exchange (ONNX) is an open-source ecosystem that sets open standards to enable a standard format for representing machine learning models.[8] ONNX was announced by Facebook and Microsoft in September 2017.[8]

Compared with the alternatives

In scikit-learn, ONNX lets a model be served without a Python environment, but the original Python object is lost and cannot be reconstructed.[1] In scikit-learn, not all models are supported by ONNX.[1] In RapidMiner, the Write PMML operator supports a listed set of model kinds, among them decision trees, rule models and linear and logistic regression models.[9] An exchange format such as PMML or ONNX trades coverage for portability, so check that the model kind is supported before relying on one. (Meridian's view)

In scikit-learn, skops.io loads only files whose types and functions are trusted by default or by the user, which makes it more secure than pickle, joblib and cloudpickle.[1] In MLflow, a registered model has a unique name and holds versions, aliases, tags and other metadata.[5]