Diagram: five prompt tokens light up together and share a single wide connection to memory.
Reading a prompt and writing a reply are different kinds of work
When you send a prompt to a language model, it does two separate jobs. It first reads the whole prompt, and then it writes the reply one tokenA small piece of text, roughly a word or part of a word. Models read and write text as tokens. at a time. The two jobs make very different demands on the hardware.
The first job, called prefill, processes every token of the prompt at once. That amounts to a large batch of matrix multiplication, which is what accelerators are designed for, so this phase is usually limited by how much arithmetic the chip can do.
The second job, decode, can’t be parallelized in the same way, because each new token depends on the ones before it. To produce a token, the chip reads the model’s weights and the stored state of the conversation from memory, and then it does the same again for the next token, and the one after that.
That stored state is the KV cacheThe KV (key–value) cache is the model’s working memory of the conversation so far. It is re-read for every new token., and it grows as the conversation gets longer. The arithmetic for each token takes very little time; most of the time goes to waiting for data. The paper begins from this observation, describing generative inference as “largely memory-bound.”
In the kitchenEach token is one dish. The chef prepares it almost immediately, then goes back to fetch the ingredients for the next one.
Interactive: sliders for context length and number of users. A bar compares the KV cache size, computed as about 0.16 megabytes per token per user, against 70 gigabytes of model weights. Paper values: 1.25 GB at 8K, 5 GB at 32K, 20 GB at 128K for one user; 10 GB rising to 320 GB from 1 to 32 users.
The KV cache grows with every token and every user
For each token in a conversation, the model keeps some intermediate results that it will need again later. Together these make up the KV cacheThe KV (key–value) cache is the model’s working memory of the conversation so far. It is re-read for every new token.. In the paper’s example, a Llama-class 70B model with 8-bit storage, the cache grows by about 0.16 MB per token for each user.
That is a small amount per token, but conversations can be long. One user at 8K tokens needs about 1.25 GB, at 32K about 5 GB, and at 128K about 20 GB.
A server also handles many conversations at the same time, and each has its own cache. The paper gives an example that grows from about 10 GB for a single user to 320 GB for 32 users, far more than the 70 GB taken up by the model’s weights.
You can change both values in the figure. All of this data has to be read again for every new token, which is why both the amount of memory and its speed matter.
Drawing of three memories attached to the same processor, with box area proportional to capacity and channel width proportional to bandwidth. SRAM: 150 TB/s, 4 GB. HBM: 18 TB/s, 192 GB. 3D-DRAM: 100 TB/s, 32 GB.
Memory is usually either fast or large
SRAM is built into the processor itself. It is very fast, 150 TB/s per card in the paper’s comparison, but there is little of it: 4 GB. The paper’s Llama-class 70B example, with 70 GB of weights, would have to be spread across many cards.
In the kitchenSRAM is like a countertop. Everything is within reach, but there isn’t much room.
HBM places stacks of memory chips next to the processor. It holds much more, 192 GB per card, but delivers 18 TB/s.
In the kitchenHBM is a large pantry down the hall with a single door.
Raptor’s 3D-DRAM sits directly underneath the processor and provides 100 TB/s and 32 GB per card. It is neither the fastest nor the largest of the three, but it comes much closer to offering both.
In the kitchen3D-DRAM is a fridge built in under the countertop, with a drawer at every workstation. It holds more than the countertop and less than the pantry, and everything in it is one reach away.
One way to compare them is to divide bandwidthHow much data per second can move between memory and the processor. by capacityHow much data the memory can hold.. The result is the number of times per second a card could read through all of its memory, which is roughly the kind of work that decoding asks for.
Memory stacks beside the processor on an interposer, with data running sideways and entering only at the processor’s edges.
Why it helps to put the memory underneath
In most AI accelerators the memory sits beside the processor, and HBM stacks connect to it along one edge. Everything the chip reads from memory has to cross that boundary.
In the kitchenThis is the pantry down the hall: there is plenty of space, but everyone uses the same door.
Raptor stacks the two instead. Its logic die, made on TSMC’s N4P process, is bonded face to face with a DRAM die, so the memory sits directly beneath the circuits that use it.
The connection between memory and logic now covers the whole area of the die instead of a strip along one edge. A dense array of microscopic solder bumps, called µbumpsMicroscopic solder bumps that connect two chips stacked face to face., joins the two dies, and each bump carries one bit per clock cycle.
In the kitchenThe ingredients now sit in a fridge right under the countertop. Every station has its own drawer, so the chef no longer has to walk all the way to the pantry.
The bumps are 36 µm apart. Because each connection is so short, moving a bit costs about 0.45 pJ, which the paper puts at roughly 6× less than reported figures for HBM3.
Short connections lower the energy per bit, and the sheer number of them is what provides the bandwidth.
Zoom level 1 of 6: Card. A card with 2 to 4 multi-chip modules.
From a whole card down to a single bank
Before getting to the challenges, it helps to see how the chip is organized. A Raptor accelerator card carries 2 to 4 multi-chip modulesMulti-chip module: one package holding several chiplets., or MCMs.
Each MCM contains 4 chipletsA small chip designed to be combined with others in one package. and is designed for about 422 W. Around them are 8 conventional LPDDR5X-9600 memory chips, which add 128 GB of slower memory for data that doesn’t fit in the stacked DRAM.
A chiplet is the stack from the previous section: a logic die bonded to a DRAM die. The DRAM die is divided into 840 banksA DRAM chip is divided into many banks: independent grids of storage cells that can be read in parallel.. Most of them are grouped into 256 independent channelsA dedicated path from a group of banks to one compute engine., and the rest are held back as spares.
The logic die is divided into 4 gangs. A gang groups neighboring slices so that they can work together on a larger part of the model without involving the rest of the chip.
Each gang contains 4 slices, which the paper treats as the basic unit of the design. A slice has a 4×4 array of tensor engines for matrix arithmetic, a SIMD core for other operations, and 16 DRAM channels of its own directly underneath. The channels are independent, so maintenance work on one of them doesn’t hold up the others.
At the bottom of the hierarchy is a single bank, a grid of 1,364 rows by 124 columns. Reading one column returns 32 bytes. These dimensions come up again in each of the challenges that follow.
Stacking memory under logic created four new challenges
Grid of 1024 squares: 256 channels times 4 banks would be needed.
- 1 Mapping data to banks
- 2 Switching energy
- 3 Faulty banks
- 4 Heat and refresh
Fitting 128-byte chunks into three banks
Each tensor engine receives data in chunksThe paper calls it a “flit”: the fixed-size piece of data delivered to a compute engine in one go. of 128 bytes. A single bank returns 32 bytes per read, so the natural design would give every channel 4 banks. With 256 channels per chiplet, that would take 1,024 banks.
The DRAM die, however, has only 840 banks.
The design also keeps 72 of them in reserve as spares, for reasons covered in the third challenge. That leaves 768, which works out to exactly 3 banks for each of the 256 channels.
Three banks return 96 bytes per read rather than 128. A simple layout would need two reads for every chunk, fetching 192 bytes to use 128 and throwing away a third of what it reads. The paper calls this overfetch.
One fix is to stagger the data so that pieces of a chunk straddle two columns, read both into a 192-byte buffer, and shift the pieces into place, tracking a different alignment for each address. Nothing is wasted, but the shifting circuitry is complicated and makes it harder to run the memory controller at high speed.
Raptor deals with the problem in the way the software lays out data, a technique the paper calls stream blocking. Each chunk is split into a 96-byte part, stored across the 3 banks at the same column, and a 32-byte remainder. Remainders from neighboring chunks are packed together in a separate region.
One read fetches a column of remainders into a small 96-byte cache, which holds the leftovers for the next three chunks. Each chunk then needs just one more read for its main part. The pattern never changes, and every byte that is read gets used.
The paper works through real data: one attention layer of Llama-3.1-70B at 4K context, which needs 16 MB of KV cache. Stream blocking splits it into 1,024 tiles of 16 KB, 64 for each of a slice’s 16 channels.
During decode, a tensor engine reads its tiles by opening a row and streaming every column before moving to the next, so each row it opens is used in full. The channels run independently, so a refresh on one doesn’t stall the others, and 16 KB tiles line up with the pages that paged-attention software already uses. The whole layer fills less than 10% of each bank, about 128 of 1,364 rows.
Large number: about 360 watts of I/O power per card at 100 TB/s.
- 1 Mapping data to banks
- 2 Switching energy
- 3 Faulty banks
- 4 Heat and refresh
Reducing the energy spent switching wires
Each connection between the two dies carries either a 0 or a 1, and a little energy is spent every time a connection changes from one value to the other. There are so many connections that, at 100 TB/s, a Raptor card would spend about 360 W just on switching them.
The figure shows a stream of 128-byte chunks crossing the connections, with the newest at the top. Orange cells mark connections whose value changed since the previous chunk, and the counter keeps a running total.
Conventional memory reduces switching with a technique called data bus inversionData bus inversion: sending data inverted (0s↔1s) when that means fewer wires switch, plus a flag saying so., but that relies on an extra signal pin and on data arriving in bursts over several clock cycles. Raptor’s stacked interface has neither, so the same job is done in the memory controller instead. The paper calls this stream flipping.
It works because of stream blocking: chunks are read back in the same order they were written. So the controller decides when it writes. It compares each chunk with the previous one on that channel, stores it inverted if that means fewer connections switch, and records the choice in a single flag bit kept in a small side region of the DRAM. When the stream is read back, the connections see the low-switching version, and the flag says which chunks to flip back. Because the flag lives in memory, no extra pin is needed.
On the chip, the worst case measured 0.455 pJ per bit. With stream flipping the effective switching rate falls to 40–48%, and the energy to 0.376 pJ per bit, a reduction of 18% that needed no additional pins.
Interactive: a row of 26 bank tiles, 24 regular and 2 spare, grouped into 8 channels of 3. Tapping a tile marks it faulty; channels shift past faulty banks. Up to 2 faults keep all 8 channels intact; a third breaks one.
- 1 Mapping data to banks
- 2 Switching energy
- 3 Faulty banks
- 4 Heat and refresh
Working around faulty banks
A die with hundreds of banksA DRAM chip is divided into many banks: independent grids of storage cells that can be read in parallel. is likely to have a few that don’t work, and throwing those dies away would be expensive. Simply switching off a faulty bank isn’t a good answer either. Its channel ends up narrower than the others, and because the tensor engines consume their channels in lockstep, one narrow channel sets the pace for all of them.
Raptor’s solution is to arrange the banks in chains with spares mixed in among them. These are the 72 spare banks mentioned in the first challenge.
The figure shows one chain from the paper’s example, with 24 banks and 2 spares forming 8 channels of 3. When a bank fails, every channel after it moves over by one position.
After a second fault the channels move again, and all 8 still have their full width. The reassignment is done by simple multiplexers on the logic die, next to the tensor engines, so no long wires are needed to route around the faulty banks.
A third fault leaves too few working banks. With two spares, a chain can tolerate up to two faults, wherever along the chain they happen to be.
You can click banks in the figure to mark them as faulty and watch the channels being reassigned.
The paper says that bank chaining recovers channels that would otherwise limit yield, but it doesn’t publish yield figures (Sec V-B).
Refresh timeline below 85 °C, using the paper's 16 ms comparison point, against HBM's nominal 32 ms. A temperature slider is available.
- 1 Mapping data to banks
- 2 Switching energy
- 3 Faulty banks
- 4 Heat and refresh
Keeping a hot stack reliable
DRAM stores each bit as a small electric charge that slowly leaks away, so every row has to be rewritten, or refreshedDRAM stores bits as tiny electric charges that leak away. Refresh re-writes every row before it fades., on a regular schedule. HBM devices nominally do this every 32 ms.
Because the DRAM is pressed against the logic, the interface between them can reach 105 °C, and charge leaks faster when it’s hot. Above 85 °C, the paper says, the DRAM needs a refresh every 4 ms to hold its data, 8× as often as HBM’s nominal interval.
The paper measures the cost of moving from a 16 ms interval to 4 ms, which the slider uses for cooler temperatures. Its performance results assume an even shorter 2 ms interval.
Refreshing that often would usually be expensive, but Raptor’s banks are small. Each one has 1,364 rows, 16–32× fewer than a conventional DRAM bank, so a full refresh pass finishes quickly.
Each bank also protects its data with error-correcting codes. The last 8 columns hold a pair of interleaved [144, 140] Reed–Solomon codewords, stored alongside the stream-flipping flag bits. On a read, the controller fetches the codes and flags first, then the data, correcting errors before the chunk reaches the tensor engine. Background scrubbing catches errors before they pile up.
Measurements on the chip confirm this. Refreshing every 4 ms costs only 1.37% of the bandwidth, and even the 2 ms interval used in the performance results costs 2.7%.
Frequent refresh also protects against rowhammer, an attack that flips bits by activating one row over and over. With this chip’s timing, an attacker needs about 8.8 ms of continuous activations to reach the threshold. At a 4 ms refresh interval, every row is refreshed before its neighbors can get there, so the refresh schedule alone stops the attack.
Heat leaves the stack upward, through the logic die, the lid and the heatsink. Since the DRAM is underneath the logic, it runs about 3.5 °C cooler than the logic. In HBM the arrangement is reversed, with the memory sitting on top of hot logic. Most of the resistance to heat flow, about 80%, is in the cooling solution; the whole die stack, DRAM included, adds only about 1.5%.
Each chiplet draws about 106 W. With baseline air cooling and 55 °C intake air, only 63 W per chiplet stays under the 105 °C limit. The paper’s optimized heatsink, with 35 °C air, keeps the peak near 93 °C, with headroom up to about 140 W. Liquid cooling would keep it under 60 °C.
Measured: about 2.5 nanoseconds per chunk and about 105 terabytes per second per card at 700 megahertz.
Testing on real chips
Everything so far has described the design. The figures in this section were measured on early Raptor chips. At the 700 MHz design target, a chunk arrived in about 2.5 ns on average, and a card moved about 105 TB/s, close to the paper’s headline figure of 100 TB/s.
The team also varied the DRAM clock between 500 MHz and 1 GHz. A faster clock raised bandwidth and lowered latency, as expected.
Stream blocking contributes to these results. Each row of a bank holds several chunks, so the cost of opening a row is shared among all the chunks that are read from it.
Elsewhere this page uses the paper’s headline figure of 100 TB/s, which the paper quotes for operation with refresh and error scrubbing running (Sec VII-A). The 105 TB/s here is the measurement shown in its Fig. 9.
Card-count grids for DeepSeek-V3 671B: SRAM 304 cards, HBM 6 cards, 3D-DRAM 38 cards. A model picker lets you choose any of 7 models.
More memory per card means fewer cards
Large models are split across many cards, and the number of cards a model needs depends mostly on how much memory each one has. For DeepSeek-V3, the paper’s smallest workable setups need 304 SRAM cards, 38 Raptor cards, or 6 HBM cards.
For Kimi K2, which has a trillion parameters, the gap is much wider: 1,584 SRAM cards (a figure the paper gives directly), compared with 54 Raptor cards and 10 HBM cards. The menu in the figure lists the other models.
HBM needs even fewer cards, but each one reads memory at 18 TB/s, compared with 100 TB/s for Raptor. Capacity determines how many cards a model needs, and bandwidth determines how quickly each of them works.
The number of cards matters because the cards working on one model constantly exchange partial results, in group operations called collectivesA group communication step where many cards exchange partial results.. Raptor’s connections form a hierarchy: an on-chip network inside each chiplet, die-to-die links inside each module, and PCIe Gen 7 or Ethernet between modules and cards.
With fewer cards, each collective involves fewer participants and less traffic has to cross the slowest links, so Raptor depends less on the network than the SRAM design does. HBM, split across even fewer cards, is the least sensitive of the three. Raptor sits in between, and like SRAM it slows down sharply when network bandwidth is very low.
Modeled results: 4.71 times the throughput per card of HBM, 2.44 times that of SRAM, and 9.96 times lower time per output token than HBM, averaged across models. In one scenario: 4.38 times over HBM and 3.15 times over SRAM. Exception: for small speech models SRAM is fastest.
What the performance model predicts
The paper’s performance model pairs the same compute logic with each type of memory and simulates serving several real models. Averaged across those models, 3D-DRAM delivers 4.71× the tokens per second per card of HBM and 2.44× those of SRAM, and each user waits 9.96× less per token than with HBM.
In one specific setting, with a 4K context and a network with 0.5 µs latency and 1 TB/s of bandwidth, the improvement is 4.38× over HBM and 3.15× over SRAM.
Raptor doesn’t come out ahead in every case. Small speech models fit on a single card, so capacity stops mattering and raw bandwidth decides the outcome; for those, SRAM is fastest. All of these figures also come from a model rather than from measurements of a working deployment.
Because HBM holds more per card, the smallest HBM setups use fewer cards than Raptor. The paper also checks a fairer split, giving every design the same number of cards. HBM then runs larger batches, but at small and medium batch sizes 3D-DRAM stays ahead.
The paper also compares Raptor with two recent research designs that put memory and compute in 3D stacks, H2-LLM and Stratum. Both were evaluated in simulation, while Raptor’s memory system has been measured on a test chip. The paper argues that Raptor’s single, unified 100 TB/s pool avoids the bottleneck those designs hit when data has to move between chips, and in its model Raptor beats H2-LLM and the largest Stratum configuration at every batch size.
Swim-lane diagram: the GPU runs attention, sends activations to Raptor, which runs the expert layers and returns results for the next layer.
Pairing Raptor with a GPU
Attention–FFN disaggregation. In a mixture-of-experts model, the attention layers mostly need room for the KV cache, which a GPU’s large HBM provides, while the expert layers mostly need to read their weights quickly, which is where Raptor is strongest. The paper describes running attention on the GPU and the experts on Raptor, passing activations between them at every layer.
Speculative decoding. A small draft model proposes the next K tokens one at a time, which is limited by memory bandwidth and suits Raptor. A larger model then checks all K proposals in a single parallel pass, which is limited by compute and suits a GPU. The paper cites a production deployment on d-Matrix’s earlier chip, Corsair, which reported sizable end-to-end speedups with exactly this arrangement.
The case for 3D-DRAM
Decoding reads the model’s weights and a growing KV cache for every token it writes, so a language model runs only as fast as its memory can deliver data, and much of its power goes into moving that data. Raptor’s answer is to put the memory directly underneath the processor.
That choice created four challenges, and each had a specific fix:
- 1Mapping data to banks → stream blocking
- 2Switching energy → stream flipping
- 3Faulty banks → bank chaining with spare banks
- 4Heat and refresh → temperature-aware refresh and interleaved ECC
The paper reports about 100 TB/s per card, with each bit moved between the dies for about 0.45 pJ on early silicon.
The comparison below is a summary of how 3D-DRAM compares against the other two kinds of memory.
Comparison from a d-Matrix presentation. SRAM, On-die memory: capacity Low, bandwidth High, power Low. HBM, 2D package with an edge “beachfront”: capacity High, bandwidth Low, power High. 3D-DRAM, Compute stacked on memory: capacity Medium, bandwidth High, power Low–Med. Energy per bit: SRAM (on-die) ~50 fJ; On-chip wire ~35 fJ per mm; Raptor 3D-DRAM 0.376–0.455 pJ; Interposer trace ~500 fJ per mm; 2.5D HBM4 (system) 2.5 pJ + 3 pJ on chip.
By the paper’s measurement, Raptor’s I/O uses about 6× less energy than reported figures for HBM3. Its data travels a millimetre-scale vertical path with no PHYThe physical-layer circuitry that drives signals off one chip and receives them on another. It takes area and energy at both ends., instead of a centimetre-scale interposer trace plus a PHY. Open circles are per millimetre travelled.
3D-DRAM uses a larger die with ≤4 layers, against 12–16 in an HBM stack, which is better for yield.
SRAM-class bandwidth at about a tenth of HBM’s energy: short vertical I/O, no sideways data movement, no PHY and no beachfrontThe edge of a chip where connections to other chips can be placed. Its length limits how many connections fit. limit.
In the kitchenSRAM is the countertop, with everything within reach but little room. HBM is the big pantry down the hall, with plenty of space but a long walk through a single door. 3D-DRAM is a fridge built in under the countertop, with more room than the counter and every ingredient one reach away. It still holds less than the pantry, so the best kitchen may use both: the pantry for whatever takes up the most room, and the fridge under the counter for whatever has to arrive fastest.