Expand description
Aprender Package Resource (.apr) model format.
Per spec Section 4.1: The .apr format is a compact, portable container for trained AI behaviors that can be hot-swapped like trading cards.
§File Structure
┌─────────────────────────────────────────────────────────────┐
│ .APR File Structure │
├─────────────────────────────────────────────────────────────┤
│ Magic Number: "APNR" (4 bytes) │
│ Version: u16 (2 bytes) │
│ Checksum: CRC32 (4 bytes) │
├─────────────────────────────────────────────────────────────┤
│ Metadata (CBOR encoded): │
│ - name, version, author, license │
│ - difficulty_levels, input_schema, output_schema │
├─────────────────────────────────────────────────────────────┤
│ Model Data (compressed): │
│ - weights: [f32; N] │
│ - biases: [f32; M] │
│ - architecture: string │
└─────────────────────────────────────────────────────────────┘Structs§
- AprFile
- Parsed APR file
- AprMetadata
- Metadata for an APR model
- AprModel
- A complete APR model with metadata and data
- Model
Data - Neural network weights and architecture
Enums§
- AprError
- Errors that can occur when working with APR models
- Model
Architecture - Network architecture specification
Constants§
- APR_
MAGIC - Magic number for APR files
- APR_
VERSION - Current APR version
- CURRENT_
VERSION - Current model version
- MAX_
MODEL_ SIZE - Maximum allowed model size (1 MB per spec Section 9.1)
- MIN_
SUPPORTED_ VERSION - Minimum model version supported