oa::ModelFile
A complete OA model file loaded in memory. `ModelFile` owns model configuration, named weights, persistent state, optimizer state, and training progress. `load()` and `save()` implement the native `.oam` wire format. External formats are imported by `oa::ModelTranslator`; they are not alternative representations of this type.
Public Methods
void oa::ModelFile::addState(const char * inName, oa::ScalarType inDtype, oa::Span<const oa::U64> inShape, const void * inData, oa::U64 inBytes)void oa::ModelFile::addWeight(const char * inName, oa::ScalarType inDtype, oa::Span<const oa::U64> inShape, const void * inData, oa::U64 inBytes)Static Public Methods
Public Data Members
adamMVectorfieldadamVVectorfieldarchConfigVectorfieldconfigModelFileConfigfieldformatVersionoa::U32fieldoptimizerModelOptimizerStatefieldoptimizerPresentoa::BoolfieldprogressModelTrainingProgressfieldstateBlobVectorfieldstateIndexVectorfieldweightBlobVectorfieldweightIndexVectorfieldPublic Method Documentation
No public source comment is attached to this declaration.
Parameters
inNameconst char *—
inDtypeoa::ScalarType—
inShapeoa::Span<const oa::U64>—
inDataconst void *—
inBytesoa::U64—
Returns
voidThe declared return value.
No public source comment is attached to this declaration.
Parameters
inNameconst char *—
inDtypeoa::ScalarType—
inShapeoa::Span<const oa::U64>—
inDataconst void *—
inBytesoa::U64—
Returns
voidThe declared return value.
No public source comment is attached to this declaration.
Parameters
inNameconst char *—
Returns
const ModelTensorEntry *The declared return value.
No public source comment is attached to this declaration.
Parameters
inNameconst char *—
Returns
const ModelTensorEntry *The declared return value.
No public source comment is attached to this declaration.
Returns
boolThe declared return value.
No public source comment is attached to this declaration.
Returns
boolThe declared return value.
No public source comment is attached to this declaration.
Returns
boolThe declared return value.
upload one encoded weight as the same semantic value consumed by the fused vkDNN MatMulNt path. Dense entries fail closed.
Parameters
inEngineoa::Engine &—
inNameconst char *—
Returns
oa::Result<oa::QuantMatrix>The declared return value.
Produce a weight-only inference artifact. Dense Float32 tensors with rank >= 2 become native OA Q4/Q8 blocks; scalar/vector weights and all state remain dense. Optimizer state is deliberately removed.
Parameters
inQuantizationoa::Quantization—
Returns
oa::Result<ModelFile>The declared return value.
No public source comment is attached to this declaration.
Parameters
inPathconst oa::String &—
Returns
oa::StatusThe declared return value.
No public source comment is attached to this declaration.
Parameters
inNameconst char *—
Returns
const void *The declared return value.
No public source comment is attached to this declaration.
Parameters
inNameconst char *—
Returns
void *The declared return value.
No public source comment is attached to this declaration.
Parameters
inNameconst char *—
Returns
const void *The declared return value.
No public source comment is attached to this declaration.
Parameters
inPathconst oa::String &—
Returns
oa::Result<ModelFile>The declared return value.