Learn R Programming

ggmlR (version 0.8.1)

ggml_marshal_model: 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)

Value

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

ggml_unmarshal_model to reconstruct the 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.

See Also

ggml_unmarshal_model, ggml_save_model