                                        UNREAL: U NIFYING R ETRIEVAL                                                                                                 AND              L ONG -
                                        C ONTEXT WITH A S INGLE M ODEL
                                                     Edan Kinderman1 , Elad Hoffer1 , Yochai Blau1 , Brian Chmiel1 , Ron Banner1 ,
                                                     Daniel Soudry1,2 , Boris Ginsburg1
                                                     1                        2
                                                           NVIDIA                 Technion
                                                     {ekinderman,ehoffer,yblau,bchmiel,rbanner,dsoudry,bginsburg}@nvidia.com



                                                                                                                     A BSTRACT
arXiv:2610.08463v1 [cs.CL] 6 Oct 2026




                                                                       Long-context inference and Retrieval-Augmented Generation (RAG) handle evi-
                                                                       dence selection at vastly different scales, from a single long prompt to an entire
                                                                       corpus. We ask whether a single model-internal mechanism can select evidence
                                                                       across this range. We introduce UNifying REtrieval And Long-Context with a
                                                                       Single Model (UNREAL), a model-native evidence selection framework to span
                                                                       corpus retrieval and long-context inference. UNREAL encodes chunks and de-
                                                                       rives retrieval queries directly from the frozen LLM’s internal representations. It
                                                                       adds fewer than 500K trainable parameters and leaves the backbone unchanged.
                                                                       On a 3B-token, 21M-chunk Wikipedia index, all four dense and hybrid UNREAL
                                                                       backbones outperform state-of-the-art retriever-reranker systems. The best model
                                                                       raises recall from 49.1% to 73.2% on HotpotQA, from 31.7% to 60.1% on 2Wiki-
                                                                       MultiHopQA, and from 8.8% to 14.4% on MuSiQue. Applied to long-context
                                                                       tasks, the same selection mechanism removes distractors before generation, rais-
                                                                       ing NoLiMa accuracy from 1.0% to 24.83% at its maximum context length of
                                                                       128K tokens, and LV-Eval’s F1 score from 49.97% to 54.66% at 256K. UNREAL
                                                                       also reduces FLOPs and time-to-first-token relative to full-context inference from
                                                                       roughly 32K tokens onward, with larger gains as context grows. Together, these
                                                                       results establish model-internal evidence selection as a common foundation for
                                                                       corpus retrieval and evidence-sparse long-context inference.


                                                                Nemotron-3.5-Lightning-30B-A3B                        Qwen3.5-35B-A3B                                Muse-Glimmer-30B

                                                                   Long context                RAG               Long context                  RAG         55    Long context               RAG
                                                                                                           60
                                                           60                                                                                              50
                                                                                                           55
                                        Exact match (EM)




                                                                                                                                                           45
                                                                                                           50
                                                           50
                                                                                                                                                           40
                                                                                                           45

                                                                                                                                                           35
                                                                                                           40
                                                           40
                                                                                                                                                           30
                                                                                                           35
                                                           8k


                                                                   k

                                                                        8k


                                                                              2k

                                                                                    2M


                                                                                          8M


                                                                                                 M

                                                                                                      0M



                                                                                                           8k


                                                                                                                 k

                                                                                                                      8k


                                                                                                                             2k

                                                                                                                                     2M


                                                                                                                                          8M


                                                                                                                                                 M

                                                                                                                                                      0M



                                                                                                                                                           8k


                                                                                                                                                                 k

                                                                                                                                                                      8k


                                                                                                                                                                            2k

                                                                                                                                                                                 2M


                                                                                                                                                                                      8M


                                                                                                                                                                                              M

                                                                                                                                                                                                   0M
                                                                 32




                                                                                                                32




                                                                                                                                                                32
                                                                                               32




                                                                                                                                               32




                                                                                                                                                                                            32
                                                                       12


                                                                             51




                                                                                                                     12


                                                                                                                            51




                                                                                                                                                                     12


                                                                                                                                                                           51
                                                                                                     10




                                                                                                                                                     10




                                                                                                                                                                                                  10




                                                                             Context length                                Context length                                  Context length

                                                                              Full context (all chunks)              BM25                                   BGE-large-en-v1.5 + Reranker
                                                                              Qwen3-Emb-0.6B + Reranker              Qwen3-Emb-4B + Reranker                UNREAL (ours)



                                        Figure 1: Exact match on question-answering as context length grows from 8K to 100M tokens.
                                        Full context evaluation is shown only until computationally infeasible. For retrieval-based methods,
                                        relevant context is first extracted from the input and then fed to the model to generate the answer.
                                        Unlike baselines that rely on external models, UNREAL leverages the frozen LLM’s internal repre-
                                        sentations to retrieve relevant context, maintaining the highest accuracy across long context lengths.



                                                                                                                                 1
1     I NTRODUCTION
Modern LLMs often process contexts where relevant information is sparsely distributed. To isolate
these key signals, evidence selection is done differently, depending on the scale. At long-context
scale, selection is implicit and internal: the model receives the full context and must suppress irrele-
vant content while generating. This avoids having a separate retriever, but is vulnerable to distractors
(Modarressi et al., 2025; Shi et al., 2023), and scaling it requires dedicated architectures, efficiency
mechanisms, and long-context training. At larger, corpus scale, this selection is explicit and ex-
ternal: a separate retriever selects passages before generation (Lewis et al., 2020). This creates a
two-model pipeline that must be trained, served, and kept aligned.
Despite being studied as alternative approaches (Xu et al., 2024; Li et al., 2024; 2025b; Lee et al.,
2024), long-context and RAG perform the same operation: query-conditioned selection of candidate
evidence. Only the scale differs, from hundreds of chunks in a prompt to millions in a corpus.
This suggests that the strengths of both approaches can be combined: make selection internal, so
evidence is ranked in the representation space of the model that will use it, and make selection
explicit, so distractors are removed during generation (Yu et al., 2024a). We therefore ask: can a
single pretrained LLM explicitly select evidence at both scales? An affirmative answer would make
retrieval and long-context inference two scales of one mechanism rather than competing systems.

1.1   M ODEL - INTERNAL EVIDENCE SELECTION ACROSS SCALES
We answer this question with UNifying REtrieval And Long-Context with a Single Model (UN-
REAL), a model-native evidence selector that operates across both long-context and corpus scales.
We build on INTRA (Hoffer et al., 2026), which demonstrated intrinsic retrieval in encoder–decoder
models. However, INTRA relies on a separate encoder and cross-attention, which prevents its di-
rect application to today’s predominant decoder-only LLMs. UNREAL removes this restriction by
encoding candidate chunks and deriving retrieval queries directly from the frozen LLM’s internal
states. UNREAL adds fewer than 500K trainable parameters, trained with contrastive loss, on top
of the frozen LLM: a soft prompt that elicits a retrieval mode and layer weights that combine its
internal states for evidence ranking. Because it reads from the residual stream, the same mechanism
applies across dense-attention, linear-attention, and state-space architectures.
At the corpus scale, UNREAL retrieves from a 3B-token, 21M-chunk Wikipedia index. All four
tested backbones outperform the strongest dedicated retriever-reranker systems. The best raises
recall@10 from 49.1% to 73.2% on HotpotQA and from 31.7% to 60.1% on 2WikiMultiHopQA.
The retrieval-trained UNREAL module can also rank chunks within a long-context prompt and re-
turn only the selected text to the LLM. This explicit removal of distractors raises accuracy on differ-
ent long-context benchmarks: at the maximum evaluated length, NoLiMa accuracy rises from 1.0%
to 24.83% at 128K tokens, while LV-Eval’s F1 score rises from 49.97% to 54.66% at 256K. This
is achieved using the same LLM, without requiring an external retriever. The method also reduces
FLOPs and time-to-first-token versus full-context inference from roughly 32K tokens onward, with
larger gains as context grows. UNREAL thus turns corpus retrieval and long-context inference into
two scales of the same model-internal selection mechanism (Fig. 1).

1.2   C ONTRIBUTIONS
1. Intrinsic corpus-scale retrieval with modern LLMs. UNREAL extends INTRA (Hoffer et al.,
   2026) to decoder-only dense and hybrid LLMs, relying on a single frozen model to encode
   candidates and extract retrieval queries. With fewer than 500K trainable parameters, all four
   tested backbones outperform the strongest dedicated retriever–reranker systems on a 21M-chunk
   Wikipedia index (Section 3).
2. Long-context selection with the same mechanism. UNREAL outperforms both full-context
   inference and methods that rely on separate external retrievers across several long-context bench-
   marks, including NoLiMa, HELMET, LV-Eval, and LOFT, while reducing FLOPs and time-to-
   first-token at practical context lengths (Section 4).
3. One selector across six orders of magnitude. The same model-native module selects evidence
   from an 8K-token context up to a 3B-token corpus, unifying long-context and retrieval reading
   without architectural changes or backbone finetuning.


                                                   2
                                               Retrieve
                                               chunks




                                         Similarity                         Learnable
                                    5                                   4
                                         scoring                            Sum
                                                                                            Answer
                Chunks
            2
                embeddings
                                                                                                    7 Generation
                                  LLM
                                                                    Layer




                                                                                           .. ..
                                                                   .. ..
                                    .. ..
                                                                    Layer

                                                                    Layer 1

                                            1 Encoding                      3 Encoding              6 Generation

                                Chunks


                                                                Query   Retrieval        Retrieve    Query
                                                                         tokens          chunks

                                                      Retrieval                           Generation


Figure 2: UNREAL trains retrieval tokens ρ and summation weights α (fire indicates training), while
keeping the LLM frozen, enhancing its ability to identify relevant information in a context. Given
a long context, these trained variables enable UNREAL to select relevant chunks and pass them to
the same LLM for retrieval-augmented generation. Numbers indicate the order of operations.

2     M ETHOD
Standard retrieval-augmented generation (RAG) (Lewis et al., 2020) delegates evidence selection to
an external retriever, forcing production pipelines to maintain multiple models. In this work, we
unify this process within a single decoder-only LLM using its intrinsic retrieval capabilities. The
closest work to ours, INTRA (Hoffer et al., 2026), asks whether an encoder–decoder model can
instead retrieve directly from its own encoded representations. However, INTRA’s reliance on an
encoder–decoder architecture and cross-attention prevents its direct application to the more widely
adopted decoder-only LLMs, limiting the range of pretrained models it can use.
In this work, we seek the same intrinsic retrieval capability in decoder-only LLMs, including hybrid
architectures that interleave attention with other sequence mixers (Gu & Dao, 2024). Our method,
UNREAL, generalizes INTRA by replacing its encoder-derived chunk embeddings ki and cross-
attention queries qℓ with representations available inside a decoder-only model. UNREAL consists
of three main components: chunk embeddings (Section 2.1), residual-state queries (Section 2.2),
and generation (Section 2.3). Fig. 2 provides an overview of the method.

2.1   C HUNK EMBEDDINGS

Let C = {ci }Mi=1 denote a corpus of M chunks. Given a query x, the goal is to retrieve the subset
S(x) ⊆ {1, . . . , M } containing the evidence needed to answer it. INTRA encodes each chunk
once as ki = Enc(ci ), where Enc denotes the model encoder. Decoder-only LLMs lack a separate
encoder. UNREAL therefore uses the frozen LLM itself to encode each corpus chunk independently.
For a chunk ci of length Ti , we select a single intermediate layer ℓc and extract its token-level
representations:
                                   ki = LLMℓc (ci ) ∈ RTi ×d ,                                  (1)
where LLMℓc (·) denotes the residual-stream states at layer ℓc , and d is the model’s hidden dimen-
sion. Thus, each chunk is represented by a sequence of Ti token vectors.
Prior work has shown that intermediate layers often encode richer semantic representations than final
layers (Skean et al., 2025). Motivated by this observation, we evaluate representations from different
layers in our corpus-retrieval setting and select ℓc according to performance on a development set
(see the ablation in Table 4).


                                                            3
2.2   R ESIDUAL STATE QUERIES

In order to perform query conditioned matching, UNREAL concatenates R learned retrieval tokens
                                                            d Tq
{ρi ∈ Rd }R i=1 to the query token embeddings {xt ∈ R }t=1 , where Tq is the query length. It also
augments the input with an initial context C0 (x), which represents the chunks ranked highest for the
query x by BM25 (Robertson & Zaragoza, 2009). Together, we get
                                                                              
                              xret = C0 (x), x1 , . . . , xTq , ρ1 , . . . , ρR ,                 (2)
