What DLRM Is, and Where Its Inference Latency Actually Lives

DLRM pairs huge embedding tables with small MLPs. Its inference latency sits in memory-bound embedding lookups, which shapes hardware, caching and…

What DLRM Is, and Where Its Inference Latency Actually Lives
Written by TechnoLynx Published on 11 Jul 2026

DLRM (the Deep Learning Recommendation Model) is a recommendation architecture with two kinds of work. Dense, continuous features go through a bottom multilayer perceptron (MLP). Categorical features are looked up in large embedding tables. The two outputs meet in a feature-interaction step, and a top MLP produces the click-through-rate prediction. At inference time, most of a DLRM’s latency comes from the embedding lookups, not from the MLP arithmetic. Those lookups are irregular, scattered memory reads, so the hardware spends its time waiting on memory rather than computing. That fact shapes which hardware, caching or compression choices are worth trying, and it is why the first step is to profile your own access pattern rather than follow a generic recipe.

How DLRM’s Embedding Tables and MLPs Fit Together at Inference

A DLRM inference request carries two kinds of input. Continuous attributes such as age, price or rating feed the bottom MLP. Categorical attributes such as user ID, item ID or location arrive as one-hot or multi-hot indices. In practice those indices are hashed first, which fixes each table at a set size and lets the model handle values it has never seen. Each index selects a row (an embedding vector) from that feature’s table, and the selected rows are pooled, typically by summing them, into one dense vector per feature. The original DLRM then takes dot products between every pair of embedding vectors and the processed dense features, and passes those pairwise interactions to the top MLP. The DLRMv2 model used from MLPerf Inference v3.1 onward replaces that interaction layer with a three-layer DCNv2 cross network and uses multi-hot categorical inputs.

The two halves differ enormously in size. The MLPs in the DLRM configurations studied for the Centaur accelerator were typically under 1 MB, small enough to stay inside a CPU’s on-chip caches. Embedding tables, by contrast, make up more than 99% of model capacity in industry-scale DLRMs, according to the RecShard authors. In Facebook’s 4-bit quantisation study they made up 99.99% of model size. As a worked figure, one Criteo feature with about 40 million distinct values and 128-dimensional fp32 vectors comes to close to 150 GB, and the authors of a 2025 embedding-bag study expect real deployments to total at least several terabytes.

The MLPs are compact and compute-heavy. The embedding tables are often too large for a single device’s memory and are then split across GPU memory, host DRAM and sometimes SSD.

Where DLRM Inference Latency Comes from: Embedding Lookups or Dense Compute?

In the measurements below, the answer is embedding lookups. Alibaba reports that more than 60% of prediction latency in its production recommendation models comes from the embedding layer, as cited by the Fleche authors at EuroSys 2022. The Centaur characterisation measured sparse embedding layers at up to 79% of inference time on a CPU baseline. RecMG, a 2025 study evaluated on Meta-like traces, found that embedding-vector accesses reached up to 58.7% of total execution time as table count and batch size grew and the cached fraction fell. On an A100 GPU, the authors of a 2024 GPU characterisation study found that the embedding stage remained the main bottleneck, with up to a 3.2× slowdown between a perfectly cached access pattern and a random one.

These figures come from different models, hardware and access patterns, and they measure different things (share of latency, share of execution time, slowdown versus an ideal case).

The share also moves. Centaur found that the MLP layers still take a significant part of execution time when batches are small. Fleche observed the opposite trend for its embedding-only optimisations: they help less at larger batch sizes, because the embedding part becomes a smaller fraction of end-to-end latency there. Fleche also found that deeper MLPs reduce the end-to-end gain from embedding work. So the published studies point to embeddings as the main DLRM bottleneck. Whether it holds for your model depends on batch size, MLP depth, pooling factor and how skewed your feature accesses are, and only a profile of your own serving path settles it.

Why DLRM Embedding Lookups Are Memory-Bound, and What Kind of Bound It Is

Each embedding lookup is a gather followed by a reduce. The kernel reads an index, loads the row that index points to, and accumulates it. The gather is an indirect, pointer-based load, which creates a load-use dependency chain inside every thread. The rows are small: typically 16 to 128 bytes according to the PIFS-Rec authors, and 128 bytes for a 32-dimensional fp32 vector in Centaur’s setup. Their addresses are scattered across tables of many gigabytes, so the reads have very little spatial or temporal locality.

On CPUs, this access pattern leaves available bandwidth unused. Centaur measured effective embedding throughput (useful bytes gathered divided by layer latency) far below its baseline system’s 77 GB/s peak memory bandwidth. The reason is that a CPU has only a handful of concurrent threads and outstanding-miss registers to keep requests in flight. At large thread counts, batch sizes and embedding dimensions the picture changes: PIFS-Rec found that CPU-attached memory channels saturate and become the bottleneck, and that adding DRAM capacity alone did not help because bandwidth was the limit.

