Export to GGUF
CLI Equivalent: apr export --format gguf
What This Demonstrates
Converts an .apr model to the GGUF format used by llama.cpp and related inference engines, mapping APR tensor layouts and quantization schemes to their GGUF equivalents.
Run
cargo run --example format_export_gguf
Key APIs
AprModel::load(path)— Load a native.aprmodel from diskGgufExporter::new(&model)— Create an exporter targeting GGUF.with_quantization(GgufQuantType::Q4_0)— Apply GGUF-native quantization during export.export(output_path)— Write the.gguffile with architecture metadata and tensors