Can Large Language Models "Read" While Small Models "Answer"? The Case for Latent-Space Communication in Agent Pipelines

    As agent systems evolve toward dividing labor between a large model that understands and decomposes tasks and a smaller model that generates final answers, a key design question emerges: should agents communicate in natural language, structured state, or latent space? This article examines how such a split-responsibility architecture behaves under a tight memory budget of roughly 20GB, covering layer-streamed weight reloading, double buffering, Prefill-phase workspace management, and KV Cache planning. It also analyzes the trade-offs between text, structured, and latent-space communication, and closes with an engineering checklist for making "large model reads, small model answers" pipelines practical, observable, and auditable.

    1. The Problem: Splitting “Reading” from “Answering” May Lead to Latent-Space Communication

    “Large model reads the task, small model writes the answer” is essentially a responsibility-separated agent collaboration pattern. The main model handles understanding complex tasks, decomposing constraints, and forming intermediate representations; the small model generates final answers or executes actions within that established context. The motivation is usually not raw parameter scale, but balancing inference cost, response latency, controllability, and output stability.

    When this collaboration moves from “single invocation” to a multi-agent pipeline, the communication format becomes a central design decision. The mainstream approach today is passing intermediate results as natural language or structured text—task summaries, constraint lists, candidate answers, scoring feedback. Text-based communication is easy to audit, easy to debug, and works across heterogeneous models; its downsides are redundancy, insufficient semantic compression, and information loss or error amplification over long chains.

    This naturally raises the question: will agents move toward latent-space communication—where the upstream model outputs hidden vectors, state tensors, or projected semantic representations that downstream models consume directly, without decoding to text and re-encoding? Technically this is not far-fetched, but it is not simply “swapping text for vectors.” It involves representation-space alignment, cache management, explainability, security auditing, and engineering cost. In particular, when a hundred-billion-parameter main model must run within limited VRAM, the state serialization and transfer overhead of latent-space communication must be budgeted alongside Prefill, KV Cache, and weight loading.

    2. Basic Constraints Under a ~20GB VRAM Budget

    Suppose the goal is to orchestrate inference for a complex task within roughly 20GB of device memory, where a hundred-billion-parameter main model handles reading and understanding in the Prefill phase, and a multi-billion-parameter small model handles answering. First, it must be clear that the full weights of such a main model cannot reside in 20GB, so generic techniques like chunked loading, layer-streamed reloading, or parameter offloading are required. “Layer-streamed reloading” here does not mean every layer is permanently resident; instead, layer weights are streamed into device memory in blocks in execution order, and released or overwritten after computing each layer—trading time for space.

    Under this constraint, the memory budget should be divided into at least these workspaces:

    1. Weight streaming buffers: staging for the current and next layer’s weight blocks, typically double-buffered to avoid compute waiting on loads.
    2. Activation and temporary workspace: attention computation, feed-forward intermediate activations, and temporary tensors for normalization and residual connections during Prefill.
    3. KV Cache area: if the main model must retain context for subsequent decoding or for the small model’s reference, space must be reserved for key-value caching; if only a compressed summary is passed after “reading,” this area can be significantly reduced.
    4. Communication and serialization staging: if agents use latent-space communication, buffers are needed for hidden states, projection layer outputs, compressed representations, and deserialization.
    5. Small model workspace: small model weights, activations, and output buffers. A multi-billion-parameter model still needs careful budgeting—never assume it is “tiny.”

    The key principle: the memory budget is not a static partition but dynamically reused across pipeline stages. After Prefill completes, parts of the main model’s weight buffers and activation workspace can be freed for the small model or communication staging. In practice, use a unified memory pool with lifecycle management to avoid fragmentation.

    3. Layer-Streamed Reloading and Double Buffering: The Core Mechanism for Trading Time for Space

    The basic flow of layer-streamed reloading: split the model into layers or blocks, keep only a few layer buffers on device; while computing layer i, asynchronously prefetch layer i+1’s weights; when layer i finishes, the buffers swap roles. Double buffering matters because it overlaps “loading” and “computing”—otherwise every layer waits on host-to-device transfers and the pipeline stalls badly.

    Illustrative pseudocode:

    1. bufferA = alloc(weight_block_size)
    2. bufferB = alloc(weight_block_size)
    3. prefetch(layer[0], bufferA)
    4. for i in range(num_layers):
    5. current = bufferA if i % 2 == 0 else bufferB
    6. next_buf = bufferB if i % 2 == 0 else bufferA
    7. if i + 1 < num_layers:
    8. async_prefetch(layer[i+1], next_buf)
    9. compute_layer(i, current, activations, kv_cache)
    10. async_wait(next_buf)
    11. release_or_reuse(current)

    Three points from this pseudocode: first, the weight block size must match the memory budget and per-layer compute; second, prefetching must be asynchronous, with events or barriers guaranteeing loading completes before the next layer computes; third, the current layer’s buffer should be reused promptly after computing—if references are not released, double buffering degrades into multi-buffering.

    Bigger buffers are not always better. Blocks that are too small cause frequent transfers and scheduling overhead; blocks that are too large crowd out activations, KV Cache, and communication staging. A practical approach: measure the ratio of per-layer compute time to per-block transfer time on the target hardware so prefetching is mostly covered by compute, while keeping a safety margin. During Prefill, activations grow substantially with longer sequences, so weight buffers should yield somewhat; during decoding, KV Cache grows faster and scheduling should adjust accordingly.

    4. Prefill Workspace: Fine-Grained Memory Management During the “Reading” Phase

    Prefill is the core of the “reading” phase. The main model processes a long input in one pass, computing representations for all tokens and generating the KV Cache. Memory pressure in this phase typically comes from three sources: weight streaming buffers, attention activations, and the KV Cache. With long inputs, attention intermediate tensors can become the primary bottleneck, so generic optimizations like chunked computation, activation recomputation, or segmented Prefill are needed.

    A workable Prefill workspace layout:

    • Input embedding and positional encoding area: process in token blocks rather than expanding all intermediate representations at once.
    • Attention workspace: reserve temporary buffers for the current attention head or head group; use chunked attention to reduce peak usage.
    • KV Cache write area: write per layer, releasing that layer’s activations once written; if the full KV is not needed later, keep only a compressed summary after reading.
    • Output projection and semantic summary area: compress the main model’s reading results into task constraints, candidate plans, or hidden-state representations for the small model to consume.
    • Communication staging area: if latent-space communication is used, projected hidden vectors, quantization parameters, and integrity checks live here.

    Note: when the Prefill workspace shares a memory pool with layer-streamed reloading, watermarks and reclamation policies are essential. For example, when the KV Cache nears its limit, pause prefetching the next layer’s weights and prioritize the current layer’s compute and cache writes; when the communication staging area needs to expand, temporarily reduce prefetch depth. The scheduler should explicitly manage priorities across the four task types—“weight loading, computation, cache writing, communication serialization”—to avoid mutual preemption and jitter.

    5. Small Model Answering and Agent Communication: Text, Structured State, or Latent Space?

    The small model’s answering phase does not require the main model to remain resident throughout. Once the main model has finished reading and produced a task representation, weight streaming buffers can be freed and memory handed to the small model and communication modules. The communication format chosen here directly affects system complexity.

    Text communication: best readability, convenient for log auditing, human intervention, and cross-model reuse; downside is length redundancy, requiring summarization and validation over long chains. For most production systems, text plus structured fields remains the robust choice.

    Structured state communication: JSON-like fields carrying task type, constraints, candidate answers, confidence scores, etc. It sits between text and latent space, with good compatibility and easy rule-based validation.

    Latent-space communication: the upstream model outputs continuous vectors or state tensors, consumed by the downstream model via projection layers or adapters. Potential advantages: high compression ratio and the ability to preserve continuous semantics that text struggles to express. Challenges: different models’ representation spaces are not shared, requiring alignment training or projection layers; hidden vectors are hard to audit and error propagation is hard to trace; serialization, quantization, and transfer themselves consume bandwidth and memory. If the main and small models are heterogeneous, latent-space communication also needs an extra representation alignment module—you cannot assume “vectors just work.”

    Therefore, latent-space communication is more likely to appear in high-throughput, low-latency, closed pipelines where models share the same lineage or have been jointly aligned. In open, auditable, mixed-model scenarios, text and structured state will coexist for a long time. Latent-space communication will not replace all natural language communication; it will serve as an optional internal representation channel for compressing high-frequency intermediate states.

    6. Engineering Checklist

    1. Clarify responsibility boundaries: the main model only reads, decomposes, and represents; the small model only answers given that representation—prevent responsibility drift.
    2. Dynamic memory budgeting: manage weight buffers, activations, KV Cache, communication staging, and the small model workspace in a unified pool, reclaimed and reused by stage.
    3. Observable double buffering: log prefetch hits, wait times, and buffer reuse counts to prevent pipeline stalls when prefetch fails to cover compute.
    4. Segmented Prefill: use chunked computation and activation recomputation for long inputs to control peak memory.
    5. Fallback for communication formats: latent-space communication should retain text or structured summaries as a degraded channel for auditing and failure recovery.
    6. Verifiable representation alignment: if hidden vectors are used, validate downstream robustness to projected representations through offline evaluation to avoid semantic drift.
    7. Security and compliance: latent-space communication does not mean unauditable—retain necessary summaries, hashes, or sampled decoding records to meet traceability requirements.

    Overall, “large model reads, small model answers” is an engineering practice of responsibility separation, and latent-space communication is its potential evolution at the communication layer. Whether it becomes widespread depends not on conceptual novelty, but on whether representation alignment, memory budgeting, auditability, and pipeline scheduling can form a closed loop. Under tight memory constraints, layer-streamed reloading and double buffering solve “how to run the main model at all”; the Prefill workspace solves “how to avoid exhausting memory during reading”; and the communication protocol solves “how to hand reading results to the answerer efficiently and reliably.” All three must be designed together before latent-space communication in agent systems becomes genuinely feasible in practice.