diff --git a/README.md b/README.md index af2d774..0df5477 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,9 @@ out = model.generate(ids, max_new_tokens=8, n_loops=8) print(f"[{attn_type.upper()}] Generated shape: {out.shape}") A = model.recurrent.injection.get_A() -rho = torch.linalg.eigvals(A).abs().max().item() +# get_A() returns the diagonal of a diagonal state matrix (shape: (dim,)), +# so its eigenvalues are simply its entries. +rho = A.abs().max().item() print( f"[{attn_type.upper()}] Spectral radius ρ(A) = {rho:.4f} (must be < 1)" )