TL;DR
Q64 is a candidate-scoring system that significantly speeds up multi-question tasks on long documents by reusing a frozen 27B LLM's internal states. By jointly training a small readout network and a residual adapter, it recovers most of the accuracy lost by freezing the backbone while delivering up to a 25x latency reduction compared to existing batched scoring methods.
What Problem Does This Paper Address?
When we use Large Language Models (LLMs) to perform multiple tasks on the same document—such as answering a series of questions, checking multiple claims, or assigning various labels—we often end up re-calculating the document's representations for every single query. This is computationally expensive and slow.
While techniques like "prefix caching" (e.g., PagedAttention) allow models to reuse the initial parts of a prompt, they don't necessarily optimize the "readout"—the final layer that translates internal model representations into a specific decision or score. The authors of this paper argue that to truly balance accuracy and speed, we need to rethink how we adapt frozen models to score candidates across a shared context.
Methods
The researchers introduce Q64, a system built on a frozen 64-layer Qwen3.8-27B backbone. The design was explored and refined using ZiYor, a self-evolving AI system.
The architecture splits the work into two phases:
- Shared Preparation: The document is encoded once. The system caches "hybrid prefix states" (which include attention KV caches as well as convolutional and recurrent states) and "token-level feature banks" from intermediate (layer 32) and final (layer 64) depths.
- Per-Question Branching: Each question is processed through the full 64-layer backbone, but it reuses the document's cached state. The output is then passed through a jointly adapted readout network.
What makes Q64 unique is the joint adaptation. Instead of just training a simple adapter, the authors jointly train:
- A residual adapter (bottleneck width 128).
- A 4-layer decoder that cross-attends to the document feature banks.
- A candidate-conditioned reader that scores specific answer choices against the document evidence.
Datasets
The model was trained on a diverse set of 8,192 training views including:
- Reading Comprehension: BoolQ, C3, LogiQA.
- Inference: OCNLI, AFQMC, MNLI.
- Rule-following: ProofWriter.
For evaluation, the authors used a fixed collection of 5,112 items from four major benchmarks: ARC-Challenge, ANLI-R3, and stratified subsets of MMLU-Pro and CMMLU.
Key Insights and Ideas
- The Accuracy-Latency Tradeoff: Freezing a massive backbone usually hurts accuracy. However, the authors found that jointly adapting the readout network (decoder + reader + adapter) can recover a significant portion of that loss without adding the heavy overhead of unfreezing the entire model.
- Amortization is the Goal: The system is designed for "amortized" computation. The cost of processing a long document is paid once, making each subsequent question much "cheaper" in terms of time.
- Readout Matters: Simply having a shared prefix isn't enough. The "candidate reader" (which uses multi-head attention to let the question/candidate pair "look" at the document banks) is crucial for making accurate decisions.
- Cold vs. Warm Requests: The paper highlights a "cold-start" overhead. For a single, short question, Q64 is actually slower than a native model because of the setup time for the readout memory. The benefits only manifest as the number of questions or the document length increases.
Key Results
- Accuracy Boost: Joint adaptation improved macro accuracy across the four benchmarks from 66.46% (adapter-only) to 74.32%. While this is a huge jump, it still trails the native 27B model (75.68%) and the 32B AnyJev baseline (76.68%).
- Massive Speedups: On a synthetic workload with a 4,096-token document and 50 questions, Q64 achieved a median latency of 2.237 seconds. In comparison, the native baseline took 5.383 seconds, and the batched AnyJev configuration took a staggering 56.872 seconds.
Limitations and Future Work
- Accuracy Deficit: Despite the improvements, Q64 does not yet match the accuracy of the full, native 27B model.
- Narrow Advantage: The latency benefits disappear for short, single-question requests due to document preparation overhead.
- Real-World Validation: The evaluation focused on public benchmarks where the question is often part of the "document." The authors note that validating the system on real-world, 50-question sessions over long, complex documents remains an open challenge.
- Serving Engines: The study did not compare Q64 against highly optimized serving frameworks like vLLM, which might narrow the performance gap.
Summary updated