Skip to main content

Module ttt

Module ttt 

Source
Expand description

Test-Time Training (TTT) Module

Implements research-valid test-time training that adapts the model to the input distribution BEFORE generation using next-token prediction loss on the input context itself.

§Research Foundation

Based on TTT-E2E (arxiv.org/abs/2512.23675) and TLM approaches:

  • Train on INPUT context (not model outputs)
  • Use next-token prediction loss (not confidence heuristics)
  • Adapt BEFORE generation (not after)

§Key Difference from SelfSupervisedTrainer

AspectSelfSupervised (old)TTT (this)
WhenAfter generationBefore generation
DataModel outputsUser inputs
LossConfidence heuristicNTP cross-entropy
WeightsPermanent LoRAScratch (temporary)

Structs§

GradientGatingConfig
Per-layer gradient gating configuration.
NoOpVerifier
No-op verifier that always accepts adaptation
RankOracle
Per-tenant rank adaptation oracle.
RankOracleConfig
Configuration for runtime rank adaptation oracle.
TTTConfig
Configuration for Test-Time Training
TTTContext
Context for TTT adaptation (for future cross-model verification)
TTTOverrides
Per-request TTT overrides from the client
TTTResult
Result of TTT adaptation
TestTimeTrainer
Test-Time Trainer

Traits§

TTTVerifier
Trait for TTT verifiers (future extension)