AI Infrastructure and Search Cost Restructuring One Month After the Restrictions

    This article examines how AI capabilities are shifting from end-to-end products into composable infrastructure, and what that shift means for engineering teams. It breaks down the four cost layers behind per-call pricing, explains why self-built retrieval pipelines avoid the "retrieval tax" of third-party APIs, and outlines the six layers of an AI-native search stack with a hybrid recall skeleton. It then covers the engineering challenges of migrating pretraining from general-purpose GPUs to domestic accelerators, including operator coverage, parallelism tuning, numerical stability, fault tolerance, and MFU, plus a three-stage migration evaluation. Finally, it offers practical guidance on replaceable architecture, cost observability, quality regression, auditability, and dual-track backend selection.

    1. The Shift: When AI Capability Becomes Infrastructure

    A pattern worth watching has emerged in the industry: an AI application shipped no new model and did not compete on any leaderboard. Instead, it broke its own capabilities into fine-grained units — search, web crawling, optical character recognition (OCR), and speech recognition — and exposed each one independently with per-call billing at prices close to marginal cost. At the same time, it open-sourced the front-end interaction layer under a permissive license, so developers can quickly reproduce a structurally identical conversational application inside their own products.

    Strip away the brand and the vendor, and the technical meaning is clear: AI capability is moving down the stack, from an end-to-end product to composable infrastructure. Developers used to receive a door (one application entry point, one closed interface); now they receive the foundation (a set of atomic capabilities plus a reference implementation they can self-host). This contrasts with access restrictions at the regulatory level: restrictions typically act on entry points and accounts, whereas infrastructure-shaped capability supply is hard to block at a single point, because demand re-converges along alternative paths.

    For engineering teams, the real question is not “who is cheaper” but three others: how the pricing of atomic capabilities is composed, what drives down unit cost, and what engineering price must be paid to migrate the compute foundation.

    2. Cost Structure Breakdown: Why Per-Call Pricing Can Drop to Rock Bottom

    Turning capabilities into per-call billing is essentially changing the cost model from “subscription plus seats” to “call volume × unit cost.” To judge whether a price is sustainable, look at four cost layers:

    1. Compute cost: on the inference side, token throughput and GPU memory footprint per request; on the training side, cluster utilization and the effective compute lost to failure recovery.
    2. Data and retrieval cost: crawling, deduplication, cleaning, index construction, and incremental updates — a typical case of heavy upfront investment with diminishing marginal cost later.
    3. Storage and bandwidth cost: raw pages, snapshots, index segments, and model weights all need tiered storage, and hot/cold separation directly determines the size of the bill.
    4. Operations and compliance cost: monitoring and alerting, rate limiting and quotas, audit trails, and content safety filtering — the larger the scale, the less optional these become.

    One key difference observable in the industry: teams that depend on external retrieval APIs carry a “retrieval tax” in their cost structure — third-party per-thousand-call fees that grow linearly as traffic rises, with limited room to negotiate. Teams that build their own retrieval pipeline spend upfront on crawlers, indexing, and cleaning, then amortize that fixed cost over their own high-concurrency traffic, which is why their pricing can land well below the market average. In one sentence: while others pay rent, it has tapped the water at the source.

    An illustrative unit-cost calculation (pseudocode, expressing only the calculation relationship and not any specific product parameters):

    1. # Unit call cost = amortized fixed cost + variable cost
    2. def unit_cost(monthly_fixed, monthly_calls, cost_per_call):
    3. amortized = monthly_fixed / max(monthly_calls, 1)
    4. return amortized + cost_per_call
    5. # Variable cost of retrieval comes mainly from external APIs or self-hosted clusters
    6. def search_cost(engine="self_hosted", qps=1000, avg_ms=120):
    7. if engine == "third_party":
    8. return qps * PRICE_PER_1K / 1000 # grows linearly with traffic
    9. else:
    10. nodes = estimate_nodes(qps, avg_ms) # derive node count from throughput and latency
    11. return nodes * NODE_HOURLY * 730 / (qps * 30 * 86400)

    Three cost-reduction measures that engineering teams can adopt directly: first, batching and request coalescing — aggregate tasks such as OCR and speech recognition into batches to cut scheduling and cold-start overhead; second, tiered caching — cache results and reuse indexes for high-frequency queries and repeated documents; third, hot/cold tiered storage — push raw data down to low-frequency storage tiers while keeping hot index segments on high-performance media.

    Driving retrieval cost down is not about cutting configuration; it is about rebuilding the pipeline. A usable AI-native retrieval system typically has six layers:

    • Scheduling and crawling: differentiated scheduling by site authority and update frequency, respecting robots protocols and rate limits to avoid wasting resources on bans.
    • Parsing and extraction: body-text extraction, template denoising, and normalization of structured fields set the ceiling on downstream index quality.
    • Cleaning and deduplication: document-level and paragraph-level deduplication (for example, fingerprint-based and near-duplicate detection) significantly reduces index size.
    • Indexing and recall: an inverted index handles keyword recall, a vector index handles semantic recall, and the two result sets are merged with fusion ranking.
    • Reranking and generation: a cross-encoder rerank improves relevance, then a generation model organizes the answer while preserving citation provenance.
    • Evaluation and feedback: an offline evaluation set monitors recall, relevance, and answer accuracy, while online clicks and follow-up queries close the loop.

    A minimal runnable skeleton for two-way recall:

    1. def hybrid_recall(query, k=50):
    2. lex = inverted_index.search(query, top_k=k) # keyword recall
    3. vec = vector_index.search(embed(query), top_k=k) # semantic recall
    4. merged = reciprocal_rank_fusion([lex, vec], k=60) # RRF fusion
    5. top = cross_encoder.rerank(query, merged)[:10] # fine ranking
    6. return top

    The payoff of building in-house is not only unit price but also controllability: index refresh cadence, content safety policy, cache hit rate, and canary releases are all decided internally, without being held hostage by an external API’s quotas and repricing schedule.

    4. Migrating the Compute Foundation: Moving Pretraining to Domestic Chips

    A more fundamental change than price is happening in the compute foundation. Industry information suggests that pretraining for the next generation of models may migrate from general-purpose GPUs to domestic accelerator cards — domestic cards have so far carried a heavier load on the inference side, while training has long relied on general-purpose GPUs. Pretraining is the most demanding stage, and migration is far harder than for inference. The core engineering problems concentrate in five areas:

    1. Operator and compiler stack adaptation: hot operators such as attention, normalization, and parallel communication need complete coverage; missing operators force fallback implementations and cause a cliff-like performance drop.
    2. Parallelism strategy matching: combinations of data, tensor, pipeline, and sequence parallelism need retuning against inter-card interconnect bandwidth.
    3. Numerical stability: loss scaling under mixed precision, overflow handling, and gradient clipping thresholds must be recalibrated, or loss will jitter and even diverge.
    4. Fault tolerance and recovery: at a scale of thousands of cards, node failures are inevitable, requiring periodic checkpoints, asynchronous saving, and fast rescheduling.
    5. Effective cluster utilization: failure rate, communication overhead, and data supply bottlenecks jointly determine MFU (model FLOPs utilization), the core metric for judging whether migration pays off.

    A migration assessment is best run in three stages — small-model alignment, mid-size convergence validation, full pretraining — with quantitative gates at each stage:

    1. Stage 1: 100% operator coverage; per-step time within 5% of baseline
    2. Stage 2: loss curve deviation < 1% under identical data and hyperparameters; no abnormal spikes
    3. Stage 3: MFU no lower than 90% of baseline; acceptable end-to-end training cycle

    It is worth stressing that migration is not a one-off project but long-term capability building: the operator library, communication library, scheduler, and monitoring and alerting system must all evolve in step, so that the stack can be reproduced quickly on next-generation hardware.

    5. Practical Recommendations for Developers

    • Make the architecture replaceable: wrap model calls, retrieval, and recognition capabilities behind a unified abstraction layer and switch backends through configuration, avoiding lock-in to a single supplier.
    1. class CapabilityRouter:
    2. def __init__(self, registry): self.registry = registry
    3. def call(self, name, payload, **kw):
    4. impl = self.registry.pick(name, policy=kw.get("policy"))
    5. return impl.invoke(payload, **kw)
    • Make cost observable: tag every call with a business identifier and scenario label, build a unit-call-cost dashboard, and set per-scenario quotas and degradation policies.
    • Make quality regression-testable: maintain offline evaluation sets for retrieval and generation, and run regression on every pipeline change so cost reduction does not cause quality to slide.
    • Make compliance auditable: retain call logs, content safety interception records, and data provenance notes to meet audit and traceability requirements.
    • Make selection dual-track: keep two usable backends for critical paths (public cloud general-purpose capability plus a self-built option), trading off dynamically among price, latency, and compliance.

    6. Conclusion

    Blocking the entry point does not block demand; what truly determines the long-term landscape is the unit cost curve and autonomy over the compute foundation. For developers and enterprises, the pragmatic path is: first, capability abstraction and cost observability; then, building high-value pipelines in-house (retrieval above all); and finally, a controlled migration at the compute layer. Baidu AI Cloud provides standard engineering support for this kind of architecture through general capabilities such as container platforms, object storage, log services, and monitoring and alerting, helping teams focus on model quality and business innovation itself.