Topic · Efficiency

Efficient networks

Everything on this site about efficient networks, in the order to read it: a page is listed after the pages it builds on. The figures below are the ones those pages use to explain it; each is live: move a slider and it recomputes.

In reading order

  1. Paper

The figures these pages use

Pulled from the pages above. Move a slider and the figure recomputes, exactly as on its page.

From Mamba — Selective State Spaces, Step by Step › 3. S4: Fixed Weights, So a Convolution

-1.01 / 4 · −1
One step of the memory. One channel, B = C = 1. Left: Ā (old state kept) and B̄ (new input written) against the step Δ. Right: the weight an input still has k steps later, the kernel of a fixed model. "As a gate" sets Δ = softplus(z) with A = −1, so Ā = 1 − σ(z) and B̄ = σ(z) (Theorem 1), with the paper's rule.

From Mamba — Selective State Spaces, Step by Step › 4. Selection: Let the Token Choose

0.52.00.011 / 2 · the 6-step check
A fixed filter against a choosing one. A toy with one channel (A = −1, B = C = 1). Filled squares are data tokens, empty ones noise. The fixed model uses one Δ everywhere, so every row is the row above shifted by one: a convolution. The choosing model takes a large Δ on data and a small one on noise, so its state holds between data tokens.

From Mamba — Selective State Spaces, Step by Step › 5. No Convolution, So How Is It Fast?

1 / 4 · the pairs
for what is kept
2 / 2 · 2560 (2.8B)11
How a recurrence runs in parallel. Eight steps of h_t = a_t · h_(t−1) + b_t with toy values, each a pair (a_t, b_t). Each round combines every slot with the one 1, 2, then 4 places to its left; after three rounds every slot holds h_t, the same as the loop on top. "What is kept": the values one layer holds while generating. Mamba's state does not grow with the length; a Transformer layer's K and V cache does.

From Mamba in RT-DETRv4 — What Could Make It Faster › 1. What v4 Runs, and Where the Work Goes

1 / 5 · v11 / 8 · whole pipeline
One pipeline, five versions. The RT-DETR pipeline for a 640 × 640 image, block by block. Step through the stages to see each block's output shape; switch the version to see which blocks it changes (rust outline), and switch to training to see the dashed parts that exist only while the model learns and are removed at inference.

From Mamba in RT-DETRv4 — What Could Make It Faster › 2. The Core Fact: AIFI Is Already Cheap

6406 / 6 · E
Where the encoder spends its attention. Counts: how many attention scores one encoder layer computes as the input grows, if every token of the three maps attended to every other, if each map attended only to itself, or if only the 20 × 20 map did (AIFI); the rust line is what a deformable encoder samples instead. These are counts, not time. Measured: the paper's own walk from variant A to E, AP against latency.

From Mamba in RT-DETRv4 — What Could Make It Faster › 2. The Core Fact: AIFI Is Already Cheap

3 / 7 · VMamba-T stage 3224
RT-DETRv4 only
Tokens, cost and MambaOut's line. Multiply-adds, not time, on a log scale: one token mixer (or one whole block, with its feed-forward layer) at each place, for VMamba's scan, global attention and 7 × 7 windows. The shaded places are the ones MambaOut would call long, L > 6D, its line for a block with a feed-forward layer of 4D. My count; for the whole VMamba-T it lands within 1 % of the paper's.

From Mamba in RT-DETRv4 — What Could Make It Faster › 4. What We Can Do, Ranked

1 / 6 · as deployed1 / 4 · S
Where a scan could save time. My placements, not measured on RT-DETRv4. Costs are my multiply-add counts at 640 × 640: what each change adds (+) or saves (−), next to the nearest timing someone published. Start at "as deployed" to see where the encoder's work goes; the dashed parts exist only in training, and F5 is the map the teacher is aligned to.

From MixConv — Mixed Depthwise Convolutional Kernels from Google Brain › MixConv — A new paradigm of Depthwise Separable Convolutional Kernels

1284
What mixing kernels costs. The mixed layer sees large and small patterns at once for far fewer weights than using the largest kernel everywhere.

Tags that go with it

Object detection 3Convolutions 2State space models 2Attention modules 1Edge deployment 1Feature pyramids and necks 1Language models 1Training recipes 1