[ { "metadataOutputVersion" : "3.0", "storagePrecision" : "Mixed (Float16, Palettized (10 bits), Palettized (11 bits), Palettized (12 bits), Palettized (13 bits), Palettized (7 bits), Palettized (8 bits), UInt4)", "outputSchema" : [ { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Float16", "formattedType" : "MultiArray (Float16 1 × 1 × 1536)", "shortDescription" : "", "shape" : "[1, 1, 1536]", "name" : "hidden_states_out", "type" : "MultiArray" }, { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Float16", "formattedType" : "MultiArray (Float16 1 × 1 × 8960)", "shortDescription" : "", "shape" : "[1, 1, 8960]", "name" : "per_layer_combined_out", "type" : "MultiArray" } ], "modelParameters" : [ ], "specificationVersion" : 9, "functions" : [ { "inputSchema" : [ { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Float16", "formattedType" : "MultiArray (Float16 1 × 1 × 1536)", "shortDescription" : "", "shape" : "[1, 1, 1536]", "name" : "hidden_states", "type" : "MultiArray" }, { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Float16", "formattedType" : "MultiArray (Float16 1 × 1 × 1 × 2048)", "shortDescription" : "", "shape" : "[1, 1, 1, 2048]", "name" : "causal_mask_full", "type" : "MultiArray" }, { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Float16", "formattedType" : "MultiArray (Float16 1 × 1 × 1 × 512)", "shortDescription" : "", "shape" : "[1, 1, 1, 512]", "name" : "causal_mask_sliding", "type" : "MultiArray" }, { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Float16", "formattedType" : "MultiArray (Float16 1 × 1 × 8960)", "shortDescription" : "", "shape" : "[1, 1, 8960]", "name" : "per_layer_raw", "type" : "MultiArray" }, { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Float16", "formattedType" : "MultiArray (Float16 1 × 1 × 1 × 256)", "shortDescription" : "", "shape" : "[1, 1, 1, 256]", "name" : "cos_s", "type" : "MultiArray" }, { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Float16", "formattedType" : "MultiArray (Float16 1 × 1 × 1 × 256)", "shortDescription" : "", "shape" : "[1, 1, 1, 256]", "name" : "sin_s", "type" : "MultiArray" }, { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Float16", "formattedType" : "MultiArray (Float16 1 × 1 × 1 × 512)", "shortDescription" : "", "shape" : "[1, 1, 1, 512]", "name" : "cos_f", "type" : "MultiArray" }, { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Float16", "formattedType" : "MultiArray (Float16 1 × 1 × 1 × 512)", "shortDescription" : "", "shape" : "[1, 1, 1, 512]", "name" : "sin_f", "type" : "MultiArray" }, { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Int32", "formattedType" : "MultiArray (Int32 1)", "shortDescription" : "", "shape" : "[1]", "name" : "current_pos", "type" : "MultiArray" }, { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Int32", "formattedType" : "MultiArray (Int32 1)", "shortDescription" : "", "shape" : "[1]", "name" : "ring_pos", "type" : "MultiArray" } ], "computePrecision" : "Mixed (Float16, Float32, Int32)", "storagePrecision" : "Mixed (Float16, Palettized (10 bits), Palettized (11 bits), Palettized (12 bits), Palettized (13 bits), Palettized (7 bits), Palettized (8 bits), UInt4)", "stateSchema" : [ { "dataType" : "Float16", "isOptional" : "0", "formattedType" : "State (Float16 14 × 1 × 512 × 512)", "shortDescription" : "", "shape" : "[14, 1, 512, 512]", "name" : "kv_cache_sliding", "type" : "State" }, { "dataType" : "Float16", "isOptional" : "0", "formattedType" : "State (Float16 2 × 1 × 2048 × 512)", "shortDescription" : "", "shape" : "[2, 1, 2048, 512]", "name" : "kv_cache_full", "type" : "State" } ], "outputSchema" : [ { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Float16", "formattedType" : "MultiArray (Float16 1 × 1 × 1536)", "shortDescription" : "", "shape" : "[1, 1, 1536]", "name" : "hidden_states_out", "type" : "MultiArray" }, { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Float16", "formattedType" : "MultiArray (Float16 1 × 1 × 8960)", "shortDescription" : "", "shape" : "[1, 1, 8960]", "name" : "per_layer_combined_out", "type" : "MultiArray" } ], "name" : "infer", "mlProgramOperationTypeHistogram" : { "Ios18.mul" : 196, "Ios18.matmul" : 16, "Ios18.rsqrt" : 8, "Ios16.reduceMean" : 8, "Ios18.exp" : 8, "Ios18.realDiv" : 8, "Split" : 73, "Ios18.readState" : 18, "Ios16.reduceMax" : 8, "Ios18.add" : 59, "Tile" : 16, "Ios18.layerNorm" : 57, "Ios18.sliceUpdate" : 16, "Ios18.writeState" : 16, "Pad" : 14, "Ios18.reshape" : 98, "Ios16.reduceSum" : 8, "Ios18.constexprLutToDense" : 73, "Ios18.linear" : 73, "Ios18.concat" : 105, "Ios18.transpose" : 80, "Ios18.sub" : 8, "Ios18.pow" : 8, "Ios18.gelu" : 16, "Ios18.sliceByIndex" : 38 } }, { "inputSchema" : [ { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Float16", "formattedType" : "MultiArray (Float16 1 × 8 × 1536)", "shortDescription" : "", "shape" : "[1, 8, 1536]", "name" : "hidden_states", "type" : "MultiArray" }, { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Float16", "formattedType" : "MultiArray (Float16 1 × 1 × 8 × 2048)", "shortDescription" : "", "shape" : "[1, 1, 8, 2048]", "name" : "causal_mask_full", "type" : "MultiArray" }, { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Float16", "formattedType" : "MultiArray (Float16 1 × 1 × 8 × 512)", "shortDescription" : "", "shape" : "[1, 1, 8, 512]", "name" : "causal_mask_sliding", "type" : "MultiArray" }, { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Float16", "formattedType" : "MultiArray (Float16 1 × 8 × 8960)", "shortDescription" : "", "shape" : "[1, 8, 8960]", "name" : "per_layer_raw", "type" : "MultiArray" }, { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Float16", "formattedType" : "MultiArray (Float16 1 × 1 × 8 × 256)", "shortDescription" : "", "shape" : "[1, 1, 8, 256]", "name" : "cos_s", "type" : "MultiArray" }, { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Float16", "formattedType" : "MultiArray (Float16 1 × 1 × 8 × 256)", "shortDescription" : "", "shape" : "[1, 1, 8, 256]", "name" : "sin_s", "type" : "MultiArray" }, { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Float16", "formattedType" : "MultiArray (Float16 1 × 1 × 8 × 512)", "shortDescription" : "", "shape" : "[1, 1, 8, 512]", "name" : "cos_f", "type" : "MultiArray" }, { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Float16", "formattedType" : "MultiArray (Float16 1 × 1 × 8 × 512)", "shortDescription" : "", "shape" : "[1, 1, 8, 512]", "name" : "sin_f", "type" : "MultiArray" }, { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Int32", "formattedType" : "MultiArray (Int32 1)", "shortDescription" : "", "shape" : "[1]", "name" : "current_pos", "type" : "MultiArray" }, { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Int32", "formattedType" : "MultiArray (Int32 1)", "shortDescription" : "", "shape" : "[1]", "name" : "ring_pos", "type" : "MultiArray" } ], "computePrecision" : "Mixed (Float16, Float32, Int32)", "storagePrecision" : "Mixed (Float16, Palettized (10 bits), Palettized (11 bits), Palettized (12 bits), Palettized (13 bits), Palettized (7 bits), Palettized (8 bits), UInt4)", "stateSchema" : [ { "dataType" : "Float16", "isOptional" : "0", "formattedType" : "State (Float16 14 × 1 × 512 × 512)", "shortDescription" : "", "shape" : "[14, 1, 512, 512]", "name" : "kv_cache_sliding", "type" : "State" }, { "dataType" : "Float16", "isOptional" : "0", "formattedType" : "State (Float16 2 × 1 × 2048 × 512)", "shortDescription" : "", "shape" : "[2, 1, 2048, 512]", "name" : "kv_cache_full", "type" : "State" } ], "outputSchema" : [ { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Float16", "formattedType" : "MultiArray (Float16 1 × 8 × 1536)", "shortDescription" : "", "shape" : "[1, 8, 1536]", "name" : "hidden_states_out", "type" : "MultiArray" }, { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Float16", "formattedType" : "MultiArray (Float16 1 × 8 × 8960)", "shortDescription" : "", "shape" : "[1, 8, 8960]", "name" : "per_layer_combined_out", "type" : "MultiArray" } ], "name" : "prefill_b8", "mlProgramOperationTypeHistogram" : { "Ios18.mul" : 196, "Ios18.matmul" : 16, "Ios18.rsqrt" : 8, "Ios16.reduceMean" : 8, "Ios18.exp" : 8, "Ios18.realDiv" : 8, "Split" : 73, "Ios18.readState" : 18, "Ios16.reduceMax" : 8, "Ios18.add" : 59, "Tile" : 16, "Ios18.layerNorm" : 57, "Ios18.sliceUpdate" : 16, "Ios18.writeState" : 16, "Pad" : 14, "Ios18.reshape" : 66, "Ios16.reduceSum" : 8, "Ios18.constexprLutToDense" : 73, "Ios18.linear" : 73, "Ios18.concat" : 105, "Ios18.transpose" : 80, "Ios18.sub" : 8, "Ios18.pow" : 8, "Ios18.gelu" : 16, "Ios18.sliceByIndex" : 38 } } ], "mlProgramOperationTypeHistogram" : { "Ios18.mul" : 196, "Ios18.matmul" : 16, "Ios18.rsqrt" : 8, "Ios16.reduceMean" : 8, "Ios18.exp" : 8, "Ios18.realDiv" : 8, "Split" : 73, "Ios18.readState" : 18, "Ios16.reduceMax" : 8, "Ios18.add" : 59, "Tile" : 16, "Ios18.layerNorm" : 57, "Ios18.sliceUpdate" : 16, "Ios18.writeState" : 16, "Pad" : 14, "Ios18.reshape" : 98, "Ios16.reduceSum" : 8, "Ios18.constexprLutToDense" : 73, "Ios18.linear" : 73, "Ios18.concat" : 105, "Ios18.transpose" : 80, "Ios18.sub" : 8, "Ios18.pow" : 8, "Ios18.gelu" : 16, "Ios18.sliceByIndex" : 38 }, "isUpdatable" : "0", "stateSchema" : [ { "dataType" : "Float16", "isOptional" : "0", "formattedType" : "State (Float16 14 × 1 × 512 × 512)", "shortDescription" : "", "shape" : "[14, 1, 512, 512]", "name" : "kv_cache_sliding", "type" : "State" }, { "dataType" : "Float16", "isOptional" : "0", "formattedType" : "State (Float16 2 × 1 × 2048 × 512)", "shortDescription" : "", "shape" : "[2, 1, 2048, 512]", "name" : "kv_cache_full", "type" : "State" } ], "availability" : { "macOS" : "15.0", "tvOS" : "18.0", "visionOS" : "2.0", "watchOS" : "11.0", "iOS" : "18.0", "macCatalyst" : "18.0" }, "computePrecision" : "Mixed (Float16, Float32, Int32)", "modelType" : { "name" : "MLModelType_mlProgram" }, "inputSchema" : [ { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Float16", "formattedType" : "MultiArray (Float16 1 × 1 × 1536)", "shortDescription" : "", "shape" : "[1, 1, 1536]", "name" : "hidden_states", "type" : "MultiArray" }, { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Float16", "formattedType" : "MultiArray (Float16 1 × 1 × 1 × 2048)", "shortDescription" : "", "shape" : "[1, 1, 1, 2048]", "name" : "causal_mask_full", "type" : "MultiArray" }, { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Float16", "formattedType" : "MultiArray (Float16 1 × 1 × 1 × 512)", "shortDescription" : "", "shape" : "[1, 1, 1, 512]", "name" : "causal_mask_sliding", "type" : "MultiArray" }, { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Float16", "formattedType" : "MultiArray (Float16 1 × 1 × 8960)", "shortDescription" : "", "shape" : "[1, 1, 8960]", "name" : "per_layer_raw", "type" : "MultiArray" }, { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Float16", "formattedType" : "MultiArray (Float16 1 × 1 × 1 × 256)", "shortDescription" : "", "shape" : "[1, 1, 1, 256]", "name" : "cos_s", "type" : "MultiArray" }, { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Float16", "formattedType" : "MultiArray (Float16 1 × 1 × 1 × 256)", "shortDescription" : "", "shape" : "[1, 1, 1, 256]", "name" : "sin_s", "type" : "MultiArray" }, { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Float16", "formattedType" : "MultiArray (Float16 1 × 1 × 1 × 512)", "shortDescription" : "", "shape" : "[1, 1, 1, 512]", "name" : "cos_f", "type" : "MultiArray" }, { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Float16", "formattedType" : "MultiArray (Float16 1 × 1 × 1 × 512)", "shortDescription" : "", "shape" : "[1, 1, 1, 512]", "name" : "sin_f", "type" : "MultiArray" }, { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Int32", "formattedType" : "MultiArray (Int32 1)", "shortDescription" : "", "shape" : "[1]", "name" : "current_pos", "type" : "MultiArray" }, { "hasShapeFlexibility" : "0", "isOptional" : "0", "dataType" : "Int32", "formattedType" : "MultiArray (Int32 1)", "shortDescription" : "", "shape" : "[1]", "name" : "ring_pos", "type" : "MultiArray" } ], "defaultFunctionName" : "infer", "generatedClassName" : "chunk_1", "userDefinedMetadata" : { }, "method" : "predict" } ]