An In-Depth Look at the New Generation Open-Source LLM Architecture and On-Device Inference Adaptation

    This article examines the architecture evolution of a newly released open-source large language model family, covering its three-generation development from a text-only base model to a full-scenario multimodal and MoE architecture. It breaks down key mechanisms such as Per-Layer Embeddings (PLE), large-range KV Cache sharing, heterogeneous KV heads, and QKV Norm, analyzes their implications for on-device inference engines in graph compilation, operator optimization, and memory scheduling, and offers practical guidance for edge-cloud collaborative deployment.

    1. Introduction: LLM Architecture Evolution and the Edge-Cloud Collaboration Trend

    As large language models extend from the cloud to mobile and desktop devices, a single parameter configuration can no longer satisfy the diverse requirements of full-scenario, multi-tier applications. A major tech company recently released a new generation of open-source LLMs that demonstrates an unusually high density of architectural innovation. The family spans from tiny edge-side configurations to large desktop-scale parameter counts, and the different sizes are not simple parameter scalings—each adopts a distinct combination of architectural mechanisms. This differentiated design maximizes edge-side efficiency, but it also poses unprecedented challenges for underlying inference engines.

    This article systematically traces the architectural evolution of this model family, with a focus on three of its most distinctive mechanisms: Per-Layer Embeddings (PLE), KV Cache sharing, and native multimodal support. It also explores underlying optimization strategies and edge-cloud collaborative deployment based on hands-on adaptation of on-device inference engines.

    2. From Base to Frontier: Three Generations of Architecture Evolution

    The new-generation models did not appear out of nowhere. Their design philosophy builds upon an intermediate version tailored for edge devices. Comparing the core characteristics across three generations reveals a clear trajectory of “inheritance and evolution”: from a text-only LLM, to an edge-side multimodal variant, to a fully extended and deeply customized new generation.

    Dimension First-Generation Base Model Intermediate Edge Multimodal Model New-Generation Full-Scenario Model
    Attention mechanism Hybrid attention Hybrid attention Hybrid attention
    KV Cache Independent per layer KV sharing (10 layers) KV sharing (18–20 layers)
    Embedding Shared embedding PLE (lookup + direct injection) PLE (lookup + projection fusion)
    QKV Norm Q/K Norm Q/K/V Norm Q/K/V Norm + attn_scale=1.0
    V projection Independent v_proj Independent v_proj Some layers use K=V (no v_proj)
    KV Head Uniform Uniform Heterogeneous KV heads
    Vision encoder General vision Transformer Lightweight convolutional vision model Vision Transformer + pooling layers
    Audio support None Basic speech encoder Enhanced speech encoder
    MoE architecture None None Introduced (128 experts, Top-8)
    Unique mechanisms — Activation sparsity, custom regularization blocks K=V, heterogeneous KV heads, dual RoPE

    As the table shows, the new generation inherits mechanisms such as PLE, KV sharing, and QKV Norm from its predecessors, deepens feature fusion and memory optimization, and introduces the Mixture-of-Experts (MoE) architecture at scale.

    3. Deep Dive into Core Mechanisms and Their Underlying Logic

    Understanding this architectural evolution requires insight into the engineering motivations behind it. Below, we break down the three most representative mechanisms in the new-generation models.

    1. Evolution of the PLE (Per-Layer Embeddings) Mechanism

    Conventional LLMs typically share a single embedding layer at the input and output, whereas PLE breaks this convention. In the intermediate-generation models, PLE used a “lookup and direct injection” approach, distributing token embeddings directly into individual Transformer layers. The new generation evolves this into “lookup plus projection fusion”: after retrieving the embedding at each layer, it passes through an additional linear projection for feature transformation before being added to the backbone features.

    Inference engine adaptation challenges: This design significantly increases the complexity of operator construction. An inference engine must not only optimize memory access locality for high-frequency embedding lookups, but also dynamically insert extra MatMul operators during graph compilation. If handled poorly, the numerous fragmented lookup and projection operations can lead to low compute utilization on edge devices.

    2. Pushing KV Cache Sharing to the Extreme

    KV Cache accounts for the largest share of memory consumption during LLM inference. The intermediate models compressed on-device memory by letting 10 layers share one set of KV Cache; the new generation extends this sharing range to 18–20 layers.

    Underlying implementation logic: This requires the inference engine to essentially rewrite its Attention cache management module. The engine must establish a safe pointer-mapping mechanism so that multiple independent Query projection branches can concurrently and safely read the same contiguous KV memory region. Under multi-stream concurrency or batched inference, fine-grained memory barriers or locking mechanisms are required to prevent data races, while excessive sharing must be avoided to prevent context contamination.

    3. Heterogeneous KV Heads and the New QKV Norm Settings

    The new generation introduces heterogeneous KV heads along with K=V in some layers (no independent v_proj). In traditional GQA (Grouped-Query Attention), KV heads are uniformly distributed; heterogeneous KV heads allow different layers to carry different numbers of KV heads, or even reuse K directly as V.

    In addition, Q/K/V Norm is applied across all layers, with attn_scale set to 1.0. This indicates that variance control has already been handled by the normalization layers during training, removing the need for the traditional scaling factor.

    Inference engine adaptation challenges: The heterogeneous design makes it impossible to apply a single operator template for batch computation—the engine must dynamically build the computation graph layer by layer. Meanwhile, removing attn_scale simplifies computation, but in quantized inference (e.g., INT8/INT4), the absence of the traditional scaling buffer places higher demands on quantization-aware training (QAT) for accuracy calibration.

    4. Native Multimodal Support and MoE Integration

    The new generation also advances significantly in multimodal and sparse architectures. On the vision side, it adopts a “vision Transformer + pooling layers” combination, preserving ViT’s strong global feature extraction while using pooling to greatly shorten the visual token sequence and reduce the computational load on downstream fusion layers. On the audio side, an enhanced speech encoder improves recognition robustness in complex acoustic environments.

    At the desktop-scale configurations, the family introduces MoE (Mixture of Experts) for the first time, with 128 experts and Top-8 routing. This substantially raises the models’ parameter capacity ceiling while keeping the number of activated parameters under control. For edge or lightweight inference engines, MoE means implementing efficient expert routing and scheduling to avoid memory bandwidth bottlenecks caused by frequently swapping in different expert weights.

    5. Practical Inference Engine Adaptation and Edge-Cloud Deployment Recommendations

    Facing such a high density of architectural innovation, inference engine adaptation should proceed along three dimensions: graph compilation, operator optimization, and memory scheduling:

    1. Dynamic graph compilation and operator fusion: To support heterogeneous KV heads and K=V, the engine must dynamically parse model configuration files and generate heterogeneous computation graphs. It should also deeply fuse the PLE embedding lookups with the subsequent projection operators to reduce kernel launch overhead.
    2. Memory pooling and KV sharing optimization: Design a globally unified KV memory pool, implementing 18–20-layer KV sharing through reference counting and offset management. For concurrent inference, adopt copy-on-write or read-only snapshot mechanisms to ensure physical isolation of KV contexts across requests.
    3. Sparse computation optimization: For the MoE architecture, optimize the preloading strategy for expert weights. Based on the device’s memory bandwidth, apply pipelined prefetching—fetching the weights of the next Top-K experts while computing the current one.

    At the enterprise deployment level, given the distribution of multiple model sizes across heterogeneous devices and the need for compute scheduling, teams can build a complete deployment loop using cloud-native capabilities. For example, use object storage services to centrally manage model weight files in various sizes; use container platforms for microservice-level elastic scaling to absorb burst traffic from edge-cloud collaborative inference; and integrate cloud monitoring and alerting services to track throughput and latency of inference engines on edge nodes in real time, dynamically adjusting routing strategies accordingly.

    6. Conclusion and Outlook

    The new-generation open-source LLM family achieves a more refined balance among performance, efficiency, and multimodal capability through highly customized architectural mechanisms—projection-fused PLE, wide-range KV sharing, heterogeneous attention, and dual RoPE, among others. However, this increase in architectural innovation density also significantly raises the engineering bar for underlying inference frameworks.

    For developers and enterprises, understanding these low-level mechanisms is not merely a prerequisite for completing an inference adaptation—it is key to efficiently deploying LLMs across edge devices and complex business scenarios. Looking ahead, as LLM architectures evolve toward deeper sparsity and heterogeneity, on-device inference engines will likewise accelerate their evolution toward more dynamic and adaptive graph compilation.