ggml_marshal_model: Marshal a ggmlR model to an in-memory container

View source: R/mlr3_marshal.R

ggml_marshal_modelR Documentation

Marshal a ggmlR model to an in-memory container

Description

Serializes a trained sequential or functional ggmlR model into a self-describing raw container suitable for transport between R sessions or parallel workers (e.g. for mlr3 parallel resampling and tuning).

Usage

ggml_marshal_model(model)

Arguments

model

A compiled ggml_sequential_model or ggml_functional_model.

Details

The container wraps the bytes produced by ggml_save_model together with a format tag, schema version, package/R versions, a SHA-256 integrity checksum, and a timestamp. Autograd modules are not supported in this version and cause the function to signal an error; the mlr3 learners catch this and fall back to marshaled = FALSE.

Value

A named list with class "ggmlR_marshaled" containing the serialized payload and metadata. Pass it to ggml_unmarshal_model to reconstruct the model.

See Also

ggml_unmarshal_model, ggml_save_model


ggmlR documentation built on July 14, 2026, 1:08 a.m.