{
  "slug": "phi-4",
  "order": 49,
  "name": "Phi-4 (14B)",
  "baseTitle": "Phi-4",
  "company": "Microsoft",
  "country": "United States",
  "flag": "🇺🇸",
  "date": "2024-12-12",
  "decoderType": "Dense",
  "attention": "GQA with RoPE",
  "layerMix": "40 GQA",
  "scale": "14B parameters",
  "totalParams": 14000000000,
  "activeParams": 14000000000,
  "context": "16,384",
  "contextTokens": 16384,
  "license": "MIT License",
  "kvCacheText": "200 KiB",
  "kvCacheKiB": 200,
  "kvCacheLevel": "High",
  "summary": "Microsoft's 14B dense Phi refresh stays close to Phi-3-medium but swaps its sliding-window attention for full-context GQA and a larger tokenizer.",
  "keyDetail": "Classic pre-norm RMSNorm stack with GQA, 40 heads, 10 KV heads, and a 100,352-token vocabulary.",
  "image": {
    "full": "https://sebastianraschka.com/llm-architecture-gallery/images/architectures/phi-4.webp",
    "thumb": "https://sebastianraschka.com/llm-architecture-gallery/images/architectures/thumbnails/phi-4.webp",
    "alt": "Figure 1: Phi-4",
    "width": 917,
    "height": 960
  },
  "articleUrl": null,
  "links": [
    {
      "label": "config.json",
      "href": "https://huggingface.co/microsoft/phi-4/blob/main/config.json",
      "title": "microsoft/phi-4"
    },
    {
      "label": "License",
      "href": "https://huggingface.co/microsoft/phi-4/blob/main/LICENSE",
      "title": null
    },
    {
      "label": "Tech report",
      "href": "https://arxiv.org/pdf/2412.08905",
      "title": null
    }
  ],
  "concepts": [
    {
      "slug": "gqa",
      "label": "GQA",
      "name": "Grouped-Query Attention",
      "url": "https://llm-atlas-7or.pages.dev/concepts/gqa/"
    }
  ],
  "aai": {
    "v4": {
      "label": "AA Intelligence Index v4.3.2",
      "total": 5.9,
      "profile": {
        "Scientific": 1.9
      },
      "url": "https://artificialanalysis.ai/models/phi-4"
    }
  },
  "sourceUrl": "https://sebastianraschka.com/llm-architecture-gallery/#card-phi-4",
  "family": "dense",
  "url": "https://llm-atlas-7or.pages.dev/models/phi-4/",
  "markdownUrl": "https://llm-atlas-7or.pages.dev/models/phi-4.md"
}