fidelity factorial arms (randk / noises0 / hidden-capacity) + pre-registration item 15
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -180,6 +180,17 @@ class ParcaeAdapter(RecurrentAdapter):
|
||||
return self.A_diag().max().item()
|
||||
|
||||
|
||||
class NoisyMergeAdapter(MergeAdapter):
|
||||
"""MergeAdapter with noise s0 (factorial cell: isolates the initial
|
||||
state; everything else identical to the standard merge)."""
|
||||
|
||||
def init_state(self, e):
|
||||
n = torch.randn_like(e.float())
|
||||
n = n * (e.float().norm(dim=-1, keepdim=True)
|
||||
/ (n.norm(dim=-1, keepdim=True) + 1e-6))
|
||||
return n.to(e.dtype)
|
||||
|
||||
|
||||
class TiedAlphaAdapter(nn.Module):
|
||||
"""Merge with LEARNED per-dim constant alpha, B tied to (1-a):
|
||||
x = (1-a)*e + a*s_hat + MLP([e;s_hat]), a = sigmoid(a_hat)
|
||||
|
||||
Reference in New Issue
Block a user