Then it reads the residual stream states at the retrieval token positions:
                   ∀ℓ : qℓ (xret ) = LLMℓ (xret ) (|xret |−R+1):|xret | ∈ RR×d .
                                                      
                                                                                                   (3)
Placing the retrieval tokens last ensures that, under the causal mask, their states condition on both
the query and the initial context. These internal layer-wise query representations qℓ are used to score
every chunk ci with the late-interaction MaxSim operator (Khattab & Zaharia, 2020):
                                                      X                    
                            si (x; ρ, α) = MaxSim          αℓ qℓ (xret ), ki ,                      (4)
                                                        ℓ
                                                                        P
where αℓ are learned layer-mixing coefficients and MaxSim(u, v) ≜         a maxb ⟨ua , vb ⟩.

The retrieved chunk set is then selected by
               SUNREAL (x) = {i ∈ {1, . . . , M } : si (x) is among the top-n scores} .            (5)
Retrieval is therefore based on the internal representations qℓ and internal chunk encodings ki instead
of an external index and model. Only ρ and α are added as learned parameters, the LLM remains
frozen.
Because our read-out operates on the residual stream, it can be applied uniformly across architectures
that use softmax attention, linear attention, or state-space layers, including hybrids that combine
these layer types. Aggregating read-outs across these layer types is further motivated by the causal
attention interpretation of selective SSMs (Ali et al., 2025; Jiang et al., 2026).
Retrieval training. The retrieval loss is a multi-positive InfoNCE objective (Oord et al., 2018; Chen
et al., 2020) that contrasts oracle chunks with sampled alternatives. For a query x, let O(x) contain
the oracle indices, corresponding to chunks that contain the annotated evidence needed to answer
the query. Let N (x) contain the hard negatives chunks. Over B(x) = O(x) ∪ N (x), we minimize
                                        1     X               exp(sj (x)/τ )
                       Lretrieval = −               log P                         ,                (6)
                                      |O(x)|                i∈B(x) exp(si (x)/τ )
                                              j∈O(x)

where τ is the temperature. Training updates only the retrieval tokens ρi and layer-mixing coeffi-
cients αℓ , while the LLM parameters remain frozen. We then apply the resulting selector to retrieval
tasks in Section 3 and long-context benchmarks in Section 4.
Compression. To reduce corpus-scale storage, we partition the full token-level chunk representa-
tions ki ∈ RTi ×d into Lp contiguous groups and mean-pool each group, compressing chunks from
Ti × d to Lp × d. Similarly, we mean-pool the R retrieval-token states qℓ across G groups, com-
pressing queries from R × d to G × d. The parameters Lp and G trade off retrieval accuracy against
index size and MaxSim compute cost.

2.3   S CORING AND GENERATION

Following Eq. (5), SUNREAL (x) contains the indices of the n highest-scoring chunks. To provide
the model with this relevant context, the selected chunks CUNREAL (x) = [ci : i ∈ SUNREAL (x)]
are concatenated with the query in the LLM prompt:
                                 y = LLM([ CUNREAL (x) , x ]) .                                    (7)
Unlike INTRA, which passes the selected encoder memories through cross-attention, UNREAL re-
encodes the selected chunks during generation. Inference thus uses one LLM forward pass to form
the retrieval queries qℓ , and a second ordinary generation pass over the selected chunks.
In the following sections, we present how UNREAL can be used for both corpus retrieval and long-
context evidence selection. We then discuss the connection between retrieval and long-context tasks.


                                                   4
                                                          HotpotQA                                                          2WikiMultiHopQA                                                                    MuSiQue




     Complete-Evidence
                         80                                                69.1 70.5 73.2 72.9 60                                                   57.1 55.3 60.1 58.9                                                                     14.4 13.8
                                                                                                                                                                              15                                                12.6 12.7
                         60



        recall@10
                                                                    49.1
                                                          44.6 48.8                                40                                                                                                               8.6   8.8
                                                                                                                                 29.6 31.7 30.3                               10                              7.1
                         40          34.6          34.6                                                                                                                                                6.0
                              25.9          27.6                                                                     24.6 25.9                                                                  4.9
                                                                                                        20.7 17.5                                                                        4.3
                         20                                                                        20                                                                          5   3.0

                          0                                                                         0                                                                          0
                                                            HoVer                                                                       IIRC                                                                  SQuAD v2
                                                                                                   40
     Complete-Evidence




                                                                                       47.4 46.3                                                                32.2          60                                                       56.1 53.4 54.4
                                                                                                                                                                                                                                51.9
                                                                           40.1 42.4                                                                28.3 27.4          28.5                                         47.4 47.5
                         40                                                                        30                                                                                                  40.9 43.1
        recall@10




                                                                                                                                        22.2 22.2
                                                                                                                                 19.2                                         40 36.0           34.4
                                                          25.4 24.5 28.1                           20 15.9 12.8 13.2 15.8                                                                28.9
                                           18.3
                         20 17.7 16.3 14.7                                                                                                                                    20
                                                                                                   10

                          0                                                                         0                                                                          0
                                                            FEVER                                                           Natural Questions                                                   Average across 8 datasets
                    100
Complete-Evidence




                                                                        84.5 85.8 86.5                                                                   28.9 30.1 30.6                                                                   49.6 49.0
                                               76.7 76.8 78.6 78.9 81.6                30                                                                                                                                       45.7 47.2
                                                                                                                            25.9 24.4 26.0 26.7 24.9
                         75          68.1 71.9                                                                24.6
                                                                                                                                                                                                              33.8 36.0 36.5
   recall@10




                              58.5                                                                                                                                            40
                                                                                                                     19.1                                                                              30.5
                                                                                                   20                                                                                        26.3
                         50                                                                                                                                                        23.3 25.9
                                                                                                        8.9                                                                   20
                         25                                                                        10

                          0                                                                         0                                                                          0
                                                                                                          Single-hop dataset            Multi-hop dataset

                                                            BM25                          BGE-large-en-v1.5                      Qwen3-Emb-0.6B                           Qwen3-Emb-4B
                                                            Hybrid RAG                    LateOn (LI) + reranker                 Qwen3-Emb-4B + reranker
                                                            UNREAL-Qwen3.5-4B             UNREAL-Qwen3.5-35B-A3B                 UNREAL-Muse-Glimmer-30B                  UNREAL-Nemo3.5-Lightning-30B-A3B




Figure 3: UNREAL scales to full-corpus Wikipedia retrieval. Complete-evidence recall@10
on 21M Wiki-2018 chunks across eight datasets; an example is correct only when all annotated evi-
dence chunks are retrieved. Across four architectures, UNREAL consistently outperforms baselines,
especially on multi-hop datasets. Bars show means with 95% BCa confidence intervals.


3                             UNREAL AS A R ETRIEVAL M ECHANISM
Our experiments evaluate whether UNREAL remains effective at a scale requiring genuine retrieval
over the 3B-token, 21M-chunk Wiki-2018 corpus (Karpukhin et al., 2020a), with a mean chunk
length of 140 tokens. We report complete-evidence recall@n: the fraction of examples with all
annotated oracle chunks retrieved in the top-n results. This is particularly demanding for multi-hop
tasks, where partial evidence receives no credit. Average recall@n appears in Figs. 9 and 10.
Benchmarks and baselines. The evaluation spans HotpotQA, 2WikiMultiHopQA, MuSiQue,
HoVer, IIRC, SQuAD v2, FEVER, and Natural Questions (Yang et al., 2018; Ho et al., 2020;
Trivedi et al., 2022; Jiang et al., 2020; Ferguson et al., 2020; Rajpurkar et al., 2018; Thorne et al.,
2018; Kwiatkowski et al., 2019). We map oracle chunks to the shared Wiki-2018 corpus using a
KILT-style procedure (Petroni et al., 2021). We compare against BM25, Qwen3-Embedding and
BGE dense retrievers, the Jina cross-encoder reranker, LightOn multi-vector (late-interaction) re-
triever, and hybrid RAG based on RRF (Robertson & Zaragoza, 2009; Zhang et al., 2025; Xiao
et al., 2024b; Jina AI, 2024; Sourty et al., 2026; Cormack et al., 2009). See Appendix B for the full
details.


3.1                            R ESULTS

We demonstrate UNREAL’s architectural generality across four backbones: the dense models
Qwen3.5-4B and Muse-Glimmer-30B, the linear-attention hybrid Qwen3.5-35B-A3B, and the
Mamba–attention hybrid Nemotron-3.5-Lightning-30B-A3B (Meta Superintelligence Lab, 2026;
Qwen Team, 2026; NVIDIA, 2026).
Full corpus evaluation. Fig. 3 reports complete-evidence recall@10. Each UNREAL backbone
leads on most of the eight datasets. The largest gains occur on HotpotQA, 2WikiMultiHopQA,
MuSiQue, and HoVer, challenging multi-hop tasks requiring evidence from multiple articles. A
similar pattern appears for recall@20 in Fig. 8. For ablation studies please refer to Table 3, Table 4
and Table 5.
Generation evaluation. Table 1 reports end-to-end question-answering performance with
Nemotron-3.5-Lightning fixed as the generator and only the retriever providing its top-5 chunk con-
text varied. We also report an oracle upper bound using only oracle chunks and a no-context lower
bound. UNREAL attains the highest EM and F1 on all three datasets while using the same LLM for
retrieval and generation. Experiments with Qwen3.5-35B-A3B as the generator appear in Table 2.


                                                                                                                                  5
Table 1: Exact match (EM) and macro-averaged F1 on three multi-hop QA datasets, generated by
Nemotron-3.5-Lightning under each retrieval method’s top-5 retrieved context. UNREAL achieves
the highest EM and F1 scores across all three datasets while relying on a single LLM for both
retrieval and generation.

                                                HotpotQA         2Wiki        MuSiQue
               Method                           EM     F1     EM      F1     EM      F1
               No context                      28.5    37.7   29.9   34.6    6.8    16.6
               Oracle                          64.3    78.9   57.5   66.8   47.5    58.2
               BM25                            39.1    49.7   29.1   35.5    6.4    14.6
               BGE-large-en-v1.5               39.6    51.2   28.5   35.6    8.6    17.6
               Qwen3-Emb-0.6B                  37.9    48.5   28.2   35.5   10.1    18.1
               Qwen3-Emb-4B                    39.2    51.4   31.6   38.8   10.5    18.1
               Hybrid RAG                      41.5    53.1   32.5   39.8   10.0    18.9
               LateOn + reranker               43.3    55.2   30.8   38.7   11.4    20.1
               Qwen3-Emb-4B + reranker         43.3    55.3   31.4   39.1   13.2    22.6
               UNREAL-Nemo3.5-Lightning        52.6    65.8   42.0   50.1   16.9    25.4



Overall, UNREAL turns a frozen LLM into a full-corpus retriever by training only the retrieval-
token embeddings ρ and layer-mixing weights α: fewer than 0.5M added parameters in total, under
0.005% of each tested backbone’s parameter count.


4     UNREAL AS A L ONG C ONTEXT M ECHANISM

In this section, we investigate whether UNREAL’s retrieval mechanism can tackle long-context tasks
by treating the full prompt as a collection of chunks to retrieve from. Many tasks framed as long-
context understanding are, in practice, sparse-evidence problems: only a small number of chunks
contain the information needed to answer the query, while the remaining context is irrelevant. This
structure closely resembles retrieval tasks such as multi-hop question answering (Ho et al., 2020).
In this setting, the answer quality depends strongly on retrieving the required evidence. Even when
evidence is retrieved, distractors may interfere with generation. Thus, expanding the context window
ensures evidence is available, but not that the model can locate and use it effectively. While prior
works (Xu et al., 2024; Li et al., 2024; 2025b) have identified the connection between retrieval and
long context data, these approaches rely on an external retriever to select the relevant context. In
contrast, UNREAL is the first to use the frozen LLM’s internal representations to select evidence
and generate the answer.

4.1   R ESULTS

