2.2. One query per effective sublayer: what it costs, what it fixes#
ARLoop’s loop is weight-tied only in its transformer blocks: the routing is indexed by effective
depth. This page counts the routing parameters from the configuration files of the released
checkpoints (stored in book/data/hf/, pinned by revision and SHA-256) and checks the counts
against the parameter totals reported by the Hugging Face API.
model |
repository |
revision |
parameters (HF API) |
config.json SHA-256 |
|---|---|---|---|---|
ARLoop-0.6B |
|
|
583,138,944 |
|
PreNormLoop-0.6B |
|
|
582,804,096 |
|
ARLoop-1.2B |
|
|
1,208,655,360 |
|
2.2.1. The 0.6B pair#
effective sublayers 2 × physical_layers × loop_count = 108
routing vectors: 108 queries + 108 norms + 1 final query + 1 final norm = 218
routing parameters: 218 × hidden_size 1,536 = 334,848
parameter gap ARLoop-0.6B − PreNormLoop-0.6B (HF API): 334,848
The 108 effective sublayers of ARLoop-0.6B each carry a query and an RMSNorm weight, and the read-out carries one more of each: \(218 \times 1536 = 334{,}848\) routing parameters. This is exactly the difference between the parameter counts of ARLoop-0.6B and PreNormLoop-0.6B: the pair differs in the routing and in nothing else that has parameters. [code + num]
The whole count follows from the configuration. With the module list of the released modeling code
(tied embedding, one shared value embedding, per layer the attention projections, the SwiGLU
matrices, two norms, and a value-embedding gate in every second layer; Q/K normalisation without
parameters; seminar_lib.backbone_parameters), the three totals are reproduced to the last
parameter:
model |
backbone (from config) |
routing |
total |
HF API |
match |
|---|---|---|---|---|---|
ARLoop-0.6B |
582,804,096 |
334,848 |
583,138,944 |
583,138,944 |
exact |
PreNormLoop-0.6B |
582,804,096 |
0 |
582,804,096 |
582,804,096 |
exact |
ARLoop-1.2B |
1,208,061,440 |
593,920 |
1,208,655,360 |
1,208,655,360 |
exact |
2.2.2. ARLoop-1.2B#
ARLoop-1.2B: 144 effective sublayers
routing parameters 290 × 2,048 = 593,920
share of the model: ARLoop-0.6B 0.057%, ARLoop-1.2B 0.049%
ARLoop-1.2B has 144 effective sublayers and \(290 \times 2048 = 593{,}920\) routing parameters. In both models the routing is about 0.05% of the parameters (0.057% and 0.049%). [code + num]
2.2.3. One effective vector per sublayer#
In the score \(q_i^\top\operatorname{Norm}(z_j)\) the RMSNorm weight \(g_i\) multiplies the query coordinate-wise, so only \(q_i \odot g_i\) matters: one effective routing vector per routing call [code]. The vector of call 0 is inert (finding F8; The window, block by block).
effective routing vectors of ARLoop-0.6B: 109
167,424 effective parameters, of which 1,536 (call 0) cannot act
2.2.4. More loops than trained#
PreNormLoop has no depth-indexed parameters, so it runs at any number of loops. ARLoop-0.6B has
routing parameters (a query and a norm weight) for 108 sublayers and none for a fourth loop: running
it at \(R > 3\) needs a rule for the missing ones (finding F1 of the digest). The paper’s App. D.2
initialises new queries for the unseen depths and trains them with the rest of the model frozen; E1
instead declares two inference-only rules (experiments/e1_release/loopctl.py), and E3 adds a
trainable bank for loop 4.
loop |
routing reused under |
routing reused under |
|---|---|---|
1 |
1 |
1 |
2 |
2 |
2 |
3 |
3 |
3 |
4 |
3 |
1 |
5 |
3 |
2 |
6 |
3 |
3 |
E3's loop-4 bank: 36 queries + 36 norm weights
= 72 vectors = 110,592 parameters
Under repeat, loops 4, 5 and 6 reuse the queries and norm weights of loop 3; under cycle, loop 4
reuses loop 1’s, loop 5 loop 2’s and loop 6 loop 3’s. E3’s bank for a fourth loop has 36 queries and 36 norm weights
(110,592 parameters), initialised as copies of loop 3’s and trained only in the random-depth arm.
Whether any of this helps is an experimental question (see E1,
E3 and Stage 1c). [num]