                                         Mixture of Lookup Experts


         Shibo Jie 1 Yehui Tang 2 Kai Han 2 Yitong Li 3 Duyu Tang 3 Zhi-Hong Deng 1 Yunhe Wang 2


                        Abstract


     Mixture-of-Experts (MoE) activates only a subset
     of experts during inference, allowing the model
     to maintain low inference FLOPs and latency
     even as the parameter count scales up. How-                       42       44     0.0 0.5 1.0           0      100       200
     ever, since MoE dynamically selects the experts,                Average Accuracy # Parameter in VRAM (B) Latency (ms/step)
     all the experts need to be loaded into VRAM.                         Dense      MoE       MoE (Expert Offloading)   MoLE (Ours)
     Their large parameter size still limits deployment,
     and offloading, which load experts into VRAM
     only when needed, significantly increase infer-
                                                                   Figure 1. With the same 410M activated parameters, MoE outper-
     ence latency. To address this, we propose Mixture
                                                                   forms the dense model in terms of performance, but it comes with
     of Lookup Experts (MoLE), a new MoE archi-
                                                                   significant VRAM usage. If experts are offloaded, inference la-
     tecture that is efficient in both communication               tency will increase. Our MoLE maintains competitive performance
     and VRAM usage. In MoLE, the experts are                      without increasing the model’s VRAM usage or decoding latency.
     Feed-Forward Networks (FFNs) during training,
     taking the output of the embedding layer as in-
     put. Before inference, these experts can be re-               1. Introduction
     parameterized as lookup tables (LUTs) that re-
     trieves expert outputs based on input ids, and                Scaling laws indicate that, with sufficient data for training,
     offloaded to storage devices. Therefore, we do                the performance of large language models (LLMs) improves
     not need to perform expert computations dur-                  as the model size increases (Kaplan et al., 2020). However,
     ing inference. Instead, we directly retrieve the              larger LLMs also result in slower inference speeds, which
     expert’s computation results based on input ids               can degrade the user experience. For this reason, the archi-
     and load them into VRAM, and thus the result-                 tecture of LLMs has increasingly focused on Mixture of
     ing communication overhead is negligible. Ex-                 Experts (MoE) (Jiang et al., 2024; Dai et al., 2024). MoE
     periments show that, with the same FLOPs and                  models use several Feed-Forward Networks (FFNs) as ex-
     VRAM usage, MoLE achieves inference speeds                    perts and employ a router to determine which subset of ex-
     comparable to dense models and significantly                  perts needs to be activated, rather than activating the entire
     faster than MoE with experts offloading, while                model. This allows the model to maintain a large number of
     maintaining performance on par with MoE. Code:                parameters while keeping the computational cost low.
     https://github.com/JieShibo/MoLE.                             Although MoE reduces the computational cost, the num-
                                                                   ber of parameters does not decrease. This means that the
                                                                   VRAM requirements during inference remain unaffordable.
                                                                   For example, although the Mixtral-8×7B (Jiang et al., 2024)
    1                                                              model only has 13B parameters activated at a time, its to-
      State Key Laboratory of General Artificial Intelli-
gence, School of Intelligence Science and Technology,              tal parameter count reaches 46B, making it impossible to
Peking University 2 Huawei Noah’s Ark Lab 3 Consumer               load into a single 80GB GPU with FP16. Existing meth-
Business Group, Huawei.      Correspondence to: Yunhe              ods (Eliseev & Mazur, 2023; Xue et al., 2024; Shen et al.,
Wang <yunhe.wang@huawei.com>, Zhi-Hong Deng <zh-                   2022) reduce VRAM usage by offloading experts to larger
deng@pku.edu.cn>, Yehui Tang <yehui.tang@huawei.com>.              storage devices (e.g., CPU RAM, disk, or cloud storage),
Proceedings of the 42 nd International Conference on Machine       and loading the selected experts into VRAM at each in-
Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025        ference step. However, there are two drawbacks to this
by the author(s).                                                  approach: i) Since the selection of experts is dynamically

                                                               1
                                                   Mixture of Lookup Experts

