Day0 Multi-Chip Adaptation for Large Models: Three Technical Breakthroughs

    This article explains how to achieve Day0 multi-chip adaptation for large-scale MoE models, so that runnable inference can be deployed across different AI accelerators on the model's release day. It covers the three-way mismatch between model requirements and hardware capabilities, the impact of the target model's architecture, and three key breakthroughs: a unified operator implementation layer that decouples models from hardware, independent tensor parallelism for small expert outputs, and a weight precision conversion path when native low-precision formats are unsupported. It also provides memory and parallelism estimation formulas, a deployment and validation checklist, and migration notes for trillion-parameter flagship models.

    1. Why Day0 Adaptation Has Become a Hard Requirement for LLM Deployment

    Release cycles for extremely large Mixture-of-Experts (MoE) models are getting shorter, and a single release often ships a flagship version and a lightweight version at the same time. The flagship version has trillions of total parameters, while the lightweight version typically has hundreds of billions of total parameters, only about ten billion activated parameters, and support for million-token context.

    Hardware, however, is not moving at the same pace. Most AI accelerators currently shipping in China do not natively support ultra-low-precision numeric formats such as FP4; only a few of the newest high-end accelerators have this capability. Single-card memory capacity also varies widely, from tens of GB to over a hundred GB.

    This creates a three-way mismatch:

    • The model side pursues lower precision and longer context, while the hardware side lacks support for the corresponding formats.
    • The model introduces new attention and connectivity patterns, but operator library coverage is incomplete.
    • The model’s parallel partitioning scheme does not fit the capacity constraints of low-memory cards.

    Day0 adaptation means completing runnable inference deployment across multiple chips on the day a model is released, rather than waiting for each hardware vendor to catch up one by one. To achieve this, adaptation work must shift from “depending on hardware-specific features” to “depending on a unified software abstraction layer.”

    2. Target Model Characteristics and Their Impact on Adaptation

    The lightweight version adapted here can be abstracted into four characteristics, each of which directly determines the adaptation strategy:

    1. MoE architecture with about 284 billion total parameters and about 13 billion activated parameters. Memory usage is determined by total parameters, while compute pressure is determined by activated parameters. The bottleneck is therefore usually memory capacity and bandwidth, not peak compute.
    2. Million-token context. The KV cache grows linearly with sequence length, and in long-context scenarios it can exceed the size of the weights themselves. This requires efficient attention implementations and cache management.
    3. Hybrid attention mechanism combining compressed sparse attention with highly compressed attention. It reduces computation and memory-access overhead for long sequences, but introduces unconventional operators that general-purpose operator libraries often do not implement.
    4. New training-side components, such as manifold-constrained hyper-connections and a new optimizer. These components mainly affect training stability and convergence speed, with limited impact on inference adaptation. However, they affect weight layout and naming conventions, so conversion scripts must be updated accordingly.

    In addition, post-training uses a two-stage paradigm: supervised fine-tuning and reinforcement learning first train domain experts separately, and online policy distillation then merges them into a single model. This explains why one model can cover tasks across multiple domains, and it means the inference side does not need to load separate weight sets for different domains, so the deployment form can stay unified.

    3. Breakthrough 1: Unified Operator Implementation That Decouples Models from Hardware

    The traditional adaptation path relies on vendor-proprietary high-performance operator libraries. Once a model introduces a new structure, you have to wait for the hardware vendor to fill in the operators, which makes Day0 impossible. A viable alternative is to implement all operators in a unified way at the intermediate layer: describe computation logic with device-independent expressions, generate executable code for the target backend at compile time, and let the same operator implementation run on different chips.

    Key engineering points:

    • Ensure consistent numerical semantics first, then optimize performance.
    • Fuse memory-bound operators (normalization, element-wise transforms, activation functions) to reduce round trips of intermediate tensors.
    • Perform explicit conversion inside the operator for unsupported dtypes, avoiding implicit promotion that causes precision and performance problems.

    The following is an illustrative operator description (it only conveys the idea and is not a specific framework interface):

    1. # Pseudocode: describe a fused operator in a device-independent way
    2. def rms_norm_with_residual(x, residual, weight, eps=1e-6):
    3. dtype = x.dtype
    4. x_f = x.to("float32") + residual.to("float32")
    5. var = mean(x_f * x_f, axis=-1, keepdim=True)
    6. out = (x_f * rsqrt(var + eps)) * weight.to("float32")
    7. return out.to(dtype), x_f.to(dtype)

    The same implementation compiles to general vector instructions on chip A and to the corresponding matrix-unit instructions on chip B, with no branching in business code.

    4. Breakthrough 2: Independent Tensor Parallelism for Small Output Groups

    Parallel strategies for MoE models usually include expert parallelism and tensor parallelism. When there are many experts and each expert’s output dimension is small, binding the tensor-parallel group to the same dimension as the expert-parallel group forces the requirement that “the number of experts must be divisible by the tensor-parallel degree.” It also amplifies the communication and slicing overhead of each expert, and on low-memory cards this easily leads to invalid partitioning or an effective batch size that is too small.

    The core of the independent tensor parallelism strategy is to decouple the two dimensions: the tensor-parallel degree is chosen independently based on single-card memory and operator efficiency, while the expert-parallel degree is chosen independently based on the number of experts and the topology. The two are combined through a two-dimensional device grid:

    1. Device grid (tp=4, ep=8), 32 cards in total
    2. ep direction: handles different expert shards, All-to-All exchanges tokens
    3. tp direction: handles weight slicing inside a single expert, All-Reduce reduces partial sums
    4. Constraint: tp and ep are independent; experts % tp == 0 is not required

    The direct benefit is that low-memory scenarios become usable: partitioning schemes that originally required high-memory cards can now be deployed with a combination of smaller-memory cards in greater numbers. Meanwhile, All-to-All communication volume scales with activated parameters rather than total parameters, keeping overall communication pressure manageable.

    5. Breakthrough 3: Weight Precision Conversion Path When Low-Precision Formats Are Missing

    Native model weights may use ultra-low-precision formats such as FP4, while the target hardware only supports FP8 and BF16. A viable path is “native low-precision weights → FP8 computation → BF16 accumulation and fallback for sensitive layers,” with four key points:

    1. Per-block scale factor restoration. Low-precision formats usually share scale factors per block. During conversion, first dequantize into the FP8 representation domain and retain the scale information for operators to use.
    2. Fallback for sensitive layers. Normalization, residual connections, routing scores, and output embeddings are precision-sensitive; keeping BF16 avoids routing jitter and logits drift.
    3. Calibration rather than retraining. Use a small amount of representative corpus for forward statistics to determine the scale range of each layer and avoid clipping outliers.
    4. Consistency checks. Compare logits and routing distributions for several fixed inputs before and after conversion; if the error exceeds the threshold, fall back that layer.
    1. Conversion pipeline:
    2. Native FP4 weights --dequantize--> FP8 main-compute weights
    3. |--> BF16 sensitive-layer weights
    4. '--> Scale factor table (read by operators)

    6. Estimating Memory and Parallelism

    Doing a capacity estimate before deployment avoids repeated trial and error. The rough formulas are:

    1. Weight memory ≈ total parameters × bytes per parameter / total cards
    2. KV cache ≈ 2 × layers × KV heads × head dim × sequence length × batch × bytes / tp
    3. Available headroom = single-card memory - weight memory - KV cache - framework and communication buffers

    With 284 billion parameters and FP8 weights (about 1 byte), the weights alone need about 284 GB. An 8-card configuration with 32 GB each leaves almost no headroom, so you must increase the card count or adopt more aggressive partitioning. If the context is extended to a million tokens, the KV cache becomes the dominant term; in that case, prioritize implementations with efficient compressed attention together with paged cache management.

    7. Deployment Workflow and Validation Checklist

    Recommended order:

    1. Parse the weight format and structure, and confirm whether operators for the new components are complete.
    2. Perform precision conversion and calibration.
    3. Determine the tp/ep combination and batch size.
    4. Run end-to-end stress tests.

    Acceptance items should include at least: output consistency for fixed inputs; no overflow or truncation for long context (from one hundred thousand to a million tokens); balanced routing load; first-token latency and throughput meeting business thresholds; and sufficient safety headroom for peak single-card memory.

    If the enterprise already has common cloud products such as a container platform, object storage, logging services, and monitoring and alerting, weight distribution, canary release, and metrics observation can be chained into a pipeline to shorten the cycle from adaptation to launch.

    8. Extension: Migration Approach for the Flagship Version

    The trillion-parameter flagship version follows the same methodology but with different emphasis. More experts and layers make device-grid design more critical; higher activated parameters make communication the main bottleneck, requiring finer-grained overlap of computation and communication. When memory is insufficient, prioritize combining expert sharding with cache offloading rather than simply lowering precision.

    Consolidating the three capabilities above into a hardware-independent intermediate layer means that model iterations only need to update parsing and operator descriptions, and runnable multi-chip deployment can be completed on release day. This is the fundamental reason Day0 adaptation can scale.