On GPUs, the bound is memory latency rather than bandwidth, and the GPU performance profiling evidence is specific. The 2024 GPU study profiled PyTorch’s Embedding Bag CUDA kernel on an A100 with 1.94 TB/s of HBM2e bandwidth. With a random access pattern, the kernel averaged 329.5 GB/s of HBM read bandwidth, 16.5% utilisation, while L2 hit rate fell to 7.7% and long-scoreboard stalls rose to 18.6 cycles per instruction. Low bandwidth use combined with long memory stalls led the authors to conclude that the embedding bag operator is memory-latency-bound on the GPU. Part of the cause was in the kernel itself: it used 74 registers per thread, which capped theoretical occupancy at 37.5%, so too few warps were resident to hide the stalls. Raising warp-level parallelism through compiler settings cut batch latency by up to 53%, but long memory stalls remained.

For hardware choice, this means peak bandwidth on the spec sheet is the wrong number to compare first. In that study the embedding kernel used at most 16.5% of the A100’s HBM read bandwidth. More bandwidth only pays off once the kernel keeps enough requests in flight to use it, or once caching brings the hot rows closer.

Does Moving DLRM Inference to a GPU Reduce Latency?

It can, as one NVIDIA measurement shows. In one NVIDIA measurement, a V100 32 GB reduced DLRM inference latency by 19× compared with an 80-thread CPU at batch size 8192. NVIDIA attributes the gain to the fact that embedding layers are limited by memory bandwidth and GPUs have much higher memory bandwidth than commodity CPUs. The gap is not universal, though: the UpDLRM authors note that because DLRM inference needs less compute than training, real-time recommendation at scale has been shown to work on CPUs alone.

Capacity is the limit that a faster GPU does not remove. Once the tables exceed HBM, rows have to come from host memory over an interconnect. RecShard’s authors note that GPU HBM approaches 2 TB/s while PCIe 4.0 x16 delivers 32 GB/s in one direction. Fetching an embedding vector from host memory or SSD into GPU memory can cost on the order of 10 µs per fetch. In NVIDIA’s MLPerf DLRMv2 submission, transferring a batch of tensors over PCIe took about 22% of batch inference time on an H100 SXM, against about 3% on a GH200 over NVLink-C2C.

Sharding tables across many GPUs swaps the PCIe problem for a communication problem. The 2025 embedding-bag study cites communication at 5% to 70% of time for DLRMs distributed across GPUs. It projects that pooling from locally addressable memory would be 22.8× to 108.2× faster than a 10 TB table spread over 128 H100s. A Meta characterisation of scale-out inference across servers reached a more reassuring result: in its best-case configuration, distributed serving increased P99 latency by only 1%. They describe different topologies and table mappings, and the Meta authors attribute their overheads mainly to how the tables were distributed and how sparse the requests were. We would read them together as a warning that the sharding plan matters more than the interconnect brochure.

Newer GPUs help, but in one study a better kernel helped more. The same 2024 study measured an average 47% uplift from moving base PyTorch from an A100 to an H100 NVL, and found that its optimised kernels on the A100 ran 23% faster than base PyTorch on the H100.

How Caching, Prefetching and Tiered Memory Change DLRM Latency

Embedding accesses follow a power law, and that skew is what caching exploits. In RecMG’s analysis of production traces, about 20% of embedding vectors receive about 80% of accesses. Meta’s tiered-memory work found the same skew. It also found that item embeddings show more locality than user embeddings, and that user embeddings account for more than two-thirds of model capacity while needing less bandwidth per query.

The skew does not make a plain LRU cache sufficient. In RecMG’s traces, 20% of accesses had a reuse distance larger than 2^20 distinct vectors, more than a typical GPU buffer of around 100,000 vectors can hold. The many rarely reused vectors still add up to a large share of traffic that LRU cannot keep. The table below summarises what the main techniques changed in the studies that measured them.

Technique What it targets Measured effect (source)
Learned caching plus prefetching into a GPU buffer (RecMG) On-demand fetches from host memory 31% average, up to 43%, lower end-to-end inference time than LRU on five datasets
Software prefetching plus L2 cache pinning on GPU Memory-latency stalls in the gather kernel Up to 103% faster embedding lookups and 77% faster end-to-end inference on an A100
Unified GPU embedding cache with kernel fusion (Fleche) Per-table cache fragmentation and kernel launch overhead 2.0–5.4× embedding-layer throughput, up to 2.4× end-to-end throughput versus HugeCTR
Software-defined tiered memory with a DRAM cache over SSD (Meta) Capacity cost of cold, low-bandwidth tables Cache hit rate above 96% in steady state
Partial-sum caching with cache-aware partitioning (UpDLRM) Repeated lookups of popular item combinations Lookup share of embedding time cut from 71–77% to 43–52%