determined by the router, we must load different experts into          2. Related Work
VRAM at each inference step. Frequent transfer of large
numbers of parameters can significantly increase inference             2.1. Mixture-of-Experts
latency, as in Figure 1. ii) Since different samples select            The concept of MoE was initially introduced by Jacobs
different experts within a single step, loading only a subset          et al. (1991); Jordan & Jacobs (1994) and has been widely
of experts may not meet the needs of batched generation.               explored and developed through subsequent research (Col-
To address the issues mentioned above, we propose Mix-                 lobert et al., 2002; Rasmussen & Ghahramani, 2001; Shah-
ture of Lookup Experts (MoLE), a new LLM architecture.                 baba & Neal, 2009; Eigen et al., 2014; Theis & Bethge,
MoLE has different structures in training and inference.               2015; Deisenroth & Ng, 2015; Aljundi et al., 2017; Shazeer
During training, MoLE is similar to MoE, with a router                 et al., 2017). MoE posits that different parts of the model,
and several experts. However, unlike MoE, where experts                i.e., the experts, focus on distinct tasks or encapsulate dif-
take intermediate features as input, MoLE’s experts are                ferent kinds of knowledge. In this paradigm, only the
fed with embedding tokens (i.e., the output of the embed-              experts relevant to a given input are activated, which al-
ding layer) instead. Additionally, MoLE allows all experts             lows the model to scale its capacity while keeping computa-
to be activated simultaneously. After training, MoLE is                tional costs manageable and making full use of specialized
not directly used for inference but undergoes a series of              knowledge across many experts. As the scale of LLMs
re-parameterizations. Since the output of the embedding                increases, reducing computational overhead has become a
layer is fixed for specific input ids, the inputs to the experts       key focus. This leads to its application in transformer-based
have only a limited number of choices, equal to the model’s            LLMs (Lepikhin et al., 2021), making MoE a widely used
vocabulary size. Therefore, for each token in the embed-               architecture.
ding layer, we pre-compute the outputs corresponding to                Recently, a series of industrial-scale large language models
all experts, creating lookup tables (LUTs) that replaces the           have been released, including Mixtral (Jiang et al., 2024)
original experts.                                                      and DeepSeek-MoE (Dai et al., 2024). Some works also
During inference, MoLE demonstrates several advantages:                aim to improve the efficiency of MoE (Jin et al., 2025) or
                                                                       increase expert capacity (Yan et al., 2025) by modifying the
   • Computation-free experts. The experts are re-                     model architecture.
     parameterized from FFNs into LUTs, eliminating the
     need for any computation. Each expert only requires a             2.2. Expert Offloading
     single lookup operation.                                          Offloading techniques typically transfer a portion of the
   • Low VRAM overhead and communication latency.                      model parameters to CPU RAM or disk when GPU memory
     Although the size of the LUT is much larger than the              is insufficient. However, current mainstream offloading
     model itself, it can be entirely offloaded to storage             frameworks, such as Zero-Infinity (Rajbhandari et al., 2021),
     devices. During inference, since the output of each               are designed for dense LLMs and load model parameters
     expert is the same number of tokens as the input, the             layer by layer on-demand. This approach overlooks the
     communication required to load the lookup results into            sparse activation property of MoE models, leading to the
     VRAM is negligible, thereby avoiding increased infer-             unnecessary loading of inactive experts.
     ence latency.                                                     Building on this, some studies have proposed expert offload-
                                                                       ing, a form of parameter offloading specifically designed for
   • Batch-generation friendly. Traditional expert offload-
                                                                       the sparse activation characteristic of MoE models (Eliseev
     ing methods introduce additional VRAM usage and
                                                                       & Mazur, 2023; Xue et al., 2024). These methods stores
     communication latency during batched generation be-
                                                                       non-expert weights and a portion of the expert cache in
     cause different samples in a batch may select different
                                                                       VRAM, while the remaining experts are offloaded to CPU
     experts. MoLE only transfers the pre-computed ex-
                                                                       RAM or disk and loaded on-demand.
     pert outputs, making its communication overhead still
     negligible even during batched generation.                        Despite being effective, existing expert offloading tech-
                                                                       niques still suffer from high latency. Subsequent research
Through extensive experiments, we validated the effective-             includes optimizing prefetching techniques and cache re-
ness of MoLE at scales of 160M, 410M, and 1B parame-                   placement strategies to accelerate inference speed (Shen
ters. As in Figure 1, with equivalent computational cost               et al., 2022), designing MoE architectures that are more
and VRAM usage, MoLE significantly outperforms dense                   friendly to prefetching (Hwang et al., 2024), or employing
models while maintaining the same inference speed. Com-                other model compression techniques to reduce prefetching
pared to MoE with expert offloading, MoLE achieves better              latency (Yi et al., 2023).
performance and with significantly faster inference speed.

                                                                   2
                                                              Mixture of Lookup Experts

   Shared FFN




                                                              Shared FFN




                                                                                                                Shared FFN
                  FFN1    FFN2         FFN3   FFN4                         FFN1   FFN2         FFN3   FFN4




                                                                                                                                                             Off-Device
                                                                                                                                                   ...

                            Router                                                     Router                                Router
                                                                                                                                                         Lookup




   (Optional)
                           Attention                                                  Attention                                        Attention

                                 ...                                                     ...                                              ...

                           Embedding                                                  Embedding                                       Embedding

                                 id                                                      id                                               id


                                                     MoE   MoLE (Ours)            Training                                            Inference



Figure 2. Illustration of MoLE. During training, MoLE differs from MoE in two key structural aspects: i) The routed experts in MoLE
take embedding tokens as input. ii) All experts in MoLE are activated. During inference, the routed experts in MoLE are re-parameterized
as zero-computation, offloaded LUTs. For simplicity, normalization layers and residual connections of attention layers are omitted.


3. Mixture of Lookup Experts                                                           MoE layers, with 8 experts per layer, but only 2 experts are
                                                                                       activated per token. Although only 13B parameters are acti-
3.1. Preliminary                                                                       vated per token, the total parameter count reaches up to 46B,
First, we briefly introduce the structure of MoE and the                               requiring at least 92GB of VRAM for FP16 deployment.
challenges it faces during inference.                                                  If temporary loading is chosen, each expert is 176M in size,
For MoE, each expert is typically a FFN module. As illus-                              and loading the necessary experts for a single decoding
trated in Figure 2 (left), a MoE layer contains N routed                               step would require up to 11.3B of parameter transfer. If
experts, represented as {FFNj }N  j=1 , and a linear router,
                                                                                       offloading to CPU VRAM is selected, using a GPU with
                 N
denoted as {r j }j=1 . Some models may also introduce a                                PCIe 4.0×16 would still incur a transfer latency of 0.7s per
shared expert FFNshared that is activated in all cases. Given                          step. Offloading to disk, on the other hand, results in an
input token h ∈ Rd , the output token h′ ∈ Rd of the MoE                               unacceptable transfer latency of over 10s per step. More
layer is computed as                                                                   importantly, since the selection of experts is dynamically
                                                                                       determined by the router, the experts chosen for different
                         G = ArgTopK({h · r j }N
                                               j=1 )                        (1)        samples are highly likely to differ when batch size > 1.
                                                                                       This requires loading all the selected experts (may be all
                    {gj }j∈G = SoftMax({h · r j }j∈G )                      (2)        experts when batch size is large) into VRAM, which not
                     X                                                                 only increases VRAM usage but also further exacerbates
                h′ =
                                      
                           gj FFNi (h) + FFNshared (h) + h                  (3)        communication latency.
                     j∈G
                                                                                       The reason experts need to be loaded into VRAM is that
where G denotes the indexes of the activated experts, and
                                                                                       they participate in the computation, which relies on GPU.
gi denote the gate value for the i-th expert.
                                                                                       In other words, if the experts do not require computation,