Given a long input as context, we treat it as a retrieval problem, i.e., we first split it into M chunks
with a mean chunk length of 140 tokens and use the frozen LLM to encode each chunk separately
(Eq. (1)). Then, UNREAL ranks the chunks against the input query (Eqs. (3) and (4)), selects the
top-n (Eq. (5)), and gives their unchanged text to the same frozen LLM for answering (Eq. (7)).
Full experimental details are provided in Appendix B. Similarly, we include other retrieval base-
lines, such as BM25 and embedding models paired with rerankers. We wish to emphasize that the
UNREAL models used in this section are the same ones presented in Section 3, i.e., no special
long-context training data was involved.
To evaluate evidence selection at lengths far beyond those of existing long-context benchmarks, we
follow the methodology of LOFT (Lee et al., 2024) and construct an QA benchmark spanning 8K to
100M tokens. We draw queries and their corresponding oracle chunks from QA benchmarks and pad
them with random distractor passages from Wiki-2018. As shown in Fig. 1, full-context accuracy
drops sharply as context length grows, whereas retrieval-based approaches perform significantly
better. UNREAL outperforms all baselines at large scales and enables generation using evidence
selected from 100M tokens, far beyond the context limits of current LLMs. For results on standard
LOFT see Fig. 12.


                                                   6
                                                           NoLiMa                                                                          LV-Eval
                       100
                                                                                                                 56
                        80

     Answer accuracy




                                                                                                    LV-Eval F1
                        60                                                                                       54

                        40
                                                                                                                 52
                        20

                         0                                                                                       50
                                         4k      8k     16k     32k      64k            128k                            16k        32k       64k     128k           256k
                                                   Context length (tokens)                                                         Context length (words)

                                                         Oracle (gold chunks)                  Full context (all chunks)                BM25
                                                         BGE-large-en-v1.5 + Reranker          Qwen3-Emb-4B + Reranker                  UNREAL (ours)




Figure 4: Left: NoLiMa accuracy across context lengths (4K–128K tokens) using Nemotron-3-
Nano. Right: LV-Eval F1 across context lengths (16K–256K words, averaged over LooGLE-SD and
MultiFieldQA-en) using Nemotron-3.5-Lightning. In both cases, full-context performance degrades
as context grows, whereas UNREAL achieves the highest performance.

                                              Nemotron-3.5-Lightning-30B-A3B                                                   Qwen3.5-35B-A3B
                                        80                                                            80
                                                                                                                      67.2                                   70.3
                                                                                                                                         66.0      65.9
                                                                                        60.2
                                        60    55.5               56.0        55.1                     60
                         Substring EM




                                                                                                                               54.2
                                                      45.4
                                        40                                                            40

                                        20                                                            20

                                         0                                                                 0

                                                     Full context (all chunks)            BM25                                BGE-large-en-v1.5 + Reranker
                                                     Qwen3-Emb-4B + Reranker              UNREAL (ours)




Figure 5: Substring exact-match on the RAG subset of the HELMET long context benchmark, with
Nemotron-3.5-Lightning-30B-A3B and Qwen3.5-35B-A3B as generators. UNREAL outperforms
full-context inference and other retrieval methods for both generators.


Fig. 4 presents results on NoLiMa (Modarressi et al., 2025), a needle-in-a-haystack benchmark
where queries and target needles share no direct keyword overlap, alongside English QA subsets
from LV-Eval (Yuan et al., 2024). As context lengths scale up to 128K tokens in NoLiMa and 256K
words in LV-Eval, full-context performance degrades sharply. In contrast, retrieval baselines remain
far more stable, with UNREAL consistently achieving the highest accuracy across all scales.
Fig. 5 shows results on the RAG subset of the HELMET QA long-context benchmark (Yen et al.,
2024). The tasks use context lengths of 8K–128K tokens, and the reported scores are averaged
across these lengths. Full-context inference remains a strong baseline, but UNREAL achieves the
highest exact-match score for both generators.
Top-n trade-off. In Fig. 6 (left) we examine how the number of selected chunks, n, affects perfor-
mance on the long-context NoLiMa benchmark. Accuracy follows an inverted-U pattern: increasing
n initially improves performance by raising evidence recall, but eventually reduces performance as
additional distractors interfere with generation. Similar non-monotonic trade-offs have been re-
ported in prior work (Yu et al., 2024b; Jin et al., 2024). UNREAL demonstrates that the same
pattern arises when a single decoder-only LLM performs both retrieval and generation.
Intrinsic retrieval. To evaluate whether a frozen LLM can perform retrieval, we test Nemotron-3-
Nano on NoLiMa by segmenting the text into chunks. Within every attention layer, we mean-pool
the key embeddings to yield a single key vector per chunk. We similarly average the query embed-
dings over the question tokens and compute a dot product between the pooled key and query vectors.
This process yields a per-chunk similarity score, allowing us to compute recall. Fig. 6 (right) shows
that these “intrinsic” untrained layer representations retrieve evidence above the random baseline.
This finding motivates UNREAL, which trains retrieval tokens ρ to strengthen the retrieval signal
already present in the frozen model. For full details, see Appendix A.2.1.


                                                                                                7
                                                                                                   0.9
               60                                      1.0                                         0.8




                                                             Average recall@n

                                                                                Average recall@n
Accuracy (%)                                                                                       0.7
               50                                      0.8                                         0.6
                                                                                                   0.5
               40                                      0.6                                         0.4
                                                                                                   0.3
               30                                      0.4
                                                                                                   0.2
                                                                                                   0.1
               20                                      0.2
                                                                                                   0.0
                    1     2     5    10 20      50 M                                                      1      2      5     10   20      50
                        Number of retrieved chunks n                                                          Number of retrieved chunks n

                                Accuracy (%)                                                       Intrinsic, per layer, not trained         UNREAL, trained
                                Average recall@n                                                   Intrinsic, best layer (L5), not trained   Random



Figure 6: Recall and accuracy on the NoLiMa benchmark for Nemotron-3-Nano. Left: The effect
of the number of selected chunks n on UNREAL’s accuracy and recall. Right: Embeddings from
the frozen LLM outperform random retrieval, motivating UNREAL, which is trained to enhance this
capability.


4.2                 E FFICIENCY

Does UNREAL’s additional retrieval pass make it less efficient than full-context inference, or do
its savings dominate at sufficiently long contexts? Although UNREAL uses separate retrieval and
generation passes, both reduce context-dependent computation. During retrieval, it encodes chunks
independently, avoiding most inter-chunk attention in the prefill. During generation, it attends only
to the selected chunks, greatly reducing both context attention and the KV-cache size. For fixed
chunk size and selection budget, UNREAL therefore scales linearly with context length, whereas
with standard attention full-context inference scales quadratically.
We determine where these savings outweigh the extra pass in both FLOPs and wall-clock time.
Appendix C gives the full FLOP difference in equation 8. Applying this to the three tested backbones
in our experimental setting, Table 6 shows the UNREAL uses less FLOPs for context lengths over
18K tokens. We also measure stage-wise time-to-first-token with vLLM on a single H100. Figure 7
shows the resulting speedup: it grows with context length across all backbones, with dashed curves
projecting the full-context runtime beyond its last feasible measurement using the FLOP model.
As can be seen, UNREAL reduces time-to-first-token at commonly used context lengths, roughly
32K tokens onward, with substantial speedups at longer contexts. Full methodology is provided in
Appendix D.


5               R ELATED W ORK

Retrieval models. ColBERT and ColBERTv2 score passages by MaxSim over token representa-
tions (Khattab & Zaharia, 2020; Santhanam et al., 2022). LLM retrievers contrastively train gener-
ators for retrieval (Wang et al., 2024; Ma et al., 2024; Zhang et al., 2025). UNREAL is also con-
trastively trained, but the chunk encoder and reader remain a frozen generative decoder. REALM,
RAG, and related methods jointly train distinct retriever and reader components (Guu et al., 2020;
Lewis et al., 2020; Izacard et al., 2023). We instead share the frozen backbone representation across
retrieval and generation, while retaining a separately trained query head. INTRA (Hoffer et al.,
2026) is the closest predecessor: it introduced retrieval from an encoder–decoder model’s inter-
nal representations. We adapt the method to standard decoder-only LLMs and use the selector for
long-context tasks.
Efficient attention. Landmark Attention, InfLLM, Quest, MoBA, NSA, and HiLS-Attention select
blocks of tokens within an LLM’s input and perform attention only on those blocks (Mohtashami
& Jaggi, 2023; Xiao et al., 2024a; Tang et al., 2024; Lu et al., 2025; Yuan et al., 2025; Hu et al.,
2026) to improve efficiency. Sparse attention fixes or learns a restricted set of positions (Beltagy
et al., 2020; Zaheer et al., 2021; Kitaev et al., 2020; Xiao et al., 2023; Xu et al., 2026); block-level


                                                                                8
                                                                UNREAL speedup over full-context baseline




         Speedup = baseline(L) / UNREAL(L)
                                             103         Muse-Glimmer-30B
                                                         Nemotron-3.5-Lightning-30B-A3B
                                                         Qwen3.5-35B-A3B

                                             102



                                             101



                                             100
                                                                                                              T = 128, n = 10

                                                   10K               100K               1M              10M             100M
                                                                            Context length L (tokens)
      Dots + solid: directly measured baseline. Dashed: FLOPs-scaled projection beyond the last measured length.
Figure 7: Time-to-first-token speedup of UNREAL over full-context inference. Solid curves use
directly measured full-context runtimes; dashed curves use FLOP-scaled projections beyond the last
measured context length.


methods summarize and rank KV blocks (Mohtashami & Jaggi, 2023; Xiao et al., 2024a; Tang et al.,
2024; Lu et al., 2025; Yuan et al., 2025; Xu et al., 2025); and hierarchical methods route attention
through chunk summaries (Hu et al., 2026). UNREAL instead uses a retrieval-trained mechanism
built on the frozen decoder’s representations to select chunks before generation, so the LLM receives
only the selected text for generation.
RAG and long context. Prior work compares retrieval pipelines with full-context models (Xu et al.,
2024; Li et al., 2024; 2025b) or asks whether long context subsumes retrieval (Lee et al., 2024).
UNREAL differs from both approaches. Unlike retrieval pipelines, it requires no external retrieval
model, avoiding the need to develop and maintain multiple models in production. Unlike full-context
baselines, UNREAL is trained on retrieval tasks and removes unselected chunks before generation,
preventing them from distracting the generator (Shi et al., 2023; Yu et al., 2024a).

6   L IMITATIONS
Our training data originated from Wikipedia QA, so transfer to heterogeneous domains and lan-
guages remains for future work. For now, our long-context experiments focus on sparse-evidence
tasks. UNREAL stores Lp vectors per chunk, costing more to build and store than a single-vector
dense index, and relies on a cheap BM25 initial context. We generate answers with general-purpose
LLMs rather than task-specific span extractors such as SpanBERT (Joshi et al., 2020), which are bet-
ter suited to extractive QA and achieve higher exact match scores. While applying retrieval to long-
context tasks substantially reduces context length and improves generation efficiency, it introduces
additional steps for chunk encoding and search; these extra steps are inherent to any retrieval-based
approach, not unique to UNREAL.
Multi-pass agentic RAG systems interleave reasoning with repeated retrieval (Li et al., 2025a; Asai
et al., 2024). UNREAL instead focuses on a single-pass retrieval mechanism that could serve as
a component within future agentic pipelines. Because these systems evaluate an entire iterative
reasoning-and-retrieval pipeline, whereas UNREAL isolates a single retrieval stage, they are not
directly comparable and are therefore excluded from our baselines.

7   D ISCUSSION AND F UTURE D IRECTIONS
This work asks whether corpus retrieval and long-context inference can share a single evidence-
selection mechanism inside a decoder-only LLM. UNREAL answers this question by using the
LLM’s representations to encode and rank candidate chunks, with fewer than 500K trainable pa-
rameters while keeping the backbone frozen. As shown, UNREAL outperformed SOTA retrieval


                                                                                    9
methods on both retrieval and long-context benchmarks. These findings support a unified view of
corpus retrieval and long-context inference as the same evidence-selection problem operating at dif-
ferent scales, and provide a path toward LLMs that retrieve and use relevant information without
relying on a separate retrieval model.

7.1   F UTURE DIRECTIONS

We close by discussing what our main finding, that retrieval supervision improves a model’s evi-
dence selection, implies for training and evaluating context-scalable models.
Train the model to recall. UNREAL makes the model’s internal retrieval ability trainable. Retrieval
supervision teaches the model’s representations to rank relevant chunks, improving recall rather than
relying on this ability to emerge from pretraining alone. As shown, the learned retriever improves
both corpus-scale retrieval and in-prompt long-context selection.
An alternative path to context scalability. These results motivate training in-model retrieval to-
gether with generation, rather than treating a larger context window as sufficient. Under this view,
sparse-evidence long-context tasks should be formulated primarily as retrieval problems during both
training and evaluation. Models should learn to identify the evidence they need before generating,
and evaluations should report evidence recall alongside answer accuracy.
Benchmarks should separate evidence regimes. This perspective does not reduce all long-context
understanding to retrieval. New benchmarks should annotate the evidence required for each an-
swer and distinguish sparse-evidence tasks from evidence-dense problems that require integrating
information across a large fraction of the input and cannot be solved by selecting a few chunks.




                                                 10
