12.8 Hybrid Architectures
Every model in this chapter has improved how a fixed-size state is updated, from gates to selective dynamics to error-correcting delta rules, yet none of them can store more information than the state's size allows. When a user pastes a table of 64 product codes and prices into a prompt and asks for 20 of them, a Transformer looks back across its full KV cache and retrieves the exact tokens, whereas a purely recurrent model has only what it compressed into its fixed state before knowing which items would be queried. In-context retrieval (in few-shot prompting, retrieval-augmented generation, and code editing) is where fixed-state sequence models hit a hard ceiling.
The remedy adopted by the recurrent language models in production use is pragmatic: interleave a small fraction of full attention layers among the recurrent blocks. Below we establish two fundamental limits on fixed-state recall (an information-theoretic bit-counting bound and Welch's geometric lower bound on key overlap), compare pure GatedDeltaNet, pure attention, and a GA hybrid on multi-query associative recall and byte-level WikiText-103, ablate the short depthwise convolution that pairs adjacent key and value tokens, quantify inference KV-cache savings at 256K context length, and summarize all sequence memories covered in this chapter.
12.8.1 Limits of a Fixed-Size State#
12.8.1.1 Counting Bits#
By the pigeonhole principle, a state of numbers stored at bits each has at most distinct configurations. To distinguish and reproduce all possible sequences of tokens drawn from a vocabulary of size , the state must satisfy (Jelassi et al., 2024):
Thus the maximum number of tokens a fixed state can recall grows linearly with state size and is completely independent of context length , whereas a Transformer's KV cache grows linearly with and never saturates.
In practice, linear matrix memories hit a geometric limit long before saturating their raw bit count. In our associative recall benchmark below, a sequence stores up to 64 pairs with keys drawn from 128 symbols and values from 4 symbols (at most bits of table information, or bits for the 64 values), while two GatedDeltaNet layers with 8 heads of float32 states hold bits—more than the required bits. Why does a matrix memory lose pairs well below its raw bit count?
12.8.1.2 Overlapping Keys#
Whether a matrix head is updated additively (Section 12.6) or via the delta rule toward the least-squares fit (Section 12.7), exact linear readout for arbitrary values requires the stored keys to be linearly independent—and holds at most linearly independent vectors. Once the number of stored keys exceeds the head dimension , the keys must overlap no matter how training chooses them.
Proposition (Welch's Bound). Let be unit vectors in with . Then the average squared inner product over all distinct pairs is at least (Welch, 1974):
Proof. Let . Its trace is , so its eigenvalues sum to . By Cauchy–Schwarz, the sum of its squared eigenvalues, which equals , is at least . Subtracting the diagonal terms leaves at least across the off-diagonal pairs.
In a head of dimension , unit keys must have mean squared overlap at least —almost indistinguishable from random unit vectors (). Widening the head to lowers the Welch floor to .
This predicts two clear experimental signatures on multi-query associative recall:
- A pure
GatedDeltaNetstack will degrade as the number of stored pairs grows past its state capacity, while quadrupling its per-layer state entries (from to at fixed width ) will shift the degradation to roughly higher pair loads. - Replacing just one of the two recurrent blocks with full causal attention (
GA) will eliminate the capacity drop entirely, because the attention layer retains every token in its cache.
12.8.2 Recall with One Attention Layer#
12.8.2.1 Four Models#
We test four two-block d2l.SeqLM models () on multi-query associative recall (num_keys=128, num_values=4, loads ):
Gated DeltaNet(GG): 8 heads of size 4 ( state entries/layer);Gated DeltaNet, 4x state(GG, num_heads=2): 2 heads of size 16 ( state entries/layer, same parameter count);attention(AA): 2-head causal attention (d2l.AttentionMixer) with the same width-4 depthwise causal convolution on and no positional encoding (rope=False);hybrid(GA):GatedDeltaNetin block 1 followed byAttentionMixerin block 2.
def recall_model(layout, num_heads=8, conv_width=4, num_hiddens=32):
"""SeqLM whose mixers are given by letters: G(ated DeltaNet) with
num_heads heads, A(ttention) with two; tokens: 4 values, 128 keys, and
the filler."""
make = {'G': lambda: d2l.GatedDeltaNet(
num_hiddens, num_heads, conv_width=conv_width,
timescales=(256, 2048)),
'A': lambda: d2l.AttentionMixer(num_hiddens, num_heads=2,
conv_width=4, rope=False)}
return d2l.SeqLM(4 + 128 + 1, num_hiddens, [make[c]() for c in layout])12.8.2.2 The Recall Sweep#
We train two seeds of each architecture for 2,000 updates with d2l.train_recall and evaluate accuracy across pair loads.
arms = {'Gated DeltaNet': dict(layout='GG'), 'attention': dict(layout='AA'),
'hybrid': dict(layout='GA'),
'Gated DeltaNet, 4x state': dict(layout='GG', num_heads=2)}
recall = {}
for name, arm in arms.items():
models = [recall_model(**arm) for _ in range(2)]
recall[name] = [d2l.train_recall(model, num_keys=128) for model in models]
print(f'{name:25s} {d2l.num_params(models[0]):,} parameters')Gated DeltaNet 37,989 parameters
attention 34,821 parameters
hybrid 36,405 parameters
Gated DeltaNet, 4x state 37,197 parameters
We now average the recall curves across the two runs of each arm and plot accuracy as a function of the number of stored pairs :
pairs = list(recall['hybrid'][0])
runs = {name: np.array([[run[n] for n in pairs] for run in two])
for name, two in recall.items()} # Two rows, one per run
d2l.plot(pairs, [r.mean(0) for r in runs.values()], 'pairs in the sequence',
'recall, mean of two runs', legend=list(runs), xscale='log',
ylim=(0, 1.05), fmts=('-o', '-s', '--x', '-^'), figsize=(4.5, 3),
legend_loc='lower left')
d2l.plt.xticks(pairs, pairs) # Ticks at the numbers of pairs
print(f'{"pairs":25s}', ''.join(f'{n:>11d}' for n in pairs))
for name, r in runs.items():
print(f'{name:25s}', ''.join(f'{a:6.2f}/{b:.2f}' for a, b in r.T))pairs 4 8 16 32 64
Gated DeltaNet 1.00/0.99 0.98/0.94 0.87/0.82 0.70/0.64 0.56/0.51
attention 1.00/1.00 1.00/1.00 1.00/1.00 1.00/1.00 1.00/1.00
hybrid 1.00/1.00 1.00/1.00 1.00/1.00 1.00/1.00 1.00/1.00
Gated DeltaNet, 4x state 1.00/1.00 1.00/1.00 1.00/1.00 1.00/0.99 0.97/0.97
Both predictions hold:
- State capacity scaling in
GatedDeltaNet: With 128 state entries/layer (GG), recall drops from about at 4 pairs to between and at 32 pairs and about at 64 pairs. Quadrupling the state to 512 entries/layer (Gated DeltaNet, 4x state) keeps recall near through 32 pairs. At 64 pairs it recalls most pairs, between about and depending on the run. - One attention layer restores exact recall: Both
attention(AA) and thehybrid(GA) achieve recall across every load up to 64 pairs in every run—mirroring the large-scale findings of Waleffe et al. (2024).
12.8.2.3 The Short Convolution#
Why did we include a width-4 depthwise causal convolution in front of our recurrent and attention mixers? In associative recall, each value arrives at token immediately after its key at token . Without local token mixing (conv_width=1), a single matrix-state layer at step sees only the value token and cannot bind it to the preceding key token. Let us ablate the convolution by setting conv_width=1 in GG:
no_conv = [d2l.train_recall(recall_model('GG', conv_width=1), num_keys=128)
for _ in range(2)] # Width 1: only scales and shifts each channel
print(f'{"pairs":25s}', ''.join(f'{n:>11d}' for n in pairs))
for name, (a, b) in [('Gated DeltaNet', recall['Gated DeltaNet']),
('without the convolution', no_conv)]:
print(f'{name:25s}', ''.join(f'{a[n]:6.2f}/{b[n]:.2f}' for n in pairs))pairs 4 8 16 32 64
Gated DeltaNet 1.00/0.99 0.98/0.94 0.87/0.82 0.70/0.64 0.56/0.51
without the convolution 0.81/0.84 0.64/0.69 0.51/0.55 0.42/0.45 0.36/0.38
Removing the width-4 causal convolution degrades recall at every single load (by roughly to percentage points, dropping even 4-pair recall to between and ).
12.8.3 Language Modeling at Equal Size#
How do pure GatedDeltaNet (GGGG), a 3-to-1 hybrid (GGGA), and pure causal attention (AAAA) compare on our byte-level WikiText-103 benchmark (d2l.SeqLM, 4 blocks at width )? We ask twice: first on the 128-byte windows used throughout this chapter, and then on windows of 1,024 bytes, to see whether a longer context separates a fixed state from a growing cache. Both times we train for 8,000 steps and not for the 1,000 steps of the earlier sections, because a model learns to use distant context late in training. The losses below are therefore lower than those of the earlier text tables and cannot be compared with them.
12.8.3.1 Short Windows#
We first load the 128-byte WikiText103 dataset:
data = d2l.WikiText103(batch_size=64, num_steps=128)The comparison needs one more arm to be fair. Mamba, gated linear attention, and Gated DeltaNet all mix neighboring tokens with a width-4 causal convolution before their recurrence, while the attention mixer of our text benchmarks has had none. A lead of GatedDeltaNet over attention could therefore belong to the convolution rather than to the memory. We give attention the same convolution in a fourth arm, as we did in the recall experiment.
To this end, text_model(layout, d) constructs a 4-block d2l.SeqLM whose mixers follow a four-letter layout string of 'G' (GatedDeltaNet, 4 heads), 'A' (AttentionMixer, 8 heads), 'C' (the same attention behind a width-4 causal convolution), and 'R' (a GRU, for the longer windows below):
torch.set_float32_matmul_precision('high') # fp32 matmuls may use tf32
text_mixers = {'R': lambda d: d2l.Recurrent(d2l.init_lecun(
nn.GRU(d, d, batch_first=True))),
'G': lambda d: d2l.GatedDeltaNet(d, num_heads=4),
'A': lambda d: d2l.AttentionMixer(d, num_heads=8),
'C': lambda d: d2l.AttentionMixer(d, num_heads=8,
conv_width=4)}
def text_model(layout, d): # 256 byte values; one block per letter
return d2l.SeqLM(256, d, [text_mixers[c](d) for c in layout]).to(
d2l.try_gpu())We train two runs each of 'GGGG', 'GGGA', 'AAAA', and 'CCCC' at width for 8,000 steps via d2l.text_table:
arms = {'Gated DeltaNet': ('GGGG', 256), 'hybrid': ('GGGA', 256),
'attention': ('AAAA', 256),
'attention, conv': ('CCCC', 256)} # Width 256, four blocks each
trained = d2l.text_table(text_model, arms, data, num_steps=8000) validation 0-15 16-63 64-127 ms/step
Gated DeltaNet 3,573,536 1.161/1.158 1.397/1.399 1.132/1.128 1.124/1.120 48/50
hybrid 3,501,848 1.153/1.154 1.399/1.398 1.123/1.124 1.114/1.114 44/43
attention 3,286,784 1.182/1.185 1.410/1.412 1.152/1.155 1.146/1.151 21/21
attention, conv 3,302,144 1.150/1.154 1.397/1.397 1.121/1.124 1.110/1.116 26/26
On 128-byte windows three of the four arms finish together: Gated DeltaNet at about nats per byte, and the GGGA hybrid and attention with the convolution at about . Only attention without the convolution stands apart, about behind at . At this length the loss is dominated by local syntax: it hardly changes after the first 16 bytes of a window (Section 12.1.4.2), so the table mostly measures how well a mixer combines neighboring bytes.
The convolution thus accounts for the whole deficit of plain attention. With it, attention is level with the hybrid. Both are ahead of Gated DeltaNet by at most, which is about what separates two runs of the same arm, so we read no ranking into it. On short windows neither the matrix memory nor the cache has an advantage that local mixing does not explain, and the hybrid's single attention layer adds nothing that we can measure. That layer matters where exact long-range lookup is needed (Exercise 5). Does it matter on real text once the windows are long enough?
12.8.3.2 Long Windows#
Windows of 128 bytes cannot show what a fixed state loses against a growing cache, nor what a vector state loses against a matrix memory. We therefore train four mixers on windows of 1,024 bytes: a stack of GRUs ('RRRR'), Gated DeltaNet, the GGGA hybrid, and attention with the convolution. The batch size drops from 64 to 8, so that every step still sees the same number of bytes and the 8,000 steps the same amount of text.
long_data = d2l.WikiText103(batch_size=8, num_steps=1024) # Same bytes/step
long_arms = {'GRU': ('RRRR', 256), 'Gated DeltaNet': ('GGGG', 256),
'hybrid': ('GGGA', 256), 'attention, conv': ('CCCC', 256)}
long_trained = d2l.text_table(text_model, long_arms, long_data,
num_steps=8000) # Long context needs training validation 0-127 128-511 512-1023 ms/step
GRU 3,817,216 1.088/1.088 1.146/1.144 1.084/1.086 1.075/1.075 119/119
Gated DeltaNet 3,573,536 1.116/1.122 1.183/1.185 1.115/1.120 1.100/1.108 64/63
hybrid 3,501,848 1.083/1.083 1.182/1.184 1.082/1.083 1.058/1.057 54/55
attention, conv 3,302,144 1.073/1.065 1.199/1.190 1.076/1.070 1.040/1.030 32/32
The average over a window hides where in the window each model gains. A model that uses its whole context keeps improving as the position grows, whereas one that summarizes only the recent bytes stops improving early. To tell the two apart, we average the validation loss of the two runs over bands of positions that double in length, from bytes 16–31 up to bytes 512–1,023:
losses = {name: np.mean([d2l.loss_by_position(model, long_data)
for model in models], 0) # Mean of the two runs
for name, models in long_trained.items()}
starts = [16, 32, 64, 128, 256, 512] # Bands [a, 2a) of positions
bands = {name: [loss[a:2 * a].mean() for a in starts]
for name, loss in losses.items()}
d2l.plot(starts, list(bands.values()), 'positions [a, 2a) in the window',
'validation loss (nats/byte)', legend=list(bands), xscale='log',
fmts=('-o', '-s', '--x', '-^'), figsize=(4.5, 3))
d2l.plt.xticks(starts, starts) # Ticks at the first position of each band
print(f'{"positions":16s}', ''.join(f'{f"{a}-{2 * a - 1}":>10s}'
for a in starts))
for name, band in bands.items():
print(f'{name:16s}', ''.join(f'{v:10.3f}' for v in band))positions 16-31 32-63 64-127 128-255 256-511 512-1023
GRU 1.118 1.097 1.100 1.079 1.088 1.075
Gated DeltaNet 1.161 1.135 1.137 1.113 1.119 1.104
hybrid 1.167 1.133 1.130 1.089 1.079 1.057
attention, conv 1.192 1.148 1.138 1.090 1.065 1.035
Longer windows help every model that we trained at both lengths. Gated DeltaNet ends between and and the hybrid between and , against and on windows of 128 bytes. Attention with the convolution ends at about in most runs. About one run in five ends near instead, for a reason that we give below. The GRU reaches . It is the slowest arm by a wide margin, at about twice the time per step of the next slowest or more, because it alone processes a window one step after another.
The three arms that were level on short windows are level no longer, and the columns of the table show where they part. From the first 128 bytes of a window to the last 512, the loss of the GRU falls by about and that of Gated DeltaNet by about . The hybrid gains about , and attention, in most runs, about . The plot locates the gain more closely. Up to byte 127 the fixed states hold their own: the GRU is lowest in every band, attention is highest in the first bands, and the hybrid cannot be told from pure Gated DeltaNet. Beyond byte 128 the GRU and Gated DeltaNet gain little more, about by the last band. The hybrid keeps falling. It leaves Gated DeltaNet behind at byte 128, and from byte 256 on it is below the GRU as well. At bytes 512–1,023 it leads Gated DeltaNet by about and the GRU by about . All of this lead comes from the one attention layer in its fourth block.
Attention falls the furthest, though not in every run. In most runs it ends at to on bytes 512–1,023, about ahead of the hybrid and the best of the four models. About one run in five lags. It ends at around overall and at about in the last band, no better than Gated DeltaNet. The plot shows the mean of the two runs in the table, so where one of them is such a run, the attention curve ends above the hybrid's and not below it.
The two kinds of run differ by a single event. For the first thousand steps or so, all runs follow the same training loss. In most runs the loss then falls suddenly by about , at some step between 1,000 and 5,000. A lagging run declines smoothly and never shows this drop. The drop is the moment at which attention learns to copy. Text repeats itself: a name, a date, or a phrase often recurs within a kilobyte. A model that finds the earlier occurrence of the bytes it has just read, and predicts the byte that followed them there, gains at every such repeat. Olsson et al. (2022) call this circuit an induction head, and we met it in Section 10.7. We can test for it directly. On windows that contain the same passage of 512 bytes twice, a run that has had its drop predicts the second copy at to of the loss of the first. A lagging run predicts both copies at nearly the same loss, through all 8,000 steps. On the first 128 bytes of a window, where there is little to copy from, the two kinds of run cannot be told apart.
A lagging run is not unstable. Its loss does not diverge, and its gradients are as large as those of the other runs. It is simply late. The step at which the circuit forms varies with the seed, and the cosine schedule leaves little learning rate after about step 6,000, so a run that has not formed the circuit by then does not form it at all. The short convolution helps here as it did in the recall task: without it, most runs have had no drop by step 5,000. We also tried other learning rates, no weight decay, and a different number of attention heads. The misses became rarer in one case and disappeared in none. Sudden drops of this kind are typical when a network must assemble a circuit from parts that are of little use on their own, and they are a good reason to train more than one seed before ranking two architectures.
With a long context and enough training, then, text shows a weaker form of what the recall task showed. The growing cache gains the most from distant bytes, a single attention layer among three recurrent ones recovers a good part of that gain, and a fixed state alone gains the least. On windows of 128 bytes there are no distant bytes to use, which is why the short-window table cannot show this.
12.8.4 Inference Memory#
During autoregressive generation, per-sequence memory determines both maximum serving batch size and memory-bandwidth-bound decoding speed:
- Grouped-query attention layer ( key–value heads of dimension in 16-bit floats): stores per token—reaching per layer at tokens.
- Recurrent / matrix-state layer (e.g., Mamba-2 at width with channels and state dimension in 16-bit floats): stores a fixed regardless of context length (overtaken by the attention layer's KV cache after just tokens).
In a hybrid architecture, only the attention layers accumulate a growing KV cache (Figure 12.8.1). A 32-layer model with 4 attention layers (1 in 8, as in Jamba (Lieber et al., 2024)) cuts the 256K-token cache from to , while 3-to-1 Gated DeltaNet hybrids such as Qwen3-Next (Team, 2025) and Kimi Linear (Team, 2025) reduce the KV cache by .
Memory held per sequence during generation, against context length, for a 32-layer model with grouped-query attention (8 key–value heads of dimension 128) and Mamba-2-sized recurrent states, in 16-bit numbers. A transformer's cache reaches 32 GB at 256K tokens; a purely recurrent model stays at 64 MB at every length; a hybrid with 4 attention layers holds an eighth of the transformer's cache.
12.8.5 The Chapter's Memories Compared#
Table 12.8.1 compares every sequence mixer built in this chapter alongside causal attention and the hybrid (with denoting model width, state dimension, expanded channels in Mamba, number of heads, and sequence length).
| Memory | State per layer at generation | Training | Synthetic task | Text |
|---|---|---|---|---|
| LSTM, GRU | , | one step after another | gates that start near one keep a symbol for 200 steps; started at one half, they lose it by 50 | 1.29 to 1.30 (4.3 M, 3.8 M) |
| minGRU | scan | at chance after 100 steps; with the timescales of S4D, recalls after 1,000 | 1.34 to 1.35 (2.8 M) | |
| S4D | convolution or scan | recalls after 1,000 steps; at most one in five on selective copying | not trained | |
| Mamba | scan | 0.98 or more on selective copying | 1.30 (4.0 M) | |
| gated linear attention | chunks | about half of 64 pairs with 128 entries, more with 512 | not trained | |
| Gated DeltaNet | chunks with a triangular solve | 0.95 or more of rewritten keys, against about 0.9 for gated linear attention | 1.16 after 8,000 steps (3.6 M) | |
| attention | fused attention over all positions | every pair at every load | 1.38 to 1.39; after 8,000 steps 1.18, and 1.15 with the width-4 convolution (3.3 M) | |
| hybrid | recurrent states plus per attention layer | both | every pair, with attention in one of two blocks | 1.15 after 8,000 steps (3.5 M) |
Reading across the columns summarizes the design trade-offs:
- For low-power streaming or continuous sensor/audio processing where exact lookup of arbitrary past tokens is not required, classical gated recurrences or selective SSMs provide compact -state processing.
- For long-context foundation models, interleaving chunk-parallel delta-rule matrix recurrences (
GatedDeltaNet) or selective SSMs (Mamba-2) with a small ratio of full attention layers ( to ) combines parallel linear-time training, – smaller inference KV caches, and exact content-addressable recall.
12.8.6 Summary#
A fixed-size state of numbers at bits each can distinguish at most histories ( to recall tokens from vocabulary ). In matrix-state layers, capacity is constrained even earlier by geometry: by Welch's bound, unit keys in must have average squared overlap at least , causing cross-key interference under both additive and delta-rule updates. On multi-query associative recall, a pure GatedDeltaNet model degrades once pair count outgrows its state entries, whereas quadrupling state entries scales capacity proportionally and replacing a single recurrent block with full attention (GA) restores recall across all loads. A width-4 causal convolution in front of the mixer is essential so adjacent key and value tokens can bind within a single layer. On byte-level text the differences are smaller, and they depend on the length of the window. On windows of 128 bytes, Gated DeltaNet, the hybrid, and attention with the convolution finish within about nats per byte of one another after 8,000 steps, and the deficit of plain attention, about , disappears once it has the same convolution. On windows of 1,024 bytes the models separate beyond byte 128: attention gains the most from distant context in most runs, the hybrid follows, and pure Gated DeltaNet gains the least. During generation, only the attention layers of a hybrid require a growing KV cache, cutting inference cache memory in proportion to the fraction of attention layers.
12.8.7 Exercises#
-
The counting bound. A model reads a string of tokens from a vocabulary of and must then reproduce it.
- Prove (12.8.1) for a model whose state between reading and writing has numbers of bits and whose output is a deterministic function of that state.
- Suppose instead that the model may output a wrong string with probability at most when the string is drawn uniformly. Show that . (Hint: count the strings that each state can decode correctly.)
- How many tokens of a vocabulary of 50,000 can a model with 48 layers of Mamba-2 state, 2 MB each in 16-bit numbers, copy at most? Why does no model of this size come close in practice?
-
Memory for many users. A GPU with 80 GB serves a model of 32 layers, with the cache sizes of Figure 12.8.1, after 16 GB of the GPU's memory are taken by the weights.
- How many sequences of 128K tokens can the GPU serve at once with the transformer, the hybrid with 4 attention layers, and the recurrent model?
- Grouped-query attention with fewer key–value heads, and 8-bit numbers for the cache, each halve the cache. Apply both to the transformer and to the hybrid, and repeat the count. Which of the two changes could also shrink the hybrid's recurrent states, and what share of the hybrid's memory do those states take after both changes?
-
Overlap and training.
- How much better than random keys can training make the keys of a head? Divide the bound (12.8.2) by , the mean squared overlap of random unit keys, and evaluate the ratio for 64 keys in dimensions 4, 8, 16, and 32. In which of these heads can trained keys be clearly better than random ones?
- [code] Train the small Gated DeltaNet model of the sweep with 4,000
and 8,000 updates (
num_updatesofd2l.train_recall). Does its recall of 32 and 64 pairs approach the hybrid's? What does the answer say about whether the small model lacks training or capacity? - [code] Draw the keys from 64 and from 512 possible ones (
num_keys, with the vocabulary ofrecall_modelchanged to match). A sequence still stores at most 64 pairs. Why can the number of possible keys change recall at all?
-
[code] Where and how much attention?
- Train the hybrid
AG, with attention in the first block, and compare its recall with that ofGA. Does the position of the attention layer matter? Consider which layer can bring each key together with the value that follows it. - Train four-block models
GGGG,GGGA, andGAGAof the same width. Do two more recurrent layers move the recall curve as far as four times the state per layer did, and does one attention layer among four still recall every pair?
- Train the hybrid
-
[code] Recall in text. In the validation windows of byte-level WikiText-103, mark the positions whose byte completes a string of at least eight bytes that already occurred earlier in the same window.
- Compare the loss of the trained Gated DeltaNet, hybrid, and
attention models (
trained) at the marked positions and at all other positions. Does attention's advantage on recall show up where text repeats itself? - Repeat with windows of 512 bytes (
num_steps=512, with fewer windows per step). How does the share of marked positions change, and with it the difference between the models?
- Compare the loss of the trained Gated DeltaNet, hybrid, and
attention models (
-
[code] Watching the copy circuit form. Build validation windows of 1,024 bytes whose second half repeats the first. Train attention with the convolution (
'CCCC') on ordinary windows of 1,024 bytes, and every 250 steps record the training loss and the ratio of the loss on the second half of the repeated windows to the loss on the first.- At which step does the ratio fall below 1, and does the training loss drop at the same step?
- Repeat with several seeds. How much does the step of the drop vary, and what does a run look like that has no drop within 8,000 steps?