The computational efficiency of MoE lies in the fact that, in                          we do not need to load them, thereby avoiding significant
Eq. (3), only k routed experts are involved in the computa-                            communication overhead. To address this, we introduce
tion. However, we cannot determine which experts need to                               MoLE, a new MoE architecture whose experts can be re-
participate until Eq. (1) is completed. This means that we                             parameterized as computation-free LUTs in inference.
either need to store all the experts in VRAM or temporarily
load the required k experts into VRAM after Eq. (1) is                                 3.2. Training Phase
computed.
                                                                                       As illustrated in Figure 2, during training, MoLE and
However, both of these solutions present deployment chal-                              MoE have similar structures, including N routed experts
lenges. Taking Mixtral-8×7B as an example, it has 32

                                                                                  3
                                                   Mixture of Lookup Experts


              Table 1. Complexities of different architectures. We report the statistics of a single FFN or MoE layer.

     Models                            FLOPs         # Param in VRAM # Param Offloaded # Param Loaded per Token
     Dense                            4dDs                2dDs                       0                       0
     MoE                          4d(kDr + Ds )       2d(N Dr + Ds )                 0                       0
     MoE + Expert Offloading      4d(kDr + Ds )       2d(kDr + Ds )               2dN Dr              2dkDr (worst case)
     MoLE + LUT Offloading            4dDs                2dDs                     dN |V|                   dN


{FFNj }N                                N
        j=1 and a linear router {r j }j=1 .    Specifically,          which allows us to obtain v ij for all i. The items of the LUT
MoLE also includes a shared expert FFNshared , which is al-           at the l-th layer can be represented as
ways activated for any input and does not receive weighting                                                   |V|
from the router.                                                                        LUTl = {{v ij }N
                                                                                                       j=1 }i=1                  (7)

Since the experts will be transformed into LUTs after train-          where |V| denotes the size of the vocabulary.
ing, MoLE differs from MoE in the following ways. First,              After re-parameterization, the LUT is offloaded to the stor-
LUT is computation-free, eliminating the need for sparse              age device, and the computation of the MoLE layer can be
activation to reduce computational cost. Therefore, MoLE              represented as
activates all experts, rather than just the top-k experts. The
computation for the router is as                                                       N
                                                                                       X
                                                                                h′ =         gj v ij + FFNshared (h) + h
                                                                                                    
                                                                                                                                 (8)
            {gj }N                       N
                 j=1 = SoftMax({h · r i }i=1 )              (4)                        j=1


Second, since the LUT is essentially a mapping between a              The inputs of the LUT in MoLE are the input ids, meaning
finite set of input-output pairs, the key to re-parameterizing        that no context information is included. This is a trade-off to
the experts into LUTs is ensuring that they only have a lim-          ensure that the experts can be re-parameterized, but it does
ited number of possible inputs. To this end, MoLE uses the            not imply that the expert layers do not contribute to context-
output of the embedding layer, i.e., the embedding tokens, as         related knowledge. Firstly, the router and shared experts
the input to the experts. After training, the embedding layer         still take intermediate features as input, which means they
is only related to the input ids, which means that the inputs         can access contextual information. Secondly, the output of
to the experts are limited to a finite set. The computation           the expert layer is part of the input to subsequent attention
for the layer is as                                                   layers, allowing the experts to influence the behavior of later
                                                                      attentions. This enables the experts to adjust how the model
              N
              X                                                       processes the same words in different contexts, thereby still
       h′ =
                               
                    gj FFNi (e) + FFNshared (h) + h         (5)       enhancing the model’s capacity.
              j=1

                                                                      3.4. Complexity Analysis
in which e = Embedding(i) ∈ Rd is the embedding token,
and i deonotes the input id.                                          Consider an MoE layer with MLP-based FFNs as experts.
All experts are activated and receive gradients during train-         Let the hidden layer dimension of the routed experts be Dr ,
ing. Therefore, we do not need to add any auxiliary losses            and the hidden layer dimension of the shared experts be Ds .
to prevent collapse or maintain training stability. MoLE              When a single token is used as input, the FLOPs for this
is trained solely using the cross-entropy loss of language            MoE layer can be computed as
modeling just like a dense model.                                                    FLOPsMoE = 4d(kDr + Ds )                    (9)

3.3. Inference Phase                                                  in which the router and normalization is neglected.

After training, MoLE can be directly used for inference like          To save VRAM, we assume that all routed experts are of-
other LLMs. However, to further reduce VRAM overhead,                 floaded, and then the offloaded parameter count is
we can re-parameterize the experts. For each possible input                             OffParamMoE = 2dN Dr                    (10)
id i, we pre-compute the outputs of expert FFNj as
                                                                      In the worst case, during inference, we need to load the k
              v ij = FFNj (Embedding(i)) ∈ Rd               (6)       experts that the current token is routed to into VRAM. The
                                                                      number of per-step loaded parameter is
In practice, we only need to perform a single forward pass
with the embedding layer’s weights as the input to FFNj ,                              LoadParamMoE = 2dkDr                     (11)

                                                                  4
                                                    Mixture of Lookup Experts


Table 2. Model architectures. We ensure a fair comparison by keeping the number of activated parameters the same in inference for the
dense, MoE, and MoLE models.

   # Activated Param                                                                                # Attention     # Parameters
                             Models          L        d         Ds         Dr       N        k
      in Inference                                                                                    Heads          in Training
                            Dense           12       768       3072         -        -       -          12              0.16B
                           MoE-10E          12       768         -        1536      10       2          12              0.39B
   160M                    MoLE-4E          12       768       3072       3072      4       4           12              0.39B
                           MoE-34E          12       768         -        1536      34       2          12              1.07B
                           MoLE-16E         12       768       3072       3072      16      16          12              1.07B
                            Dense           24      1024       4096         -        -       -          16              0.41B
                           MoE-10E          24      1024         -        2048      10       2          16              1.21B
   410M                    MoLE-4E          24      1024       4096       4096      4       4           16              1.21B
                           MoE-34E          24      1024         -        2048      34       2          16              3.63B
                           MoLE-16E         24      1024       4096       4096      16      16          16              3.63B
                             Dense          16      2048       8192         -        -       -           8              1.01B
   1B                       MoE-10E         16      2048         -        4096      10       2           8              3.16B
                            MoLE-4E         16      2048       8192       8192      4        4           8              3.16B


