smpanaro's picture
Faster argmax by skipping logit concat
f519906
[
{
"metadataOutputVersion" : "3.0",
"storagePrecision" : "Float16",
"outputSchema" : [
{
"hasShapeFlexibility" : "0",
"isOptional" : "0",
"dataType" : "Float16",
"formattedType" : "MultiArray (Float16 1 × 64 × 16384)",
"shortDescription" : "",
"shape" : "[1, 64, 16384]",
"name" : "logits_0",
"type" : "MultiArray"
},
{
"hasShapeFlexibility" : "0",
"isOptional" : "0",
"dataType" : "Float16",
"formattedType" : "MultiArray (Float16 1 × 64 × 16384)",
"shortDescription" : "",
"shape" : "[1, 64, 16384]",
"name" : "logits_1",
"type" : "MultiArray"
},
{
"hasShapeFlexibility" : "0",
"isOptional" : "0",
"dataType" : "Float16",
"formattedType" : "MultiArray (Float16 1 × 64 × 16384)",
"shortDescription" : "",
"shape" : "[1, 64, 16384]",
"name" : "logits_2",
"type" : "MultiArray"
},
{
"hasShapeFlexibility" : "0",
"isOptional" : "0",
"dataType" : "Float16",
"formattedType" : "MultiArray (Float16 1 × 64 × 16384)",
"shortDescription" : "",
"shape" : "[1, 64, 16384]",
"name" : "logits_3",
"type" : "MultiArray"
},
{
"hasShapeFlexibility" : "0",
"isOptional" : "0",
"dataType" : "Float16",
"formattedType" : "MultiArray (Float16 1 × 64 × 16384)",
"shortDescription" : "",
"shape" : "[1, 64, 16384]",
"name" : "logits_4",
"type" : "MultiArray"
},
{
"hasShapeFlexibility" : "0",
"isOptional" : "0",
"dataType" : "Float16",
"formattedType" : "MultiArray (Float16 1 × 64 × 16384)",
"shortDescription" : "",
"shape" : "[1, 64, 16384]",
"name" : "logits_5",
"type" : "MultiArray"
},
{
"hasShapeFlexibility" : "0",
"isOptional" : "0",
"dataType" : "Float16",
"formattedType" : "MultiArray (Float16 1 × 64 × 16384)",
"shortDescription" : "",
"shape" : "[1, 64, 16384]",
"name" : "logits_6",
"type" : "MultiArray"
},
{
"hasShapeFlexibility" : "0",
"isOptional" : "0",
"dataType" : "Float16",
"formattedType" : "MultiArray (Float16 1 × 64 × 13568)",
"shortDescription" : "",
"shape" : "[1, 64, 13568]",
"name" : "logits_7",
"type" : "MultiArray"
}
],
"modelParameters" : [
],
"specificationVersion" : 7,
"mlProgramOperationTypeHistogram" : {
"Concat" : 1,
"Ios16.mul" : 2,
"Squeeze" : 1,
"Transpose" : 1,
"Ios16.reshape" : 10,
"Ios16.matmul" : 8,
"Ios16.realDiv" : 1,
"Ios16.reduceL2Norm" : 1
},
"computePrecision" : "Mixed (Float16, Int32)",
"isUpdatable" : "0",
"availability" : {
"macOS" : "13.0",
"tvOS" : "16.0",
"visionOS" : "1.0",
"watchOS" : "9.0",
"iOS" : "16.0",
"macCatalyst" : "16.0"
},
"modelType" : {
"name" : "MLModelType_mlProgram"
},
"userDefinedMetadata" : {
"com.github.apple.coremltools.source_dialect" : "TorchScript",
"com.github.apple.coremltools.source" : "torch==2.1.0",
"com.github.apple.coremltools.version" : "8.0b1"
},
"inputSchema" : [
{
"hasShapeFlexibility" : "0",
"isOptional" : "0",
"dataType" : "Float16",
"formattedType" : "MultiArray (Float16 1 × 2048 × 8 × 8)",
"shortDescription" : "",
"shape" : "[1, 2048, 8, 8]",
"name" : "x",
"type" : "MultiArray"
}
],
"generatedClassName" : "Llama_3_2_1B_Instruct_2024_10_13_15_34_32_chunk3",
"method" : "predict"
}
]