FlowMesh treats multi-stage LLM workflows (RLHF, agentic pipelines) as a shared elastic service by decomposing them into fine-grained DAG operators with deterministic identities — enabling cross-tenant deduplication via $H_{\mathrm{task}}$, batching via $H_{\mathrm{exec}}$, and heterogeneous GPU scheduling via a single utility function — achieving up to 3.8× cost reduction and 2.0× energy savings over baselines.
Modern AI workflows (RLHF, RLAIF, multi-agent systems) are graph-structured DAGs of interdependent tasks, but infrastructure treats them as opaque black-box jobs. Three challenges arise:
The root cause: forcing graph-structured workflows into block-resource abstractions.
FlowMesh is a dual-plane service fabric with three key ideas:
核心技术壁垒: The two-level identity scheme ($H_{\mathrm{task}}$ for dedup, $H_{\mathrm{exec}}$ for batching) that unifies exact-match reuse and compatible-batch grouping while preserving per-DAG provenance. This is what enables cross-tenant sharing without conflating lineage — prior systems could do one but not both.

Paper's Figure 4, verbatim (caption: "System overview of FlowMesh.").
The dual-plane architecture: Control Plane (planner, router, scheduler) maintains a global view of all tenant DAGs and ready operators. Data Plane (elastic worker pool + CAS) executes scheduled work as stateless continuous-batching lanes. The control plane turns all tenant workflows into a single global stream of ready operators and continuously routes compatible requests into persistent executors.
The control plane maximizes:
$$U(j,B) = w_t T_{\mathrm{eff}}(j,B) - w_c C(j) + w_\ell G_{\mathrm{loc}}(j,B)$$
where $T_{\mathrm{eff}}$ = predicted throughput on worker $j$ for batch $B$, $C(j)$ = normalized cost rate, $G_{\mathrm{loc}}$ = locality gain (model weights in GPU memory, adapters on disk, hot KV cache). Feasibility gated by VRAM/BW limits, architectural requirements, and tenant affinity rules.
Two identity functions enable sharing without conflating provenance:
| Symbol | Meaning |
|---|---|
| $H_{\mathrm{task}}$ | Deterministic operator identity (includes input hashes) |
| $H_{\mathrm{exec}}$ | Execution signature (omits input hashes, adds resource class) |
| $U(j,B)$ | Scalar utility for worker $j$ serving batch $B$ |
| $T_{\mathrm{eff}}(j,B)$ | Predicted effective throughput (tokens/sec or samples/sec) |
| $C(j)$ | Normalized cost rate of worker $j$ |
| $G_{\mathrm{loc}}(j,B)$ | Locality gain (weights in memory, adapters on disk) |
| $(w_t, w_c, w_\ell)$ | Policy weights for throughput, cost, locality |
Setup: 6 GPU workers — H100 NVL (94 GB), RTX 4090 (48 GB), RTX 4090 (24 GB). Vast.ai Oct 2025 rates. Llama-3.1-8B, Llama-3.2-3B/1B. vLLM (inference) + HuggingFace TRL (RL training).

Paper's Figure 5, verbatim (caption: "FlowMesh compared with baselines. Left: Total cost and energy consumption. Right: Cost–Delay Product and Energy–Delay Product.").
FlowMesh delivers the lowest cost and energy across all baselines. DS (Decompose + Static) achieves slightly higher raw throughput by favoring H100 GPUs, but FlowMesh makes better use of smaller GPUs for superior cost/energy efficiency. The 2–10× CDP/EDP improvement is driven by the combination of deduplication, topology-aware placement, and elastic scaling.

Paper's Figure 6, verbatim (caption: "Average task latency with different numbers of available workers. FlowMesh achieves similar or better latency in all cases.").
FlowMesh's latency advantage is most significant with fewer workers — where baselines queue for resources while FlowMesh consolidates common tasks across workflows, effectively skipping the queue.

Paper's Figure 7, verbatim (caption: "Complete tasks under different numbers of workers on a Kubernetes cluster.").
Sub-linear scaling: 17 → 32 tasks/min from 8 → 48 workers (6× workers for ~1.9× throughput). This suggests significant coordination overhead at scale, though queuing delay (not compute) dominates total latency.

Paper's Figure 9, verbatim (caption: "Dynamic workload and the number of active workers in FlowMesh over time.").
The system effectively scales up and down tracking incoming workflow rate. The 30–60s lag is attributed to Vast.ai's instance bidding API — not fundamental to FlowMesh's design.
Where FlowMesh loses: DS achieves slightly higher raw throughput (favors H100s). Sub-linear scaling suggests diminishing returns. 30–60s Vast.ai provisioning lag could violate tight SLOs. Evaluation uses only 6 workers in the main experiment — gap to production scale is unaddressed.
| Workload regime | FlowMesh | Baseline | Why |
|---|---|---|---|
| Multi-tenant with shared sub-tasks | 1.8–3.8× cost reduction | Redundant computation | Cross-DAG dedup via $H_{\mathrm{task}}$ |
| Heterogeneous GPU cluster | Superior cost-efficiency | Wastes expensive GPUs on easy tasks | Utility-based placement matches task to GPU |
| Variable arrival rate | Elastic scaling | Static over/under-provisioning | Stateless workers + CAS enable instant scale |
| Tight latency SLOs | Moderate (30–60s Vast.ai lag) | Fixed allocation is predictable | Provisioning lag may violate strict SLOs |
| Step | Claim | Evidence | Depends on |
|---|---|---|---|
| 1 | DAG workflows contain massive redundant compute across tenants | §2: RLHF/RLAIF anatomy shows identical SFT + reward inference across experiments | — |
| 2 | Deterministic operator identities enable safe cross-tenant deduplication and batching | §3: $H_{\mathrm{task}}$ for exact-match, $H_{\mathrm{exec}}$ for compatible-batch; lineage preserved per DAG edge | Step 1 |
| 3 | A single utility function unifies placement, batching, and routing | §3.1: $U(j,B)$ trades off throughput, cost, locality; feasibility-gated by VRAM/arch constraints | Step 2 |
| 4 | Stateless workers + CAS provide elastic fault-tolerance | §3.2–3.3: idempotent re-execution, speculative replicas, at-most-once publication via content identity | Step 3 |
| 5 | End-to-end cost/energy/latency improvements over baselines | §5.2: 1.8–3.8× cost, 1.3–2.0× energy, 2–10× CDP/EDP | Steps 2, 3, 4 |
Implementation: Dual-backend — Kubernetes (custom controller + scheduler plugin in Go) and Vast.ai (Python CLI/SDK).
vastai search offers → rents best-scoring machine. CAS on external S3.No public repository cited in the paper.
[实现未公开]
关键实现细节: