Skip to main content

build_model

Function build_model 

Source
pub fn build_model(spec: &TrainSpec) -> Result<Model>
Expand description

Build a model from configuration by loading from file

Loads the model from the path specified in the TrainSpec. Supports:

  • SafeTensors (.safetensors) - HuggingFace compatible binary format
  • JSON (.json) - Entrenar serialization format
  • YAML (.yaml, .yml) - Entrenar serialization format

Falls back to demo mode (simple MLP) if the model file doesn’t exist, to support testing and demonstration workflows.