Member sign in
Use Forge on the web ↗
Get Forge ↗

FORGE RESEARCH

Systems research · Technical report

Evidence, experts
and the memory frontier.

Retrieval-augmented generation and dynamic neural paging address two constraints on local intelligence. Forge is investigating how evidence retrieval and faithful execution of sparse models can work together on a consumer GPU.

New research · November 30, 2026

From answers to accountable decisions
Adjustable evidence thresholds, inspectable uncertainty and the distinction between a recommendation and a verified action.

Abstract

A local language model faces an information constraint and a physical memory constraint. Retrieval-augmented generation (RAG) brings authorized external evidence into its context. A neural pager manages the placement of model weights across memory tiers. Their composition can make a locally grounded workflow feasible within a smaller device budget.

Our current experiment preserves a trained mixture-of-experts (MoE) router while moving selected expert weights from system RAM to GPU buffers. On a 16 GiB NVIDIA GeForce RTX 5060 Ti, a Qwen3-30B-A3B test spanning its first two transformer blocks reduced explicit expert-buffer allocation from 747.00 MiB to 70.03 MiB. The ordered expert selections matched an independent CPU reference within the tested fixtures. This report preserves that controlled result and adds an end-to-end experiment in which a small local worker requests and uses advice from the full paged model.

Research update · November 25, 2026. A Gemma E2B worker now completes a local consultation through all 48 Qwen3-30B-A3B layers and uses the returned advice in its mission. The two-block fixture remains the narrower numerical comparison. The new end-to-end trial verifies the handoff and a correct answer. Broader numerical equivalence, answer-quality gains and production performance remain open evaluations.

Forge Mission Board replay of the second Qwen3 MoE block. Eight experts are highlighted in a 24-slot GPU cache. The two-block comparison reports 747 MiB resident and 70.03 MiB paged.
Recorded Mission Board trace. Decision 24 of the two-block Qwen3 experiment. RAM-to-GPU traffic is cumulative. Expert buffers report allocated storage. The Knowledge Center and paging inspector show their actual independent states.

Two memory systems, one request

RAG selects source passages. Neural paging selects which weight pages occupy fast memory. The passage selection affects the model’s input and can change its answer. Weight placement is evaluated against the same model, input and trained router, with numerical agreement as its acceptance condition.

PropertyRAGNeural paging
Unit of retrievalPassage, document or structured evidenceLayer–expert weight page
Selection signalQuery, lexical match, embeddings and rerankingThe checkpoint’s trained neural gate
Working memoryEvidence index and bounded prompt contextGPU buffers, system RAM and backing storage
Primary purposeSupply relevant, attributable informationFit required computation within a device budget
Correctness evidenceSource relevance, access scope and citation fidelityRoutes, tensor outputs and generated token agreement
Main costRetrieval, reranking and longer prompt processingTransfers, cache misses and synchronization
Privacy surfaceDocuments, embeddings, compiled context and provider requestsRAM, GPU buffers, caches and input-dependent execution traces

The Forge retrieval prototype combines lexical ranking and locally computed semantic similarity, then reranks candidates and compiles evidence with source identifiers and revision offsets. Its budget counts serialized UTF-8 bytes, including citation metadata. Token count remains a separate model-context constraint.

A small retrieval fixture placed its expected source first and compiled two citations into 438 of 570 available bytes. The tiny generator still produced an incorrect answer. Retrieval quality, execution fidelity and answer quality therefore require individual measurements. Lewis et al., RAG.

Execution and mathematics

Let Da denote the passages authorized for the current request. Let q be the query, and let B bound compiled evidence. The following expression describes the retrieval stage at the level of its public interfaces.

Evidence compilation
EB(q) = packB(rerank(RRF(BM25(q, Da), cos(enc(q), enc(Da)))))

The authorized corpus is ranked, fused and compiled into a bounded evidence context.

At layer ℓ and token position t, let u be the normalized hidden state, Wg the trained gate and Fℓ,e expert e. For the tested Qwen3 gate, expert indices are selected by top-k logits and their selected weights are normalized with softmax.

Learned sparse execution
Sℓ,t = TopK(Wg,ℓuℓ,t, k)
αℓ,t = softmax((Wg,ℓuℓ,t)S)
hℓ+1,t = rℓ,t + ∑e ∈ Sℓ,t αℓ,t,e Fℓ,e(uℓ,t)

The original gate determines the selected experts and their contributions.