For MoLE, since the experts are transformed into                      no shared experts and activating the top-2 routed experts,
computation-free LUTs, its FLOPs can be computed as                   since Muennighoff et al. (2024) suggest that shared experts
                                                                      lead to performance degradation. To ensure the number of
                    FLOPsMoLE = 4dDs                       (12)       activation parameter is the same as that of the dense model,
                                                                      the hidden dimension of the MoE FFNs is set to half the
The number of parameters contained in the offload LUT is              hidden dimension of the dense model’s FFNs.
                  OffParamMoLE = dN |V|                    (13)       For the MoLE model, since routed experts have no computa-
                                                                      tion during inference, we use FFNs identical to those of the
In each inference step, since we only need to load all the v ij       dense model’s FFNs as the shared experts to keep the same
from Eq. (8) into VRAM, the amount of parameters loaded               FLOPs as the dense model. For the routed experts, since
is only                                                               their hidden dimension does not affect the model architec-
                  LoadParamMoLE = dN                     (14)         ture during inference, we set it to be the same as the shared
                                                                      experts for simplicity. We implemente MoE with both 10
We summarize all these comparisons in Table 1. Since |V|              and 34 experts and MoLE with both 4 and 16 experts for
is typically on the order of tens of thousands, for example,          comparison.
|V| = 32k for Mixtral (Jiang et al., 2024) and |V| = 50k
for Pythia (Biderman et al., 2023), and Dr varies from                Data & Tokenizer. We train all models on a 100B-token
thousands to tens of thousands depending on the model                 subset of the deduped Pile dataset (Gao et al., 2021), us-
size, the number of offloaded parameters in MoE and MoLE              ing the GPT-NeoX tokenizer employed by Pythia, with a
will not differ by an order of magnitude. However, the                vocabulary size of 50k.
number of parameters loaded per token in MoLE will be                 Hyper-Parameters. We follow the learning rate settings
only a fraction — often hundreds or even thousands of times           used by Pythia, specifically 6.0 × 10−4 for the models with
smaller — compared to the number of parameters loaded                 160M activated parameter, and 3.0 × 10−4 for the models
per token in MoE.                                                     with 410M and 1B activated parameter. For the MoE model,
                                                                      the coefficients for the z-loss and load balance loss are set to
4. Experiments                                                        0.001 and 0.01, respectively, as suggested by Muennighoff
                                                                      et al. (2024).
4.1. Experimental Setup
                                                                      Benchmarks. We use the lm-evaluation-harness package
Model Architectures. As shown in Table 2, we imple-                   for evaluation. The benchmarks used include ARC-C (Clark
ment models with activation parameter counts of 160M,                 et al., 2018), ARC-E (Clark et al., 2018), BoolQ (Clark
410M, and 1B. For the dense model, we basically follow                et al., 2019), HellaSwag (Zellers et al., 2019), PIQA (Bisk
the Pythia (Biderman et al., 2023) setup. For the MoE                 et al., 2020), RACE (Lai et al., 2017), SIQA (Sap et al.,
model, we adopt a configuration similar to Mixtral, with

                                                                  5
                                                     Mixture of Lookup Experts


Table 3. Comparison of the complexities of different architectures. MoE offloads all experts and MoLE offloads the LUT, ensuring
that both models maintain the same VRAM usage as the dense model. “# Param Loaded per Token” considers the worst-case scenario,
when the experts of MoE activated in the current step have no overlap with those from the last step.

                               # Param
                # Param
   Models                      Loaded       ARC-C ARC-E BoolQ HellaSwag PIQA RACE SIQA LAMBADA AVG
                Offloaded
                              per Token
   160M Activated & In-VRAM Parameters
   Dense           0B             0M          20.3      45.9     57.1        29.7     64.0    29.4    37.8       26.2       38.8
   MoE-10E        0.3B           57M          21.7      49.5     51.6        32.0     66.8    30.6    39.1       31.0       40.3
   MoLE-4E        1.8B         0.037M         21.9      48.5     60.7        31.2     65.1    29.4    38.4       31.1       40.8
   MoE-34E        1.0B           57M          20.5      50.0     57.5        34.5     67.3    28.6    39.9       36.4       41.8
   MoLE-16E       7.4B         0.15M          22.4      48.6     60.3        32.7     68.3    30.9    38.6       33.3       41.9
   410M Activated & In-VRAM Parameters
   Dense           0B             0M          21.8      50.8     56.8        33.8     66.5    29.6    39.2       36.2       41.8
   MoE-10E        1.0B          201M          24.1      53.5     54.5        37.1     69.0    30.8    40.8       41.5       43.9
   MoLE-4E        4.9B         0.098M         22.0      54.8     61.1        35.9     69.6    30.9    40.1       42.2       44.6
   MoE-34E        3.4B          201M          25.0      57.0     59.7        39.9     71.5    32.3    40.4       47.1       46.6
   MoLE-16E       19.7B         0.39M         23.6      57.0     60.9        37.6     70.8    32.0    40.2       43.5       45.7
   1B Activated & In-VRAM Parameters
   Dense           0B            0M           24.1      56.9     52.8        37.6     69.5    31.6    39.1       43.1       44.3
   MoE-10E        2.7B         537M           25.9      57.8     53.8        40.7     72.0    33.6    41.3       48.0       46.6
   MoLE-4E        6.6B         0.26M          25.5      58.8     61.7        39.8     71.7    32.1    40.9       48.3       47.4


Table 4. Ablation study on training loss. The base model is MoLE-16E with 160M activated parameters. After adding the auxiliary loss
used by MoE, the performance decreased.

  Training Loss                           ARC-C ARC-E BoolQ HellaSwag PIQA RACE SIQA LAMBADA AVG
  LM loss only (ours)                      22.4       48.6     60.3        32.7      68.3    30.9     38.6       33.3       41.9
  LM loss + load balance loss              21.2       50.8     60.2        32.4      66.5    31.5     37.7       33.1       41.7
  LM loss + load balance loss + z -loss    20.7       50.5     51.7        32.5      67.7    30.8     38.2       32.5       40.6


2019), and LAMBADA (Paperno et al., 2016). For all these              parison of five pairs of MoLE and MoE models with the
benchmarks, we report the zero-shot accuracy.                         same number of training parameters, MoLE outperforms
                                                                      MoE in four out of the five comparisons in terms of average
Offloading Setting. To measure the deployment efficiency
                                                                      accuracy. Notably, for MoLE-16E with 160M, 410M, and
of different models in VRAM-constrained environments, we
                                                                      1B activated parameters, the number of per-token loaded
apply offloading strategies to both MoE and MoLE to ensure
                                                                      parameter is only about 1/1500, 1/2000, and 1/2000 of that
their VRAM usage is consistent with that of a dense model
                                                                      of MoE, respectively. This demonstrates that MoLE can
with the same number of activated parameters. For the MoE
                                                                      maintain outstanding performance while significantly reduc-
model, we adopt an expert offloading strategy, where only
                                                                      ing communication overhead, making it feasible to offload
the parameters of the activated experts and all non-expert
                                                                      to lower-tier storage devices.
parameters are stored in VRAM. During each inference
step, if the required activated expert is not in VRAM, it is          We note that the size of the LUTs in MoLE is 2.4 to 7.4
loaded from the storage device into VRAM, replacing the               times larger than the size of the offloaded experts in MoE.
previously loaded expert. For MoLE, we offload the LUT,               However, since these parameters are offloaded to large, scal-
while keeping the other parameters stored in VRAM.                    able storage devices, we believe the storage overhead of
                                                                      the LUTs remains within an acceptable range. Specifically,
4.2. Main Results                                                     as the model size increases, the proportion of the LUTs
                                                                      also decreases accordingly. On models with 1B activated
As shown in Table 3, both MoE and MoLE significantly                  parameters, the size of the LUTs in MoLE-4E becomes
improve performance over the dense baseline. In the com-

                                                                 6
                                                  Mixture of Lookup Experts


Table 5. Ablation study on the hidden dimension of routed experts. The base model is MoLE-16E with 160M activated parameters.

                                   # Param
            # Param   # Param
  Dr                               Loaded ARC-C ARC-E BoolQ HellaSwag PIQA RACE SIQA LAMBADA AVG
          in Training Offloaded
                                  per Token
  768       0.4B        7.4B       0.15M      20.6     48.1      58.7        31.4      66.9    30.3    38.7      31.9       40.8
  3072      1.1B        7.4B       0.15M      22.4     48.6      60.3        32.7      68.3    30.9    38.6      33.3       41.9
  12288     3.8B        7.4B       0.15M      21.8     52.4      58.1        33.1      67.6    29.2    38.7      32.3       41.7


       Table 6. Ablation study on the number of routed experts. The base model is MoLE with 160M activated parameters.

                                   # Param
            # Param   # Param
 N                                 Loaded ARC-C ARC-E BoolQ HellaSwag PIQA RACE SIQA LAMBADA AVG
          in Training Offloaded
                                  per Token
 2           0.3B        0.9B      0.02M      19.5      48.2     57.7        30.2      64.7    29.5    38.1       29.4      39.7
 4           0.4B        1.8B      0.04M      21.9      48.5     60.7        31.2      65.1    29.4    38.4       31.1      40.8
 8           0.6B        3.7B      0.07M      19.4      50.5     60.2        32.0      66.4    29.9    37.4       32.6      41.1
 16          1.1B        7.4B      0.15M      22.4      48.6     60.3        32.7      68.3    30.9    38.6       33.3      41.9
 32          2.0B       14.7B      0.29M      21.8      53.1     59.0        33.5      68.4    30.7    38.8       33.0      42.3


comparable to the size of the experts in MoE.                        Architecture designs. To ensure that routed experts can be
                                                                     re-parameterized, we change the input to the routed experts
4.3. Ablation Experiments                                            from intermediate features to embedding tokens. Intuitively,
                                                                     this modification means that the experts only receive the raw
Training loss. Unlike MoE, MoLE is a fully differentiable            word features and no context-related information, which is
model, so during training, we do not encounter issues like           likely to lead to a decrease in model performance. But on the
router collapse or instability. Therefore, we do not use any         other hand, since the re-parameterized experts do not require
additional auxiliary losses. To illustrate this, we attempt to       computation during the inference phase, we can activate all
add the load balance loss and z-loss from MoE. As shown in           the experts while keeping the model’s inference FLOPs
Table 4, after adding these losses, the model’s performance          unchanged. This helps compensate for the performance
decline. This is because the additional losses caused the            loss mentioned earlier. To conduct an ablation study on
model’s optimization objectives to become misaligned with            this, we trained the following model variants, evolving from
the inference requirements, leading to negative effects.             MoE-10E to MoLE-4E of 160M activated parameters:
Number and size of experts. We experiment with varying
the size and number of experts. As shown in Table 5, when               • Full activation. All experts of MoE-10E are activated,
the hidden dimension of the experts increases from d to                   which causes the number of activated parameters to
4d, the model’s performance improves. However, further                    increase from 0.16B to 0.39B. Meanwhile, all auxiliary
increasing the dimension to 16d leads to performance sat-                 losses are discarded.
uration. This is because increasing the size of the experts
does not affect the re-parameterized models or the size of              • Reconfiguration. Based on the above model, we modify
the LUTs during inference. It indicates that the knowledge                the experts by changing from 10 routed experts to 1
embedded in LUTs with a constant size reaches saturation                  shared expert and 4 routed experts. Additionally, the
as the expert size increases, meaning that there is no “free              hidden dimension of the experts is increased to twice its
lunch” — further increases in expert size do not lead to                  original size. The total number of parameters remains
additional performance gains.                                             unchanged.
Unlike the increase in size, the increase in the number of              • Embedding as inputs. Based on the above model, we
experts results in a continuous performance improvement,                  change the input to the routed experts to embedding
demonstrating a certain level of scalability. At the same                 tokens.
time, the size of the LUTs and the amount of parameters
transferred will also increase proportionally.                          • Re-parameterization. Based on the above model, we
                                                                          reparameterize the routed experts as LUTs. Then the

                                                                 7
                                                     Mixture of Lookup Experts


                                       Table 7. Ablation study on the designs in structure.

                                         # Param
                             # Param
  Model                                 Activated ARC-C ARC-E BoolQ HellaSwag PIQA RACE SIQA LAMBADA AVG
                           in Training
                                       in Inference
  MoE-10E                     0.39B       0.16B        21.7     49.5              51.6                  32.0       66.8    30.6       39.1    31.0       40.3
  + Full activation           0.39B       0.39B        21.6     50.2              58.6                  33.3       66.8    30.5       39.6    33.5       41.8
  + Reconfiguration           0.39B       0.39B        21.5     48.7              58.0                  32.7       67.5    31.1       38.5    33.7       41.5
  + Embedding as inputs       0.39B       0.39B        21.9     48.5              60.7                  31.2       65.1    29.4       38.4    31.1       40.8
  + Re-param. = MoLE-4E       0.39B       0.16B        21.9     48.5              60.7                  31.2       65.1    29.4       38.4    31.1       40.8


           Table 8. Post-training quantization for LUTs. The base model is MoLE-4E with 160M activated parameters.

                            Size of Param
    LUT    Size of Param
                               Loaded     ARC-C ARC-E BoolQ HellaSwag PIQA RACE SIQA LAMBADA AVG
  Precision Offloaded
                             per Second
  FP16            3.5GB         72KB          21.9       48.5     60.7                           31.2          65.1   29.4        38.4       31.1        40.8
  NF4             0.9GB         18KB          21.5       48.5     61.7                           31.3          64.7   29.6        38.6       30.9        40.9
  NF3             0.7GB         14KB          22.3       48.1     59.8                           31.0          65.3   28.9        38.5       30.1        40.5


     number of activated parameters during inference re-
                                                                                           500           Dense
                                                                       Latency (ms/step)

     turns to 0.16B. This model is referred to as MoLE-4E.                                               MoE-10E
                                                                                           400
                                                                                                         MoLE-4E (Ours)
As shown in the table, using embedding tokens as the input                                 300           MoE-34E
to the routed experts only results in a 0.7 performance drop,                                            MoLE-16E (Ours)
                                                                                           200
but it brings significant benefits of enabling the experts to
be re-parameterized, allowing us to activate all experts. A                                100
fully activated MoE yields a 1.5 performance gain com-                                      0
                                                                                                               1                  8                 32
pared to top-2 MoE, which leads to an overall performance                                                                  Batch Size
improvement for MoLE over MoE.

4.4. Efficiency
                                                                       Figure 3. Decoding latency. We use experts offloading for MoE.
We measure the per-step decoding latency of models with                The light-colored portion of the bars represents the delay caused
410M activated parameters on NVIDIA V100 GPU using                     by loading.
Huggingface’s transformers package. Since the spe-
cific speed of parameter loading is largely influenced by
the underlying implementation, we estimate the latency of              higher latency than the dense model. As the batch size
loading parameters based on the maximum PCIe bandwidth                 increases, the number of experts being loaded also increases,
of the V100, which is 16GB/s. For the MoE model, when                  further adding to the latency of MoE, but the latency of
the batch size is 1, the experts activated in the previous de-         MoLE has almost no increase.
coding step are retained in VRAM. When the batch size is
greater than 1, random two of the activated experts from the           4.5. Reducing the Size of LUTs
previous decoding step are retained in VRAM for each layer.
                                                                       Although MoLE significantly reduces data transfer in of-
If the experts activated in the current step overlap with those
                                                                       floading scenarios compared to MoE, it has a larger storage
in VRAM, they will not be reloaded. Under this setup, the
                                                                       footprint. While storage space may not be as constrained
average number of experts loaded per step for batch sizes
                                                                       as VRAM, reducing the size of the LUTs can still allevi-
of 1, 8, and 32 are 1.6, 6.7, and 8.0 for MoE-10E, or 1.9,
                                                                       ate deployment burdens. To address this, we conduct a
12.3, and 27.4 for MoE-34E, respectively. The input length
                                                                       simple experiment to compress the LUTs. We apply post-
is fixed to 512.
                                                                       training quantization to the FP16 LUTs, quantizing them
As shown in Figure 3, the latency of MoLE is comparable                to NF4 and NF3 (Dettmers et al., 2023) data types. The
to that of the dense model, while MoE exhibits significantly           token-wise block sizes for quantization are 768 and 128,

                                                                  8
                                                   Mixture of Lookup Experts

respectively. As shown in Table 8, the model’s performance            Collobert, R., Bengio, S., and Bengio, Y. A parallel mixture
suffers minimal loss, while the storage burden and size of              of svms for very large scale problems. Neural Comput.,
transferred data are reduced to 25.3% and 19.5% of the                  14(5):1105–1114, 2002.
original size, respectively. This indicates that the LUTs still
contains significant redundancy and has the potential for             Dai, D., Deng, C., Zhao, C., Xu, R. X., Gao, H., Chen,
further compression. We leave this as future work.                      D., Li, J., Zeng, W., Yu, X., Wu, Y., Xie, Z., Li, Y. K.,
                                                                        Huang, P., Luo, F., Ruan, C., Sui, Z., and Liang, W.
                                                                        Deepseekmoe: Towards ultimate expert specialization in
5. Conclusion                                                           mixture-of-experts language models. In Proceedings of
In this paper, we address the issues of high memory con-               ACL, 2024.
sumption and loading latency in MoE by proposing MoLE,
                                                                      Deisenroth, M. P. and Ng, J. W. Distributed gaussian pro-
a novel language model architecture. MoLE restricts the
                                                                        cesses. In Proceedings of ICML, 2015.
