Are some parts of your model useless? 🤨
I looked impact of value residuals (cf. quoted) in Ripple 65B. I wanted to know if they had an impact in the modeling, or were just small contributions,
So I plotted the coefficient of the value residual for each layer: higher coeff = more residual is used = local hidden states matter less.
If all coefficients were 0, values residual would be useless 🥸 it is not.
The early layers use the residual more than a little, which is surprising since they are so close to the start of the model. Layer 6 even uses ONLY the residual, ie. it builds its value projection only from the input embeddings. Strength of residual peaks at layer 6 and then decreases.
Mid-layers use little to no residual: they only base their values on their own hidden states. Pretty fun.
Late layers use the residual the most: no surprise there IMO, the input signal is weakest near the end so the model benefits from a strong residual there. But it's not uniform (strong residuals are followed by weaker ones) so it looks like the model alternates between interpreting the local hidden states and looking back at the inputs.
Always cool to look into those details when a model is published! And thanks to open-source and tools like transformers, it's really easy to do. You can see the impact of an architectural decision and how it manifests in the modeling.
Fun data is just out there, waiting to be analyzed 🔎