GPT-4 Has 1.8 Trillion Parameters. It Uses 2% of Them Per Token. Here Is Why That Is a Feature.

· Source: AI on Medium · Field: Technology & Digital — Artificial Intelligence & Machine Learning · Depth: Advanced, quick

Summary

GPT-4 utilizes a Mixture-of-Experts (MoE) architecture, which includes a parameter dictionary of 1.8 trillion parameters. For each token processed, GPT-4 activates approximately 36 billion parameters, representing about 2% of its total parameter dictionary. This sparse activation is not a limitation but a deliberate architectural choice with a precise mathematical justification. Unlike standard transformer feedforward blocks where all tokens pass through the same parameters, MoE layers replace this with a set of expert networks, and a routing function selects a subset of these experts for each token. Understanding this design is crucial for deploying such systems at scale.

Key takeaway

For AI Architects and Machine Learning Engineers optimizing large language model deployments, understanding GPT-4's Mixture-of-Experts architecture is critical. Your resource allocation and scaling strategies should account for sparse parameter activation, where only a fraction of the total parameters are active per token. This implies focusing on efficient routing and expert management rather than assuming uniform parameter load, potentially leading to more cost-effective and performant systems.

Key insights

GPT-4's 1.8 trillion parameter dictionary uses a sparse Mixture-of-Experts architecture, activating only 2% per token by design.

Principles

Method

The MoE layer computes y = Σᵢ∈Top-k(x) G(x)ᵢ · Eᵢ(x), where x is input, Eᵢ(x) is expert output, G(x)ᵢ is gating weight, and Top-k(x) selects k experts.

In practice

Topics

Best for: Research Scientist, CTO, VP of Engineering/Data, AI Scientist, Machine Learning Engineer, AI Architect

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by AI on Medium.