R EFERENCES
Ameen Ali, Itamar Zimerman, and Lior Wolf. The hidden attention of Mamba models. In Pro-
 ceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume
 1: Long Papers), pp. 1516–1534, 2025. doi: 10.18653/v1/2025.acl-long.76. URL https:
 //aclanthology.org/2025.acl-long.76/.

Akari Asai, Zeqiu Wu, Yizhong Wang, Avirup Sil, and Hannaneh Hajishirzi. Self-RAG: Learning to
  retrieve, generate, and critique through self-reflection. In International Conference on Learning
  Representations (ICLR), 2024.

Iz Beltagy, Matthew E. Peters, and Arman Cohan. Longformer: The Long-Document Transformer,
   2020. URL https://arxiv.org/abs/2004.05150.

Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for
  contrastive learning of visual representations. In International conference on machine learning,
  pp. 1597–1607. PmLR, 2020.

Gordon V. Cormack, Charles L. A. Clarke, and Stefan Büttcher. Reciprocal rank fusion outperforms
  condorcet and individual rank learning methods. In Proceedings of the 32nd International ACM
  SIGIR Conference on Research and Development in Information Retrieval, pp. 758–759. ACM,
  2009. doi: 10.1145/1571941.1572114.

James Ferguson, Matt Gardner, Hannaneh Hajishirzi, Tushar Khot, and Pradeep Dasigi. IIRC: A
  dataset of incomplete information reading comprehension questions. In Proceedings of the 2020
  Conference on Empirical Methods in Natural Language Processing, pp. 1137–1147, 2020. doi:
  10.18653/v1/2020.emnlp-main.86.

Albert Gu and Tri Dao. Mamba: Linear-time sequence modeling with selective state spaces. In
  First Conference on Language Modeling (COLM), 2024. URL https://arxiv.org/abs/
  2312.00752.

Kelvin Guu, Kenton Lee, Zora Tung, Panupong Pasupat, and Ming-Wei Chang. REALM: Retrieval-
  augmented language model pre-training. In Proceedings of the 37th International Conference on
  Machine Learning, ICML’20, 2020.

Xanh Ho, Anh-Khoa Duong Nguyen, Saku Sugawara, and Akiko Aizawa. Constructing a multi-
  hop QA dataset for comprehensive evaluation of reasoning steps. In Proceedings of the 28th
  International Conference on Computational Linguistics, pp. 6609–6625, 2020.

Elad Hoffer, Yochai Blau, Edan Kinderman, Ron Banner, Daniel Soudry, and Boris Ginsburg. Re-
  trieval from within: An intrinsic capability of attention-based models, 2026. URL https:
  //arxiv.org/abs/2605.05806.

Xiang Hu, Xinyu Wei, Hao Gu, Minshen Zhang, Tian Liang, Huayang Li, Lei Zhu, Yan Wang, Sirui
  Han, Yushi Bai, Kewei Tu, Haitao Mi, and Leo Liang. Hierarchical sparse attention done right:
  Toward infinite context modeling, 2026. URL https://arxiv.org/abs/2607.02980.

Gautier Izacard, Patrick Lewis, Maria Lomeli, Lucas Hosseini, Fabio Petroni, Timo Schick, Jane
  Dwivedi-Yu, Armand Joulin, Sebastian Riedel, and Edouard Grave. Atlas: Few-shot learning
  with retrieval augmented language models. Journal of Machine Learning Research, 24(251):
  1–43, 2023. URL http://jmlr.org/papers/v24/23-0037.html.

Jindong Jiang, Amala Sanjay Deshmukh, Kateryna Chumachenko, Karan Sapra, Zhiding Yu, Guilin
   Liu, Andrew Tao, Pavlo Molchanov, Jan Kautz, and Wonmin Byeon. Stateful token reduction for
   long-video hybrid VLMs, 2026. URL https://arxiv.org/abs/2603.00198.

Yichen Jiang, Shikha Bordia, Zheng Zhong, Charles Dognin, Maneesh Singh, and Mohit Bansal.
  HoVer: A dataset for many-hop fact extraction and claim verification. In Findings of the Asso-
  ciation for Computational Linguistics: EMNLP 2020, pp. 3441–3460, 2020. doi: 10.18653/v1/
  2020.findings-emnlp.309.


                                                11
Bowen Jin, Jinsung Yoon, Jiawei Han, and Sercan Ö. Arik. Long-context llms meet rag: Over-
  coming challenges for long inputs in rag. ArXiv, abs/2410.05983, 2024. URL https:
  //api.semanticscholar.org/CorpusID:273229050.
Jina AI. Jina Reranker v2 Base Multilingual, 2024. URL https://jina.ai/models/
   jina-reranker-v2-base-multilingual/. Released June 25, 2024.
Mandar Joshi, Danqi Chen, Yinhan Liu, Daniel S Weld, Luke Zettlemoyer, and Omer Levy. Span-
 bert: Improving pre-training by representing and predicting spans. Transactions of the association
 for computational linguistics, 8:64–77, 2020.
Vladimir Karpukhin, Barlas Oguz, Sewon Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Danqi
  Chen, and Wen-tau Yih. Dense passage retrieval for open-domain question answering. In
  Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing
  (EMNLP), pp. 6769–6781. Association for Computational Linguistics, 2020a. doi: 10.18653/
  v1/2020.emnlp-main.550.
Vladimir Karpukhin, Barlas Oguz, Sewon Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Danqi
  Chen, and Wen-tau Yih. Dense passage retrieval for open-domain question answering. In Pro-
  ceedings of the 2020 conference on empirical methods in natural language processing (EMNLP),
  pp. 6769–6781, 2020b.
Omar Khattab and Matei Zaharia. ColBERT: Efficient and effective passage search via contex-
 tualized late interaction over BERT. In Proceedings of the 43rd International ACM SIGIR
 Conference on Research and Development in Information Retrieval, pp. 39–48, 2020. doi:
 10.1145/3397271.3401075.
Nikita Kitaev, Lukasz Kaiser, and Anselm Levskaya. Reformer: The efficient transformer. In
  International Conference on Learning Representations, 2020. URL https://openreview.
  net/forum?id=rkgNKkHtvB.
Tom Kwiatkowski, Jennimaria Palomaki, Olivia Redfield, Michael Collins, Ankur Parikh, Chris
  Alberti, Danielle Epstein, Illia Polosukhin, Jacob Devlin, Kenton Lee, Kristina Toutanova, Llion
  Jones, Matthew Kelcey, Ming-Wei Chang, Andrew M. Dai, Jakob Uszkoreit, Quoc Le, and Slav
  Petrov. Natural questions: A benchmark for question answering research. Transactions of the
  Association for Computational Linguistics, 7:452–466, 2019. doi: 10.1162/tacl a 00276.
Woosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng, Lianmin Zheng, Cody Hao Yu, Joseph E.
 Gonzalez, Hao Zhang, and Ion Stoica. Efficient memory management for large language model
 serving with pagedattention. In Proceedings of the ACM SIGOPS 29th Symposium on Operating
 Systems Principles, 2023.
Jinhyuk Lee, Anthony Chen, Zhuyun Dai, Dheeru Dua, Devendra Singh Sachan, Michael Boratko,
   Yi Luan, Sébastien MR Arnold, Vincent Perot, Siddharth Dalmia, et al. Can long-context lan-
   guage models subsume retrieval, rag, sql, and more? arXiv preprint arXiv:2406.13121, 2024.
Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal,
  Heinrich Küttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, Sebastian Riedel, and Douwe
  Kiela. Retrieval-augmented generation for knowledge-intensive NLP tasks. In Advances in Neural
  Information Processing Systems, volume 33, pp. 9459–9474. Curran Associates, Inc., 2020.
Xiaoxi Li, Guanting Dong, Jiajie Jin, Yuyao Zhang, Yujia Zhou, Yutao Zhu, Peitian Zhang, and
  Zhicheng Dou. Search-o1: Agentic search-enhanced large reasoning models, 2025a. URL
  https://arxiv.org/abs/2501.05366.
Xinze Li, Yixin Cao, Yubo Ma, and Aixin Sun. Long context vs. RAG for LLMs: An evaluation
  and revisits, 2025b. URL https://arxiv.org/abs/2501.01880.
Zhuowan Li, Cheng Li, Mingyang Zhang, Qiaozhu Mei, and Michael Bendersky. Retrieval aug-
  mented generation or long-context LLMs? A comprehensive study and hybrid approach. In
  Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing:
  Industry Track, 2024. URL https://arxiv.org/abs/2407.16833.


                                                12
Enzhe Lu, Zhejun Jiang, Jingyuan Liu, Yulun Du, Tao Jiang, Chao Hong, Shaowei Liu, Weiran He,
  Enming Yuan, Yuzhi Wang, Zhiqi Huang, Huan Yuan, Suting Xu, Xinran Xu, Guokun Lai, Yanru
  Chen, Huabin Zheng, Junjie Yan, Jianlin Su, Yuxin Wu, Neo Y. Zhang, Zhilin Yang, Xinyu Zhou,
  Mingxing Zhang, and Jiezhong Qiu. MoBA: Mixture of block attention for long-context LLMs,
  2025. URL https://arxiv.org/abs/2502.13189.
Xueguang Ma, Liang Wang, Nan Yang, Furu Wei, and Jimmy Lin. Fine-tuning LLaMA for multi-
  stage text retrieval. In Proceedings of the 47th International ACM SIGIR Conference on Re-
  search and Development in Information Retrieval, pp. 2421–2425, 2024. doi: 10.1145/3626772.
  3657951.
Meta Superintelligence Lab. Muse Glimmer Model Card.            https://huggingface.co/
 meta-models/Muse-Glimmer-30B, 2026.
Ali Modarressi, Hanieh Deilamsalehy, Franck Dernoncourt, Trung Bui, Ryan A. Rossi, Seunghyun
  Yoon, and Hinrich Schütze. NoLiMa: Long-context evaluation beyond literal matching, 2025.
  URL https://arxiv.org/abs/2502.05167.
Amirkeivan Mohtashami and Martin Jaggi. Random-access infinite context length for transformers.
 In Advances in Neural Information Processing Systems (NeurIPS), 2023. Landmark Attention.
NVIDIA. NVIDIA Nemotron 3.5 Lightning 30B-A3B model card. https://huggingface.
 co/nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16, 2026.
Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predic-
  tive coding. arXiv preprint arXiv:1807.03748, 2018.
Fabio Petroni, Aleksandra Piktus, Angela Fan, Patrick Lewis, Majid Yazdani, Nicola De Cao, James
  Thorne, Yacine Jernite, Vladimir Karpukhin, Jean Maillard, et al. Kilt: a benchmark for knowl-
  edge intensive language tasks. In Proceedings of the 2021 Conference of the North American
  Chapter of the Association for Computational Linguistics: Human Language Technologies, pp.
  2523–2544, 2021.
Qwen Team. Qwen3.5: Towards native multimodal agents. https://qwen.ai/blog?id=
 qwen3.5, 2026.
Pranav Rajpurkar, Robin Jia, and Percy Liang. Know what you don’t know: Unanswerable questions
  for SQuAD. In Proceedings of the 56th Annual Meeting of the Association for Computational
  Linguistics, pp. 784–789, 2018. doi: 10.18653/v1/P18-2124.
Stephen Robertson and Hugo Zaragoza. The Probabilistic Relevance Framework: BM25 and Be-
  yond. Foundations and Trends in Information Retrieval, 3(4):333–389, 2009. doi: 10.1561/
  1500000019.
Keshav Santhanam, Omar Khattab, Jon Saad-Falcon, Christopher Potts, and Matei Zaharia. Col-
  BERTv2: Effective and efficient retrieval via lightweight late interaction. In Proceedings of the
  2022 Conference of the North American Chapter of the Association for Computational Linguis-
  tics: Human Language Technologies, pp. 3715–3734, 2022. doi: 10.18653/v1/2022.naacl-main.
  272.
Freda Shi, Xinyun Chen, Kanishka Misra, Nathan Scales, David Dohan, Ed Chi, Nathanael Schärli,
  and Denny Zhou. Large language models can be easily distracted by irrelevant context, 2023.
  URL https://arxiv.org/abs/2302.00093.
