{
  "output": {
    "baseDir": "models/local",
    "modelBaseId": "lfm2.5-1.2b-instruct-q4k-ehf16-af32"
  },
  "quantization": {
    "weights": "q4k",
    "embeddings": "f16",
    "lmHead": "f16",
    "computePrecision": "f32",
    "q4kLayout": "row"
  },
  "inference": {
    "attention": {
      "queryPreAttnScalar": 64,
      "attnLogitSoftcapping": null,
      "slidingWindow": null,
      "queryKeyNorm": true,
      "causal": true,
      "attentionBias": false,
      "attentionOutputGate": false,
      "valueNorm": false
    },
    "normalization": {
      "rmsNormEps": 0.00001,
      "rmsNormWeightOffset": false,
      "postAttentionNorm": false,
      "preFeedforwardNorm": false,
      "postFeedforwardNorm": false
    },
    "ffn": {
      "activation": "silu",
      "gatedActivation": true,
      "branchMode": "auto",
      "swigluLimit": null,
      "useDoubleWideMlp": false
    },
    "rope": {
      "ropeTheta": 1000000,
      "ropeLocalTheta": null,
      "mropeInterleaved": false,
      "mropeSection": null,
      "partialRotaryFactor": null,
      "ropeScalingType": null,
      "ropeScalingFactor": 1,
      "ropeLocalScalingType": null,
      "ropeLocalScalingFactor": 1,
      "yarnBetaFast": null,
      "yarnBetaSlow": null,
      "yarnOriginalMaxPos": null,
      "ropeLocalYarnBetaFast": null,
      "ropeLocalYarnBetaSlow": null,
      "ropeLocalYarnOriginalMaxPos": null,
      "ropeLocalPartialRotaryFactor": null,
      "ropeFrequencyBaseDim": null,
      "ropeLocalFrequencyBaseDim": null,
      "longropeShortFactor": null,
      "longropeLongFactor": null,
      "longropeOriginalMaxPos": null
    },
    "output": {
      "finalLogitSoftcapping": null,
      "tieWordEmbeddings": true,
      "scaleEmbeddings": false,
      "embeddingTranspose": false,
      "embeddingVocabSize": null,
      "embeddingPostprocessor": null,
      "embeddingScale": null,
      "logitInputScale": 1
    },
    "layerPattern": {
      "type": "custom",
      "globalPattern": null,
      "period": null,
      "offset": null,
      "layerTypes": [
        "conv",
        "conv",
        "full_attention",
        "conv",
        "conv",
        "full_attention",
        "conv",
        "conv",
        "full_attention",
        "conv",
        "full_attention",
        "conv",
        "full_attention",
        "conv",
        "full_attention",
        "conv"
      ],
      "residualBranchScale": 1
    },
    "chatTemplate": {
      "type": "chatml",
      "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": "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:8995b4a790a1f3b89fbb801f89d595985eee46c9bfca4133f74396259083eda9"
      },
      "rmsnorm": {
        "kernel": "rmsnorm.wgsl",
        "entry": "main",
        "digest": "sha256:284d3efb0ad0991fc57ece5f634cbc8a931fcab36f193b2b6832561d4cc79ef1"
      },
      "gemv": {
        "kernel": "matmul_gemv_subgroup.wgsl",
        "entry": "main_vec4",
        "digest": "sha256:2ea9aea659367210fbf61d922c0d4ee17cdac68ffb506b3bc5516e498071e011"
      },
      "rope": {
        "kernel": "rope.wgsl",
        "entry": "main",
        "digest": "sha256:b2da9d396668981dab9794c2973b668279f768994466b083d2105730555e1a5b"
      },
      "attn_decode": {
        "kernel": "attention_decode_online_f16kv.wgsl",
        "entry": "main",
        "digest": "sha256:91808be35895e921c0fa43fc47bfe8cab69c437c388ab561f595d9dc983f66e1",
        "precision": {
          "kvDtype": "f16"
        }
      },
      "residual": {
        "kernel": "residual.wgsl",
        "entry": "main",
        "digest": "sha256:abd19bc08ad668a7cad562e2bc0a4be1aa8827ad4300d8d474b7fc2af4c27117"
      },
      "gelu": {
        "kernel": "gelu.wgsl",
        "entry": "main",
        "digest": "sha256:7f8900b69de5107e4cf424cac0d4de1539591ece34e977ff30f6f7364460ab34",
        "constants": {
          "HAS_GATE": true
        }
      },
      "tiled": {
        "kernel": "matmul_f16w_f32a_tiled.wgsl",
        "entry": "main",
        "digest": "sha256:e94ae5374e8b43dd48b663eff59a45c822c3784d5702a1145266b6ffd15ba78c"
      },
      "attn_small": {
        "kernel": "attention_small_f16kv.wgsl",
        "entry": "main",
        "digest": "sha256:ad3bb913c17167eb28fefc6abd24602ea0f148bc22a2b5f437eeffcc6f7fc668",
        "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:7ff3dd675b4737d920e0b3889e15c4fedde8410a353bbc6d4651db76ce69eb9b"
      }
    },
    "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"
      ],
      [
        "gate_proj",
        "gemv",
        "layer.{L}.mlp.gate_proj"
      ],
      [
        "up_proj",
        "gemv",
        "layer.{L}.mlp.up_proj"
      ],
      [
        "activation",
        "gelu"
      ],
      [
        "down_proj",
        "gemv",
        "layer.{L}.mlp.down_proj"
      ],
      [
        "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_small"
      ],
      [
        "o_proj",
        "tiled",
        "layer.{L}.self_attn.o_proj"
      ],
      [
        "attn_residual",
        "residual"
      ],
      [
        "post_attn_norm",
        "rmsnorm"
      ],
      [
        "gate_proj",
        "tiled",
        "layer.{L}.mlp.gate_proj"
      ],
      [
        "up_proj",
        "tiled",
        "layer.{L}.mlp.up_proj"
      ],
      [
        "activation",
        "gelu"
      ],
      [
        "down_proj",
        "tiled",
        "layer.{L}.mlp.down_proj"
      ],
      [
        "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
  }
}