Here r is the layer’s attention residual. The pager must have every selected expert available before its contribution is computed. A missed page incurs a transfer or an explicitly supported equivalent execution path. The reference experiment compares original packed GGUF weights through independent CPU dequantization and GPU kernels. Dense shared operations and trained routing remain part of the model’s execution.

Physical residency
MGPU(t) = Mshared + MKV(t) + Mscratch(t) + ∑(ℓ,e) ∈ C(t) Wℓ,e

The expert cache contributes one term to the total GPU budget.

Wℓ,e counts stored bytes, including quantization layout. C is the set of resident layer–expert pages. Total GPU usage also includes shared tensors, key/value cache, activations, workspaces and runtime overhead. The measured 70.03 MiB is the expert-buffer component of this equation.

Issued weight traffic
DH→D = ∑j ∈ demand loads Wj + ∑j ∈ issued prefetches Wj

Demand and prefetch traffic are counted independently of initial preload.

The traffic term counts actual issued transfers. A useful first estimate of transfer service time is bytes divided by effective bandwidth. Compute and copies can overlap, so a latency model must account for dependencies and queue contention. Prefetch accuracy, demand hit rate and total bytes transferred should be measured together.

Measured observations

The figure and this table refer to the same recorded run. It used six distinct first-position token IDs, repeated in reverse order, for 12 independent one-token fixtures. Two layers with 128 experts each produced 24 router decisions and 192 expert selections. The trained gate selected eight experts per layer.

Resident experts747.00 MiB
Paged experts70.03 MiB
MeasurementResidentPaged
GPU expert slots25624
Explicit expert buffers783,286,272 bytes73,433,088 bytes
Demand cache hits19299
Demand page loads0, following preload93
Evictions069
Demand transfer volume0, following preload271.37 MiB
Median two-block fixture28.15 ms29.05 ms
Ordered router agreementMatched referenceMatched reference
Maximum final hidden-state error3.052 × 10⁻⁵3.052 × 10⁻⁵

The explicit expert-buffer reduction is exactly 90.625%. The 93 demand loads moved 93 × 3,059,712 = 284,553,216 packed bytes. Cumulative transfers can exceed the instantaneous cache allocation. Numerical acceptance used elementwise |Δh| ≤ 2 × 10⁻⁴ + 3 × 10⁻⁴ |href|.

These paired fixture timings describe this run’s two-block work. A useful language-service evaluation needs full prompt processing, time to first token, sustained decode, queue delay and concurrent requests under equivalent conditions. Download the public measurement summary.

Supporting the smaller model

The purpose of this work is to extend what a small local model can accomplish. Gemma E2B remains the primary worker. When it requests deeper reasoning, Forge passes a focused question to the neural node. The paged Qwen model generates advice, and Gemma receives that result in the same mission, checks it and completes its response. The model weights retain their trained values during this process.

The new experiment executes the complete 48-layer Qwen3-30B-A3B network, including causal attention, its trained expert selection and the final output projection. A bounded expert cache manages weight residency. The trial also uses a bounded host window over a memory-mapped GGUF, so the operating system’s file cache participates. Physical SSD reads were unmeasured.

We tested a public arithmetic fixture. A part costs $72, and the requested gross margin is 20%. The correct selling price is $72 ÷ (1 − 0.20) = $90. Gemma answered correctly on its own. In the assisted run, the neural node returned “$90,” and Gemma checked the calculation in its final response.

Observed measureGemma E2B aloneGemma with neural node
Final answer$90$90
End-to-end mission time8.26 s68.46 s
Neural consultation time—54.21 s
Sampled whole-GPU high-water mark5.83 GiB9.02 GiB
Sampled system RAM high-water mark40.83 GiB53.36 GiB

These are sequential single runs on the same 16 GiB RTX 5060 Ti workstation with approximately 64 GB of system memory and other applications present. The marks include those applications. The worker remained loaded during the consultation. The baseline was a recorded tool-free mission on the same question and model.

Completed Forge mission showing the worker’s pricing question, the neural node’s $90 answer and Gemma’s calculation check.
A completed local consultation. The node inspector exposes the worker’s question, returned advice and final calculation check. The request used the synthetic pricing fixture described above.

The consultation processed 74 input tokens and generated three answer tokens. Its allocated expert buffers occupied 373.50 MiB, while cumulative expert transfers reached 22.94 GiB. Shared tensors, attention state and temporary buffers contribute additional memory. Repeated transfers help explain why a correct handoff can still have substantial latency.

The trial establishes a working local consultation path. It provides no measured accuracy improvement over Gemma alone, and the assisted mission took longer. A separate multiplication fixture matched all three generated token IDs against an independent CPU llama.cpp run. For the pricing fixture, that reference returned the same amount in a different sentence. Exact-text comparison failed, and full numerical equivalence remains unproven.

