module
serialization
6 memberslucid.serializationlucid.serialization: save and load tensors and modules.
The wire format goes through the engine's to_bytes / from_bytes
contract — no numpy round-trip, so checkpoints can be loaded in a
numpy-free environment. Format version 3 records the dtype as the
canonical Lucid name ("float32", "int64", …) instead of the
numpy str(arr.dtype) it used in v1/v2.
Functions
fn
save→ NoneSerialise obj to a Lucid-format checkpoint file.
fn
load→ objectLoad an object saved by save or save_safetensors.
fn
save_sharded→ NoneSave obj as a sharded, self-describing checkpoint directory.
fn
load_sharded→ OrderedDict or objectLoad a sharded checkpoint directory written by save_sharded.
fn
save_safetensors→ NoneSave a flat state dict as a SafeTensors file.
fn
load_safetensors→ dict of str to TensorLoad a SafeTensors file into a flat state dict.