Oscar Skean, Md Rifat Arefin, Dan Zhao, Niket Patel, Jalal Naghiyev, Yann LeCun, and
  Ravid Shwartz-Ziv. Layer by layer: Uncovering hidden representations in language mod-
  els. ArXiv, abs/2502.02013, 2025. URL https://api.semanticscholar.org/
  CorpusID:276107264.
Raphaël Sourty, Antoine Chaffin, Paulo Roberto Moura Junior, and Amélie Chatelain. Denseon
  with the lateon: Fully open dense and late-interaction models for multilingual, long-context, and
  code search. arXiv preprint arXiv:2607.27178, 2026.


                                                13
Jiaming Tang, Yilong Zhao, Kan Zhu, Guangxuan Xiao, Baris Kasikci, and Song Han. Quest:
   Query-aware sparsity for efficient long-context LLM inference. In Proceedings of the 41st Inter-
   national Conference on Machine Learning (ICML), 2024. URL https://arxiv.org/abs/
   2406.10774.
James Thorne, Andreas Vlachos, Christos Christodoulopoulos, and Arpit Mittal. FEVER: A large-
  scale dataset for fact extraction and verification. In Proceedings of the 2018 Conference of the
  North American Chapter of the Association for Computational Linguistics, pp. 809–819, 2018.
  doi: 10.18653/v1/N18-1074.
Harsh Trivedi, Niranjan Balasubramanian, Tushar Khot, and Ashish Sabharwal. MuSiQue: Multi-
  hop questions via single-hop question composition. Transactions of the Association for Compu-
  tational Linguistics, 10:539–554, 2022. doi: 10.1162/tacl a 00475.
Liang Wang, Nan Yang, Xiaolong Huang, Linjun Yang, Rangan Majumder, and Furu Wei. Improv-
  ing text embeddings with large language models. In Proceedings of the 62nd Annual Meeting of
  the Association for Computational Linguistics (Volume 1: Long Papers), pp. 11897–11916, 2024.
  doi: 10.18653/v1/2024.acl-long.642.
Chaojun Xiao, Pengle Zhang, Xu Han, Guangxuan Xiao, Yankai Lin, Zhengyan Zhang, Zhiyuan
  Liu, and Maosong Sun. InfLLM: Training-free long-context extrapolation for LLMs with an
  efficient context memory. In Advances in Neural Information Processing Systems (NeurIPS),
  2024a.
Guangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han, and Mike Lewis. Efficient streaming lan-
  guage models with attention sinks, 2023. URL https://arxiv.org/abs/2309.17453.
Shitao Xiao, Zheng Liu, Peitian Zhang, Niklas Muennighoff, Defu Lian, and Jian-Yun Nie. C-pack:
  Packed resources for general chinese embeddings. In Proceedings of the 47th international ACM
  SIGIR conference on research and development in information retrieval, pp. 641–649, 2024b.
Anyi Xu, Bangcai Lin, Bing Xue, Bingxuan Wang, Bingzheng Xu, Bochao Wu, Bowei Zhang,
  Chaofan Lin, Chen Dong, Chenchen Ling, et al. Deepseek-v4: Towards highly efficient million-
  token context intelligence. arXiv preprint arXiv:2606.19348, 2026.
Peng Xu, Wei Ping, Xianchao Wu, Lawrence McAfee, Chen Zhu, Zihan Liu, Sandeep Subramanian,
  Evelina Bakhturina, Mohammad Shoeybi, and Bryan Catanzaro. Retrieval meets long context
  large language models. In The Twelfth International Conference on Learning Representations
  (ICLR), 2024. URL https://arxiv.org/abs/2310.03025.
Ruyi Xu, Guangxuan Xiao, Haofeng Huang, Junxian Guo, and Song Han. XAttention: Block sparse
  attention with antidiagonal scoring, 2025. URL https://arxiv.org/abs/2503.16428.
Zhilin Yang, Peng Qi, Saizheng Zhang, Yoshua Bengio, William W. Cohen, Ruslan Salakhutdinov,
  and Christopher D. Manning. HotpotQA: A dataset for diverse, explainable multi-hop question
  answering. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language
  Processing, pp. 2369–2380, 2018. doi: 10.18653/v1/D18-1259.
Howard Yen, Tianyu Gao, Minmin Hou, Ke Ding, Daniel Fleischer, Peter Izsak, Moshe Wasserblat,
  and Danqi Chen. HELMET: How to evaluate long-context language models effectively and thor-
  oughly, 2024. URL https://arxiv.org/abs/2410.02694.
Tan Yu, Anbang Xu, and Rama Akkiraju. In defense of RAG in the era of long-context language
  models, 2024a. URL https://arxiv.org/abs/2409.01666.
Yue Yu, Wei Ping, Zihan Liu, Boxin Wang, Jiaxuan You, Chao Zhang, Mohammad Shoeybi, and
  Bryan Catanzaro. RankRAG: Unifying context ranking with retrieval-augmented generation in
  LLMs. In Advances in Neural Information Processing Systems, 2024b. URL https://arxiv.
  org/abs/2407.02485.
Jingyang Yuan, Huazuo Gao, Damai Dai, Junyu Luo, Liang Zhao, Zhengyan Zhang, Zhenda Xie,
   Y. X. Wei, Lean Wang, Zhiping Xiao, Yuqing Wang, Chong Ruan, Ming Zhang, Wenfeng Liang,
   and Wangding Zeng. Native sparse attention: Hardware-aligned and natively trainable sparse
   attention. In Proceedings of the 63rd Annual Meeting of the Association for Computational Lin-
   guistics (ACL), 2025. URL https://arxiv.org/abs/2502.11089.


                                                14
Tao Yuan, Xuefei Ning, Dong Zhou, Zhijie Yang, Shiyao Li, Minghui Zhuang, Zheyue Tan, Zhuyu
  Yao, Dahua Lin, Boxun Li, et al. Lv-eval: A balanced long-context benchmark with 5 length
  levels up to 256k. arXiv preprint arXiv:2402.05136, 2024.
Manzil Zaheer, Guru Guruganesh, Avinava Dubey, Joshua Ainslie, Chris Alberti, Santiago Ontanon,
 Philip Pham, Anirudh Ravula, Qifan Wang, Li Yang, and Amr Ahmed. Big bird: Transformers
 for longer sequences, 2021. URL https://arxiv.org/abs/2007.14062.
Yanzhao Zhang, Mingxin Li, Dingkun Long, Xin Zhang, Huan Lin, Baosong Yang, Pengjun Xie,
  An Yang, Dayiheng Liu, Junyang Lin, Fei Huang, and Jingren Zhou. Qwen3 embedding:
  Advancing text embedding and reranking through foundation models, 2025. URL https:
  //arxiv.org/abs/2506.05176.




                                              15
A                                      A DDITIONAL EXPERIMENTS


A.1                                      C ORPUS - SCALE RETRIEVAL RESULTS

Figs. 8 to 10 report Complete-evidence recall@20, average recall@10, and average recall@20, re-
spectively, across 8 datasets using the full Wiki-2018 corpus, demonstrating UNREAL’s superiority
over SOTA embedding models, rerankers, and late-interaction methods.


                                                                  HotpotQA                                                                     2WikiMultiHopQA                                                                     MuSiQue
          Complete-Evidence




                               80                                                     74.3 75.8 77.5 77.5                                                              61.0 60.3 64.3 63.6 20                                                                   18.5 17.8
                                                                                                               60                                                                                                                                   15.7 16.6
             recall@20




                               60                                53.8 52.6 53.0                                                                                                                  15
                                            44.0          41.8                                                                                   34.9 35.3 33.9                                                                         10.7 10.9
                                                                                                               40                                                                                                                 9.7
                               40 33.6             34.0                                                                 25.6           28.9 31.0                                                 10
                                                                                                                                                                                                                            8.5
                                                                                                                               21.5                                                                           5.6    6.6
                                                                                                               20                                                                                      4.0
                               20                                                                                                                                                                 5
                                   0                                                                               0                                                                              0
                                                                    HoVer                                                                                   IIRC                                                                  SQuAD v2
          Complete-Evidence




                               60                                                                 54.3 53.6                                                                        37.8
                                                                                                                                                                                          35.1                                                      57.6
                                                                                                                                                                                                                                                           62.2 59.4 60.6
                                                                                      47.5 50.1                40                                                      33.5 33.3                 60                                  52.0 52.5
                                                                                                                                                                                                                           48.1 50.9
             recall@20




                               40                                                                              30                                     24.8 25.5 25.7                                  41.9          40.8
                                                                 32.8          32.4                                                                                                                          36.1
                                                                        27.2                                            19.5 17.6      20.3                                                      40
                                       23.2 22.7          23.6                                                 20                 16.1
                                                   19.3
                               20                                                                                                                                                                20
                                                                                                               10
                                   0                                                                               0                                                                              0
                                                                   FEVER                                                                       Natural Questions                                                    Average across 8 datasets
                              100
Complete-Evidence




                                                      81.5 81.6 83.0 83.4 85.1
                                                                               87.6 88.6 89.3 40                                                                            35.8 37.1 37.4 60                                                       50.8 52.7
                                                                                                                                                                                                                                                              54.7 54.4
                                            73.6 77.7                                                                          30.1            31.5 31.4 31.5 33.1 31.5
                               75 64.0                                                                                                                                                                                            40.0 39.7 40.6
   recall@20




                                                                                                               30                      23.9                                                      40                        35.8
                                                                                                                                                                                                           31.4 30.9
                               50                                                                                                                                                                     28.0
                                                                                                               20
                                                                                                                        11.9                                                                     20
                               25                                                                              10
                                   0                                                                               0                                                                              0
                                                                                                                          Single-hop dataset                 Multi-hop dataset

                                                                   BM25                              BGE-large-en-v1.5                                Qwen3-Emb-0.6B                         Qwen3-Emb-4B
                                                                   Hybrid RAG                        LateOn (LI) + reranker                           Qwen3-Emb-4B + reranker
                                                                   UNREAL-Qwen3.5-4B                 UNREAL-Qwen3.5-35B-A3B                           UNREAL-Muse-Glimmer-30B                UNREAL-Nemo3.5-Lightning-30B-A3B




Figure 8: Complete-evidence recall@20 on 21M Wiki-2018 chunks across 8 datasets; an example
is correct only when all annotated evidence chunks are retrieved. Bars show means with 95% BCa
confidence intervals.




                                                                 HotpotQA                                                                     2WikiMultiHopQA                                                                      MuSiQue
                                                                                  78.3 79.8 81.2 81.3 80                                                               71.0 69.0 72.3 71.5 40                                                                   34.4 32.7
          Average recall@10




                              80                                                                                                                                                                                                        31.2 30.4 31.1 31.9
                                                             65.5 68.0 68.3
                                                      57.8                                                    60                      50.5 51.5
                                                                                                                                                     55.6 57.2 56.0                              30                        25.7 27.4
                              60 50.2 54.9 52.5                                                                        43.6 39.5                                                                                    22.4
                                                                                                                                                                                                      18.6 17.3
                                                                                                              40                                                                                 20
                              40
                              20                                                                              20                                                                                 10

                               0                                                                               0                                                                                  0
                                                                  HoVer                                                                                     IIRC                                                                  SQuAD v2
                              80                                                            73.0 71.7                                                                              45.4 43.2 60                                                            56.1 53.4 54.4
          Average recall@10




                                                                                  68.7 68.9                                                                 41.1 40.5 41.5 41.6                                                                     51.9
                                                                           61.8                                                                      37.8                                                                               47.4 47.5
                                                             57.6 57.5
                              60 47.9           49.5
                                                                                                              40 32.5                         32.7                                                                         40.9 43.1
                                      45.1 45.4                                                                                       29.4                                                       40 36.0            34.4
                                                                                                                              26.1
                                                                                                                                                                                                             28.9
                              40
                                                                                                              20
                                                                                                                                                                                                 20
                              20

                               0                                                                               0                                                                                  0
                                                                  FEVER                                                                       Natural Questions                                                     Average across 8 datasets
                    100                                                      89.1 90.1 90.6                                                                                 50.0 50.6                                                                         62.5 62.0
