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
| Aspect | SelfSupervised (old) | TTT (this) |
|---|---|---|
| When | After generation | Before generation |
| Data | Model outputs | User inputs |
| Loss | Confidence heuristic | NTP cross-entropy |
| Weights | Permanent LoRA | Scratch (temporary) |
Structs§
- Gradient
Gating Config - Per-layer gradient gating configuration.
- NoOp
Verifier - No-op verifier that always accepts adaptation
- Rank
Oracle - Per-tenant rank adaptation oracle.
- Rank
Oracle Config - 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
- Test
Time Trainer - Test-Time Trainer
Traits§
- TTTVerifier
- Trait for TTT verifiers (future extension)