Large Model Reads, Small Model Answers: Latent Space Relaying for On-Device AI
This article explains why running a 700B-class model on consumer hardware is limited by memory bandwidth rather than compute, and how a latent space relay architecture addresses it: a large model encodes long context once, compresses it into a compact soft prompt, and a small model repeatedly reads that representation to generate tokens at high speed. It covers hardware placement, first-token latency, throughput tuning, projector training options, key risks, and the scenarios where this design fits or fails.
1. The Real Bottleneck: Bandwidth, Not Compute
Getting a 700B-class model onto consumer hardware is close to a dream for everyone working on on-device AI. But what actually blocks it is not floating-point throughput. It is data movement.
Start with a rough calculation. Quantizing to 1 Byte per weight, a 753B-parameter model needs roughly 753GB for the main matrices alone. Using the official FP8 checkpoint, once scales, norms, and extra parameters such as the multi-token prediction heads are counted, the total file size is about 755.6GB. That means:
- The weights cannot fit in the VRAM of any consumer GPU, so they must stay resident in system memory or on a high-speed SSD.
- Autoregressive decoding theoretically reads every activated weight once per generated token. At 755GB, even with 200GB/s of memory bandwidth, the theoretical floor is around 3.8 seconds per token, and in practice paging, quantization/dequantization, and scheduling overhead make it slower.
- A 4B-class small model reads only about 4GB per token at the same bandwidth, so it can easily exceed one hundred tokens per second.
The conclusion is straightforward: the scarce resource for a large model is the time spent reading weights, while the scarce resource for a small model is knowledge and reasoning depth. That leads to a natural architecture: run the large model once, compress the information in the long context into a very small intermediate representation, and hand it to the small model to read repeatedly and emit at high speed. This is the core motivation behind “the large model reads the question, the small model answers it.”
2. Why the Handoff Point Must Be in Latent Space
The conventional approach passes the large model’s output text to the small model for continuation. It is simple to engineer, but wasteful in information-theoretic terms: the moment a 128K context is squeezed into a few hundred words of natural language, many fine-grained constraints (formatting, references, boundary conditions, implicit preferences) are dropped, and the small model is left guessing.
Latent space communication takes a different route: send vectors instead of tokens.
- During prefill, the large model encodes the long context and emits the hidden state sequence from the final layer (or several intermediate layers).
- A lightweight projection module maps those high-dimensional vectors into the small model’s input embedding space, producing a handful of “soft prompts.”
- The small model treats these soft prompts as a prefix and generates the answer autoregressively as usual.
This yields three benefits: the intermediate representation has a controllable size (for example, 32 vectors at 2048 dimensions is only about 128KB in FP16), so transfer and VRAM cost are negligible; information is preserved as continuous vectors, with far less loss than a text bottleneck; and the small model needs no structural changes, only a prefix inserted at the input.
Illustrative pseudocode:
# Large model: encode the long context oncehidden = big_model.encode(long_context_128k) # [L, d_big]soft = projector(hidden) # [k, d_small] k << L# Small model: decode at high speed with the soft prompt as prefixprefix = small_model.embed_tokens(prompt_ids) # [m, d_small]inputs = concat([soft, prefix], dim=0)answer = small_model.generate(inputs, max_new_tokens=1024)
3. Architecture Breakdown Across Four Dimensions
3.1 Hardware and Placement Strategy
Keep the large model weights in system memory under low-bit quantization, in a “load once, stay resident” serving mode; keep the small model resident in VRAM so decoding has zero wait. If memory capacity is insufficient, cold layers can live on an SSD with page locking, but accept a significant increase in first-token latency.
3.2 IO and First-Token Latency
The design compresses the expensive full-weight scan into a single prefill. Three things matter in practice: operator parallelism during prefill, KV cache reuse (cache hits when the same document is queried repeatedly), and batching in the projection module. First-token latency is essentially determined by prefill, while output speed is determined by the small model. The two are decoupled, which makes them easy to optimize separately.
3.3 Compute Time and Throughput
Small model decoding is memory-bound. Effective ways to raise throughput include continuous batching, weight quantization, and speculative decoding (let the small model draft, with fallback verification when needed). As concurrency grows, scale out small model replicas first rather than large model replicas, because the large model’s scarce resource is bandwidth, not concurrency.
3.4 Training the Latent Space Bridge
The projection module is usually randomly initialized and needs training. Three viable paths: train only the projection layers and freeze both models, which is the cheapest; add lightweight fine-tuning of the small model (such as low-rank adaptation) to align the two representation distributions; or introduce distillation, using the large model’s output distribution on long-context tasks as the supervision signal. Training data should cover long-document question answering, multi-turn coreference, and structured extraction, and layer selection matters: different layers carry different levels of semantic abstraction, so use a small validation set to determine the best extraction layer and soft prompt length.
4. Four Risks to Face Directly
- Semantic drift: soft prompts lack interpretability, making errors hard to localize. Keep a text fallback channel and fall back to the large model answering directly when confidence is low.
- Capability mismatch: the small model’s parameter capacity limits it from reasoning beyond its own ability, so the division of labor should be drawn by task, not by model size.
- Evaluation difficulty: continuous vectors cannot be assessed with text similarity directly, so build end-to-end task metrics (accuracy, format compliance, human preference) rather than metrics on the intermediate representation.
- System complexity: two models, two memory budgets, and one training pipeline mean operational cost clearly higher than a single model.
5. Where It Fits and Where It Does Not
Good fit: understanding very long documents and codebases, multi-turn question answering after injecting a large body of private knowledge once, and agent execution paths that are sensitive to output speed with relatively fixed answer patterns.
Poor fit: tasks requiring strong logical deduction and open-ended creation, scenarios where context changes frequently, and early-stage projects whose teams lack training and evaluation capability. In those cases the safer choice is a text relay of “large model skims + structured summary + small model generates”: get the pipeline working first, then replace it with latent space bridging step by step.
6. Where This Is Heading
Latent space communication will not replace natural language interfaces, but it will become a compression layer between long context and on-device deployment. Three signals indicate its maturity: whether projection modules can transfer across model families, whether soft prompts can be cached and reused, and whether standardized evaluation benchmarks appear. Until those three land, the pragmatic approach is to treat it as a pluggable optimization and adopt an architecture with a fallback path to absorb the uncertainty. To validate in the cloud, you can deploy the two-model service on a container platform, host checkpoints in object storage, and use logging and monitoring with alerting to observe the separated curves of first-token latency and throughput.