input to experts to a limited set (embedding tokens), allow-
ing the experts to be re-parameterized into LUTs before               Dettmers, T., Pagnoni, A., Holtzman, A., and Zettlemoyer,
inference, thus avoiding the need to load expert param-                 L. Qlora: Efficient finetuning of quantized llms. In
eters. MoLE demonstrates competitive results on down-                   Proceedings of NeurIPS, 2023.
stream tasks, while significantly outperforming MoE with
expert offloading in terms of inference speed. This work              Eigen, D., Ranzato, M., and Sutskever, I. Learning factored
provides a new direction for designing edge-friendly lan-               representations in a deep mixture of experts. In Workshop
guage models. Future research could explore more diverse                of ICLR, 2014.
discrete spaces and expert architectures.
                                                                      Eliseev, A. and Mazur, D. Fast inference of mixture-of-
                                                                        experts language models with offloading. arXiv preprint,
Impact Statement                                                        arXiv:2312.17238, 2023.
This paper advances LLMs, which have potential societal
                                                                      Gao, L., Biderman, S., Black, S., Golding, L., Hoppe, T.,
impacts, including concerns around bias, misinformation,
                                                                        Foster, C., Phang, J., He, H., Thite, A., Nabeshima, N.,
and accessibility. Continued ethical oversight and interdisci-
                                                                        Presser, S., and Leahy, C. The pile: An 800gb dataset
plinary collaboration are essential as the field evolves.
                                                                        of diverse text for language modeling. arXiv preprint,
                                                                        arXiv:2101.00027, 2021.
References
                                                                      Hwang, R., Wei, J., Cao, S., Hwang, C., Tang, X., Cao, T.,
Aljundi, R., Chakravarty, P., and Tuytelaars, T. Expert
                                                                       and Yang, M. Pre-gated moe: An algorithm-system co-
  gate: Lifelong learning with a network of experts. In
                                                                       design for fast and scalable mixture-of-expert inference.
  Proceedings of CVPR, 2017.
                                                                       In Proceedings of ISCA, 2024.
Biderman, S., Schoelkopf, H., Anthony, Q. G., Bradley,
                                                                      Jacobs, R. A., Jordan, M. I., Nowlan, S. J., and Hinton, G. E.
  H., O’Brien, K., Hallahan, E., Khan, M. A., Purohit,
                                                                        Adaptive mixtures of local experts. Neural Comput., 3
  S., Prashanth, U. S., Raff, E., Skowron, A., Sutawika,
                                                                        (1):79–87, 1991.
  L., and van der Wal, O. Pythia: A suite for analyzing
  large language models across training and scaling. In               Jiang, A. Q., Sablayrolles, A., Roux, A., Mensch, A., Savary,
  Proceedings of ICML, 2023.                                             B., Bamford, C., Chaplot, D. S., de Las Casas, D., Hanna,
Bisk, Y., Zellers, R., Bras, R. L., Gao, J., and Choi, Y.                E. B., Bressand, F., Lengyel, G., Bour, G., Lample, G.,
  PIQA: reasoning about physical commonsense in natural                  Lavaud, L. R., Saulnier, L., Lachaux, M., Stock, P., Sub-
  language. In Proceedings of AAAI, 2020.                                ramanian, S., Yang, S., Antoniak, S., Scao, T. L., Gervet,
                                                                         T., Lavril, T., Wang, T., Lacroix, T., and Sayed, W. E.
Clark, C., Lee, K., Chang, M., Kwiatkowski, T., Collins,                 Mixtral of experts. arXiv preprint, arXiv:2401.04088,
  M., and Toutanova, K. Boolq: Exploring the surprising                  2024.
  difficulty of natural yes/no questions. In Burstein, J.,
  Doran, C., and Solorio, T. (eds.), Proceedings of NAACL-            Jin, P., Zhu, B., Yuan, L., and Yan, S. Moe++: Accelerat-
  HLT, 2019.                                                             ing mixture-of-experts methods with zero-computation
                                                                         experts. In Proceedings of ICLR, 2025.
Clark, P., Cowhey, I., Etzioni, O., Khot, T., Sabharwal, A.,
  Schoenick, C., and Tafjord, O. Think you have solved                Jordan, M. I. and Jacobs, R. A. Hierarchical mixtures of
  question answering? try arc, the AI2 reasoning challenge.             experts and the EM algorithm. Neural Comput., 6(2):
  arXiv preprint, arXiv:1803.05457, 2018.                               181–214, 1994.

                                                                  9
                                                  Mixture of Lookup Experts

Kaplan, J., McCandlish, S., Henighan, T., Brown, T. B.,               Xue, L., Fu, Y., Lu, Z., Mai, L., and Marina, M. K. Moe-
  Chess, B., Child, R., Gray, S., Radford, A., Wu, J., and              infinity: Activation-aware expert offloading for efficient
  Amodei, D. Scaling laws for neural language models.                   moe serving. arXiv preprint, arXiv:2401.14361, 2024.
  arXiv preprint, arXiv:2001.08361, 2020.
                                                                      Yan, S., Bin, X., Zhang, S., Wang, Y., and Lin, Z. Tc-
Lai, G., Xie, Q., Liu, H., Yang, Y., and Hovy, E. H. RACE:              moe: Augmenting mixture of experts with ternary expert
  large-scale reading comprehension dataset from exami-                 choice. In Proceedings of ICLR, 2025.
  nations. In Palmer, M., Hwa, R., and Riedel, S. (eds.),
                                                                      Yi, R., Guo, L., Wei, S., Zhou, A., Wang, S., and Xu,
  Proceedings of EMNLP, 2017.
                                                                        M. Edgemoe: Fast on-device inference of moe-based
Lepikhin, D., Lee, H., Xu, Y., Chen, D., Firat, O., Huang, Y.,          large language models. arXiv preprint, arXiv:2308.14352,
  Krikun, M., Shazeer, N., and Chen, Z. Gshard: Scaling                 2023.
  giant models with conditional computation and automatic
                                                                      Zellers, R., Holtzman, A., Bisk, Y., Farhadi, A., and Choi,
  sharding. In Proceedings of ICLR, 2021.
                                                                        Y. Hellaswag: Can a machine really finish your sentence?
