Large Models Read the Problem, Small Models Write the Answer: Exploring Latent-Space Communication for AI Agents

    This article examines an AI Agent architecture that separates understanding from generation: a cloud-based or clustered 700B-scale model handles long-context comprehension, information extraction, and task planning, while a locally deployed 4B model generates the final response at high throughput. It analyzes hardware constraints, prefill and decode bottlenecks, latent-space bridging, and cloud–edge deployment strategies.

    In the current large language model (LLM) landscape, models with around 700B parameters represent the leading edge of open-source reasoning capability and knowledge capacity. However, their massive parameter footprint places them beyond the practical reach of consumer-grade and many enterprise GPU systems. Even under extreme quantization at 1 byte per weight, the primary parameter matrices of a 700B model require more than 700 GB of memory. Once scale factors, normalization parameters, and other auxiliary data are included, the total model size often approaches 760 GB.

    To address this limitation, the industry is exploring a new type of Agent architecture: a very large model handles “reading the problem” and understanding the task, while a locally deployed 4B-scale model takes over “writing the answer” and produces the output at high throughput. This article explains the design principles and practical considerations behind this approach from the perspectives of hardware architecture, I/O bottlenecks, computation time, and latent-space bridging.

    1. The Current Challenge: Hardware Constraints for Very Large Models

    Before examining the architecture, it is important to understand why extremely large models are difficult to deploy locally.

    1.1 Physical Limits on GPU Memory

    A conventional eight-GPU server with an 8 × 80 GB configuration provides 640 GB of total GPU memory, which is insufficient to fully load a quantized 700B model. For consumer GPUs, which typically offer 16 GB or 24 GB of memory, running a model of this scale on a single card—or even across a small cluster—is highly impractical.

    This memory wall is one of the primary obstacles to bringing very large models to local and edge environments.

    1.2 Uneven Compute Distribution Between Prefill and Decode

    LLM inference can generally be divided into two stages:

    • Prefill: The model processes the input prompt, such as a 128K-token context. This stage involves a large amount of computation and is largely compute-bound. GPUs can make effective use of their matrix-multiplication units, resulting in relatively high utilization.
    • Decode: The model generates tokens one at a time. This stage is largely memory-bound. Each generation step requires reading the model weights and accessing the KV cache, making memory bandwidth a major bottleneck. In practice, compute utilization is often below 5%.

    For a 700B model, even if the memory challenge can be solved, the memory traffic during decoding remains enormous. Generation speed often struggles to exceed single-digit tokens per second.

    2. Architecture: A Large Model Reads, a Small Model Answers

    To overcome these bottlenecks, an architecture that separates understanding from generation has emerged. Its central idea is to assign each model the task it performs best:

    • The large model provides long-context understanding and complex reasoning.
    • The small model provides low memory traffic and fast token generation.

    2.1 Processing Long Contexts with the Large Model

    A 128K-scale input can be sent to a 700B-class model running in the cloud or on a compute cluster. At this stage, the large model performs deep semantic understanding, information extraction, and logical planning.

    It does not need to generate the final answer token by token. Instead, it can produce structured instructions, a summary of the key context, or even latent-space features directly.

    2.2 Generating Locally with the Small Model

    After quantization, a 4B-scale model may require only around 4 GB of GPU memory, making it practical to deploy on a consumer GPU. During decoding, each generated token requires access to roughly 4 GB of model weights rather than hundreds of gigabytes. This sharply reduces memory-bandwidth pressure.

    With an efficient inference framework, the small model can potentially reach generation speeds of more than 100 tokens per second, enabling a smoother real-time interaction experience.

    3. Latent-Space Bridging: The Next Direction for AI Agents

    If the large model passes its result to the small model as natural language, the approach is straightforward, but it introduces information loss and transmission latency. A future direction for AI Agents is communication through latent representations rather than discrete text.

    3.1 What Is Latent-Space Communication?

    Latent-space communication allows models to exchange information through hidden states or KV-cache representations instead of natural-language tokens. After processing a long context, the large model produces a high-dimensional tensor. A lightweight projection layer, such as an MLP, maps this tensor into the smaller model’s representation space and uses it as part of the small model’s initial input.

    3.2 Implementation and Pseudocode

    This bridging process must address differences between the models’ representation dimensions. If the large model has a hidden dimension of hidden_dim_large and the small model has a hidden dimension of hidden_dim_small, a projection layer must be trained to reduce or expand the representation so that the two spaces can be aligned.

    1. import torch
    2. import torch.nn as nn
    3. class LatentSpaceBridge(nn.Module):
    4. def __init__(self, large_dim, small_dim):
    5. super().__init__()
    6. # Map latent features from the large model to the small model's input space
    7. self.projection = nn.Linear(large_dim, small_dim)
    8. def forward(self, large_hidden_states):
    9. # large_hidden_states: [batch_size, seq_len, large_dim]
    10. small_input_states = self.projection(large_hidden_states)
    11. return small_input_states
    12. # Large-model output -> bridge layer -> small-model input
    13. bridge = LatentSpaceBridge(large_dim=8192, small_dim=2048)
    14. large_model_output_hidden = torch.randn(1, 10, 8192) # Example large-model features
    15. small_model_input = bridge(large_model_output_hidden)
    16. # The small_model_input is then passed to the 4B model for decoding

    By passing tensors directly between models, an Agent system can avoid the large model’s detokenization step and the small model’s tokenization step. This can significantly reduce end-to-end latency.

    4. Practical Deployment and Cloud–Edge Collaboration

    In enterprise applications, this architecture is often deployed through a cloud–edge collaboration model.

    4.1 Running the Large Model in the Cloud

    In the cloud, developers can use general-purpose LLM API services or containerized deployment solutions, such as those provided by Baidu AI Cloud. Cloud infrastructure offers sufficient computing resources to handle the high-throughput prefill workloads of 700B-scale models. It can process complex long-context documents and perform detailed task decomposition.

    4.2 Accelerating Generation with a Local Small Model

    A 4B-scale model can be deployed on the user device or an edge node. After the cloud-based large model completes the “reading” phase and sends planning instructions or latent features, the edge-side small model performs generation using local GPU memory.

    This design supports high throughput and, in certain scenarios, can help protect sensitive data because the core response-generation process takes place locally.

    4.3 Optimizing the Pipeline Asynchronously

    To further improve system performance, developers can introduce message queues and asynchronous streaming. While the large model processes a 128K context, it can emit intermediate states in chunks. The small model can begin decoding as soon as it receives the first chunk of hidden states, creating a pipelined workflow and reducing idle waiting time.

    Conclusion

    The “large model reads, small model answers” architecture is essentially a redistribution of compute and memory-bandwidth resources. By separating understanding from generation and exploring direct communication through latent representations, it becomes possible to leverage the advanced reasoning capabilities of very large models at a lower hardware cost.

    As alignment techniques between models continue to mature, AI Agents may move beyond isolated, single-model operation toward coordinated multi-model systems that communicate through shared latent spaces.