AI Compute Infrastructure and MaaS Platform Implementation Guide
This guide explains why owning accelerator hardware does not automatically translate into productivity, and how to build the missing layers between compute and business value. It covers compute and cloud infrastructure layering—resource pooling, high-speed interconnect and storage, and elastic cost tiers—then walks through building a Model as a Service (MaaS) platform with a model repository, inference gateway, autoscaling, metering and quotas, and observability. It also details Token production and operations metrics, AI application patterns from personal efficiency to organizational productivity, a four-stage rollout plan with exit criteria, and risk controls including data classification, compliance review, disaster recovery, and avoiding vendor lock-in.
1. Why Having Compute Is Not the Same as Having Productivity
As enterprises move toward AI-driven transformation, a pattern keeps repeating: a company has already purchased or built a substantial pool of accelerator cards, yet the pace of model iteration on the business side has not improved accordingly. The cause is usually not the hardware itself, but the absence of a middle layer between compute and business needs.
Breaking the problem down reveals three gaps:
- Resource gap: Accelerators are allocated to a few teams as whole machines or whole cards, leaving them heavily fragmented with chronically low average utilization.
- Scheduling gap: Training jobs, inference services, and data processing workloads compete for the same resources, with no unified priority or quota mechanism.
- Metering gap: Compute consumption cannot be accurately attributed to business units and scenarios, so costs cannot be accounted for and operations have nothing to act on.
In practice, Baidu AI Cloud converges these three gaps into a single sequence: first build a schedulable resource pool, then build a meterable service layer, and only then build scenario-facing applications. Reversing that order often leads to rework later.
2. Layered Implementation of Compute and Cloud Infrastructure
2.1 Resource Pooling: Turning Whole Cards into Schedulable Units
The core goal of resource pooling is to let accelerators be allocated at fine granularity, the same way CPU and memory are. Two approaches are common in the industry: one is the device plugin mechanism on container platforms, which exposes devices to the scheduler as resource declarations; the other is virtualization or time-slicing, which splits a single card into multiple independently usable instances.
The following illustrative job declaration shows the minimal loop of “request resources, bind the environment, start the task”:
apiVersion: batch/v1kind: Jobmetadata:name: model-pretrain-samplespec:template:spec:containers:- name: trainerimage: registry.internal/train-runtime:latestresources:limits:accelerator/gpu: 8env:- name: MASTER_ADDRvalue: "master-0.svc.cluster.local"restartPolicy: Never
Note that field names differ across platforms. This example only expresses the general pattern of resource declaration and distributed startup, not the interface contract of any specific platform.
2.2 High-Speed Interconnect and Storage
The efficiency bottleneck of large-scale distributed training often shifts from computation to communication and data reads. Three areas deserve engineering attention:
- Network: Multiple cards within a machine rely on high-bandwidth interconnect, while cross-machine communication relies on low-latency networks; topology-aware scheduling can significantly reduce cross-tier communication.
- Storage: Training data typically requires both object storage and a parallel file system—the former holds raw corpora and version archives, the latter delivers high-throughput sequential reads.
- Caching: Pushing hot datasets down to a cache layer close to the compute nodes is the most direct way to shorten data supply latency.
2.3 Elasticity and Cost Tiers
Inference and training have completely different load curves. Training runs are long-cycle, interruptible, and reorderable; inference is short-request, highly latency-sensitive, and highly volatile. A resource pooling strategy is therefore recommended: the training pool relies mainly on low-cost interruptible resources, paired with checkpoints and automatic resume; the inference pool relies mainly on stable resources, paired with load-based autoscaling.
3. The MaaS Platform: From Resources to Meterable Services
The value of MaaS (Model as a Service) is packaging model capabilities as standardized services, so upper-layer applications no longer care about the underlying resource shape. A usable MaaS platform typically contains five modules:
- Model repository: Manages model versions, weights, configurations, and evaluation results, with one-click rollback.
- Inference service gateway: Provides unified authentication, rate limiting, routing, and canary releases.
- Elastic scaling: Automatically adjusts instance counts based on concurrency and latency metrics.
- Metering and quotas: Attributes usage by call count, Token count, or duration.
- Observability: Logging and monitoring with alerting that covers core metrics such as latency, error rate, and queue length.
The routing logic at the gateway layer can be abstracted as follows:
def route(request):quota = quota_center.check(request.tenant, request.model)if not quota.allowed:raise RateLimited("tenant quota exhausted")endpoint = router.pick(model=request.model,policy="least_pending_first",max_latency_ms=800,)result = endpoint.invoke(request.payload)meter.record(tenant=request.tenant,tokens=result.usage.total_tokens,latency_ms=result.latency_ms,)return result
The point of this code is not the specific implementation but three steps that cannot be skipped: quota validation at the entry point, load-aware routing, and usage recording at the exit. Missing any one of them degrades the platform into an experimental environment that “can be called but cannot be operated.”
4. Token Production and Operations: Turning Consumption into Manageable Metrics
The Token is the universal unit of measurement in the MaaS era, and a complete operational loop needs to be built around it.
The production side focuses on three things: throughput, meaning the total number of Tokens produced per unit of time; time to first token and overall latency, which directly determine the interaction experience; and batching strategy, where dynamic batching improves device utilization while keeping tail latency under control.
The operations side needs to answer the question of cost attribution. The following metric baseline is recommended:
| Metric | Meaning | Optimization Direction |
|---|---|---|
| Cost per Token | Total resource cost / Tokens produced | Improve batching efficiency and cache hit rate |
| Resource utilization | Actual compute time / Occupied duration | Reduce idle spinning and queuing |
| Latency SLA attainment | Share of requests meeting the SLA | Tiered routing and capacity reservation |
| Cache hit rate | Share of requests served from cache | Semantic caching and result reuse |
Keep in mind that any specific performance number depends heavily on model size, input and output length, and hardware configuration; citing data out of context has no engineering value. Teams should use their own load test results as the baseline.
5. The AI Application Layer: From Personal Efficiency to Organizational Productivity
Adoption at the application layer usually advances along three paths:
- Retrieval-augmented knowledge access: Bring enterprise documents, tickets, and code repositories into the retrieval chain, where the model only generates and facts are constrained by retrieval results, which can significantly reduce hallucinations.
- Intelligent coding and R&D assistance: Embed AI coding tools in coding, review, and test case generation, turning individual efficiency gains into team standards and template assets.
- Business process integration: Connect model capabilities to processes with clear metrics such as approvals, customer service, and quality inspection, measuring success by business metrics rather than call volume.
The leap from personal productivity to organizational productivity hinges on assetization: prompt templates, evaluation sets, tool-calling conventions, and failure case libraries should all be placed under version control, forming reusable and auditable organizational assets rather than techniques scattered across individuals.
6. Implementation Roadmap and Risk Control
A four-stage rollout is recommended, with clear exit criteria for each stage:
- Stage 1 (resource visibility): Complete resource pooling and unified monitoring, and produce a utilization baseline.
- Stage 2 (service availability): Launch the inference gateway and model repository, and get canary release and rollback working end to end.
- Stage 3 (metering trust): Connect quotas and billing attribution so costs can be allocated to business owners.
- Stage 4 (scenario repeatability): Build 2 to 3 standardized scenario templates and replicate them across more business lines.
For risk control, focus on data classification and masking policies, compliance review of model outputs, multi-availability-zone disaster recovery and fallback plans, and avoiding vendor lock-in—by abstracting an inference interface layer that keeps upper-layer applications decoupled from the specific resource shape.
7. Conclusion
Compute infrastructure, the MaaS platform, and Token operations are not three separate projects but three positions on the same value chain. The path advocated by Baidu AI Cloud is essentially to first solve the “foundation” problem of schedulable resources, then solve the “operations” problem of meterable services, and finally let AI applications scale and replicate under controllable cost and observable metrics. Only by advancing in this order does AI-driven industrial transformation gain a sustainable engineering foundation.
