{
  "output": {
    "baseDir": "models/local",
    "modelBaseId": "gemma-4-moe-q4k-ehf16-af32"
  },
  "quantization": {
    "weights": "q4k",
    "embeddings": "f16",
    "lmHead": "f16",
    "computePrecision": "f32",
    "q4kLayout": "row"
  },
  "inference": {
    "attention": {
      "queryPreAttnScalar": 256,
      "attnLogitSoftcapping": null,
      "slidingWindow": 1024,
      "queryKeyNorm": true,
      "valueNorm": true,
      "causal": true,
      "attentionBias": false,
      "attentionOutputGate": false
    },
    "normalization": {
      "rmsNormEps": 0.000001,
      "rmsNormWeightOffset": false,
      "postAttentionNorm": true,
      "preFeedforwardNorm": true,
      "postFeedforwardNorm": true
    },
    "ffn": {
      "activation": "gelu",
      "gatedActivation": true,
      "branchMode": "auto",
      "useDoubleWideMlp": false,
      "swigluLimit": null
    },
    "rope": {
      "ropeTheta": 1000000,
      "ropeLocalTheta": 10000,
      "mropeInterleaved": false,
      "mropeSection": null,
      "partialRotaryFactor": null,
      "ropeScalingType": "yarn",
      "ropeScalingFactor": 8,
      "ropeLocalScalingType": null,
      "ropeLocalScalingFactor": 1,
      "yarnBetaFast": 4,
      "yarnBetaSlow": 1,
      "yarnOriginalMaxPos": 32768,
      "ropeLocalYarnBetaFast": null,
      "ropeLocalYarnBetaSlow": null,
      "ropeLocalYarnOriginalMaxPos": null,
      "longropeShortFactor": null,
      "longropeLongFactor": null,
      "longropeOriginalMaxPos": null
    },
    "output": {
      "finalLogitSoftcapping": null,
      "tieWordEmbeddings": true,
      "scaleEmbeddings": true,
      "embeddingTranspose": false,
      "embeddingVocabSize": null,
      "embeddingScale": null,
      "logitInputScale": 1
    },
    "layerPattern": {
      "type": "uniform",
      "globalPattern": null,
      "period": null,
      "offset": null,
      "layerTypes": null,
      "residualBranchScale": 1
    },
    "moe": {
      "kernelProfileId": "mixtral-moe-v1",
      "numExperts": 8,
      "topK": 2,
      "numSharedExperts": 0,
      "routerDtype": "f32",
      "supportedActivationDtypes": [
        "f16",
        "f32"
      ],
      "preferredActivationDtype": "f32",
      "tensorPattern": "mixtral"
    },
    "chatTemplate": {
      "type": "gemma4",
      "enabled": true
    }
  },
  "session": {
    "compute": {
      "defaults": {
        "activationDtype": "f32",
        "mathDtype": "f32",
        "accumDtype": "f32",
        "outputDtype": "f32"
      }
    },
    "kvcache": {
      "kvDtype": "f16",
      "layout": "contiguous",
      "pageSize": 256,
      "tiering": {
        "mode": "off",
        "hotWindow": 1024,
        "coldPageSize": 256,
        "coldDtype": "f16",
        "compression": {
          "mode": "none",
          "blockSize": 1,
          "bitWidth": 4,
          "prodMode": false
        },
        "gating": {
          "mode": "auto",
          "minAluBwRatio": 0
        }
      },
      "quantization": {
        "mode": "none",
        "bitWidth": 4,
        "prodMode": false
      }
    },
    "decodeLoop": {
      "batchSize": 4,
      "stopCheckMode": "batch",
      "readbackInterval": 1,
      "readbackMode": "sequential",
      "ringTokens": 1,
      "ringStop": 1,
      "ringStaging": 1,
      "disableCommandBatching": false
    },
    "perLayerInputs": {
      "materialization": "auto",
      "rowCache": {
        "mode": "lru",
        "maxRows": 256,
        "maxBytes": 134217728,
        "decodedDtype": "f32"
      },
      "prefetch": {
        "mode": "next_token",
        "rowsAhead": 1
      },
      "gpuUpload": {
        "mode": "per_step_slices",
        "stagingRows": 2
      },
      "hotCache": {
        "mode": "prepared_tokens",
        "maxTokens": 1024,
        "maxBytes": 134217728,
        "outputDtype": "f32"
      }
    },
    "prefillChunkSubmitMode": "sync",
    "useFlashPrefillAttention": false,
    "useWideTileQ4KPrefill": false,
    "retainQ4KMaterialization": false
  },
  "execution": {
    "kernels": {
      "embed": {
        "kernel": "gather_f16.wgsl",
        "entry": "main",
        "digest": "sha256:a2c318bc362d676769d8cb751d61a4d7777e1068be0456eff634e0821d783c10"
      },
      "rmsnorm": {
        "kernel": "rmsnorm.wgsl",
        "entry": "main",
        "digest": "sha256:4f4d144735bdff86b8567346ba7ea7b82fe68a2ac9656ba1577106158af9bc7c"
      },
      "gemv": {
        "kernel": "matmul_gemv_subgroup.wgsl",
        "entry": "main_vec4",
        "digest": "sha256:2ea9aea659367210fbf61d922c0d4ee17cdac68ffb506b3bc5516e498071e011"
      },
      "rope": {
        "kernel": "rope.wgsl",
        "entry": "main",
        "digest": "sha256:923f9a96c941aee94119ecf04fa5b1508c77b7d927a7e6044ce6588b2d51a416"
      },
      "attn_decode": {
        "kernel": "attention_decode_online_f16kv.wgsl",
        "entry": "main",
        "digest": "sha256:c6d9f8c614a2a088cb533958007896391efb3e348377dc8095c409944c562912",
        "precision": {
          "kvDtype": "f16"
        }
      },
      "residual": {
        "kernel": "residual.wgsl",
        "entry": "main",
        "digest": "sha256:4dbfb0a9ca0fb6047a01618f0374b445c243774d039407acdf41b0711ea8eaf4"
      },
      "gelu": {
        "kernel": "gelu.wgsl",
        "entry": "main",
        "digest": "sha256:db864455ec72070d7d8729c8744e2eac377a4939a9bc2ecb26eb086d866e16b0",
        "constants": {
          "HAS_GATE": true
        }
      },
      "tiled": {
        "kernel": "matmul_f16w_f32a.wgsl",
        "entry": "main",
        "digest": "sha256:027a8f1cd9713cbe0b0ada160bd175e0542bb90896ad85441b023522d9a1befc"
      },
      "attn_stream": {
        "kernel": "attention_streaming_f16kv.wgsl",
        "entry": "main",
        "digest": "sha256:c3ec920699a81ee6df04a64eb0ea2477bec168ebb809af29f2d4b0924a4bdf8f",
        "precision": {
          "kvDtype": "f16"
        }
      },
      "lm_head_gemv": {
        "kernel": "matmul_gemv_subgroup.wgsl",
        "entry": "main_multicol",
        "digest": "sha256:e41f94574d5ac54dd2710036da5d5acc643a483b79b2d74b86825efdaaa7438f",
        "constants": {
          "MULTICOL_COLS_PER_WG": 64,
          "MULTICOL_THREADS_PER_COL": 4
        }
      },
      "sample": {
        "kernel": "sample.wgsl",
        "entry": "sample_single_pass",
        "digest": "sha256:f2377b2a58c2eeb695a6f6f7ad877630bdba5e74d5dc1a8d919cd73b360d4870"
      }
    },
    "preLayer": [
      [
        "embed",
        "embed",
        "embed_tokens"
      ]
    ],
    "decode": [
      [
        "input_norm",
        "rmsnorm"
      ],
      [
        "q_proj",
        "gemv",
        "layer.{L}.self_attn.q_proj"
      ],
      [
        "k_proj",
        "gemv",
        "layer.{L}.self_attn.k_proj"
      ],
      [
        "v_proj",
        "gemv",
        "layer.{L}.self_attn.v_proj"
      ],
      [
        "rope_q",
        "rope"
      ],
      [
        "rope_k",
        "rope"
      ],
      [
        "attention",
        "attn_decode"
      ],
      [
        "o_proj",
        "gemv",
        "layer.{L}.self_attn.o_proj"
      ],
      [
        "attn_residual",
        "residual"
      ],
      [
        "post_attn_norm",
        "rmsnorm"
      ],
      [
        "ffn",
        "gelu"
      ],
      [
        "ffn_residual",
        "residual"
      ]
    ],
    "prefill": [
      [
        "input_norm",
        "rmsnorm"
      ],
      [
        "q_proj",
        "tiled",
        "layer.{L}.self_attn.q_proj"
      ],
      [
        "k_proj",
        "tiled",
        "layer.{L}.self_attn.k_proj"
      ],
      [
        "v_proj",
        "tiled",
        "layer.{L}.self_attn.v_proj"
      ],
      [
        "rope_q",
        "rope"
      ],
      [
        "rope_k",
        "rope"
      ],
      [
        "attention",
        "attn_stream"
      ],
      [
        "o_proj",
        "tiled",
        "layer.{L}.self_attn.o_proj"
      ],
      [
        "attn_residual",
        "residual"
      ],
      [
        "post_attn_norm",
        "rmsnorm"
      ],
      [
        "ffn",
        "gelu"
      ],
      [
        "ffn_residual",
        "residual"
      ]
    ],
    "postLayer": [
      [
        "final_norm",
        "rmsnorm"
      ],
      [
        "lm_head",
        "lm_head_gemv",
        "lm_head"
      ],
      [
        "lm_head_prefill",
        "tiled",
        "lm_head"
      ],
      [
        "sample",
        "sample"
      ]
    ],
    "policies": {
      "unsupportedPrecision": "error",
      "dtypeTransition": "require_cast_step",
      "unresolvedKernel": "error"
    }
  },
  "largeWeights": {
    "gpuResidentOverrides": null
  },
  "modelType": "gemma4"
}