Average recall@10




                                                    82.0 82.1 84.0 84.1 86.5                                                                  46.4 45.9 47.0 47.9 44.5 49.0                                                                         59.2 60.7
                                          73.2 77.1
                                                                                                                              44.1                                                    60                                          51.9 54.2 54.6
                              75 62.6                                                                                                 36.9                                                                                 48.3
                                                                                                              40                                                                                      39.2 41.1
                                                                                                                                                                                                                43.6
                                                                                                                                                                                                 40
                              50                                                                                       22.4
                                                                                                              20
                              25                                                                                                                                                                 20

                               0                                                                               0                                                                                  0
                                                                                                                          Single-hop dataset                 Multi-hop dataset

                                                                   BM25                              BGE-large-en-v1.5                                 Qwen3-Emb-0.6B                        Qwen3-Emb-4B
                                                                   Hybrid RAG                        LateOn (LI) + reranker                            Qwen3-Emb-4B + reranker
                                                                   UNREAL-Qwen3.5-4B                 UNREAL-Qwen3.5-35B-A3B                            UNREAL-Muse-Glimmer-30B               UNREAL-Nemo3.5-Lightning-30B-A3B




Figure 9: Average recall@10 on 21M Wiki-2018 chunks across 8 datasets. Bars show means with
95% BCa confidence intervals.




                                                                                                                                                      16
                                                             HotpotQA                                                       2WikiMultiHopQA                                                                  MuSiQue
                                                                              82.1 83.5 84.4 84.5 80                                              74.2 73.2 76.0 75.2                                                                39.4 38.0




          Average recall@20
                                                                                                                                                                           40                                              35.9 37.4
                              80                             71.6 70.5 70.9
                                                                                                                               59.4 59.6 58.5                                                               32.7 34.4 33.6
                                        62.5          63.0                                                                                                                                           30.4
                                               57.5                                              60 48.4             54.0 55.6
                              60 56.5                                                                    44.8
                                                                                                                                                                           30
                                                                                                                                                                                21.6 20.9
                                                                                                                                                                                              26.0

                              40                                                                 40                                                                        20
                              20                                                                 20                                                                        10
                               0                                                                   0                                                                        0
                                                                HoVer                                                                  IIRC                                                                 SQuAD v2
                                                                                                  60
                                                                              73.6 73.9 77.6 76.7                                                             50.6 48.9                                                             62.2 59.4 60.6
          Average recall@20




                              80                                                                                                   44.4 45.1 45.0 46.6 47.0                                                                  57.6
                                                             64.4 60.0 64.7                                                                                                60                                  52.0 52.5
                                                                                                       37.4                 38.2                                                                     48.1 50.9
                              60 54.0 52.1 50.4 55.5                                             40           32.2 34.1                                                         41.9          40.8
                                                                                                                                                                           40          36.1
                              40
                                                                                                 20                                                                        20
                              20
                               0                                                                   0                                                                        0
                                                               FEVER                                                        Natural Questions                                                 Average across 8 datasets
                    100                                                         92.4 92.8                                                                 58.9 59.7                                                          64.2 65.9 67.3 67.1
Average recall@20




                                                  86.5 86.5 88.1 88.2 89.7 91.7           60                                55.2 56.0 55.6 57.5 53.5 58.3
                                        78.6 82.7                                                             52.4
                                                                                                                                                                           60                        54.1
                                                                                                                                                                                                            58.2 58.2 58.9
                              75 68.5                                                                                44.8                                                                 48.8
                                                                                                                                                                                44.8 47.5
                                                                                                 40 30.1
                              50                                                                                                                                           40

                              25                                                                 20                                                                        20

                               0                                                                   0                                                                        0
                                                                                                          Single-hop dataset             Multi-hop dataset

                                                                 BM25                       BGE-large-en-v1.5                       Qwen3-Emb-0.6B                        Qwen3-Emb-4B
                                                                 Hybrid RAG                 LateOn (LI) + reranker                  Qwen3-Emb-4B + reranker
                                                                 UNREAL-Qwen3.5-4B          UNREAL-Qwen3.5-35B-A3B                  UNREAL-Muse-Glimmer-30B               UNREAL-Nemo3.5-Lightning-30B-A3B




Figure 10: Average recall@20 on 21M Wiki-2018 chunks across 8 datasets. Bars show means with
95% BCa confidence intervals.


Table 2 reports end-to-end question-answering performance with Qwen3.5-35B-A3B fixed as the
generator and only the retriever providing its top-5 chunk context varied.




Table 2: Exact match (EM) and macro-averaged F1 on three QA datasets, generated by Qwen3.5-
35B-A3B under each retrieval method’s top-5 retrieved context. “Oracle” denotes the upper-bound
result, obtained by answering the question based only on the oracle chunks.

                                                                                                                              HotpotQA                            2Wiki                          MuSiQue
                                                      Method                                                                  EM              F1              EM                F1              EM                F1
                                                      No context                                                             25.0             34.6            27.7           33.3               6.9              14.8
                                                      Oracle                                                                 60.8             74.9            53.6           61.7              42.6              54.6
                                                      BM25                                                                   36.8             47.3            28.1           34.4              7.0               15.2
                                                      BGE-large-en-v1.5                                                      36.9             47.3            27.6           33.7               9.7              18.1
                                                      Qwen3-Emb-0.6B                                                         34.9             46.0            28.5           35.0               7.7              15.4
                                                      Qwen3-Emb-4B                                                           36.5             48.7            31.7           38.4              10.4              18.4
                                                      Hybrid RAG                                                             39.3             51.3            30.7           37.5               8.9              18.1
                                                      LateOn + reranker                                                      41.3             53.2            31.5           38.5              10.8              19.6
                                                      Qwen3-Emb-4B + reranker                                                40.8             52.6            31.2           37.9              11.8              20.8
                                                      UNREAL-Qwen3.5-35B-A3B                                                 48.2             61.6            40.2           47.2              17.8              27.1


A.2                                     L ONG - CONTEXT RESULTS

In Fig. 11 we present the effect of retrieved distractors vs random distractors on the NoLiMa dataset.
As can be seen, retrieved distractors reduce the NoLiMa score more than random distractors.




                                                                                                                                    17
                                                    100         oracle

                                                     90




                                     NoLiMa score
                                                     80

                                                     70

                                                     60
                                                                   random distractors
                                                                   retrieved distractors
                                                     50
                                                                2.5       5.0       7.5     10.0     12.5     15.0                         17.5       20.0
                                                                                 chunks shown (gold always present)

Figure 11: Distractor identity matters. With the gold chunk always present, retrieved distractors
cause more interference than the same number of random distractors, and the gap grows with the
budget.


             50                                                                                                    80
             40
LOFT score




                  k=5
                        k = 10 k = 20
                                                                                                      LOFT score   60
             30
                                                                                                                   40
             20
             10                                                                                                    20
                                                                                                                                                                                   0
              0                                                                                                     0
                   1k           3k                        10k            30k               100k                                        A          e             A         T            I
                                                                                                                         NQ        ot
                                                                                                                                      Q          u           CQ          S        AR
                                  Mean prompt tokens                                                                            tp           SiQ          iO         QUE        MP
                                                                                                                              Ho           Mu         To
                                                                                                                                                         p                    QA


                        No context                        Oracle (gold chunks)                              Full context (all chunks)                          UNREAL top-k (ours)



Figure 12: LOFT generation. (a) All selective budgets outperform full-context reading. (b) Per-
formance by dataset at n = 10 against gold-only context. We use each dataset’s designated LOFT
metric.


A.2.1              I NTRINSIC RETRIEVAL

Fig. 6 (right) evaluates whether the frozen Nemotron-3-Nano can retrieve evidence on NoLiMa
without retrieval training. We split each context into chunks and score them against the question
using the model’s attention keys and queries.
                                       ℓ,h
For attention layer ℓ and head h, let ki,t denote the key vector at token t of chunk ci , and qtℓ,h the
query vector at token t of the question x. We mean-pool these vectors over the chunk and question
tokens, respectively:
                                                                                |ci |                                                |x|
                                                                          1 X ℓ,h                                              1 X ℓ,h
                                                          k̄iℓ,h =                k ,                              q̄ ℓ,h =          q .
                                                                         |ci | t=1 i,t                                        |x| t=1 t

We compute their dot product within each head and average over the Hℓ heads to obtain a chunk
score:
                                                                                           ℓ D    H
                                                                                        1 X                  E
                                                                         sℓi (x) =            q̄ ℓ,h , k̄iℓ,h .
                                                                                        Hℓ
                                                                                              h=1


For each layer separately, we rank chunks by sℓi (x) and compute recall@n over the top-n chunks. No
retrieval tokens or learned layer weights are used. These untrained representations retrieve evidence
above the random baseline.


                                                                                                  18
A.3   A BLATION STUDIES

Table 3 presents a recipe ablation for Nemotron-3.5-Lightning-30B-A3B, in which we vary, one at
a time, the design choices used in the main method. Table 4 presents an ablation study of the layer
from which corpus chunk embeddings are produced. We find that middle-to-late layers yield the
strongest retrieval performance, a result that is reproduced across other architectures as well.

Table 3: Recipe ablation for UNREAL-Nemotron-3.5-Lightning-30B-A3B, single-knob departures
from the main method. R is the number of retrieval tokens; G is the number of groups they are
mean-pooled into on the query side; ML (multi-layer) vs. SL (single-layer) is whether the read-
out combines all 6 global-attention blocks or only the block used for the corpus readout; HN is
the number of hard negatives per query; |C0 (x)| is the number of BM25-retrieved context chunks
prepended to the query; P is the number of learnable soft prompt tokens used at the beginning of
the sequence. Avg. R@10 is recall averaged over each query’s oracle chunks; All R@10 requires
every oracle chunk to be retrieved.

                                     HotpotQA                          MuSiQue                   SQuAD v2
       Design choice      Avg R@10          All R@10          Avg R@10         All R@10          Avg R@10
       Baseline              81.28            72.93              32.70            13.79            54.43
       R = 64 → 16        77.93 (-3.35)    67.83 (-5.10)      31.91 (-0.79)    13.04 (-0.75)    53.82 (-0.61)
       G=4 → 1            77.91 (-3.37)    68.37 (-4.56)      29.69 (-3.01)    11.49 (-2.30)    52.94 (-1.49)
       ML → SL            73.02 (-8.26)    61.01 (-11.92)     26.20 (-6.50)     9.86 (-3.93)    46.93 (-7.50)
       HN= 500 → 100      79.40 (-1.88)    70.59 (-2.34)      28.77 (-3.93)    11.58 (-2.21)    52.86 (-1.57)
       |C0 (x)| = 5 → 1   78.50 (-2.78)    68.83 (-4.10)      31.36 (-1.34)    11.95 (-1.84)    52.68 (-1.75)
       |C0 (x)| = 5 → 0   71.08 (-10.20)   56.73 (-16.20)     28.83 (-3.87)     8.94 (-4.85)    50.16 (-4.27)
       P =1 → 0           79.61 (-1.67)    70.86 (-2.07)      32.17 (-0.53)    13.21 (-0.58)    52.92 (-1.51)
       Lp = 7 → 1         78.20 (-3.08)    69.11 (-3.82)      30.28 (-2.42)    12.45 (-1.34)    48.52 (-5.91)


Table 4: Ablation on the layer used to create the corpus chunk embeddings, for UNREAL-
Nemotron-3.5-Lightning-30B-A3B.

                                  HotpotQA                        MuSiQue                 SQuAD v2
           Corpus layer   Avg R@10         All R@10         Avg R@10      All R@10        Avg R@10
           Layer 8           79.68          70.25            31.74            12.33            53.66
           Layer 18          78.98          69.42            31.65            12.45            54.05
           Layer 30          80.19          71.39            32.40            13.33            54.85
           Layer 38          80.62          71.99            31.94            12.29            54.01
           Layer 42          81.28          72.93            32.70            13.79            54.43
           Layer 48          80.19          71.64            32.78            12.75            54.13


Table 5 examines how the number of pooled vectors per corpus chunk, Lp , affects retrieval quality
for Nemotron-3.5-Lightning-30B-A3B. We encode the Wiki-2018 corpus at Lp ∈ 1, 3, 7, 11 and
report Average recall@10 and Complete-evidence recall@10. Recall increases monotonically with
Lp across both metrics, confirming that a finer-grained chunk representation yields more accurate
retrieval, though this comes at the cost of higher memory and compute during evaluation.

B     E XPERIMENTAL SETTING

B.1   R ETRIEVAL DATA