Two patterns from these studies matter for design. First, which lever helps depends on how much buffer you have. In RecMG, prefetching supplied 67.5% of the benefit when the GPU buffer held 0.1% of unique vectors, while caching supplied 72.3% at a 15% buffer. Second, which lever helps depends on access skew. In the GPU study, L2 pinning helped most on highly skewed datasets with smaller working sets, and prefetching helped most on near-random ones with long-latency loads. Slower tiers add their own latency: PIFS-Rec cites around 100 ns of extra latency for CXL-attached memory over local DRAM, which is why it places only cold pages there. RecShard’s 5× embedding-kernel speedup from frequency-aware placement across HBM and unified memory was measured on training, so treat it as evidence for the placement principle, not as an inference figure.

How DLRM Inference Latency Is Measured: MLPerf’s Server Scenario and Tail Latency

The MLPerf Inference server scenario suits online DLRM serving, because it measures throughput under a tail-latency bound rather than raw speed. In the server scenario, queries arrive at random following a Poisson distribution, and each query must be answered within a benchmark-specific latency bound. The 2019 MLPerf Inference paper gives bounds from 15 to 250 milliseconds across its tasks. In that version, no more than 1% of vision queries and 3% of translation queries could exceed the bound. The score is the highest queries-per-second rate the system sustains while meeting that requirement.

The statistics are strict. A 99th-percentile guarantee at the paper’s confidence level needs about 270,000 queries, and every run lasts at least 60 seconds so that power management and clock scaling settle. The cost of the latency bound is real: compared with the offline scenario, the server scenario cut throughput by as little as 3% for some systems and as much as 50% for others, because random arrivals make large batches harder to form. The authors also warn that how much a latency bound costs one model says little about another. NVIDIA reports that the GH200’s larger, faster HBM let DLRMv2 run with up to double the batch size in the server scenario compared with an H100 SXM.

The practical lesson for your own measurements is to report p99 under realistic arrivals at a stated latency bound, not average batch latency at the largest batch that fits. Meta’s ranking workloads, for example, need latency in the tens of milliseconds. Keeping that p99 target honest after deployment, through continuous measurement, alerting and retraining hygiene, is part of MLOps engineering as much as kernel work.

Can Compressing DLRM Embedding Tables Cut Latency Without Hurting Accuracy?

Yes for some methods, if you pick the method by how it affects reads at inference time. A survey of embedding compression sorts methods into three families. Low-precision methods (binarisation, quantisation) use fewer bits per weight. Mixed-dimension methods give some features shorter vectors. Weight-sharing methods (hashing, vector quantisation, decomposition) let features share parameters.

Facebook’s post-training 4-bit quantisation shrank a production ranking model to 13.89% of its single-precision size with neutral model quality. Its 4-bit SparseLengthsSum lookup ran on par with or faster than the optimised 8-bit and FP32 versions in most cases, even though sub-8-bit formats need extra bit manipulation to dequantise. Binarisation goes further, cutting memory 32×, but the survey reports that it usually causes severe accuracy loss. Some methods add latency instead of removing it. The survey notes that structured mixed-dimension approaches pay for an extra linear transformation and unstructured ones for sparse-storage access. It also warns that decomposition methods can add significant inference latency when they rebuild embeddings, and suggests vector quantisation instead, because interaction terms can be precomputed.

Compression also lowers latency indirectly when a smaller table fits in a faster tier. NVIDIA converted its MLPerf DLRMv2 embedding table to FP16, halving it to 49 GB so it fit on a single H100. On the 24 GB L4, it split the table between GPU and host memory by row frequency. When you assess a compression scheme, check whether it moves the hot set into HBM or cache, and then measure lookup latency directly rather than assuming that fewer bytes means faster reads.

A Profiling Order for Locating DLRM Latency Before You Optimise

Published techniques such as prefetching and L2 pinning each help a particular access pattern, and you only find out which one you have by profiling. The order we would follow:

  1. Split end-to-end latency by stage (embedding, bottom MLP, interaction, top MLP, host-device transfer) at your production batch size and arrival pattern, because the embedding share shifts with batch size and MLP depth.
  2. Profile the embedding kernel’s occupancy and register use. If occupancy is below the maximum, check registers, shared memory and launch configuration before anything else, as the GPU study recommends.
  3. Compare achieved HBM bandwidth with peak while watching memory stalls. Low bandwidth use with long stalls points to latency hiding (prefetching, more warps). Saturated channels point to bandwidth or placement.
  4. Measure the skew and reuse distance of your own feature accesses, because buffer size and skew decide whether caching, pinning or prefetching does the most.
  5. Check what crosses the interconnect: PCIe transfers and all-to-all traffic for sharded tables.
  6. Validate any change under a server-style p99 bound, since a system that performs well without a latency bound can perform poorly once random arrivals make large batches harder to form.

RecMG found that embedding access patterns follow user behaviour rather than code structure, so you cannot read your access skew from the model definition.