pub struct TTTResult {Show 22 fields
pub avg_loss: f32,
pub loss_improvement: f32,
pub steps_performed: usize,
pub adaptation_time_ms: u64,
pub skipped: bool,
pub skip_reason: Option<String>,
pub avg_grad_norm: f32,
pub max_grad_norm: f32,
pub gradient_clipped: bool,
pub tokens_used: usize,
pub tokens_provided: usize,
pub was_truncated: bool,
pub initial_perplexity: f32,
pub final_perplexity: f32,
pub recommendation: bool,
pub gated_steps: usize,
pub pending: bool,
pub time_used_ms: u64,
pub time_budget_ms: u64,
pub rank_utilization: HashMap<String, f64>,
pub gated_layers: Vec<String>,
pub rank_signals: HashMap<String, RankSignal>,
}Expand description
Result of TTT adaptation
Fields§
§avg_loss: f32Average loss across gradient steps
loss_improvement: f32Loss improvement (initial - final)
steps_performed: usizeNumber of gradient steps actually performed
adaptation_time_ms: u64Time spent on TTT (milliseconds)
skipped: boolWhether adaptation was skipped (input too short, etc.)
skip_reason: Option<String>Reason for skipping (if skipped)
avg_grad_norm: f32Average gradient norm across steps
max_grad_norm: f32Maximum gradient norm observed
gradient_clipped: boolWhether gradients were clipped
tokens_used: usizeNumber of tokens actually used for adaptation (after truncation)
tokens_provided: usizeTotal tokens provided in input
was_truncated: boolWhether input was truncated (exceeded max_ttt_context)
initial_perplexity: f32Initial perplexity before adaptation (exp(initial_loss))
final_perplexity: f32Final perplexity after adaptation (exp(final_loss))
recommendation: boolServer’s recommendation: true = commit, false = rollback
gated_steps: usizeNumber of steps determined by perplexity gating
pending: boolWhether adaptation is pending client commit/rollback
time_used_ms: u64Wall-clock time used for adaptation (milliseconds)
time_budget_ms: u64Time budget that was enforced (milliseconds).
Client can derive timed_out = time_used_ms >= time_budget_ms.
rank_utilization: HashMap<String, f64>Per-key rank utilization from this adaptation (empty if skipped)
gated_layers: Vec<String>Layers gated (gradients frozen) during this adaptation
rank_signals: HashMap<String, RankSignal>Rank adaptation signals from this evaluation (empty if not evaluated)
Implementations§
Trait Implementations§
Source§impl From<TTTResult> for TTTMetrics
impl From<TTTResult> for TTTMetrics
Auto Trait Implementations§
impl Freeze for TTTResult
impl RefUnwindSafe for TTTResult
impl Send for TTTResult
impl Sync for TTTResult
impl Unpin for TTTResult
impl UnsafeUnpin for TTTResult
impl UnwindSafe for TTTResult
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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