Expand description
Per-tenant LoRA delta for isolated Test-Time Training
Each tenant gets their own LoRA delta (A/B weight matrices) that accumulates adaptations across requests. Deltas are trained via SGD and can be persisted to content-addressed storage or merged into permanent adapter files.
Structs§
- Layer
Delta Config - Per-layer LoRA rank and target module override.
- Tenant
Delta - Per-tenant LoRA delta with per-layer accumulation tracking
- Tenant
Delta Config - Configuration for creating a new tenant delta (also used by the create_lora MCP tool)
Functions§
- extract_
lora_ components - Extract LoRA components from hierarchical tensor names e.g., “base_model.model.layers.5.self_attn.q_proj.lora_A.weight” -> Some((5, “q_proj”, “lora_a”))
- load_
state_ dict_ from_ bytes - Load a state dict from safetensors bytes.
- serialize_
state_ dict_ to_ bytes - Serialize a state dict (HashMap<String, Tensor>) to safetensors bytes.
Type Aliases§
- Shared
Tenant Delta - Type-safe wrapper that enforces Mutex protection for TenantDelta. All cross-thread access must go through this wrapper.