pub struct TRMConfig {
pub hidden_size: usize,
pub h_cycles: usize,
pub l_cycles: usize,
pub l_layers: usize,
pub num_heads: usize,
pub expansion: f32,
pub pos_encodings: String,
pub mlp_t: bool,
pub halt_max_steps: usize,
pub dropout: f32,
pub vocab_size: usize,
pub num_outputs: usize,
}Expand description
Configuration for Tiny Recursive Model
Based on TinyRecursiveReasoningModel_ACTV1Config from the Python implementation.
Fields§
Embedding/hidden dimension
h_cycles: usizeNumber of high-level reasoning cycles
l_cycles: usizeNumber of low-level update cycles per H-cycle
l_layers: usizeNumber of layers in L-level (low-level) blocks
num_heads: usizeNumber of attention heads
expansion: f32FFN expansion factor (hidden_size * expansion)
pos_encodings: StringPositional encoding type: “rope”, “learned”, or “none”
mlp_t: boolUse MLP instead of transformer (smaller, faster)
halt_max_steps: usizeMaximum steps for ACT halting
dropout: f32Dropout probability
vocab_size: usizeVocabulary size (for embeddings)
num_outputs: usizeNumber of output classes/tokens
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TRMConfig
impl<'de> Deserialize<'de> for TRMConfig
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TRMConfig
impl RefUnwindSafe for TRMConfig
impl Send for TRMConfig
impl Sync for TRMConfig
impl Unpin for TRMConfig
impl UnwindSafe for TRMConfig
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> 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>
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