{
  "output": {
    "baseDir": "models/local",
    "modelBaseId": "gemma-4-e2b-it-q4k-ehf16-af32",
    "textOnly": false
  },
  "quantization": {
    "weights": "q4k",
    "embeddings": "f16",
    "lmHead": "f16",
    "vision": "f16",
    "projector": "f16",
    "audio": "f16",
    "computePrecision": "f32",
    "q4kLayout": "row"
  },
  "manifest": {
    "visionConfig": {
      "vision_architecture": "gemma4",
      "hidden_size": 768,
      "num_attention_heads": 12,
      "num_hidden_layers": 16,
      "num_key_value_heads": 12,
      "head_dim": 64,
      "intermediate_size": 3072,
      "patch_size": 16,
      "pooling_kernel_size": 3,
      "position_embedding_size": 10240,
      "default_output_length": 280,
      "rms_norm_eps": 0.000001,
      "hidden_activation": "gelu_pytorch_tanh",
      "use_clipped_linears": true,
      "standardize": false,
      "rope_parameters": {
        "rope_theta": 100
      }
    },
    "audioConfig": {
      "audio_architecture": "gemma4",
      "feature_extractor": {
        "feature_size": 128,
        "sampling_rate": 16000,
        "frame_length_ms": 20,
        "hop_length_ms": 10,
        "min_frequency": 0,
        "max_frequency": 8000,
        "preemphasis": 0,
        "preemphasis_htk_flavor": true,
        "fft_overdrive": false,
        "dither": 0,
        "input_scale_factor": 1,
        "mel_floor": 0.001,
        "per_bin_mean": null,
        "per_bin_stddev": null
      },
      "num_hidden_layers": 12,
      "hidden_size": 1024,
      "num_attention_heads": 8,
      "conv_kernel_size": 5,
      "subsampling_conv_channels": [
        128,
        32
      ],
      "output_proj_dims": 1536,
      "attention_context_left": 13,
      "attention_context_right": 0,
      "attention_chunk_size": 12,
      "attention_logit_cap": 50,
      "attention_invalid_logits_value": -1000000000,
      "residual_weight": 0.5,
      "rms_norm_eps": 0.000001,
      "hidden_act": "silu",
      "use_clipped_linears": true
    },
    "artifactIdentity": {
      "sourceCheckpointId": "google/gemma-4-E2B-it",
      "weightCapsuleId": "gemma-4-e2b-it-q4k-ehf16-af32-wp-catalog-v1",
      "manifestVariantId": "gemma-4-e2b-it-q4k-ehf16-af32-mv-exec-v1",
      "artifactCompleteness": "complete"
    }
  },
  "inference": {
    "attention": {
      "queryPreAttnScalar": 1,
      "attnLogitSoftcapping": null,
      "slidingWindow": 512,
      "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": true,
      "swigluLimit": null
    },
    "rope": {
      "ropeTheta": 1000000,
      "ropeLocalTheta": 10000,
      "ropeInterleaved": false,
      "mropeInterleaved": false,
      "mropeSection": null,
      "partialRotaryFactor": 0.25,
      "ropeLocalPartialRotaryFactor": null,
      "ropeFrequencyBaseDim": 512,
      "ropeLocalFrequencyBaseDim": null,
      "ropeScalingType": null,
      "ropeScalingFactor": 1,
      "ropeLocalScalingType": null,
      "ropeLocalScalingFactor": 1,
      "yarnBetaFast": null,
      "yarnBetaSlow": null,
      "yarnOriginalMaxPos": null,
      "ropeLocalYarnBetaFast": null,
      "ropeLocalYarnBetaSlow": null,
      "ropeLocalYarnOriginalMaxPos": null,
      "longropeShortFactor": null,
      "longropeLongFactor": null,
      "longropeOriginalMaxPos": null
    },
    "output": {
      "finalLogitSoftcapping": 30,
      "tieWordEmbeddings": true,
      "scaleEmbeddings": true,
      "embeddingTranspose": false,
      "embeddingVocabSize": null,
      "embeddingPostprocessor": null,
      "embeddingScale": null,
      "logitInputScale": 1
    },
    "layerPattern": {
      "type": "every_n",
      "globalPattern": null,
      "period": 5,
      "offset": 4,
      "layerTypes": null,
      "residualBranchScale": 1
    },
    "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": 8,
      "stopCheckMode": "batch",
      "readbackInterval": 8,
      "readbackMode": "overlapped",
      "ringTokens": 2,
      "ringStop": 1,
      "ringStaging": 2,
      "disableCommandBatching": false
    },
    "perLayerInputs": {
      "materialization": "gpu_split_tables",
      "rowCache": {
        "mode": "lru",
        "maxRows": 512,
        "maxBytes": 268435456,
        "decodedDtype": "f32"
      },
      "prefetch": {
        "mode": "next_token",
        "rowsAhead": 1
      },
      "gpuUpload": {
        "mode": "per_step_slices",
        "stagingRows": 2
      },
      "hotCache": {
        "mode": "prepared_tokens",
        "maxTokens": 4096,
        "maxBytes": 268435456,
        "outputDtype": "f32"
      }
    },
    "prefillChunkSubmitMode": "async",
    "useFlashPrefillAttention": true,
    "useWideTileQ4KPrefill": true,
    "retainQ4KMaterialization": false
  },
  "largeWeights": {
    "gpuResidentOverrides": [
      "model.language_model.embed_tokens.weight"
    ]
  },
  "execution": {
    "kernels": {
      "embed": {
        "kernel": "gather_split8_f16_vec4_f32_out.wgsl",
        "entry": "gather_vec4_f32_out",
        "digest": "sha256:bc88d2106f80121ccb1f91f1ee0980173fe88bec5fe04cc941bdbc59b28e8ae1"
      },
      "rmsnorm": {
        "kernel": "rmsnorm.wgsl",
        "entry": "main",
        "digest": "sha256:4f4d144735bdff86b8567346ba7ea7b82fe68a2ac9656ba1577106158af9bc7c"
      },
      "final_norm_stable": {
        "kernel": "rmsnorm.wgsl",
        "entry": "main",
        "digest": "sha256:4f4d144735bdff86b8567346ba7ea7b82fe68a2ac9656ba1577106158af9bc7c",
        "precision": {
          "inputDtype": "f32",
          "outputDtype": "f32"
        }
      },
      "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"
      },
      "q4_prefill_shared": {
        "kernel": "fused_matmul_q4_batched_multicol_shared.wgsl",
        "entry": "main",
        "digest": "sha256:142817adcacb28750a92793996cd15c2d9fe13d03e0c2d0aadf3e674dc7a35d6"
      },
      "attn_stream": {
        "kernel": "attention_streaming_f16kv.wgsl",
        "entry": "main",
        "digest": "sha256:c3ec920699a81ee6df04a64eb0ea2477bec168ebb809af29f2d4b0924a4bdf8f",
        "precision": {
          "kvDtype": "f16"
        }
      },
      "attn_small": {
        "kernel": "attention_small_f16kv.wgsl",
        "entry": "main",
        "digest": "sha256:ad3bb913c17167eb28fefc6abd24602ea0f148bc22a2b5f437eeffcc6f7fc668",
        "precision": {
          "kvDtype": "f16"
        }
      },
      "attn_head256": {
        "kernel": "attention_head256_f16kv.wgsl",
        "entry": "main",
        "digest": "sha256:4e1eafa0a5e407c99714d04f0e75f3834e1156bcb25579892f248d95aae197da",
        "precision": {
          "kvDtype": "f16"
        }
      },
      "attn_head512": {
        "kernel": "attention_head512_f16kv.wgsl",
        "entry": "main",
        "digest": "sha256:fe8bc99230a5ee4c969ba1cf9eca289ad936d14f1f87c12a7ca95640cdd8d89e",
        "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
        }
      },
      "lm_head_gemv_stable": {
        "kernel": "matmul_gemv_subgroup.wgsl",
        "entry": "main_multicol",
        "digest": "sha256:e41f94574d5ac54dd2710036da5d5acc643a483b79b2d74b86825efdaaa7438f",
        "constants": {
          "MULTICOL_COLS_PER_WG": 64,
          "MULTICOL_THREADS_PER_COL": 4
        },
        "precision": {
          "inputDtype": "f32",
          "outputDtype": "f32"
        }
      },
      "lm_head_prefill_stable": {
        "kernel": "matmul_f16w_f32a.wgsl",
        "entry": "main",
        "digest": "sha256:027a8f1cd9713cbe0b0ada160bd175e0542bb90896ad85441b023522d9a1befc",
        "precision": {
          "inputDtype": "f32",
          "outputDtype": "f32"
        }
      },
      "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": [
      {
        "layers": [
          0,
          1,
          2,
          3,
          5,
          6,
          7,
          8,
          10,
          11,
          12,
          13,
          15,
          16,
          17,
          18,
          20,
          21,
          22,
          23,
          25,
          26,
          27,
          28,
          30,
          31,
          32,
          33
        ],
        "steps": [
          [
            "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_head256"
          ],
          [
            "o_proj",
            "tiled",
            "layer.{L}.self_attn.o_proj"
          ],
          [
            "attn_residual",
            "residual"
          ],
          [
            "post_attn_norm",
            "rmsnorm"
          ],
          [
            "ffn",
            "gelu"
          ],
          [
            "ffn_residual",
            "residual"
          ]
        ]
      },
      {
        "layers": [
          4,
          9,
          14,
          19,
          24,
          29,
          34
        ],
        "steps": [
          [
            "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_head512"
          ],
          [
            "o_proj",
            "tiled",
            "layer.{L}.self_attn.o_proj"
          ],
          [
            "attn_residual",
            "residual"
          ],
          [
            "post_attn_norm",
            "rmsnorm"
          ],
          [
            "ffn",
            "gelu"
          ],
          [
            "ffn_residual",
            "residual"
          ]
        ]
      }
    ],
    "postLayer": [
      [
        "final_norm",
        "final_norm_stable"
      ],
      [
        "lm_head",
        "lm_head_gemv_stable",
        "lm_head"
      ],
      [
        "lm_head_prefill",
        "lm_head_prefill_stable",
        "lm_head"
      ],
      [
        "sample",
        "sample"
      ]
    ],
    "policies": {
      "unsupportedPrecision": "error",
      "dtypeTransition": "require_cast_step",
      "unresolvedKernel": "error"
    }
  },
  "modelType": "gemma4"
}