Muennighoff, N., Soldaini, L., Groeneveld, D., Lo, K., Mor-             In Proceedings of ACL, 2019.
 rison, J., Min, S., Shi, W., Walsh, P., Tafjord, O., Lambert,
 N., Gu, Y., Arora, S., Bhagia, A., Schwenk, D., Wadden,
 D., Wettig, A., Hui, B., Dettmers, T., Kiela, D., Farhadi,
 A., Smith, N. A., Koh, P. W., Singh, A., and Hajishirzi, H.
 Olmoe: Open mixture-of-experts language models. arXiv
 preprint, arXiv:2409.02060, 2024.

Paperno, D., Kruszewski, G., Lazaridou, A., Pham, Q. N.,
  Bernardi, R., Pezzelle, S., Baroni, M., Boleda, G., and
  Fernández, R. The LAMBADA dataset: Word prediction
  requiring a broad discourse context. In Proceedings of
  ACL, 2016.

Rajbhandari, S., Ruwase, O., Rasley, J., Smith, S., and He,
  Y. Zero-infinity: breaking the GPU memory wall for
  extreme scale deep learning. In de Supinski, B. R., Hall,
  M. W., and Gamblin, T. (eds.), Proceedings of SC, 2021.

Rasmussen, C. E. and Ghahramani, Z. Infinite mixtures of
  gaussian process experts. In Proceedings of NIPS, 2001.

Sap, M., Rashkin, H., Chen, D., Bras, R. L., and Choi,
  Y. Social iqa: Commonsense reasoning about social
  interactions. In Proceedings of EMNLP-IJCNLP, 2019.

Shahbaba, B. and Neal, R. M. Nonlinear models using
  dirichlet process mixtures. J. Mach. Learn. Res., 10:
  1829–1850, 2009.

Shazeer, N., Mirhoseini, A., Maziarz, K., Davis, A., Le,
  Q. V., Hinton, G. E., and Dean, J. Outrageously large
  neural networks: The sparsely-gated mixture-of-experts
  layer. In Proceedings of ICLR, 2017.

Shen, L., Wu, Z., Gong, W., Hao, H., Bai, Y., Wu, H., Wu,
  X., Xiong, H., Yu, D., and Ma, Y. Se-moe: A scalable and
  efficient mixture-of-experts distributed training and infer-
  ence system. arXiv preprint, arXiv:2205.10034, 2022.

Theis, L. and Bethge, M. Generative image modeling using
  spatial lstms. In Proceedings of NIPS, 2015.

                                                                 10
                                    Mixture of Lookup Experts

Appendix
A. Pseudocode
A.1. Training Phase

class MoleDecoderLayer(nn.Module):
   def __init__(self, config):
      super().__init__()
      self.self_attn = Attention(config)
      self.shared_expert = MLP(config)
      self.router = nn.Linear(config.hidden_size, config.num_experts, bias=False)
      self.routed_expert = nn.ModuleList([MLP(config) for _ in config.num_experts])
      self.input_layernorm = RMSNorm(config.hidden_size)
      self.post_attention_layernorm = RMSNorm(config.hidden_size)
      self.expert_layernorm = RMSNorm(config.hidden_size)

   def forward(self, hidden_states, embedding_states):
      ’’’Attention’’’
      residual = hidden_states
      hidden_states = self.input_layernorm(hidden_states)
      hidden_states = self.self_attn(hidden_states)
      hidden_states = residual + hidden_states

       ’’’Shared Expert’’’
       residual = hidden_states
       hidden_states = self.post_attention_layernorm(hidden_states)
       shared_output = self.shared_expert(hidden_states)

       ’’’Routed Expert’’’
       router_value = nn.functional.softmax(self.router(hidden_states), dim=-1)
       embedding_states = self.expert_layernorm(embedding_states)
       routed_output = torch.stack([expert(embedding_states) for expert in
           self.routed_expert], dim=2)
       routed_output = (routed_output * router_value.unsqueeze(-1)).sum(dim=2)
       hidden_states = residual + shared_output + routed_output

       return hidden_states



A.2. Inference Phase

class MoleDecoderLayer(nn.Module):
   def __init__(self, config):
      super().__init__()
      self.self_attn = Attention(config)
      self.shared_expert = MLP(config)
      self.router = nn.Linear(config.hidden_size, config.num_experts, bias=False)
      self.lut = LookupTable(config.vocab_size, config.num_experts * config.hidden_size)
      self.input_layernorm = RMSNorm(config.hidden_size)
      self.post_attention_layernorm = RMSNorm(config.hidden_size)

   def forward(self, hidden_states, input_ids):
      ’’’Lookup’’’
      lookup_results = self.lut(input_ids).to(hidden_states.device, non_blocking=True)

       ’’’Attention’’’
       residual = hidden_states
       hidden_states = self.input_layernorm(hidden_states)
       hidden_states = self.self_attn(hidden_states)
       hidden_states = residual + hidden_states

       ’’’Shared Expert’’’
       residual = hidden_states

                                               11
                                       Mixture of Lookup Experts

     hidden_states = self.post_attention_layernorm(hidden_states)
     shared_output = self.shared_expert(hidden_states)

     ’’’Routed Expert’’’
     router_value = nn.functional.softmax(self.router(hidden_states), dim=-1)
     lookup_results = lookup_results.view(-1, config.num_experts, config.hidden_size)
     routed_output = (lookup_results * router_value.unsqueeze(-1)).sum(dim=2)
     hidden_states = residual + shared_output + routed_output

     return hidden_states



B. Hyper-parameters

                            Configuration Key                                  Value
                            attention-dropout                                       0
                            dtype                                               bf16
                            global-batch-size                                   1024
                            gradient-clipping                                     1.0
                            hidden-dropout                                          0
                            lr-decay-style                                    cosine
                            max-position-embeddings                             2048
                            min-lr                         0.1 ∗ optimizer.params.lr
                            no-weight-tying                                     True
                            norm                                         RMSNorm
                            optimizer.params.betas                       [0.9, 0.95]
                            optimizer.params.eps                               1e-08
                            optimizer.type                                    Adam
                            pos-emb                                           rotary
                            rotary-pct                                           0.25
                            seq-length                                          2048
                            train-iters                                       50000
                            warmup                                               0.01
                            weight-decay                                         0.01




                                                      12
