pub struct SoarConfig {
pub num_secondary: usize,
pub selective: bool,
pub spill_threshold: f32,
}Expand description
Configuration for SOAR (Spilling with Orthogonality-Amplified Residuals)
Fields§
§num_secondary: usizeNumber of secondary cluster assignments. Current trained generations use the published two-assignment objective, so builders clamp this to one secondary.
selective: boolUse selective spilling (only spill vectors near cluster boundaries)
spill_threshold: f32Positive values are calibrated residual-norm thresholds. A negative value requests build-time calibration to the corresponding spill fraction; trained artifacts always persist a positive threshold. This tagged representation preserves the serialized structure layout.
Implementations§
Source§impl SoarConfig
impl SoarConfig
Sourcepub fn with_secondary(num_secondary: usize) -> Self
pub fn with_secondary(num_secondary: usize) -> Self
Create SOAR config with specified number of secondary assignments
Sourcepub fn target_spill_fraction(self, fraction: f32) -> Self
pub fn target_spill_fraction(self, fraction: f32) -> Self
Calibrate selective spilling during training to at most a target fraction of vectors receiving one secondary assignment.
Sourcepub fn full() -> Self
pub fn full() -> Self
Full spilling (no selectivity) - assigns all vectors to secondary clusters
Sourcepub fn aggressive() -> Self
pub fn aggressive() -> Self
Compatibility alias for full one-secondary spilling. The generalized multi-secondary objective is intentionally not exposed until it is implemented and validated.
Trait Implementations§
Source§impl Clone for SoarConfig
impl Clone for SoarConfig
Source§fn clone(&self) -> SoarConfig
fn clone(&self) -> SoarConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SoarConfig
impl Debug for SoarConfig
Source§impl Default for SoarConfig
impl Default for SoarConfig
Source§impl<'de> Deserialize<'de> for SoarConfig
impl<'de> Deserialize<'de> for SoarConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for SoarConfig
impl RefUnwindSafe for SoarConfig
impl Send for SoarConfig
impl Sync for SoarConfig
impl Unpin for SoarConfig
impl UnsafeUnpin for SoarConfig
impl UnwindSafe for SoarConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more