An earlier trial exhausted its answer allowance while explaining the formula. Asking the node to give its conclusion first produced the completed short answer shown here. This illustrates why completion checks need to examine the returned advice as well as the primary worker’s final response. Download the consultation measurement summary.

Privacy and trust boundaries

Local retrieval can keep source documents, query embeddings and compiled evidence on the workstation when the encoder and generator also execute locally. When a remote generation provider is selected, the evidence included in its request can cross the device boundary. That data flow needs an explicit user decision and an auditable scope.

Embeddings are derived from private text and deserve appropriate access controls. Published research has demonstrated text recovery from particular embedding systems under defined conditions. Its findings motivate careful handling of vector indexes and do not establish a corresponding attack against Forge. Morris et al., Text Embeddings Reveal (Almost) As Much As Text.

Weight paging changes memory residency. Security also depends on process permissions, disk protection, operating-system caches and how temporary buffers are handled. A path to a local model provides a location reference. The model’s license, file integrity and implementation compatibility require their own checks.

The consultation passes the worker’s supplied question to a local research process. Private evidence included in that question remains sensitive. Execution receipts and routing traces can contain prompts, token IDs, generated text, source offsets and workstation paths. Routing is input-dependent, so access patterns can correlate activity. Public reports should use reviewed fixtures and scrubbed measurement summaries. The Mission Board capture here uses a recorded test with private paths and account details excluded.

A joint research objective

The next step is to evaluate evidence policy a and placement policy π jointly. A stronger system should minimize measured end-to-end latency while meeting constraints on evidence quality, authorized disclosure, physical memory and faithful execution. The expression below specifies a proposed evaluation objective.

Proposed constrained evaluation
mina, π   p95q ∼ Wheld-out [L(q; a, π)]

Minimize the measured 95th-percentile request latency over a declared held-out workload.

Subject to

Ea(q) ⊆ Da,   bytes(Ea) ≤ B

Qevidence(a) ≥ Qmin,   egressprivate(a) ≤ Papproved

supt MGPU(π, t) ≤ Vusable

Spaged(q, Ea) = Sreference(q, Ea)

|hpaged − hreference| ≤ εabs + εrel |hreference|

L includes retrieval, prompt processing, generation and queueing for a specified held-out workload. Q is an explicit evidence rubric. P records approved private-text disclosure. V reserves GPU space for the entire request. The route and tensor constraints compare the same checkpoint and compiled context. Changing retrieved evidence can legitimately change the hidden state and trained route.

Answer quality belongs in the evaluation alongside this constrained objective. A model can faithfully execute an incorrect answer, and a relevant document can exceed an available context or privacy budget. The current measurements establish local components of this program. Further experiments must test whether the composition improves useful task outcomes.

Next experiments

  1. Expand numerical coverage. Extend the full-model comparisons across varied prompts, sequence lengths and decode steps. Investigate output differences using layer states, routing decisions and logits against the same checkpoint.
  2. Measure resident working sets. Track per-layer reuse, expert hit rates, packed transfer bytes and effective bandwidth under diverse tasks.
  3. Test the memory hierarchy. Establish RAM-backed performance, then evaluate an explicitly bounded SSD tier with cold and warm-cache results.
  4. Evaluate useful answers. Evaluate Gemma alone, Gemma with RAG, Gemma with the neural node, and their combination on held-out tasks. Fix the answer rubric and resource budgets before testing.
  5. Measure service behavior. Include p50 and p95 latency, cancellation, concurrent requests, fairness and recovery after interrupted loads.

The long-term direction is expert-addressable storage and coordinated local execution. Predictive loading becomes useful when its transfer cost, memory footprint and measured accuracy of prediction improve the complete request.

References and acknowledgements

  1. Lewis et al. (2020). Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks.
  2. Shazeer et al. (2017). Outrageously Large Neural Networks.
  3. Eliseev and Mazur (2023). Fast Inference of Mixture-of-Experts Language Models with Offloading.
  4. Qwen team. Qwen3-30B-A3B model card.
  5. Morris et al. (2023). Text Embeddings Reveal (Almost) As Much As Text.

This work builds on published sparse-model research and open tools including PyTorch, Hugging Face Transformers, llama.cpp/GGUF, PyOpenCL and React Flow. Model weights and dependencies retain their respective authorship and license terms.

Published November 25, 2026 · Forge Runtime Research · Static Labs