We construct our retrieval data setting by mapping gold evidence from existing datasets to a shared
DPR Wikipedia 2018 corpus (Karpukhin et al., 2020b), using a KILT-like method (Petroni et al.,
2021). The corpus consists of around 21M chunks, with a median of around 141 Nemotron-3.5-
Lightning tokens per chunk. The downstream tasks span three categories: single-hop QA (Natural
Questions (Kwiatkowski et al., 2019), SQuAD v2 (Rajpurkar et al., 2018)), multi-hop QA (Hot-
potQA (Yang et al., 2018), 2WikiMultiHopQA (Ho et al., 2020), MuSiQue (Trivedi et al., 2022),


                                                    19
Table 5: Effect of the number of pooled vectors per corpus chunk Lp on retrieval recall@10, for
UNREAL-Nemotron-3.5-Lightning-30B-A3B. Avg. R@10 is the recall averaged over each query’s
oracle chunks; All R@10 requires every oracle chunk of a query to be retrieved. Recall increases
monotonically with Lp , but at the cost of higher memory and compute during evaluation.

                HotpotQA                   MuSiQue                      2Wiki           SQuAD v2
   Lp     Avg R@10     All R@10     Avg R@10     All R@10     Avg R@10      All R@10    Avg R@10
   1        78.20        69.11        30.28        12.45        67.43           55.21      48.52
   3        79.34        70.58        31.15        12.70        69.51           57.11      51.61
   7        81.28        72.93        32.70        13.79        71.52           58.90      54.43
   11       81.54        73.40        34.34        14.67        72.38           59.68      55.42



IIRC (Ferguson et al., 2020)), and fact verification (FEVER (Thorne et al., 2018), HoVer (Jiang
et al., 2020)).
Based on KILT (Petroni et al., 2021), for each dataset, we map its oracle chunks to Wikipedia
2018 chunks via title matching. We then compute a text-alignment quality score based on length-
robust unigram, bigram, and trigram containment overlap between the oracle evidence text and each
candidate chunk. The score ranges from 0 to 1, where 1.0 means that the oracle text is essentially
contained verbatim in the chunk. For NQ, we directly reuse existing DPR bi-encoder gold mappings,
bypassing this KILT mapping step. For evaluation, similar to KILT, we report results on a filtered
set that retains an oracle only if it comes from an exact title match or has a fallback alignment score
above a quality threshold (0.6 by default).
We additionally retrieve lexical signals for each query. For each query, we use its input text as a
BM25 query and retain the top chunks as BM25 context, which is provided as additional input to
UNREAL (C0 (x)). We then mine oracle-seeded hard negatives: the query’s oracle chunks were
used as seed queries by running their text through BM25. The top lexically similar chunks across
all seeds are pooled and deduplicated, and any chunk overlapping with the query’s oracle set is
discarded. This yields up to 512 hard negatives per query that are lexically close to the gold evidence
but guaranteed not to belong to it, providing a clean hard-negative pool for contrastive training.

B.2     L ONG - CONTEXT BENCHMARKS

We wish to note that the UNREAL models evaluated in the long-context setting were not trained
on long-context data. Instead, the UNREAL modules were trained exclusively on standard retrieval
data (as detailed in Section B.1) and subsequently evaluated on both retrieval and long-context tasks.
Following the methodology of LOFT (Lee et al., 2024), we construct a new open-domain QA bench-
mark scaling context lengths from 8K to 100M tokens (Fig. 1). Our goal is to evaluate long-context
generation on context scales significantly larger than those present in current benchmarks.
We sample 500 queries at random from the validation splits of four QA datasets: Natural Ques-
tions (Kwiatkowski et al., 2019), HotpotQA (Yang et al., 2018), 2WikiMultiHopQA (Ho et al.,
2020), and MuSiQue (Trivedi et al., 2022), totaling 2,000 questions. Each query is paired with ora-
cle passages from the DPR Wiki-2018 corpus (approximately 21 million passages). We retain only
questions whose gold passages match corpus entries by exact article title.
To construct the extended contexts, all queries share a single distractor pool. We remove all gold
passages associated with any validation query across the four datasets to ensure distractors do not
overlap with target evidence. Contexts are constructed across ten lengths: 8K, 16K, 32K, 128K,
256K, 512K, 1M, 10M, 30M, and 100M tokens, measured using the Nemotron tokenizer over con-
text passages. Distractors are drawn sequentially from the head of the shuffled corpus to fill the
token budget alongside the gold passages. Each gold passage is placed at a relative context depth
sampled uniformly at random for that query; these relative depths remain fixed across all context
lengths. Consequently, as context length scales, a question maintains its gold evidence at identical
relative positions, altering only the volume of surrounding distractor text. All stochastic choices,
including question sampling, corpus shuffling, and passage positioning, use fixed random seeds to
guarantee deterministic inputs across evaluated models and runs.


                                                  20
To evaluate retrieval methods on long-context benchmarks, contexts are split into sentence-aligned
chunks averaging 141 tokens (mostly ranging from 123 to 165 tokens) to match the Wiki-2018
length distribution used during retriever training. The chunks form an exact cover of the source text
and are created on a per-document basis to prevent them from crossing document boundaries. For
generation, retrieved chunks are reassembled into native prompt templates in their original document
order and scored using native metrics.

B.3     M ETHOD AND TRAINING CONFIGURATION

On the corpus side, we use the full Wikipedia-2018 corpus, containing around 21M chunks. Each
chunk is encoded only once using the frozen LLM, by extracting the outputs of a single layer and
compressing them into Lp = 7 pooled vectors.
On the query side, we use R = 64 retrieval tokens pooled into G = 4 groups, together with an
initial context C0 (x) consisting of the top-5 BM25 chunks. The query embeddings are obtained by
a learnable sum of the full-attention outputs of the model. Moreover, only for query processing,
a single learned soft-prompt vector is concatenated to the beginning of the retrieval input. Unlike
ρ, this vector is never read out or scored; it only steers the frozen LLM toward a retrieval-oriented
computation and is trained jointly with ρ and α. These components are the only learnable parameters
in UNREAL, totaling fewer than 500K parameters, or less than 2 × 10−5 of the frozen model in all
cases. The exact number of learnable parameters is (R + 1)D + |α|, where D is the embedding
dimension and |α| is the number of layer-mixing weights.
We trained the UNREAL models using the training sets of Natural Questions (Kwiatkowski et al.,
2019), SQuAD v2 (Rajpurkar et al., 2018), HotpotQA (Yang et al., 2018), 2WikiMultiHopQA (Ho
et al., 2020), MuSiQue (Trivedi et al., 2022), IIRC (Ferguson et al., 2020), FEVER (Thorne et al.,
2018), and HoVer (Jiang et al., 2020), all mapped into a single shared Wikipedia-2018 corpus (see
Appendix B.1). We note that all retrieval baselines used in this work, such as Qwen3-Embedding
(Zhang et al., 2025), were also fine-tuned on high-quality retrieval datasets like HotpotQA and
Natural Questions.
For the contrastive objective, we draw 500 hard negatives per query from a BM25 ranking seeded
on that query’s oracle chunks. We discard the top 10 ranks, as they are typically near-duplicates of
the oracle chunks themselves. B(x) is then the deduplicated union of the oracle and hard-negative
chunks from all queries in a microbatch, ensuring that a chunk serving as an oracle for one query
is never treated as a negative for that query. We train for 15K steps with a global batch of 256
queries, using AdamW with β = (0.9, 0.95), weight decay 0.1, gradient clipping at norm 1.0,
and 100 warmup steps followed by linear decay to zero. At evaluation time, each query is scored
exhaustively against all M chunks, without an approximate index or candidate pre-filter.
The per-backbone settings are as follows. For Qwen3.5-35B-A3B (40 blocks, d = 2048), we read
the index at ℓc = 27, using a learning rate of 5 × 10−3 . For Muse-Glimmer-30B (52 blocks,
d = 6656), we use ℓc = 47, and a learning rate of 5 × 10−3 . For Nemotron-3.5-Lightning-30B-A3B
(52 blocks, d = 2688), we use ℓc = 42, and a learning rate of 10−2 .

C      FLOP A NALYSIS

UNREAL replaces full-context inference with chunk encoding, retrieval, and generation over se-
lected evidence. This avoids processing irrelevant context but adds retrieval and re-encoding work.
We compare these costs and derive the context length above which UNREAL requires fewer FLOPs,
counting only the work on which the two pipelines differ.

Full-context inference vs. UNREAL.           Full-context inference prefills [context, x]. UNREAL in-
stead:

       (i) Encodes each chunk independently up to layer ℓc (equation 1);
      (ii) Runs one forward pass through all L layers on xret (equation 2), of length |xret | =
           |C0 (x)| T + Tq + R;
      (iii) Prefills [CUNREAL (x), x], of length nT + Tq , for generation (equation 7).


                                                    21
After prefill, both pipelines perform the same autoregressive decoding except for the cached context
length: full context attends to N + Tq prompt tokens, whereas UNREAL attends to nT + Tq .
Thus UNREAL uses fewer attention FLOPs and a smaller KV cache, which benefits memory-bound
decoding.

C.1    S ETTING

All chunks have equal length, Ti ≡ T , so the context given to the model contains N ≡ M T tokens.
Both pipelines use a KV cache, and Tg denotes the number of decode forward passes. A multiply-
add counts as two FLOPs.

Weights. For identical layers, passing one token through the first ℓ layers costs 2Θℓ/L FLOPs,
where Θ counts backbone matrix parameters active per token. It includes all sequence-mixer and
dense-FFN projections; in MoE layers, it counts the router, shared experts, and selected routed ex-
perts. It excludes token embeddings, which are lookups, and the LM output head, whose generation
cost cancels in equation 8.

Attention. One causal query-key pair costs 4La da FLOPs, summed over the La global-attention
layers: 2da for the score and 2da for the value accumulation. For a standard decoder, La = L and
da = d.
Linear-attention and state-space layers have no position-dependent pairwise term, so we include
their projections in Θ and neglect their small recurrent-update cost. We also omit sliding-window
attention: full context attends to up to W keys per token, so this conservatively understates UN-
REAL’s savings.

Omitted operations. Softmax, normalization, and activations are ignored. The selection stage is
also neglected: BM25 for C0 (x) involves no dense matrix products, and the remaining selection
steps are tiny. These are mean pooling (about d FLOPs per token), the α-weighted layer sum, and
MaxSim scoring (equation 4, 2dGLp FLOPs per chunk). Chunk encoding alone costs 2Θℓc /L per
context token, and the ratio (1 + 2GLp /T ) dL/(2Θℓc ) is about 2 × 10−7 for the models below (this
ratio covers pooling and MaxSim).

C.2    FLOP DIFFERENCE : UNRAEL VS . FULL - CONTEXT INFERENCE

The two pipelines perform identical work on two things:

       • the context tokens in layers 1, . . . , ℓc , including all intra-chunk attention there;
       • the shared generation-side work: the query tokens’ weight products and query-to-query
         attention in the prefill; all decode-step weight products and attention to the query and pre-
         viously generated tokens; and all required generation logits.

Let λ denote the fraction of Θ in layers ℓc + 1, . . . , L, for identical layers, λ = 1 − ℓc /L. Let La,≤c
count global-attention layers through ℓc . The difference ∆ ≡ Ffull − FUNREAL is
                                                                                     
                          | {z } + |2La da N (N − T ) +{z
                    ∆ = 2ΘλN                                   2(Tq + Tg )(N − nT )
                                                                                      }
                             (a)
                                                               (b)
                                                       
                           − 2Θ nT + 2La da nT (nT + 1)
                            |           {z             }
                                              (c)
                                                                                                     (8)
                           − 2Θ |xret | + 2La da |xret |(|xret | + 1)
                            |                 {z                     }
                                                    (d)
                           + 2da (La − La,≤c )N (T + 1) .
                             |          {z            }
                                            (e)

      (a) Deeper layers on the context (UNREAL saving). Full-context inference passes every con-
          text token through all L layers. UNREAL reads the chunk embeddings at layer ℓc (equa-


                                                          22
         tion 1) and discards the chunk states, since the selected chunks are re-encoded during gen-
         eration. It therefore never runs layers ℓc + 1, . . . , L on the context, saving 2Θλ per context
         token.
    (b) Attention to unselected chunks (UNREAL saving). Each part counts causal query-key pairs,
        at 4La da FLOPs per pair.
           – Prefill. The full-context prefill computes all N (N + 1)/2 causal pairs among the
             context tokens. UNREAL’s independent chunk encoding computes only the M T (T +
             1)/2 = N (T +1)/2 intra-chunk pairs. The remaining N (N −T )/2 cross-chunk pairs
             give the first term.
           – Query. In full context, each of the Tq query tokens attends to all N context tokens. In
             UNREAL it attends only to the nT selected tokens, a difference of Tq (N − nT ) pairs.
           – Decode. Likewise, each of the Tg decoded tokens attends to N − nT fewer keys, a
             difference of Tg (N − nT ) pairs.
     (c) Re-encoding the selected chunks (UNREAL extra cost). UNREAL’s generation pre-
         fill passes the nT selected tokens through all layers again (2Θ nT ) and computes their
         nT (nT + 1)/2 causal self-attention pairs. The query’s attention to these tokens is already
         counted in (b).
    (d) Retrieval pass (UNREAL extra cost). The forward pass on xret has no counterpart in full-
        context inference. Its tokens cost 2Θ |xret | in weights plus |xret |(|xret | + 1)/2 attention
        pairs.
     (e) Intra-chunk attention above ℓc (UNREAL saving). This restores the full-context-only intra-
         chunk work in the La − La,≤c global-attention layers above the readout.

