|
|
|
|
|
by amluto
1 day ago
|
|
> Depth-wise cross-attention (split Q/K/V): While standard transformer attention operates across tokens in a sequence, DCA applies attention across layers in depth. Each token queries a dynamically weighted mix of all prior layer embeddings, unlocking the model's full historical context without the computational penalty usually required to scale traditional attention. I’ve often thought that something like this might lead to a real solution to the infamous strawberry problem. Ignoring pesky issues like tokenization, the actual input data is visible to the model as the embedding fed to the first layer, but the first layer is probably nowhere near smart enough to understand that the model is trying to count R instances. But by the time whatever layer is reached that might understand the goal, the non-wasteful part of the low-level memory (the K’s and V’s from the first layer) can’t be queried any more. But this cross-depth attention can query them! Admittedly, there are holes in this argument. Beyond just tokenization (to the extent that the model can see letters at all, it is reconstructing them), the attention mechanism doesn’t really have a clean “count the hits” operation. |
|
besides making the letters visible in some way, you need to remove softmax normalization (not for the full model! just for the sections of it that do the counting) since it only allows you to represent outputs as a fraction of the inputs. no model architecture that normalizes this way will ever truly learn integer counting that generalizes to unseen inputs.
you also need a different activation function, relu and family cut away some crucial information.
just copy paste what I told you into a claude conversation, they can train a small llm that shows it easily on their server cpu or locally on your machine.