pub struct TrainingFreeLoopConfig {
pub window_start: usize,
pub window_end: usize,
pub loop_count: usize,
pub strategy: SubStepStrategy,
pub iteration_mode: IterationMode,
pub cache_strategy: CacheStrategy,
}Expand description
Configuration for training-free loop wrapper (Plan 136).
Pure inference-time retrofit: re-applies a contiguous mid-stack block of layers with ODE-motivated damped sub-stepping. No training needed.
Fields§
§window_start: usizeStart of the loop window (inclusive layer index).
window_end: usizeEnd of the loop window (inclusive layer index).
loop_count: usizeNumber of loop iterations (K in the paper).
strategy: SubStepStrategySub-step integration strategy.
iteration_mode: IterationModeIteration mode (block vs layer-wise).
cache_strategy: CacheStrategyKV cache write strategy.
Implementations§
Source§impl TrainingFreeLoopConfig
impl TrainingFreeLoopConfig
Sourcepub fn from_config(config: &Config) -> Self
pub fn from_config(config: &Config) -> Self
Creates a config with sensible defaults for a given Config.
Window heuristic: center at 48% depth, ±1 layer. For small models (≤4 layers), defaults to (0, n_layer−1). Uses the paper-recommended K-stage RK strategy with β=0.5.
Trait Implementations§
Source§impl Clone for TrainingFreeLoopConfig
impl Clone for TrainingFreeLoopConfig
Source§fn clone(&self) -> TrainingFreeLoopConfig
fn clone(&self) -> TrainingFreeLoopConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TrainingFreeLoopConfig
impl Debug for TrainingFreeLoopConfig
Auto Trait Implementations§
impl Freeze for TrainingFreeLoopConfig
impl RefUnwindSafe for TrainingFreeLoopConfig
impl Send for TrainingFreeLoopConfig
impl Sync for TrainingFreeLoopConfig
impl Unpin for TrainingFreeLoopConfig
impl UnsafeUnpin for TrainingFreeLoopConfig
impl UnwindSafe for TrainingFreeLoopConfig
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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