given frequency $\mathbf{f}$ the $k$-equipartition is unique and is simple to compute. In our experiments, we saw that setting $k$ anywhere in the $(8,16)$ range is sufficient to observe the effects induced by mixed dimensions, with diminishing effect beyond that.

**Input:** Desired number of blocks $k$ **Input:** Row-wise frequencies vector $\mathbf{\bar{f}}$ **Output:** Offsets vector $\mathbf{t}$ $\mathbf{f} \gets \texttt{sort} (\mathbf{\bar{f}})$ Find offsets $t_i$ such that $\sum_{l=t_{i}}^{t_{i+1}} f_l = \sum_{l=t_{j}}^{t_{j+1}} f_l$ for $\forall j$ and $i = 0,...,k$

\[alg:equipart\]

#### Blocking for CTR Prediction

In CTR prediction tasks, we have several categorical features, with $k+1$ corresponding embedding matrices $E^{(i)} \in \mathbb{R}^{n_i \times d}$. To size the mixed dimension embedding layer for CTR prediction applications *we apply mixed dimensions across different embedding matrices by stacking them*. Therefore, the problem structure defines the number of blocks and number of vectors in each original embedding defines the row counts $n_i$ in the corresponding block in the mixed dimension embedding layer.

Popularity-Based Mixed Dimensions
---------------------------------

We now assume that the number of vectors $n_i$ in each block of the mixed dimension embedding layer $\mathbf{\bar{E}}$ is already fixed. Therefore, it only remains to assign the dimensions $\mathbf{d} := (d_0,...,d_k)$ to completely specify it.

We propose a popularity-based 