Expand description
Axonml Serialize - Model Serialization for Axonml ML Framework
§File
crates/axonml-serialize/src/lib.rs
§Author
Andrew Jewell Sr - AutomataNexus
§Updated
March 8, 2026
§Disclaimer
Use at own risk. This software is provided “as is”, without warranty of any kind, express or implied. The author and AutomataNexus shall not be held liable for any damages arising from the use of this software.
Structs§
- Checkpoint
- A complete training checkpoint.
- Checkpoint
Builder - Builder for creating checkpoints.
- State
Dict - State dictionary for storing model parameters.
- State
Dict Entry - An entry in the state dictionary.
- Tensor
Data - Serializable tensor data.
- Training
State - Training state for checkpointing.
Enums§
- Format
- Supported serialization formats.
- Onnx
OpType - ONNX operator type mapping.
Functions§
- convert_
from_ pytorch - Convert a state dict from
PyTorchnaming conventions. - detect_
format - Detect the format from a file path based on extension.
- detect_
format_ from_ bytes - Detect format from file contents (magic bytes).
- from_
onnx_ shape - Convert from ONNX shape (handling -1 for dynamic dimensions).
- from_
pytorch_ key - Convert a PyTorch-style key to Axonml format.
- load_
checkpoint - Load a training checkpoint.
- load_
state_ dict - Load a state dictionary from a file.
- pytorch_
layer_ mapping - Map of
PyTorchlayer names to Axonml equivalents. - save_
checkpoint - Save a complete training checkpoint.
- save_
model - Save a model’s state dictionary to a file.
- save_
state_ dict - Save a state dictionary to a file with specified format.
- to_
onnx_ shape - Convert a shape to ONNX format (with batch dimension handling).
- to_
pytorch_ key - Convert a Axonml key to
PyTorchformat. - transpose_
linear_ weights - Transpose weights if needed for format conversion.