Identifiability of LLaMA-style decoders
We prove that a LLaMA-style decoder, with pre-norm RMSNorm, skip connections, rotary positions, grouped-query attention, a causal mask, SwiGLU feed-forward layers and a tied or untied unembedding, is determined by the function it computes on soft tokens, up to an explicit gauge group, for all parameters outside a proper algebraic subset. The group consists of one orthogonal change of frame of the residual stream, a torus and a general linear group for each key-value group, a scaling for each neuron, and permutations. For Mistral-7B its orbits have dimension $1.3\cdot10^{7}$, which is 0.18% of the parameters. For $\varepsilon>0$ and contexts longer than three times the head dimension, the function also determines each of the 2D sublayers at non-generic parameters and against wider networks, whenever every block has a head whose attention pattern occurs in no other block. A tied unembedding fixes the frame of the residual stream up to signed permutations. The method treats exponentials of attention scores and gate pre-activations as coordinates on a torus, shows that the partition function of a head that sees three positions is prime, and isolates heads and neurons by residues of…
- arXiv
- 2612.02679
- Authors
- Pranav Venkata Konda
- Categories
- cs.LG · cs.CL · math.AG