Expand description
Core types and inference engine for irithyll streaming ML models.
irithyll-core provides loss functions, observation traits, a compact binary
format, and branch-free traversal for deploying trained SGBT models on
embedded targets (Cortex-M0+, 32KB flash).
§Features
- Loss functions — squared, logistic, Huber, softmax, expectile, quantile
- Observation trait — zero-copy training interface with
SampleRef - 12-byte packed nodes — 5 nodes per 64-byte cache line
- Zero-copy
EnsembleView— constructed from&[u8], no allocation after validation - Branch-free traversal —
cmov/cselchild selection, no pipeline stalls #![no_std]— zero mandatory dependencies, runs on bare metal
§Usage
ⓘ
use irithyll_core::{EnsembleView, FormatError};
// Load packed binary (e.g. from flash, file, or network)
let packed_bytes: &[u8] = &[/* exported via irithyll::export_embedded() */];
let view = EnsembleView::from_bytes(packed_bytes)?;
let prediction = view.predict(&[1.0f32, 2.0, 3.0]);Re-exports§
pub use error::FormatError;pub use packed::EnsembleHeader;pub use packed::PackedNode;pub use packed::TreeEntry;pub use packed_i16::PackedNodeI16;pub use packed_i16::QuantizedEnsembleHeader;pub use view::EnsembleView;pub use view_i16::QuantizedEnsembleView;pub use loss::Loss;pub use loss::LossType;pub use sample::Observation;pub use sample::SampleRef;
Modules§
- error
- Minimal error types for the packed binary format.
- loss
- Loss functions for gradient boosting.
- math
- Platform-agnostic f64 math operations.
- packed
- 12-byte packed node format and ensemble binary layout.
- packed_
i16 - 8-byte quantized packed node format for integer-only inference.
- quantize
- f64 → f32 quantization utilities for packed export.
- sample
- Core observation trait and zero-copy sample types.
- traverse
- Branch-free tree traversal for packed nodes.
- traverse_
i16 - Branch-free tree traversal for quantized i16 packed nodes.
- view
- Zero-copy, zero-alloc inference view over a packed ensemble binary.
- view_
i16 - Zero-copy, zero-alloc inference view over a quantized (int16) ensemble binary.