The +1 parts of (c)-(d) are diagonal-pair corrections, only 1/κ of the corresponding weight
costs, where κ ≡ Θ/(La da ). Term (e) is a second correction, across the three backbones and
n ∈ {5, 10, 20}, omitting it raises the roots by at most 0.21%, so we omit it below.

C.2.1   S IMPLIFYING ASSUMPTIONS

We now reduce equation 8 under two assumptions:

   (S1) Short queries and generations: Tq = Tg = T .
   (S2) The context is much longer than the selected evidence: N ≫ nT . Since n ≥ 1, this also
        implies N ≫ T . For fixed, moderate n, |C0 (x)|, and R/T , it further gives N ≫ |xret |,
        since |xret | = (|C0 (x)| + 1)T + R = O(nT ).


                                               2L d N 2
                                                                                          
                     ∆ ≈ |2ΘλN
                            {z } +                                  −      2Θ nT + |xret |               .    (9)
                                               | a{za }                    |    {z         }
                            deeper layers   cross-chunk attention       re-encoding and retrieval pass

The neglected terms have relative size of order T /N and (nT /N )2 , which vanish in the long-context
limit. The diagonal corrections are also smaller than their weight terms by La da /Θ = 1/κ; ad-
ditionally, κ ≫ 1 for all evaluated backbones. Because these dropped terms have mixed signs,
Eq. equation 9 is an approximation, not a bound.

C.2.2   B REAK - EVEN CONTEXT LENGTH

Dividing Eq. equation 9 by 2La da , UNREAL requires fewer FLOPs (∆ > 0) if and only if

                               N 2 + λκN − κ nT + |xret | > 0,
                                                         

that is, for N > N ∗ with
                                         q                       
                            N ∗ = 12 −λκ + λ2 κ2 + 4κ nT + |xret | .                                         (10)


                                                         23
Last-layer readout.    For ℓc = L (i.e. λ = 0), Eq. equation 10 reduces to
                                            q
                                     N ∗ = κ nT + |xret | .
                                                            
                                                                                                   (11)

This is the length at which the avoided cross-chunk attention, about 2La da N 2 , equals the weight
cost of the tokens UNREAL processes additionally. Any λ > 0 adds the linear saving (a) and lowers
N ∗ below this value.
                                                                                      p
Self-consistency. For λ = 0, let Q = nT +|xret |. The condition Q ≪ κ gives N ∗ /Q = κ/Q ≫
1, so the predicted root satisfies (S2). This generally holds for large LLMs with modest selected
evidence.

Longer generations. When Tg ≫ T , term (b) adds 4La da Tg (N − nT ) FLOPs of savings, low-
ering the break-even length toward nT from above.

C.3   N ∗ FOR THE EVALUATED BACKBONES

We evaluate equation 10 for the three 30B-scale backbones, using their released configurations and
the per-backbone ℓc of Appendix B.3.
For all three backbones we use T = 141 (the median chunk length in Nemotron tokens), |C0 (x)| =
5, R = 64, and Tq = Tg = T , so |xret | = 910. Table 6 reports the results.

Table 6: Approximate break-even context length N ∗ (tokens; equation 10), with T = 141, Tq =
Tg = T , and |xret | = 910. Θ counts active non-embedding matrix parameters.

                                                                             N ∗ (tokens)
          Backbone                   Θ     La         κ       ℓc /L   λ      n=5   n = 10
                                                          5
          Muse-Glimmer-30B         25.2B 13 4.73 × 10 47/52 0.096 13,049            17,437
          Nemotron-3.5-Lightning    2.87B 6 1.17 × 105 42/52 0.201 6,321             8,471
          Qwen3.5-35B-A3B           2.44B 10 5.95 × 104 27/40 0.323 4,117            5,569

Across these settings, equation 10 is within 0.55% of the numerical root of the full equation 8.

D     E FFICIENCY BENCHMARK : METHODOLOGY AND FULL RESULTS

We report measured time-to-first-token (TTFT) and throughput for UNREAL’s chunk-then-select
pipeline against full-context inference. This section gives the full methodology, the FLOPs model,
and results for all four backbones from Section 3.
Setup. We benchmark performance only, not accuracy: all models are randomly initialized
(load format="dummy") and all inputs are random token ids (skip tokenizer init), so
no checkpoints or tokenizers are required. We serve each backbone with vLLM (Kwon et al., 2023)
rather than a plain transformers forward pass, so results reflect PagedAttention, FlashAttention-
3, and continuous batching. We use the chunking regime evaluated throughout Section 4 (T =128,
n=10) and sweep L over the same ten values as Fig. 1 (8K–100M tokens).
All measurements use bf16 weights and activations on a single NVIDIA H100 80GB GPU, except
Qwen3.5-35B-A3B’s KV cache, stored in fp8 since its ≈64GB of resident weights (256 routed
experts) leave too little bf16 headroom for a 256K-token cache. With this, all four baselines are
measured directly up to 256K tokens. vLLM dispatches each backbone’s optimized fused kernels
(FlashInfer’s Gated-DeltaNet for linear attention, native Mamba2/MoE mixers for Nemotron-3.5-
Lightning)
FLOPs model. We count prefill multiply-add FLOPs as 2 FLOPs/MAC, walking each backbone’s
real per-layer sequence rather than a single network-wide ratio. Every layer contributes a linear
(O(L)) projection cost – QKVO for full-/sliding-attention, or the real linear-attention / Mamba2
projection sizes otherwise plus its feed-forward cost (dense or MoE, charging only the active and


                                                 24
                              Qwen3.5-4B                                                             Muse-Glimmer-30B
           106                                                                     106




                                                                                                                                 225×
                                                               793×
Time (s)   104




                                                                        Time (s)
                                                                                   104




                                                                                                                         23×
                                                80×
           102




                                                                                                                 3×
                                   9×
                                                                                   102




                                                                                                    1×
                        2×
           100                                  T = 128, n = 10
                                                                                   100
                 10K   100K       1M           10M            100M                       10K       100K          1M     10M     100M
                       Context length L (tokens)                                                   Context length L (tokens)

                         Qwen3.5-35B-A3B                                                       Nemotron-3.5-Lightning-30B-A3B
           106                                                                     106




                                                               1455×




                                                                                                                                 638×
                                                                                   104
Time (s)




                                                                        Time (s)
           104




                                                146×




                                                                                                                         64×
           102                                                                     102
                                   15×




                                                                                                                 7×
                                                                                                    2×
                        2×




           100                                                                     100

                 10K   100K       1M           10M            100M                       10K       100K          1M     10M     100M
                       Context length L (tokens)                                                   Context length L (tokens)

                               Baseline, measured                 Baseline, FLOPs-projected                    UNREAL



Figure 13: Measured time-to-first-token, baseline vs. UNREAL, for all four backbones (random
weights/inputs, served with vLLM on an NVIDIA H100, bf16). Solid markers are directly mea-
sured; the dashed baseline segment is a FLOPs-scaled projection past the point where a single full-
context forward pass exceeds our measurement budget or the available KV cache. Dotted vertical
connectors mark the speedup (baseline time / UNREAL time) at a few representative context lengths,
read directly off the time gap between the two curves.


any always-on shared experts, with 2 or 3 weight matrices matching each backbone’s real gated/non-
gated activation). Full-attention layers additionally cost Cattn (L)=2L2 dattn (dattn =nheads dhead );
sliding-attention layers cost 2L min(L, W )dattn for window W – linear in L once L>W , the same
logic that makes UNREAL’s own T -chunked encoding linear; linear-attention and Mamba2 layers
add no quadratic term. The LM head is counted only on passes that emit logits. Summed over the
real layer sequence, full-context inference costs FLOPsbase (L) = O(L) + O(L2 ), while UNREAL
costs FLOPsUNREAL (L) = O(L) + O(L T ) + O(M ) + O(1) + O(1) (M =L/T ): the quadratic
                               |      {z      } | {z } | {z } | {z }
                                         encode, through ℓc             score             query     generate
term shrinks to L · LC , and generation always reads exactly nT =1,280 tokens regardless of L.
Measured wall-clock results. Figs. 13 and 14 report measured TTFT and throughput for all four
backbones. The baseline curve is shown only up to the context length at which a single for-
ward pass exceeds our 75-second measurement budget (solid markers), matching the convention
of Fig. 1; we extend it with a dashed, FLOPs-scaled projection (tproj (L) = tmeasured (Lcutoff ) ·
FLOPsbase (L)/FLOPsbase (Lcutoff )) for visual continuity across the same 8K–100M range. UN-
REAL’s chunk-encoding time is computed from its measured, steady-state per-chunk throughput.
Chunk encoding is parallel across the M =L/T chunks, so total encode time scales linearly with M
plus the directly measured, constant-size query and generation passes. This measured TUNREAL (L)
omits two components, both excluded because they are negligible or out of scope rather than favor-
able to UNREAL: (1) the MaxSim scoring step (O(M ) in the FLOPs model above) is not separately
benchmarked, as it is a lightweight vector similarity computation external to the LLM forward
pass that accounts for under 0.01% of UNREAL’s total FLOPs at every backbone and length we
tested; and (2) any orchestration overhead between the encode and generate stages (selecting the
top-k chunks, assembling the generation prompt), which a production serving stack would incur but
which our per-stage vLLM benchmarking (each stage measured on its own, isolated engine) does not
capture. The measured curves corroborate the FLOPs estimate: UNREAL’s TTFT grows roughly
linearly with L while the baseline’s grows quadratically, so the baseline becomes both slower and,
eventually, infeasible to run at all, in the same context-length regime where Fig. 1 shows its accuracy
collapsing.




                                                                       25
Prefill throughput (tok/s) Prefill throughput (tok/s)




                                                                                                              Prefill throughput (tok/s) Prefill throughput (tok/s)
                                                                              Qwen3.5-4B                                                                                            Muse-Glimmer-30B
                                                                                                                                                                      104
                                                                        2×




                                                                                                                                                                                              3×
                                                                                   9×




                                                                                                                                                                                                       23×
                                                        104
                                                                                             80×




                                                                                                                                                                      103
                                                                                                     793×




                                                                                                                                                                                                                225×
                                                        103
                                                                                                                                                                      102
                                                        102
                                                                 10K   100K        1M       10M     100M                                                                    10K   100K       1M       10M      100M
                                                                       Context length (tokens)                                                                                     Context length (tokens)

                                                                        Qwen3.5-35B-A3B                                                                                       Nemotron-3.5-Lightning-30B-A3B
                                                        105
                                                                                                                                                                                    2×
                                                                        2×




                                                                                                                                                                                              7×
                                                                                   15×




                                                        104                                                                                                           104
                                                                                             146×




                                                                                                                                                                                                       64×
                                                                                                     1455×




                                                                                                                                                                                                                638×
                                                             3
                                                        10
                                                                                                                                                                      103
                                                        102
                                                                                                                                                                      102
                                                                 10K   100K        1M       10M     100M                                                                    10K   100K       1M       10M      100M
                                                                       Context length (tokens)                                                                                     Context length (tokens)

                                                                              Baseline, measured        Baseline, FLOPs-projected                                                           UNREAL


Figure 14: Measured prefill throughput (tokens/second), baseline vs. UNREAL, for all four back-
bones. Same data and conventions as Fig. 13.




                                                                                                             26
