A New Generation of Open-Source LLM Architecture: Breakdown and Inference Engine Adaptation

    This article examines a new open-source large language model series available in sizes from ultra-lightweight on-device models to desktop-class models. Instead of scaling one design uniformly, each size combines different architectural mechanisms. The article breaks down three of the most distinctive ones: cross-layer KV cache sharing, per-layer embeddings with projection fusion, and normalization with heterogeneous KV heads. It also covers the inference engine changes these mechanisms require and offers optimization suggestions from edge-cloud collaboration practice.

    As large language models expand across on-device hardware, desktop computers, and cloud servers, the demands on model architecture now go well beyond simple parameter scaling. A recent open-source model series has drawn wide attention for its dense set of architectural innovations. The series spans several sizes, from ultra-lightweight on-device models to desktop-class models, and is designed to cover a full range of compute budgets. Each size combines different architectural mechanisms rather than scaling one design uniformly, which creates new challenges for inference engine adaptation. This article examines the three most distinctive mechanisms in the series and offers optimization advice drawn from edge-cloud collaborative engineering practice.

    1. Core Architectural Innovations

    The new multi-size model series builds on the hybrid attention and native multimodal support of its predecessors, with substantial architectural changes. Its core innovations fall into the following areas.

    1. Cross-Layer KV Cache Sharing

    In a traditional Transformer, every layer maintains its own Key and Value cache. In long-context scenarios, this causes GPU memory usage to grow linearly. This series is the first to adopt cross-layer KV cache sharing at scale. Early models cached KV separately for each layer. The next generation shared KV across some layers, such as 10 layers. The latest generation extended sharing to 18 to 20 layers. This approach greatly reduces memory overhead during inference, which makes it feasible to run large models on resource-constrained on-device hardware. However, the inference engine must correctly handle data dependencies between layers during operator scheduling to avoid conflicting concurrent writes.

    2. Per-Layer Embeddings (PLE) and Lookup-Projection Fusion

    The embedding design has also changed significantly. Early models generally used a single global shared embedding. The new generation introduces PLE (Per-Layer Embeddings), which injects layer-specific information through direct table lookups. It further builds on this with a “lookup plus projection fusion” design. This breaks away from a single word-vector mapping and gives the model more flexibility in representing features at different network depths. On the inference side, this requires an additional non-standard parameter table. The graph compiler must also fuse the embedding lookup with the subsequent linear projection operator.

    3. Normalization and Heterogeneous KV Heads

    In the attention computation, the model series applies Q/K/V Norm throughout and hard-codes the attention scaling factor to 1.0. This differs from the traditional approach of normalizing only Q and K, and it improves training stability for deep networks. More notably, some sizes drop the separate V projection and set K=V directly. These sizes also use heterogeneous KV head designs. Traditional grouped-query attention (GQA) requires uniform KV heads across all layers. Heterogeneous heads allow different layers to use different head partitioning strategies. This asymmetric design increases model capacity, but it means the inference engine can no longer rely on static head mapping assumptions. It must use dynamic resolution instead.

    4. Native Multimodal Support and MoE

    The new architecture also explores multimodal and sparse computation. The vision encoder has evolved from a single ViT to a combination of ViT and a Pooler. Audio support adopts the more efficient Conformer architecture. Larger sizes introduce a mixture-of-experts (MoE) system. One example is a model with 26B total parameters and 4B activated parameters, using a 128-expert Top-8 architecture. This keeps capacity high while limiting inference compute. However, it places high demands on multimodal feature alignment and efficient MoE routing.

    2. Inference Engine Adaptation Challenges and Engineering Practice

    Given this level of architectural change, inference engines must be reworked across the stack, from low-level graph compilation to upper-level memory management.

    1. Dynamic Operator Graphs and Kernel Fusion

    For the K=V mechanism and heterogeneous KV heads, the inference engine must rewrite the attention computation graph. In practice, the redundant v_proj operator can be removed, and the result of the K computation can be reused directly as the V input. For the PLE lookup-projection fusion, the fused operators in the underlying tensor computation library can run the table lookup and the subsequent linear mapping in the same kernel. This reduces reads and writes of intermediate tensors in memory.

    2. KV Cache Memory Management and Reuse

    For cross-layer KV cache sharing, the engine must establish pointer-level reuse during memory allocation. The KV caches of multiple layers point to one pre-allocated contiguous memory region. Combined with the Q/K/V Norm mechanism, the correct scaling policy must be applied before the Softmax step. For on-device deployment, low-bit quantization such as INT8 or INT4 can further compress this shared KV cache. This helps get the most out of the device’s memory bandwidth.

    3. Edge-Cloud Collaboration and Cloud-Native Infrastructure

    Multi-size, multimodal models usually require collaboration between lightweight on-device inference and more complex cloud computation. For cloud deployment and model weight distribution, teams can use the cloud-native infrastructure of Baidu AI Cloud. For example, the container platform can provide elastic scaling for inference services. The object storage service can support efficient distribution of large model weights and multimodal feature libraries. The monitoring and alerting service can track performance bottlenecks in heterogeneous KV heads and MoE routing in real time. Together, these services help maintain low end-to-end latency and high availability.

    3. Lessons for Developers

    The architecture of this new open-source model series suggests that future model design will increasingly focus on customization for efficiency. Activation sparsity techniques such as AltUp and Laurel Block, along with asymmetric designs such as K=V and heterogeneous heads, show that model developers are using structural changes to overcome the compute bottlenecks of the standard Transformer.

    For application developers and enterprise architects, working at the API level is no longer enough. For private deployment or on-device adaptation, teams need operator-level optimization skills. When choosing an underlying inference engine, teams should prioritize options with extensible graph compilation and support for custom memory management frameworks. Building an end-to-end MLOps toolchain on mature compute infrastructure, such as Baidu AI Cloud, is also important. The toolchain should cover data processing, model fine-tuning, and heterogeneous inference deployment. Such a toolchain is a necessary path for handling changing model architectures and improving iteration speed.