Distributed Transformer Execution: Orchestrated Inference Across Heterogeneous Devices
A thesis on partitioning a large model into versioned execution stages, routing activations across a trusted network, and managing replicas and session state on devices of different sizes.
Abstract
Large language models place pressure on accelerator memory, memory bandwidth, network capacity and the cost of reliable serving. At the same time, an organization may own many workstations whose resources are available for only part of the day. This thesis examines whether a trusted pool of such devices can execute one pretrained model by hosting different portions of its computation, rather than requiring every participant to hold the complete model.
The proposed architecture uses a Model Execution Coordinator to manage a versioned execution graph, worker capabilities, stage placement and session assignments. Workers host contiguous groups of compatible transformer blocks. They exchange typed activation tensors directly, retain the key–value state for their assigned layers, and expose several replicas of a stage when capacity and failure-domain separation permit. A stable serving pool supports interactive requests; less reliable devices contribute only where their availability and performance satisfy the workload.
The central proposition is conditional: partitioning can make an otherwise infeasible model fit across the pool, while careful placement and state-aware recovery may make that capacity useful. It does not remove the sequential dependencies of autoregressive generation or guarantee lower latency. Analytical examples distinguish parameter storage, session memory, communication cost and employee demand. Stageplane now implements an initial decoder-only serving subset, with local correctness and resource experiments documented on its project page. Those experiments do not validate the paper’s multi-host performance or productivity hypotheses; no peer review or production performance is claimed.
Contributions proposed in this paper
- A proposed control-plane and data-plane separation for version-pinned model stages on heterogeneous, trusted workers.
- A session-aware replica and recovery protocol that distinguishes loaded weights from the KV state needed to continue generation.
- Explicit capacity and network calculations, including a 10,000-employee planning scenario and the limits of small-device participation.
- A reproducible evaluation plan with baselines, failure experiments and criteria that could reject the proposal.
1. The problem: useful capacity is more than installed compute
A model that does not fit in one device’s usable memory cannot be served there merely by leaving more CPU cores idle. Weights are only one allocation. Inference also needs intermediate tensors, kernel workspace and session state. Long contexts and concurrent users can exhaust memory even after low-bit weights fit. When generation reads a large quantity of weights for a small amount of token work, memory bandwidth can constrain execution before arithmetic capacity is saturated.
Adding machines introduces another constraint: intermediate results must arrive before dependent computation can continue. Moving data through host memory, an ordinary network interface and a congested switch may cost more than the computation moved off the original device. The relevant resource is therefore a feasible path through compute, memory and communication—not the sum of advertised device specifications.
The motivating question is whether an enterprise can assemble that path from resources it already controls. A successful system would widen access to model capacity, respect employee workloads, and deliver an explicit service objective. It would not require every laptop to become an inference server, or require a large model for tasks already handled well by a smaller one. The proposal must be compared with those simpler alternatives.
3. Research questions and falsifiable hypotheses
RQ1 asks when a heterogeneous pool can serve a fixed model within a declared memory and latency budget. H1 is that profiling-based stage placement, combined with a minimum network-quality requirement, improves the fraction of requests meeting that budget compared with equal layer counts placed without topology awareness. Reject H1 if the measured improvement disappears across repeated workloads or is outweighed by scheduling and migration cost.
RQ2 asks whether replicas make ongoing sessions recoverable at an acceptable price. H2 is that a bounded warm-state policy can reduce recovery latency relative to rebuilding every failed session from its prefix, while staying inside a declared memory and network budget. Reject H2 when replication overhead consumes the service benefit, or recovery violates the committed token history.
RQ3 asks whether opportunistic devices provide net useful capacity. H3 is that eligibility filters and workload tiers produce more accepted work per total operating cost than using the stable pool alone. Count device interference, electricity, support, failed attempts and network upgrades. A positive parameter-capacity result alone does not establish H3, and none of these hypotheses has been experimentally confirmed in this paper.
4. Define the model before distributing it
A transformer block is one repeated unit inside a model; it is not necessarily a complete transformer model. An encoder–decoder architecture has an encoder stack, a decoder stack and dependencies such as cross-attention. A decoder-only language model instead processes a causal sequence through decoder blocks. This thesis uses decoder-only inference as its worked example. Supporting an encoder–decoder model requires adding its actual encoder outputs and cross-attention state to the execution graph, not routing every request through an imaginary encoder.
The graph is derived from one compatible pretrained checkpoint. It includes tokenization, embeddings, ordered blocks, normalization, output projection and sampling. Residual connections, attention masks, position information, tensor layouts and tied parameters must preserve the model’s semantics. Arbitrary encoders and decoders from unrelated checkpoints are not interchangeable services. Tensor shape agreement alone does not make their learned representations compatible.
The default partition groups contiguous complete blocks into a stage. Placing each activation function or normalization on a separate machine would create many small network boundaries with little useful compute between them. Coarse stages keep most internal operations local. Within a fast accelerator island, a stage may itself use tensor parallelism; the outer coordinator treats that island as one contracted execution unit.
The phrase encoded execution means that a stage’s output is represented as a typed, serialized tensor message. Serialization preserves values under the agreed format. Quantization changes numerical precision and needs separate quality testing. Encryption protects a communication channel. These are three distinct operations: encoding does not automatically compress the model, hide the prompt from a worker, or remove the cost of transporting activations.
Figure 1. The execution path, its replicas and recovery
5. A coordinator for decisions, a direct path for tensors
The Model Execution Coordinator is a logical service with a model registry, device inventory, placement planner and session directory. It receives a requested model version and service class, checks authorization and available capacity, and returns a leased route through eligible stage replicas. Its metadata records what each worker can execute, not the private contents of every user’s prompt.
The control plane distributes assignments, health information and model manifests. The data plane carries activations directly between the workers on the approved route. Sending every tensor through a central model manager would make that manager a bandwidth bottleneck and enlarge its sensitive-data footprint. A gateway still owns the client connection, request limits and committed output stream, but does not need to relay every intermediate stage result.
A logical coordinator need not be one machine. A three-member consensus-backed metadata service can tolerate one unavailable member while a majority remains connected, under the usual crash-fault assumptions. Raft is a precedent for this control-plane role. It is not a reason to vote on every tensor or to infer that a three-node metadata cluster has replicated all model weights and session caches.
Coordinator partitions require a policy. Existing sessions may continue only under a still-valid route lease and a defined cancellation boundary; new sessions must not silently acquire conflicting assignments. After a lease expires, workers fail closed for that assignment. The client receives a bounded retry or an explicit failure rather than an unverified claim that execution continued correctly.
6. The model manifest and stage execution contract
The manifest is an immutable description of a particular executable model version. It identifies the checkpoint and tokenizer hashes, layer intervals, weight format, activation and cache dtypes, supported kernels, position encoding and maximum supported shapes. Directed edges declare every tensor dependency. For encoder–decoder or multimodal models, this includes auxiliary states that a simple linear pipeline would otherwise omit.
A worker registers device type, allocatable memory after reserves, observed service times, supported operations, network locality and a failure-domain identifier. The coordinator validates these capabilities against the manifest before advertising the replica as ready. Successfully downloading a weight file is insufficient: a readiness probe must execute a compatible fixture, check output shape and compare numerical behavior against an agreed reference tolerance.
Each message carries a tenant-scoped session identifier, model revision, stage identifier, route epoch, sequence position and expected tensor description. Reject stale epochs, incompatible revisions, unexpected dimensions and out-of-budget allocations before computation. A bounded binary tensor format is preferable to arbitrary object deserialization. The example below is a proposed architecture contract, not Stageplane’s exact API schema; consult the implementation’s versioned protocol for its supported fields and limits.
model_revision: "checkpoint-sha256"
tokenizer_revision: "tokenizer-sha256"
stage_id: decoder-03
layers: {start_inclusive: 10, end_exclusive: 15}
input: {layout: BSH, dtype: bf16, hidden_size: 8192}
output: {layout: BSH, dtype: bf16, hidden_size: 8192}
state: {kind: kv_cache, ownership: session_and_layer}
weights: {format: approved-4bit-format, artifact_hash: sha256}
placement: {replicas: 3, distinct_hosts: true}
request_identity: [tenant, session, route_epoch, token_offset]
limits: {max_context_tokens: 8192, max_inflight: measured_budget}7. One request, from admission to the next token
At admission, the gateway authenticates the caller, selects an authorized model revision and reserves a route with enough memory for the requested context and output allowance. Tokenization must use the manifest’s tokenizer. A request that cannot obtain a feasible complete route is queued within a bound or rejected; partially reserving attractive early stages must not strand work behind an unavailable later stage.
During prefill, prompt activations traverse the ordered stages. Each worker computes its blocks and builds the KV cache for those layers. Only after the final output projection and sampling does the gateway commit the first generated token. During decode, the new token traverses the model using the previously built caches. The chosen replica at each stage remains associated with the session because that is where its state lives.
The so-called navigation layer is consequently an execution scheduler. It selects among equivalent replicas of the next required stage; it does not choose an arbitrary layer because that layer seems semantically relevant to the question. A trained mixture-of-experts model has its own learned expert routing and additional communication dependencies. The coordinator must preserve those semantics rather than inventing conditional execution for a dense model.
Cancellation and backpressure travel through the complete route. Downstream capacity determines how much upstream work may be in flight. On cancellation, workers release reservations and caches under a bounded cleanup policy. Request accounting distinguishes admitted, completed, cancelled and failed work so that a fast early-stage metric cannot hide stalled end-to-end requests.
8. Place stages according to measured cost
Equal numbers of layers do not guarantee equal service time or memory demand. Embeddings and output heads can be substantial, and kernels behave differently across devices. The planner profiles candidate stage intervals at representative prompt lengths and decode batches, then checks a feasible memory budget and end-to-end route. Faster workers may host more blocks, reducing the number of network boundaries.
Placement should prefer locality for adjacent stages, avoid repeatedly crossing a constrained uplink, and reserve headroom for a worker’s foreground activity. A node with abundant RAM but slow matrix execution may qualify for batch work and fail the interactive service objective. CPU RAM, GPU memory and unified memory must be accounted for according to their actual access and transfer costs, not treated as interchangeable capacity.
Rebalancing also has a price. Loading weights, warming kernels and transferring or reconstructing session state can cost more than a short-lived improvement in the planner’s score. Use minimum residency periods and drain old assignments before moving them. Profile under contention as well as isolation: multiple nominally fast links can share one saturated switch or network interface.
9. Three replicas do not automatically preserve a session
Sharding and replication solve different problems. Sixteen different stages collectively hold one model. Three copies of each stage hold three copies of those weights in aggregate; they do not create a model three times as large. Replicas can supply alternative execution capacity and tolerate some failures. The usefulness of a replica depends on placement, scheduling and whether it can recover the session state.
For each stage, three replicas should occupy three distinct hosts, ideally with additional separation where power and networking failures matter. Four replicas spread across three machines still provide only three host failure domains. Other stages may share those machines if budgets permit, but their failure correlations must be included. Never describe a replica count as an availability guarantee without the failure model.
A replacement that has loaded weights is warm for new sessions, not necessarily for a conversation already in progress. That conversation’s layers have accumulated KV tensors. Recovery can transfer a compatible cache snapshot from a surviving trusted copy, restore a protected checkpoint and replay its suffix, or rebuild the required state by running the retained token prefix through the necessary stages. Rebuilding later-layer caches requires upstream activations too; a token list is not a ready-made cache.
The proposed protocol freezes progress at the last gateway-committed output offset, increments the route epoch, reserves a replacement and restores a consistent prefix. Cache checkpoints must identify their model revision and exact processed offset. Workers discard uncommitted suffix state before retrying. The gateway deduplicates output commits using session, epoch and token offset. Recovery can repeat computation; the design does not promise exactly-once distributed execution.
If generation uses stochastic sampling, persist the committed tokens and the sampling policy. Reuse the appropriate random state where reproducibility is required, while recognizing that heterogeneous floating-point kernels can still change numerical results. Recovery must preserve the already delivered transcript and be tested at failures before and after token commitment. A bounded resume failure is preferable to silently splicing incompatible state into an answer.
10. A worked memory budget: weights, replicas and KV cache
Consider an illustrative 70-billion-parameter model stored at a nominal four bits per parameter. Packed weights alone use 70 × 10⁹ × 4 / 8 = 35 billion bytes: 35 GB in decimal units, approximately 32.6 GiB. Sixteen perfectly balanced stages would average about 2.04 GiB of weights each. Three replicas per stage require 105 GB, or approximately 97.8 GiB, of aggregate packed weight storage. These are storage calculations, not a claim that any particular 70B checkpoint can be partitioned evenly or executed in that exact footprint.
Real deployments add quantization scales, some higher-precision tensors, kernel workspace, activation buffers, runtime allocations and operating-system reserves. Some kernels expand or dequantize data in ways that raise the peak footprint. Four-bit weight storage does not imply four-bit activations or a four-bit KV cache. AWQ is an example of weight quantization research; the format, calibration and backend must be validated for the chosen model and device.
For a conventional grouped-query attention cache, a useful uncompressed estimate is 2 × L × B × S × Hkv × Dhead × bytes_per_element. L is the number of layers; B is the number of equally long resident sequences; S is cached sequence length; Hkv is the number of key/value heads; Dhead is head dimension. The factor two accounts for keys and values. Different context lengths require summing their lengths. Sliding-window attention, latent-attention variants, cache quantization and prefix sharing change this estimate.
With 80 layers, one 8,192-token sequence, eight KV heads, head dimension 128 and two bytes per cache element, the model-wide cache is 2.5 GiB. Dividing 80 layers into sixteen five-layer stages gives 160 MiB per stage per sequence. Thirty-two such resident sequences use 5 GiB of cache per stage replica that owns those sequences, before weights or workspace. Each replica carries its assigned sessions; copying every session cache to every standby would multiply that state again. Stage-level admission must account for this distinction.
Explore the capacity and network assumptions
Change the assumptions to explore capacity and communication. This fixed, illustrative model has 70B parameters, 80 layers, hidden width 8,192, eight KV heads of dimension 128, and two-byte activations and cache elements. It is not a named checkpoint or a hardware benchmark.
Memory assumes uniform stages and the selected number of equally long sessions on each replica, without copying their caches to standbys. The subtotal excludes quantization metadata, activations, workspace, runtime and reserves. Network estimates describe one unchunked request at the nominal link rate, with no overlap, contention, compute or queue delay. Session count changes resident cache memory; it does not batch the displayed network payload. One stage has no inter-stage edges.
11. The network can become the new compute bottleneck
For a simple pipeline boundary with hidden width d, batch B, token span S and b bytes per activation element, the payload is B × S × d × b. At B = 1, S = 4,096, d = 8,192 and b = 2, a prefill boundary carries 64 MiB. At one decode token and the same width, the boundary carries 16 KiB. This estimate excludes metadata and any additional tensors required by the architecture. It explains why prefill and decode put different demands on the same link.
A nominal 1 Gbit/s link transports 125 million bytes per second before protocol overhead and contention. Sending 64 MiB over one such edge takes about 0.537 seconds at that ideal rate. A deliberately simplified, unchunked, serialized pass across fifteen edges takes about 8.05 seconds in payload transfer alone. Real goodput is lower than the link rate; chunking and overlap can reduce the unchunked path estimate. Neither this arithmetic nor the animation is a measured time to first token.
For decode, 16 KiB takes roughly 0.131 milliseconds per edge at that rate. If each edge also adds an assumed one millisecond of one-way transport and dispatch latency, fifteen edges contribute about 16.97 milliseconds before stage computation, queuing and sampling. Ten times the bandwidth reduces serialization time but not that fixed latency. This is why a low-bandwidth metric and a low-latency metric are not interchangeable.
Autoregressive generation requires the sampled token before the next ordinary decode step can proceed. A deeper pipeline does not make one conversation execute all its dependent stages simultaneously. Independent sessions and microbatches can keep different stages busy and improve throughput. On a balanced ideal pipeline, filling and draining still create bubbles; uneven stage speeds and finite request populations make utilization worse.
12. What a 10,000-employee organization actually implies
An employee count is neither a worker count nor a concurrency measurement. Suppose, purely for planning, that 20% of 10,000 employees opt in and half of those devices are simultaneously available. That produces 1,000 candidate devices. Some will fail memory, kernel, privacy, locality or latency requirements, so even this number is not qualified serving capacity. A reliable architecture does not schedule a request across all 1,000 simply because they exist.
Start instead with an illustrative sixteen-stage route whose three replicas per stage occupy 48 qualified worker slots. A conservative first pilot could use 48 distinct stable hosts, although a suitable server may host several slots after resource accounting. This is a placement example, not a recommendation to buy 48 machines. A smaller number of capable hosts often reduces latency and operations. Additional eligible nodes can provide replacement capacity or another complete serving path only when the bottleneck stages and network are also provisioned.
Demand needs its own assumptions. If 10% of 10,000 employees are active and each submits one request every five minutes, the mean arrival rate is 1,000 / 300, approximately 3.33 requests per second. At an assumed mean end-to-end residence time of twenty seconds, a stable system has about 67 requests resident on average by Little’s law. The twenty seconds is an input assumption, not a predicted outcome; bursts, token lengths and service objectives still determine required headroom.
The earlier 32-sequence cache example is therefore not enough to certify this demand scenario. Sessions may have different lengths and be spread unevenly across replicas. Measure admission, queueing and per-stage cache occupancy under the expected request mix. If the slower stages cannot keep up, adding early-stage replicas or idle employee devices will not repair the complete path.
| Quantity | Assumption or calculation | Interpretation |
|---|---|---|
| Employees | 10,000 | Potential users, not simultaneous inference workers. |
| Candidate devices | 10,000 × 20% × 50% = 1,000 | Still subject to trust, memory, kernel and network qualification. |
| Example stage slots | 16 stages × 3 replicas = 48 | A model placement with copies, not 48 copies of the full model. |
| Mean request arrival rate | 1,000 active users / 300 seconds ≈ 3.33/s | A synthetic workload assumption that excludes bursts. |
| Mean resident requests | 3.33/s × 20 seconds ≈ 67 | Conditional on stable operation and the assumed residence time. |
13. A useful role for small devices, without pretending they are GPUs
A small device can participate without executing the largest model’s critical stage. A trusted machine may handle tokenization, gateway duties, admission coordination, monitoring aggregation or a smaller local model. It may also serve a limited stage if the full peak memory budget fits, supported kernels exist and measured service time is acceptable. None of these roles is automatically free: tokenization and gateway work also carry sensitive data and consume resources.
A device with 512 MiB of usable memory cannot host a stage whose packed weights alone average 2 GiB. A laptop with sufficient system RAM may still lack a fast execution backend. Splitting into ever smaller stages to accommodate it adds communication boundaries and increases exposure to churn. The planner should be allowed to decline the device for interactive inference while admitting useful offline work.
The proposed pool has three tiers: a stable low-latency core, scheduled capacity available for known windows, and opportunistic devices for restartable tasks. Employee participation is opt-in and resource-capped, with foreground-priority, thermal, battery and network policies. A laptop sleeping or leaving a network is an expected event, not an exceptional outage. Critical sessions require a recovery path that survives those events without exhausting the stable core.
A useful outcome may be a smaller local model for ordinary requests and a distributed larger model for explicitly routed difficult tasks. That policy must be evaluated for quality and privacy rather than assuming every task benefits from the largest available checkpoint. Distributed capacity is an option to use selectively, not a reason to increase every request’s computational footprint.
14. Improve throughput without hiding latency
An initial implementation should keep placement and session ownership simple, then add optimizations individually. Continuous batching can combine independent work within a stage, subject to latency budgets and available cache memory. Bounded queues and fair admission prevent one tenant’s long prompts from consuming all state. A throughput gain is valuable only if enough requests still meet the promised time to first token and inter-token delay.
Prefill and decode have different resource profiles, so separating their workers is an extension worth testing. DistServe provides a serving precedent for that separation. In this proposal, handing a session from prefill workers to decode workers also moves or reconstructs its KV state. The transfer must be included in time to first token and network accounting. On a slow link, keeping both phases together may be better.
Weight quantization may allow fewer, larger stages. Activation quantization may reduce communication, but can accumulate numerical error through repeated boundaries. Cache quantization changes the state budget separately. Introduce one precision change at a time, retain an unmodified reference and evaluate quality on the target tasks. A smaller memory number is not sufficient evidence of a usable execution path.
Replicas should follow bottlenecks and failure policy rather than a uniform count by habit. More replicas of a saturated stage can help distribute new sessions when upstream and downstream capacity permits. They do not instantly accelerate a session already bound to a slow stateful worker. Speculative decoding, expert parallelism and prefix caching are future extensions with their own correctness and privacy constraints; the baseline does not depend on them.
15. Trust, privacy and model integrity are explicit boundaries
The baseline threat model trusts managed worker hosts to execute approved code and protect in-memory data. It considers crashes, accidental incompatibility, stale assignments and unauthorized network access. It does not claim to tolerate Byzantine workers that deliberately falsify tensor results. A signature establishes which artifact was approved; it does not prove that a remote machine actually executed it correctly.
Intermediate activations and KV caches are sensitive data. Keeping raw text at the gateway does not establish confidentiality from workers. Petals explicitly discusses recovery of input tokens by early-layer servers and recommends trusted participants for sensitive work. The enterprise proposal therefore restricts confidential sessions to authorized device pools and jurisdictions. Mutual TLS protects transport; workload identity and tenant-aware authorization restrict stage access. Encryption in transit cannot protect data from the worker that must process it.
Model manifests and weight artifacts require integrity verification and an authorized distribution path. The chosen checkpoint’s license and internal data policies must permit its intended placement. Tenant-scoped identifiers, bounded cache lifetimes, validated tensor sizes and safe cleanup limit accidental cross-session exposure. Logs should normally record timings, shapes, revisions and error codes rather than prompts or tensor contents. Debug capture needs a separate access and retention policy.
If untrusted personal devices are a requirement, the design needs a different security analysis and likely different execution technology. Trusted execution environments, cryptographic computation and redundant result checking each introduce assumptions and costs; none is supplied merely by dividing a model. The first implementation should not claim privacy-preserving inference or secure multi-party computation.
16. Operate a model version, not a collection of unrelated services
A rolling upgrade must keep each session pinned to one complete compatible model revision. Register the new manifest, load and validate its stages, route new sessions only after a complete path is ready, and drain the old revision. Do not replace a middle stage with a new checkpoint while earlier stages and caches remain from the old one. Rollback restores a coherent route and version policy, not just a container tag.
Observe the complete request with a trace identifier that links admission, stage service time, boundary transfer, queue delay and token commitment. Record time to first token, time per output token, context lengths, cache occupancy, cancellation cleanup and recovery outcomes by model and workload class. Metadata-service health is not a proxy for inference health. A full-route synthetic fixture can expose a missing or incompatible stage that individual process probes miss.
Capacity planning includes weight download and cold-start storms. Stagger placements and enforce transfer budgets so that many devices recovering simultaneously do not saturate the same storage or network path. A circuit breaker should stop admitting sessions to a degraded path. An alternative smaller model may be offered only under an explicit user or application policy; silently changing the model would invalidate both the service contract and the experiment.
17. Evaluation: what would establish that this works?
Build a reproducible fixture around one licensed checkpoint, one tokenizer and declared precision settings. Record device inventory, kernel and runtime versions, stage boundaries, network topology and cache policy. Use the same prompt and output-length distributions across systems. Keep warm and cold runs separate, retain failures, repeat trials and report variation. Publish the configuration and raw measurement method before interpreting a favorable average.
The primary baselines are the same model on a suitable single accelerator when it fits, a conventional fast multi-GPU or multi-node configuration, static pipeline placement, and an offloading configuration appropriate to the workload. A smaller local model is a separate task-quality and cost baseline, not an equal-model latency comparison. FlexGen motivates evaluating offloading on its intended throughput-oriented workload instead of selecting only cases where it is disadvantaged.
Measure p50, p95 and p99 time to first token and time per output token; completed requests and tokens per second; goodput under a declared service-level objective; peak memory; bytes per generated token; and total energy and operating cost. Report accepted task outcomes and interference with the employee’s foreground workload. Lower infrastructure spend does not demonstrate productivity unless users complete useful tasks with acceptable quality and review effort.
Correctness checks compare stage outputs and final logits with a reference within declared tolerances, then measure task-level quality. For sampling, compare appropriate output statistics rather than demanding identical text under every kernel. Fault injection removes a stage worker during prefill, between decode steps and after sampling but before commitment. Also test coordinator loss, delayed heartbeats, stale epochs, network partitions, cache exhaustion and conflicting revisions.
Ablations remove topology awareness, change replica counts, vary cache recovery policies and disable each precision optimization. Vary context length, concurrency, link bandwidth and measured latency independently. Include correlated host or switch failures instead of only independent process exits. Report the regime where the design stops meeting its objective; that boundary is a result, not a failed presentation.
| Question | Comparison | Evidence required |
|---|---|---|
| Does placement help? | Profiled placement vs equal-layer static placement | Goodput, tail latency and migration cost under identical demand. |
| Do replicas help recovery? | Prefix replay vs bounded warm-state policy | Resume latency, committed-history correctness, cache and network overhead. |
| Do small devices help? | Stable pool vs stable plus eligible opportunistic workers | Accepted work, energy, support cost and foreground interference. |
| Does compression remain useful? | Reference precision vs each isolated precision change | Quality delta, peak memory, boundary bytes and complete latency. |
18. Stageplane implementation and the next evaluation steps
Stageplane is the reference implementation associated with this thesis. It provides model distribution, version-pinned whole stages, an executor, trusted workers, direct activation forwarding, replica placement and committed-prefix replay. Its privacy-focused deployment controls include bearer authentication and configurable mutual TLS, with operational traces that omit prompt and activation contents. This protects a managed deployment boundary; participating workers still see their inputs and state.
The repository records 36 passing tests and Qwen3 4B generated-token parity in local experiments, alongside slower distributed runs and failed capacity/deadline attempts. Workers in those experiments shared one physical host. The implementation does not include every proposed capability: consensus coordinator failover, live KV-state replication, active link profiling and foreground-device policies remain future work. The project page contains the detailed evidence and limitations; the analytical 70B examples in this paper remain planning calculations.
The next evaluation phase repeats semantic validation on two physically independent trusted machines. Use a small supported model, a fixed stage boundary, the versioned manifest and deterministic fixtures. Compare reference outputs before introducing different kernels or quantization. This extends the local correctness evidence to a real network without confounding it with every other optimization.
Phase two introduces a stable local network pool, measured placement, multiple independent sessions and enforceable memory admission. Instrument the complete path and compare it with a conventional serving baseline. Add a third host and controlled worker failure before advertising replicas as an availability feature. Demonstrate epoch handling and committed-history recovery using a deliberately small cache budget.
Phase three adds heterogeneous devices in a restricted batch tier, then promotes only qualified workers to interactive service. Evaluate optional cache replication, precision changes and separated prefill/decode one at a time. A production decision requires an agreed service objective, quality threshold, total-cost comparison and an operational owner. Stop expansion when the next device adds more communication, failure or support cost than accepted work.
Stageplane
Stageplane is where I have implemented the initial serving design with privacy-focused controls for a trusted worker pool. Explore the project’s architecture, authenticated transport, committed-prefix recovery and recorded Qwen tests. Workers still process sensitive activations; this is not cryptographic private inference.
19. Expected advantages and conditions that can defeat them
The strongest expected advantage is capacity access: no single worker needs to store the whole checkpoint. A second is selective reuse of available hardware, especially for tasks that tolerate batching and variable completion time. Versioned stages can also make hardware replacement and rollout boundaries explicit. Replicas may provide continuity when session state can be recovered within the service objective. Each benefit is conditional and needs the evaluation described above.
The counterweight is a larger distributed system. More boundaries add latency and failure exposure; heterogeneity creates stragglers; sessions consume state on several machines; and control, storage and network operations cost money. A dedicated accelerator configuration can outperform a larger collection of nominally idle resources. A smaller model can be the better business choice even when the distributed model is technically feasible.
This thesis covers inference over a compatible pretrained model. Full training adds backward communication, optimizer state, synchronization and a different memory budget; it is outside the scope of Stageplane’s implemented serving subset. The numerical examples assume simplified uniform blocks and conventional attention. They do not establish performance for a named checkpoint, arbitrary hardware, an internet-wide swarm or an actual 10,000-person organization.
20. Conclusion and the next research step
A large model can be viewed as a versioned computation graph whose stages reside on different machines. The useful abstraction is a compatible execution stage with explicit tensor and state contracts, coordinated through a metadata service and connected by a measured data path. Replication then becomes a question of both weight placement and session recovery, while small devices participate according to what they can execute reliably.
The thesis is that governed heterogeneous inference deserves evaluation as a way to widen access to model capacity where an organization has suitable trusted resources. Its success depends on preserving model semantics, bounding state, controlling network cost and meeting an end-to-end objective. Stageplane supplies an initial implementation and local evidence. The next research step is controlled evaluation on physically independent hosts. This paper’s broader scalability and productivity hypotheses remain open; the implementation does not turn analytical bounds into production performance claims.
References
Primary papers and author-maintained technical documentation, reviewed on 31 October 2026. References establish prior work; they do not validate the proposed system’s performance.
- Attention Is All You Need ↗Vaswani et al. · 2017
- GPipe: Efficient Training of Giant Neural Networks using Pipeline Parallelism ↗Huang et al. · 2019
- Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelism ↗Shoeybi et al. · 2019
- Petals: Collaborative Inference and Fine-tuning of Large Models ↗Borzunov et al. · 2022; revised 2023
- Efficient Memory Management for Large Language Model Serving with PagedAttention ↗Kwon et al. · 2023
- DistServe: Disaggregating Prefill and Decoding for Goodput-optimized Large Language Model Serving ↗Zhong et al. · 2024
- FlexGen: High-Throughput Generative Inference of Large Language Models with a Single GPU ↗Sheng et al. · 2023
- GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpoints ↗Ainslie et al. · 2023
- AWQ: Activation-aware Weight Quantization for On-Device LLM Compression and Acceleration ↗Lin et al. · 2023; MLSys 2024
- In Search of an Understandable Consensus Algorithm ↗Ongaro and Ousterhout · 2014
- Distributed Inference with vLLM ↗vLLM Team · 2025
Practical guide & interpretation
This thesis proposes a Model Execution Coordinator that places compatible stages of one pretrained transformer on trusted devices, routes activations between workers and manages session-aware recovery. Partitioning expands available model capacity; whether it improves useful serving depends on memory, network cost, state recovery and measured task outcomes.
Read the estimates as constraints
Start with the model’s real execution graph and peak per-worker memory. Use the explorer to see how adding stages reduces the average weight allocation while adding network boundaries. Increase the session count separately: cache growth can consume the apparent headroom. Replication copies stage weights; it does not increase the parameter count of the model being executed.
In the 3D recovery view, the replacement is waiting for state before it can continue the request. Treat that pause as a design obligation. A useful prototype must preserve the delivered token history and demonstrate recovery under a declared time and resource budget. The paper’s evaluation section explains how to test those claims against conventional serving and smaller-model alternatives.
Questions & answers
Does using more devices make one response faster?
Not necessarily. Consecutive stages still depend on one another, and each network edge adds transfer and dispatch cost. Multiple independent sessions can improve pipeline utilization, but single-session latency and total throughput must be measured separately.
Can any small device host a transformer stage?
Only if its complete memory budget, supported kernels, trust level and measured speed satisfy the workload. Other devices can contribute gateway, coordination or restartable batch work. A device that cannot meet the interactive objective should not be placed on that critical path.
Is there an implementation or a verified benchmark for this thesis?
Yes. Stageplane implements an initial decoder-only serving subset and records local Qwen correctness, latency and resource experiments. The dedicated project page explains those results and the features still proposed. The Source & Active Research Code button links to Karthik Ramesh’s Stageplane repository. Multi-host speedup and enterprise productivity remain unverified; the diagrams and calculator are analytical illustrations, not a live model.
About this work
Written by Karthik Ramesh, an AI platform engineer and independent AI and quantum researcher. This thesis paper includes a compact interactive explanation; the text describes its assumptions and practical limits.
First published . Explanation updated .
