Automatic Speech Recognition
Core ML
NeMo
apple-neural-engine
on-device
ios
macos
speech
audio
automatic-speech-translation
canary
fastconformer
kv-cache
fp16
Instructions to use smdesai/canary-1b-v2-coreml with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- NeMo
How to use smdesai/canary-1b-v2-coreml with NeMo:
import nemo.collections.asr as nemo_asr asr_model = nemo_asr.models.ASRModel.from_pretrained("smdesai/canary-1b-v2-coreml") transcriptions = asr_model.transcribe(["file.wav"]) - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse files- canary_cross_kv.mlmodelc/analytics/coremldata.bin +3 -0
- canary_cross_kv.mlmodelc/coremldata.bin +3 -0
- canary_cross_kv.mlmodelc/metadata.json +77 -0
- canary_cross_kv.mlmodelc/model.mil +144 -0
- canary_cross_kv.mlmodelc/weights/weight.bin +3 -0
- canary_decoder_kv.mlmodelc/analytics/coremldata.bin +3 -0
- canary_decoder_kv.mlmodelc/coremldata.bin +3 -0
- canary_decoder_kv.mlmodelc/metadata.json +265 -0
- canary_decoder_kv.mlmodelc/model.mil +0 -0
- canary_decoder_kv.mlmodelc/weights/weight.bin +3 -0
- canary_encoder.mlmodelc/analytics/coremldata.bin +3 -0
- canary_encoder.mlmodelc/coremldata.bin +3 -0
- canary_encoder.mlmodelc/metadata.json +104 -0
- canary_encoder.mlmodelc/model.mil +0 -0
- canary_encoder.mlmodelc/weights/weight.bin +3 -0
- canary_preprocessor.mlmodelc/analytics/coremldata.bin +3 -0
- canary_preprocessor.mlmodelc/coremldata.bin +3 -0
- canary_preprocessor.mlmodelc/metadata.json +104 -0
- canary_preprocessor.mlmodelc/model.mil +122 -0
- canary_preprocessor.mlmodelc/weights/weight.bin +3 -0
- metadata.json +53 -0
canary_cross_kv.mlmodelc/analytics/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3553add8e4c4f4351f2e127d0a9c4b9f0ee7885503db507603fdfcb35f395250
|
| 3 |
+
size 243
|
canary_cross_kv.mlmodelc/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:21cceed24d63e235b0d7a1bc93fbce5c040e9c6a3e4485bc6525ec874086baa7
|
| 3 |
+
size 470
|
canary_cross_kv.mlmodelc/metadata.json
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"metadataOutputVersion" : "3.0",
|
| 4 |
+
"shortDescription" : "Canary-1b-v2 cross-attention K\/V precompute (per-window, 8L)",
|
| 5 |
+
"outputSchema" : [
|
| 6 |
+
{
|
| 7 |
+
"hasShapeFlexibility" : "0",
|
| 8 |
+
"isOptional" : "0",
|
| 9 |
+
"dataType" : "Float32",
|
| 10 |
+
"formattedType" : "MultiArray (Float32 8 × 1 × 8 × 188 × 128)",
|
| 11 |
+
"shortDescription" : "",
|
| 12 |
+
"shape" : "[8, 1, 8, 188, 128]",
|
| 13 |
+
"name" : "enc_k",
|
| 14 |
+
"type" : "MultiArray"
|
| 15 |
+
},
|
| 16 |
+
{
|
| 17 |
+
"hasShapeFlexibility" : "0",
|
| 18 |
+
"isOptional" : "0",
|
| 19 |
+
"dataType" : "Float32",
|
| 20 |
+
"formattedType" : "MultiArray (Float32 8 × 1 × 8 × 188 × 128)",
|
| 21 |
+
"shortDescription" : "",
|
| 22 |
+
"shape" : "[8, 1, 8, 188, 128]",
|
| 23 |
+
"name" : "enc_v",
|
| 24 |
+
"type" : "MultiArray"
|
| 25 |
+
}
|
| 26 |
+
],
|
| 27 |
+
"storagePrecision" : "Float16",
|
| 28 |
+
"modelParameters" : [
|
| 29 |
+
|
| 30 |
+
],
|
| 31 |
+
"specificationVersion" : 9,
|
| 32 |
+
"mlProgramOperationTypeHistogram" : {
|
| 33 |
+
"Ios18.linear" : 16,
|
| 34 |
+
"Ios18.transpose" : 16,
|
| 35 |
+
"Stack" : 2,
|
| 36 |
+
"Ios18.cast" : 3,
|
| 37 |
+
"Ios18.reshape" : 16,
|
| 38 |
+
"Ios18.mul" : 8
|
| 39 |
+
},
|
| 40 |
+
"computePrecision" : "Mixed (Float16, Float32, Int32)",
|
| 41 |
+
"isUpdatable" : "0",
|
| 42 |
+
"stateSchema" : [
|
| 43 |
+
|
| 44 |
+
],
|
| 45 |
+
"availability" : {
|
| 46 |
+
"macOS" : "15.0",
|
| 47 |
+
"tvOS" : "18.0",
|
| 48 |
+
"visionOS" : "2.0",
|
| 49 |
+
"watchOS" : "11.0",
|
| 50 |
+
"iOS" : "18.0",
|
| 51 |
+
"macCatalyst" : "18.0"
|
| 52 |
+
},
|
| 53 |
+
"modelType" : {
|
| 54 |
+
"name" : "MLModelType_mlProgram"
|
| 55 |
+
},
|
| 56 |
+
"inputSchema" : [
|
| 57 |
+
{
|
| 58 |
+
"hasShapeFlexibility" : "0",
|
| 59 |
+
"isOptional" : "0",
|
| 60 |
+
"dataType" : "Float32",
|
| 61 |
+
"formattedType" : "MultiArray (Float32 1 × 188 × 1024)",
|
| 62 |
+
"shortDescription" : "",
|
| 63 |
+
"shape" : "[1, 188, 1024]",
|
| 64 |
+
"name" : "enc_states",
|
| 65 |
+
"type" : "MultiArray"
|
| 66 |
+
}
|
| 67 |
+
],
|
| 68 |
+
"userDefinedMetadata" : {
|
| 69 |
+
"com.github.apple.coremltools.conversion_date" : "2026-07-01",
|
| 70 |
+
"com.github.apple.coremltools.source" : "torch==2.7.0",
|
| 71 |
+
"com.github.apple.coremltools.version" : "9.0b1",
|
| 72 |
+
"com.github.apple.coremltools.source_dialect" : "TorchScript"
|
| 73 |
+
},
|
| 74 |
+
"generatedClassName" : "canary_cross_kv",
|
| 75 |
+
"method" : "predict"
|
| 76 |
+
}
|
| 77 |
+
]
|
canary_cross_kv.mlmodelc/model.mil
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
program(1.3)
|
| 2 |
+
[buildInfo = dict<string, string>({{"coremlc-component-MIL", "3600.16.1"}, {"coremlc-version", "3600.22.1"}, {"coremltools-component-torch", "2.7.0"}, {"coremltools-source-dialect", "TorchScript"}, {"coremltools-version", "9.0b1"}})]
|
| 3 |
+
{
|
| 4 |
+
func main<ios18>(tensor<fp32, [1, 188, 1024]> enc_states) {
|
| 5 |
+
string enc_states_to_fp16_dtype_0 = const()[name = string("enc_states_to_fp16_dtype_0"), val = string("fp16")];
|
| 6 |
+
tensor<fp16, [1024, 1024]> layers_0_second_sub_layer_key_net_weight_to_fp16 = const()[name = string("layers_0_second_sub_layer_key_net_weight_to_fp16"), val = tensor<fp16, [1024, 1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(64)))];
|
| 7 |
+
tensor<fp16, [1024]> layers_0_second_sub_layer_key_net_bias_to_fp16 = const()[name = string("layers_0_second_sub_layer_key_net_bias_to_fp16"), val = tensor<fp16, [1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(2097280)))];
|
| 8 |
+
tensor<fp16, [1, 188, 1024]> enc_states_to_fp16 = cast(dtype = enc_states_to_fp16_dtype_0, x = enc_states)[name = string("cast_34")];
|
| 9 |
+
tensor<fp16, [1, 188, 1024]> linear_0_cast_fp16 = linear(bias = layers_0_second_sub_layer_key_net_bias_to_fp16, weight = layers_0_second_sub_layer_key_net_weight_to_fp16, x = enc_states_to_fp16)[name = string("linear_0_cast_fp16")];
|
| 10 |
+
tensor<int32, [4]> var_79 = const()[name = string("op_79"), val = tensor<int32, [4]>([1, 188, 8, 128])];
|
| 11 |
+
tensor<fp16, [1, 188, 8, 128]> var_80_cast_fp16 = reshape(shape = var_79, x = linear_0_cast_fp16)[name = string("op_80_cast_fp16")];
|
| 12 |
+
tensor<fp16, [1024, 1024]> layers_0_second_sub_layer_value_net_weight_to_fp16 = const()[name = string("layers_0_second_sub_layer_value_net_weight_to_fp16"), val = tensor<fp16, [1024, 1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(2099392)))];
|
| 13 |
+
tensor<fp16, [1024]> layers_0_second_sub_layer_value_net_bias_to_fp16 = const()[name = string("layers_0_second_sub_layer_value_net_bias_to_fp16"), val = tensor<fp16, [1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(4196608)))];
|
| 14 |
+
tensor<fp16, [1, 188, 1024]> linear_1_cast_fp16 = linear(bias = layers_0_second_sub_layer_value_net_bias_to_fp16, weight = layers_0_second_sub_layer_value_net_weight_to_fp16, x = enc_states_to_fp16)[name = string("linear_1_cast_fp16")];
|
| 15 |
+
tensor<int32, [4]> var_100 = const()[name = string("op_100"), val = tensor<int32, [4]>([1, 188, 8, 128])];
|
| 16 |
+
tensor<fp16, [1, 188, 8, 128]> var_101_cast_fp16 = reshape(shape = var_100, x = linear_1_cast_fp16)[name = string("op_101_cast_fp16")];
|
| 17 |
+
fp16 _inversed_109_y_0_to_fp16 = const()[name = string("_inversed_109_y_0_to_fp16"), val = fp16(0x1.308p-2)];
|
| 18 |
+
tensor<fp16, [1, 188, 8, 128]> _inversed_109_cast_fp16 = mul(x = var_80_cast_fp16, y = _inversed_109_y_0_to_fp16)[name = string("_inversed_109_cast_fp16")];
|
| 19 |
+
tensor<fp16, [1024, 1024]> layers_1_second_sub_layer_key_net_weight_to_fp16 = const()[name = string("layers_1_second_sub_layer_key_net_weight_to_fp16"), val = tensor<fp16, [1024, 1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(4198720)))];
|
| 20 |
+
tensor<fp16, [1024]> layers_1_second_sub_layer_key_net_bias_to_fp16 = const()[name = string("layers_1_second_sub_layer_key_net_bias_to_fp16"), val = tensor<fp16, [1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(6295936)))];
|
| 21 |
+
tensor<fp16, [1, 188, 1024]> linear_2_cast_fp16 = linear(bias = layers_1_second_sub_layer_key_net_bias_to_fp16, weight = layers_1_second_sub_layer_key_net_weight_to_fp16, x = enc_states_to_fp16)[name = string("linear_2_cast_fp16")];
|
| 22 |
+
tensor<int32, [4]> var_123 = const()[name = string("op_123"), val = tensor<int32, [4]>([1, 188, 8, 128])];
|
| 23 |
+
tensor<fp16, [1, 188, 8, 128]> var_124_cast_fp16 = reshape(shape = var_123, x = linear_2_cast_fp16)[name = string("op_124_cast_fp16")];
|
| 24 |
+
tensor<fp16, [1024, 1024]> layers_1_second_sub_layer_value_net_weight_to_fp16 = const()[name = string("layers_1_second_sub_layer_value_net_weight_to_fp16"), val = tensor<fp16, [1024, 1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(6298048)))];
|
| 25 |
+
tensor<fp16, [1024]> layers_1_second_sub_layer_value_net_bias_to_fp16 = const()[name = string("layers_1_second_sub_layer_value_net_bias_to_fp16"), val = tensor<fp16, [1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(8395264)))];
|
| 26 |
+
tensor<fp16, [1, 188, 1024]> linear_3_cast_fp16 = linear(bias = layers_1_second_sub_layer_value_net_bias_to_fp16, weight = layers_1_second_sub_layer_value_net_weight_to_fp16, x = enc_states_to_fp16)[name = string("linear_3_cast_fp16")];
|
| 27 |
+
tensor<int32, [4]> var_144 = const()[name = string("op_144"), val = tensor<int32, [4]>([1, 188, 8, 128])];
|
| 28 |
+
tensor<fp16, [1, 188, 8, 128]> var_145_cast_fp16 = reshape(shape = var_144, x = linear_3_cast_fp16)[name = string("op_145_cast_fp16")];
|
| 29 |
+
fp16 _inversed_153_y_0_to_fp16 = const()[name = string("_inversed_153_y_0_to_fp16"), val = fp16(0x1.308p-2)];
|
| 30 |
+
tensor<fp16, [1, 188, 8, 128]> _inversed_153_cast_fp16 = mul(x = var_124_cast_fp16, y = _inversed_153_y_0_to_fp16)[name = string("_inversed_153_cast_fp16")];
|
| 31 |
+
tensor<fp16, [1024, 1024]> layers_2_second_sub_layer_key_net_weight_to_fp16 = const()[name = string("layers_2_second_sub_layer_key_net_weight_to_fp16"), val = tensor<fp16, [1024, 1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(8397376)))];
|
| 32 |
+
tensor<fp16, [1024]> layers_2_second_sub_layer_key_net_bias_to_fp16 = const()[name = string("layers_2_second_sub_layer_key_net_bias_to_fp16"), val = tensor<fp16, [1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(10494592)))];
|
| 33 |
+
tensor<fp16, [1, 188, 1024]> linear_4_cast_fp16 = linear(bias = layers_2_second_sub_layer_key_net_bias_to_fp16, weight = layers_2_second_sub_layer_key_net_weight_to_fp16, x = enc_states_to_fp16)[name = string("linear_4_cast_fp16")];
|
| 34 |
+
tensor<int32, [4]> var_167 = const()[name = string("op_167"), val = tensor<int32, [4]>([1, 188, 8, 128])];
|
| 35 |
+
tensor<fp16, [1, 188, 8, 128]> var_168_cast_fp16 = reshape(shape = var_167, x = linear_4_cast_fp16)[name = string("op_168_cast_fp16")];
|
| 36 |
+
tensor<fp16, [1024, 1024]> layers_2_second_sub_layer_value_net_weight_to_fp16 = const()[name = string("layers_2_second_sub_layer_value_net_weight_to_fp16"), val = tensor<fp16, [1024, 1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(10496704)))];
|
| 37 |
+
tensor<fp16, [1024]> layers_2_second_sub_layer_value_net_bias_to_fp16 = const()[name = string("layers_2_second_sub_layer_value_net_bias_to_fp16"), val = tensor<fp16, [1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(12593920)))];
|
| 38 |
+
tensor<fp16, [1, 188, 1024]> linear_5_cast_fp16 = linear(bias = layers_2_second_sub_layer_value_net_bias_to_fp16, weight = layers_2_second_sub_layer_value_net_weight_to_fp16, x = enc_states_to_fp16)[name = string("linear_5_cast_fp16")];
|
| 39 |
+
tensor<int32, [4]> var_188 = const()[name = string("op_188"), val = tensor<int32, [4]>([1, 188, 8, 128])];
|
| 40 |
+
tensor<fp16, [1, 188, 8, 128]> var_189_cast_fp16 = reshape(shape = var_188, x = linear_5_cast_fp16)[name = string("op_189_cast_fp16")];
|
| 41 |
+
fp16 _inversed_197_y_0_to_fp16 = const()[name = string("_inversed_197_y_0_to_fp16"), val = fp16(0x1.308p-2)];
|
| 42 |
+
tensor<fp16, [1, 188, 8, 128]> _inversed_197_cast_fp16 = mul(x = var_168_cast_fp16, y = _inversed_197_y_0_to_fp16)[name = string("_inversed_197_cast_fp16")];
|
| 43 |
+
tensor<fp16, [1024, 1024]> layers_3_second_sub_layer_key_net_weight_to_fp16 = const()[name = string("layers_3_second_sub_layer_key_net_weight_to_fp16"), val = tensor<fp16, [1024, 1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(12596032)))];
|
| 44 |
+
tensor<fp16, [1024]> layers_3_second_sub_layer_key_net_bias_to_fp16 = const()[name = string("layers_3_second_sub_layer_key_net_bias_to_fp16"), val = tensor<fp16, [1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(14693248)))];
|
| 45 |
+
tensor<fp16, [1, 188, 1024]> linear_6_cast_fp16 = linear(bias = layers_3_second_sub_layer_key_net_bias_to_fp16, weight = layers_3_second_sub_layer_key_net_weight_to_fp16, x = enc_states_to_fp16)[name = string("linear_6_cast_fp16")];
|
| 46 |
+
tensor<int32, [4]> var_211 = const()[name = string("op_211"), val = tensor<int32, [4]>([1, 188, 8, 128])];
|
| 47 |
+
tensor<fp16, [1, 188, 8, 128]> var_212_cast_fp16 = reshape(shape = var_211, x = linear_6_cast_fp16)[name = string("op_212_cast_fp16")];
|
| 48 |
+
tensor<fp16, [1024, 1024]> layers_3_second_sub_layer_value_net_weight_to_fp16 = const()[name = string("layers_3_second_sub_layer_value_net_weight_to_fp16"), val = tensor<fp16, [1024, 1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(14695360)))];
|
| 49 |
+
tensor<fp16, [1024]> layers_3_second_sub_layer_value_net_bias_to_fp16 = const()[name = string("layers_3_second_sub_layer_value_net_bias_to_fp16"), val = tensor<fp16, [1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(16792576)))];
|
| 50 |
+
tensor<fp16, [1, 188, 1024]> linear_7_cast_fp16 = linear(bias = layers_3_second_sub_layer_value_net_bias_to_fp16, weight = layers_3_second_sub_layer_value_net_weight_to_fp16, x = enc_states_to_fp16)[name = string("linear_7_cast_fp16")];
|
| 51 |
+
tensor<int32, [4]> var_232 = const()[name = string("op_232"), val = tensor<int32, [4]>([1, 188, 8, 128])];
|
| 52 |
+
tensor<fp16, [1, 188, 8, 128]> var_233_cast_fp16 = reshape(shape = var_232, x = linear_7_cast_fp16)[name = string("op_233_cast_fp16")];
|
| 53 |
+
fp16 _inversed_241_y_0_to_fp16 = const()[name = string("_inversed_241_y_0_to_fp16"), val = fp16(0x1.308p-2)];
|
| 54 |
+
tensor<fp16, [1, 188, 8, 128]> _inversed_241_cast_fp16 = mul(x = var_212_cast_fp16, y = _inversed_241_y_0_to_fp16)[name = string("_inversed_241_cast_fp16")];
|
| 55 |
+
tensor<fp16, [1024, 1024]> layers_4_second_sub_layer_key_net_weight_to_fp16 = const()[name = string("layers_4_second_sub_layer_key_net_weight_to_fp16"), val = tensor<fp16, [1024, 1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(16794688)))];
|
| 56 |
+
tensor<fp16, [1024]> layers_4_second_sub_layer_key_net_bias_to_fp16 = const()[name = string("layers_4_second_sub_layer_key_net_bias_to_fp16"), val = tensor<fp16, [1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(18891904)))];
|
| 57 |
+
tensor<fp16, [1, 188, 1024]> linear_8_cast_fp16 = linear(bias = layers_4_second_sub_layer_key_net_bias_to_fp16, weight = layers_4_second_sub_layer_key_net_weight_to_fp16, x = enc_states_to_fp16)[name = string("linear_8_cast_fp16")];
|
| 58 |
+
tensor<int32, [4]> var_255 = const()[name = string("op_255"), val = tensor<int32, [4]>([1, 188, 8, 128])];
|
| 59 |
+
tensor<fp16, [1, 188, 8, 128]> var_256_cast_fp16 = reshape(shape = var_255, x = linear_8_cast_fp16)[name = string("op_256_cast_fp16")];
|
| 60 |
+
tensor<fp16, [1024, 1024]> layers_4_second_sub_layer_value_net_weight_to_fp16 = const()[name = string("layers_4_second_sub_layer_value_net_weight_to_fp16"), val = tensor<fp16, [1024, 1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(18894016)))];
|
| 61 |
+
tensor<fp16, [1024]> layers_4_second_sub_layer_value_net_bias_to_fp16 = const()[name = string("layers_4_second_sub_layer_value_net_bias_to_fp16"), val = tensor<fp16, [1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(20991232)))];
|
| 62 |
+
tensor<fp16, [1, 188, 1024]> linear_9_cast_fp16 = linear(bias = layers_4_second_sub_layer_value_net_bias_to_fp16, weight = layers_4_second_sub_layer_value_net_weight_to_fp16, x = enc_states_to_fp16)[name = string("linear_9_cast_fp16")];
|
| 63 |
+
tensor<int32, [4]> var_276 = const()[name = string("op_276"), val = tensor<int32, [4]>([1, 188, 8, 128])];
|
| 64 |
+
tensor<fp16, [1, 188, 8, 128]> var_277_cast_fp16 = reshape(shape = var_276, x = linear_9_cast_fp16)[name = string("op_277_cast_fp16")];
|
| 65 |
+
fp16 _inversed_285_y_0_to_fp16 = const()[name = string("_inversed_285_y_0_to_fp16"), val = fp16(0x1.308p-2)];
|
| 66 |
+
tensor<fp16, [1, 188, 8, 128]> _inversed_285_cast_fp16 = mul(x = var_256_cast_fp16, y = _inversed_285_y_0_to_fp16)[name = string("_inversed_285_cast_fp16")];
|
| 67 |
+
tensor<fp16, [1024, 1024]> layers_5_second_sub_layer_key_net_weight_to_fp16 = const()[name = string("layers_5_second_sub_layer_key_net_weight_to_fp16"), val = tensor<fp16, [1024, 1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(20993344)))];
|
| 68 |
+
tensor<fp16, [1024]> layers_5_second_sub_layer_key_net_bias_to_fp16 = const()[name = string("layers_5_second_sub_layer_key_net_bias_to_fp16"), val = tensor<fp16, [1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(23090560)))];
|
| 69 |
+
tensor<fp16, [1, 188, 1024]> linear_10_cast_fp16 = linear(bias = layers_5_second_sub_layer_key_net_bias_to_fp16, weight = layers_5_second_sub_layer_key_net_weight_to_fp16, x = enc_states_to_fp16)[name = string("linear_10_cast_fp16")];
|
| 70 |
+
tensor<int32, [4]> var_299 = const()[name = string("op_299"), val = tensor<int32, [4]>([1, 188, 8, 128])];
|
| 71 |
+
tensor<fp16, [1, 188, 8, 128]> var_300_cast_fp16 = reshape(shape = var_299, x = linear_10_cast_fp16)[name = string("op_300_cast_fp16")];
|
| 72 |
+
tensor<fp16, [1024, 1024]> layers_5_second_sub_layer_value_net_weight_to_fp16 = const()[name = string("layers_5_second_sub_layer_value_net_weight_to_fp16"), val = tensor<fp16, [1024, 1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(23092672)))];
|
| 73 |
+
tensor<fp16, [1024]> layers_5_second_sub_layer_value_net_bias_to_fp16 = const()[name = string("layers_5_second_sub_layer_value_net_bias_to_fp16"), val = tensor<fp16, [1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(25189888)))];
|
| 74 |
+
tensor<fp16, [1, 188, 1024]> linear_11_cast_fp16 = linear(bias = layers_5_second_sub_layer_value_net_bias_to_fp16, weight = layers_5_second_sub_layer_value_net_weight_to_fp16, x = enc_states_to_fp16)[name = string("linear_11_cast_fp16")];
|
| 75 |
+
tensor<int32, [4]> var_320 = const()[name = string("op_320"), val = tensor<int32, [4]>([1, 188, 8, 128])];
|
| 76 |
+
tensor<fp16, [1, 188, 8, 128]> var_321_cast_fp16 = reshape(shape = var_320, x = linear_11_cast_fp16)[name = string("op_321_cast_fp16")];
|
| 77 |
+
fp16 _inversed_329_y_0_to_fp16 = const()[name = string("_inversed_329_y_0_to_fp16"), val = fp16(0x1.308p-2)];
|
| 78 |
+
tensor<fp16, [1, 188, 8, 128]> _inversed_329_cast_fp16 = mul(x = var_300_cast_fp16, y = _inversed_329_y_0_to_fp16)[name = string("_inversed_329_cast_fp16")];
|
| 79 |
+
tensor<fp16, [1024, 1024]> layers_6_second_sub_layer_key_net_weight_to_fp16 = const()[name = string("layers_6_second_sub_layer_key_net_weight_to_fp16"), val = tensor<fp16, [1024, 1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(25192000)))];
|
| 80 |
+
tensor<fp16, [1024]> layers_6_second_sub_layer_key_net_bias_to_fp16 = const()[name = string("layers_6_second_sub_layer_key_net_bias_to_fp16"), val = tensor<fp16, [1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(27289216)))];
|
| 81 |
+
tensor<fp16, [1, 188, 1024]> linear_12_cast_fp16 = linear(bias = layers_6_second_sub_layer_key_net_bias_to_fp16, weight = layers_6_second_sub_layer_key_net_weight_to_fp16, x = enc_states_to_fp16)[name = string("linear_12_cast_fp16")];
|
| 82 |
+
tensor<int32, [4]> var_343 = const()[name = string("op_343"), val = tensor<int32, [4]>([1, 188, 8, 128])];
|
| 83 |
+
tensor<fp16, [1, 188, 8, 128]> var_344_cast_fp16 = reshape(shape = var_343, x = linear_12_cast_fp16)[name = string("op_344_cast_fp16")];
|
| 84 |
+
tensor<fp16, [1024, 1024]> layers_6_second_sub_layer_value_net_weight_to_fp16 = const()[name = string("layers_6_second_sub_layer_value_net_weight_to_fp16"), val = tensor<fp16, [1024, 1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(27291328)))];
|
| 85 |
+
tensor<fp16, [1024]> layers_6_second_sub_layer_value_net_bias_to_fp16 = const()[name = string("layers_6_second_sub_layer_value_net_bias_to_fp16"), val = tensor<fp16, [1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(29388544)))];
|
| 86 |
+
tensor<fp16, [1, 188, 1024]> linear_13_cast_fp16 = linear(bias = layers_6_second_sub_layer_value_net_bias_to_fp16, weight = layers_6_second_sub_layer_value_net_weight_to_fp16, x = enc_states_to_fp16)[name = string("linear_13_cast_fp16")];
|
| 87 |
+
tensor<int32, [4]> var_364 = const()[name = string("op_364"), val = tensor<int32, [4]>([1, 188, 8, 128])];
|
| 88 |
+
tensor<fp16, [1, 188, 8, 128]> var_365_cast_fp16 = reshape(shape = var_364, x = linear_13_cast_fp16)[name = string("op_365_cast_fp16")];
|
| 89 |
+
fp16 _inversed_373_y_0_to_fp16 = const()[name = string("_inversed_373_y_0_to_fp16"), val = fp16(0x1.308p-2)];
|
| 90 |
+
tensor<fp16, [1, 188, 8, 128]> _inversed_373_cast_fp16 = mul(x = var_344_cast_fp16, y = _inversed_373_y_0_to_fp16)[name = string("_inversed_373_cast_fp16")];
|
| 91 |
+
tensor<fp16, [1024, 1024]> layers_7_second_sub_layer_key_net_weight_to_fp16 = const()[name = string("layers_7_second_sub_layer_key_net_weight_to_fp16"), val = tensor<fp16, [1024, 1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(29390656)))];
|
| 92 |
+
tensor<fp16, [1024]> layers_7_second_sub_layer_key_net_bias_to_fp16 = const()[name = string("layers_7_second_sub_layer_key_net_bias_to_fp16"), val = tensor<fp16, [1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(31487872)))];
|
| 93 |
+
tensor<fp16, [1, 188, 1024]> linear_14_cast_fp16 = linear(bias = layers_7_second_sub_layer_key_net_bias_to_fp16, weight = layers_7_second_sub_layer_key_net_weight_to_fp16, x = enc_states_to_fp16)[name = string("linear_14_cast_fp16")];
|
| 94 |
+
tensor<int32, [4]> var_387 = const()[name = string("op_387"), val = tensor<int32, [4]>([1, 188, 8, 128])];
|
| 95 |
+
tensor<fp16, [1, 188, 8, 128]> var_388_cast_fp16 = reshape(shape = var_387, x = linear_14_cast_fp16)[name = string("op_388_cast_fp16")];
|
| 96 |
+
tensor<fp16, [1024, 1024]> layers_7_second_sub_layer_value_net_weight_to_fp16 = const()[name = string("layers_7_second_sub_layer_value_net_weight_to_fp16"), val = tensor<fp16, [1024, 1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(31489984)))];
|
| 97 |
+
tensor<fp16, [1024]> layers_7_second_sub_layer_value_net_bias_to_fp16 = const()[name = string("layers_7_second_sub_layer_value_net_bias_to_fp16"), val = tensor<fp16, [1024]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(33587200)))];
|
| 98 |
+
tensor<fp16, [1, 188, 1024]> linear_15_cast_fp16 = linear(bias = layers_7_second_sub_layer_value_net_bias_to_fp16, weight = layers_7_second_sub_layer_value_net_weight_to_fp16, x = enc_states_to_fp16)[name = string("linear_15_cast_fp16")];
|
| 99 |
+
tensor<int32, [4]> var_408 = const()[name = string("op_408"), val = tensor<int32, [4]>([1, 188, 8, 128])];
|
| 100 |
+
tensor<fp16, [1, 188, 8, 128]> var_409_cast_fp16 = reshape(shape = var_408, x = linear_15_cast_fp16)[name = string("op_409_cast_fp16")];
|
| 101 |
+
fp16 _inversed_417_y_0_to_fp16 = const()[name = string("_inversed_417_y_0_to_fp16"), val = fp16(0x1.308p-2)];
|
| 102 |
+
tensor<fp16, [1, 188, 8, 128]> _inversed_417_cast_fp16 = mul(x = var_388_cast_fp16, y = _inversed_417_y_0_to_fp16)[name = string("_inversed_417_cast_fp16")];
|
| 103 |
+
int32 var_420_axis_0 = const()[name = string("op_420_axis_0"), val = int32(0)];
|
| 104 |
+
tensor<int32, [4]> transpose_32_perm_0 = const()[name = string("transpose_32_perm_0"), val = tensor<int32, [4]>([0, 2, 1, 3])];
|
| 105 |
+
tensor<int32, [4]> transpose_33_perm_0 = const()[name = string("transpose_33_perm_0"), val = tensor<int32, [4]>([0, 2, 1, 3])];
|
| 106 |
+
tensor<int32, [4]> transpose_34_perm_0 = const()[name = string("transpose_34_perm_0"), val = tensor<int32, [4]>([0, 2, 1, 3])];
|
| 107 |
+
tensor<int32, [4]> transpose_35_perm_0 = const()[name = string("transpose_35_perm_0"), val = tensor<int32, [4]>([0, 2, 1, 3])];
|
| 108 |
+
tensor<int32, [4]> transpose_36_perm_0 = const()[name = string("transpose_36_perm_0"), val = tensor<int32, [4]>([0, 2, 1, 3])];
|
| 109 |
+
tensor<int32, [4]> transpose_37_perm_0 = const()[name = string("transpose_37_perm_0"), val = tensor<int32, [4]>([0, 2, 1, 3])];
|
| 110 |
+
tensor<int32, [4]> transpose_38_perm_0 = const()[name = string("transpose_38_perm_0"), val = tensor<int32, [4]>([0, 2, 1, 3])];
|
| 111 |
+
tensor<int32, [4]> transpose_39_perm_0 = const()[name = string("transpose_39_perm_0"), val = tensor<int32, [4]>([0, 2, 1, 3])];
|
| 112 |
+
tensor<fp16, [1, 8, 188, 128]> transpose_39 = transpose(perm = transpose_39_perm_0, x = _inversed_417_cast_fp16)[name = string("transpose_56")];
|
| 113 |
+
tensor<fp16, [1, 8, 188, 128]> transpose_38 = transpose(perm = transpose_38_perm_0, x = _inversed_373_cast_fp16)[name = string("transpose_57")];
|
| 114 |
+
tensor<fp16, [1, 8, 188, 128]> transpose_37 = transpose(perm = transpose_37_perm_0, x = _inversed_329_cast_fp16)[name = string("transpose_58")];
|
| 115 |
+
tensor<fp16, [1, 8, 188, 128]> transpose_36 = transpose(perm = transpose_36_perm_0, x = _inversed_285_cast_fp16)[name = string("transpose_59")];
|
| 116 |
+
tensor<fp16, [1, 8, 188, 128]> transpose_35 = transpose(perm = transpose_35_perm_0, x = _inversed_241_cast_fp16)[name = string("transpose_60")];
|
| 117 |
+
tensor<fp16, [1, 8, 188, 128]> transpose_34 = transpose(perm = transpose_34_perm_0, x = _inversed_197_cast_fp16)[name = string("transpose_61")];
|
| 118 |
+
tensor<fp16, [1, 8, 188, 128]> transpose_33 = transpose(perm = transpose_33_perm_0, x = _inversed_153_cast_fp16)[name = string("transpose_62")];
|
| 119 |
+
tensor<fp16, [1, 8, 188, 128]> transpose_32 = transpose(perm = transpose_32_perm_0, x = _inversed_109_cast_fp16)[name = string("transpose_63")];
|
| 120 |
+
tensor<fp16, [8, 1, 8, 188, 128]> var_420_cast_fp16 = stack(axis = var_420_axis_0, values = (transpose_32, transpose_33, transpose_34, transpose_35, transpose_36, transpose_37, transpose_38, transpose_39))[name = string("op_420_cast_fp16")];
|
| 121 |
+
string var_420_cast_fp16_to_fp32_dtype_0 = const()[name = string("op_420_cast_fp16_to_fp32_dtype_0"), val = string("fp32")];
|
| 122 |
+
int32 var_423_axis_0 = const()[name = string("op_423_axis_0"), val = int32(0)];
|
| 123 |
+
tensor<int32, [4]> transpose_40_perm_0 = const()[name = string("transpose_40_perm_0"), val = tensor<int32, [4]>([0, 2, 1, 3])];
|
| 124 |
+
tensor<int32, [4]> transpose_41_perm_0 = const()[name = string("transpose_41_perm_0"), val = tensor<int32, [4]>([0, 2, 1, 3])];
|
| 125 |
+
tensor<int32, [4]> transpose_42_perm_0 = const()[name = string("transpose_42_perm_0"), val = tensor<int32, [4]>([0, 2, 1, 3])];
|
| 126 |
+
tensor<int32, [4]> transpose_43_perm_0 = const()[name = string("transpose_43_perm_0"), val = tensor<int32, [4]>([0, 2, 1, 3])];
|
| 127 |
+
tensor<int32, [4]> transpose_44_perm_0 = const()[name = string("transpose_44_perm_0"), val = tensor<int32, [4]>([0, 2, 1, 3])];
|
| 128 |
+
tensor<int32, [4]> transpose_45_perm_0 = const()[name = string("transpose_45_perm_0"), val = tensor<int32, [4]>([0, 2, 1, 3])];
|
| 129 |
+
tensor<int32, [4]> transpose_46_perm_0 = const()[name = string("transpose_46_perm_0"), val = tensor<int32, [4]>([0, 2, 1, 3])];
|
| 130 |
+
tensor<int32, [4]> transpose_47_perm_0 = const()[name = string("transpose_47_perm_0"), val = tensor<int32, [4]>([0, 2, 1, 3])];
|
| 131 |
+
tensor<fp16, [1, 8, 188, 128]> transpose_47 = transpose(perm = transpose_47_perm_0, x = var_409_cast_fp16)[name = string("transpose_48")];
|
| 132 |
+
tensor<fp16, [1, 8, 188, 128]> transpose_46 = transpose(perm = transpose_46_perm_0, x = var_365_cast_fp16)[name = string("transpose_49")];
|
| 133 |
+
tensor<fp16, [1, 8, 188, 128]> transpose_45 = transpose(perm = transpose_45_perm_0, x = var_321_cast_fp16)[name = string("transpose_50")];
|
| 134 |
+
tensor<fp16, [1, 8, 188, 128]> transpose_44 = transpose(perm = transpose_44_perm_0, x = var_277_cast_fp16)[name = string("transpose_51")];
|
| 135 |
+
tensor<fp16, [1, 8, 188, 128]> transpose_43 = transpose(perm = transpose_43_perm_0, x = var_233_cast_fp16)[name = string("transpose_52")];
|
| 136 |
+
tensor<fp16, [1, 8, 188, 128]> transpose_42 = transpose(perm = transpose_42_perm_0, x = var_189_cast_fp16)[name = string("transpose_53")];
|
| 137 |
+
tensor<fp16, [1, 8, 188, 128]> transpose_41 = transpose(perm = transpose_41_perm_0, x = var_145_cast_fp16)[name = string("transpose_54")];
|
| 138 |
+
tensor<fp16, [1, 8, 188, 128]> transpose_40 = transpose(perm = transpose_40_perm_0, x = var_101_cast_fp16)[name = string("transpose_55")];
|
| 139 |
+
tensor<fp16, [8, 1, 8, 188, 128]> var_423_cast_fp16 = stack(axis = var_423_axis_0, values = (transpose_40, transpose_41, transpose_42, transpose_43, transpose_44, transpose_45, transpose_46, transpose_47))[name = string("op_423_cast_fp16")];
|
| 140 |
+
string var_423_cast_fp16_to_fp32_dtype_0 = const()[name = string("op_423_cast_fp16_to_fp32_dtype_0"), val = string("fp32")];
|
| 141 |
+
tensor<fp32, [8, 1, 8, 188, 128]> enc_v = cast(dtype = var_423_cast_fp16_to_fp32_dtype_0, x = var_423_cast_fp16)[name = string("cast_32")];
|
| 142 |
+
tensor<fp32, [8, 1, 8, 188, 128]> enc_k = cast(dtype = var_420_cast_fp16_to_fp32_dtype_0, x = var_420_cast_fp16)[name = string("cast_33")];
|
| 143 |
+
} -> (enc_k, enc_v);
|
| 144 |
+
}
|
canary_cross_kv.mlmodelc/weights/weight.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:02bf8060427056b229b8406434f4ffd00748a7ecf4c22b463ddb87f33de510d2
|
| 3 |
+
size 33589312
|
canary_decoder_kv.mlmodelc/analytics/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d986857aada35955d23c8451f035387b7aadcf7d1ef59b6fa40d4e042650457b
|
| 3 |
+
size 243
|
canary_decoder_kv.mlmodelc/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0d6b71c6182ec837f211caed7fa42ae60faf82cd30e55312fa48ef6fef24b141
|
| 3 |
+
size 957
|
canary_decoder_kv.mlmodelc/metadata.json
ADDED
|
@@ -0,0 +1,265 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"metadataOutputVersion" : "3.0",
|
| 4 |
+
"shortDescription" : "Canary-1b-v2 KV-cache transformer decoder step (8L, iOS18 stateful, single token)",
|
| 5 |
+
"outputSchema" : [
|
| 6 |
+
{
|
| 7 |
+
"hasShapeFlexibility" : "0",
|
| 8 |
+
"isOptional" : "0",
|
| 9 |
+
"dataType" : "Float32",
|
| 10 |
+
"formattedType" : "MultiArray (Float32 1 × 1 × 16384)",
|
| 11 |
+
"shortDescription" : "",
|
| 12 |
+
"shape" : "[1, 1, 16384]",
|
| 13 |
+
"name" : "log_probs",
|
| 14 |
+
"type" : "MultiArray"
|
| 15 |
+
}
|
| 16 |
+
],
|
| 17 |
+
"storagePrecision" : "Float16",
|
| 18 |
+
"modelParameters" : [
|
| 19 |
+
|
| 20 |
+
],
|
| 21 |
+
"specificationVersion" : 9,
|
| 22 |
+
"mlProgramOperationTypeHistogram" : {
|
| 23 |
+
"Ios18.expandDims" : 1,
|
| 24 |
+
"Ios18.softmax" : 17,
|
| 25 |
+
"Ios18.mul" : 56,
|
| 26 |
+
"Ios18.matmul" : 32,
|
| 27 |
+
"Ios18.equal" : 1,
|
| 28 |
+
"Ios18.greaterEqual" : 1,
|
| 29 |
+
"Select" : 1,
|
| 30 |
+
"Ios18.readState" : 16,
|
| 31 |
+
"Ios18.gather" : 2,
|
| 32 |
+
"Ios18.add" : 50,
|
| 33 |
+
"Ios18.layerNorm" : 26,
|
| 34 |
+
"Ios18.sliceUpdate" : 16,
|
| 35 |
+
"Ios18.writeState" : 16,
|
| 36 |
+
"Ios18.reshape" : 49,
|
| 37 |
+
"Ios18.linear" : 65,
|
| 38 |
+
"Ios18.relu" : 8,
|
| 39 |
+
"Ios18.cast" : 10,
|
| 40 |
+
"Ios18.sub" : 1,
|
| 41 |
+
"Ios18.transpose" : 48,
|
| 42 |
+
"Ios18.log" : 1,
|
| 43 |
+
"Ios18.sliceByIndex" : 16
|
| 44 |
+
},
|
| 45 |
+
"computePrecision" : "Mixed (Float16, Float32, Int16, Int32, UInt16)",
|
| 46 |
+
"isUpdatable" : "0",
|
| 47 |
+
"stateSchema" : [
|
| 48 |
+
{
|
| 49 |
+
"dataType" : "Float16",
|
| 50 |
+
"isOptional" : "0",
|
| 51 |
+
"formattedType" : "State (Float16 1 × 8 × 238 × 128)",
|
| 52 |
+
"shortDescription" : "",
|
| 53 |
+
"shape" : "[1, 8, 238, 128]",
|
| 54 |
+
"name" : "k_0",
|
| 55 |
+
"type" : "State"
|
| 56 |
+
},
|
| 57 |
+
{
|
| 58 |
+
"dataType" : "Float16",
|
| 59 |
+
"isOptional" : "0",
|
| 60 |
+
"formattedType" : "State (Float16 1 × 8 × 238 × 128)",
|
| 61 |
+
"shortDescription" : "",
|
| 62 |
+
"shape" : "[1, 8, 238, 128]",
|
| 63 |
+
"name" : "k_1",
|
| 64 |
+
"type" : "State"
|
| 65 |
+
},
|
| 66 |
+
{
|
| 67 |
+
"dataType" : "Float16",
|
| 68 |
+
"isOptional" : "0",
|
| 69 |
+
"formattedType" : "State (Float16 1 × 8 × 238 × 128)",
|
| 70 |
+
"shortDescription" : "",
|
| 71 |
+
"shape" : "[1, 8, 238, 128]",
|
| 72 |
+
"name" : "k_2",
|
| 73 |
+
"type" : "State"
|
| 74 |
+
},
|
| 75 |
+
{
|
| 76 |
+
"dataType" : "Float16",
|
| 77 |
+
"isOptional" : "0",
|
| 78 |
+
"formattedType" : "State (Float16 1 × 8 × 238 × 128)",
|
| 79 |
+
"shortDescription" : "",
|
| 80 |
+
"shape" : "[1, 8, 238, 128]",
|
| 81 |
+
"name" : "k_3",
|
| 82 |
+
"type" : "State"
|
| 83 |
+
},
|
| 84 |
+
{
|
| 85 |
+
"dataType" : "Float16",
|
| 86 |
+
"isOptional" : "0",
|
| 87 |
+
"formattedType" : "State (Float16 1 × 8 × 238 × 128)",
|
| 88 |
+
"shortDescription" : "",
|
| 89 |
+
"shape" : "[1, 8, 238, 128]",
|
| 90 |
+
"name" : "k_4",
|
| 91 |
+
"type" : "State"
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"dataType" : "Float16",
|
| 95 |
+
"isOptional" : "0",
|
| 96 |
+
"formattedType" : "State (Float16 1 × 8 × 238 × 128)",
|
| 97 |
+
"shortDescription" : "",
|
| 98 |
+
"shape" : "[1, 8, 238, 128]",
|
| 99 |
+
"name" : "k_5",
|
| 100 |
+
"type" : "State"
|
| 101 |
+
},
|
| 102 |
+
{
|
| 103 |
+
"dataType" : "Float16",
|
| 104 |
+
"isOptional" : "0",
|
| 105 |
+
"formattedType" : "State (Float16 1 × 8 × 238 × 128)",
|
| 106 |
+
"shortDescription" : "",
|
| 107 |
+
"shape" : "[1, 8, 238, 128]",
|
| 108 |
+
"name" : "k_6",
|
| 109 |
+
"type" : "State"
|
| 110 |
+
},
|
| 111 |
+
{
|
| 112 |
+
"dataType" : "Float16",
|
| 113 |
+
"isOptional" : "0",
|
| 114 |
+
"formattedType" : "State (Float16 1 × 8 × 238 × 128)",
|
| 115 |
+
"shortDescription" : "",
|
| 116 |
+
"shape" : "[1, 8, 238, 128]",
|
| 117 |
+
"name" : "k_7",
|
| 118 |
+
"type" : "State"
|
| 119 |
+
},
|
| 120 |
+
{
|
| 121 |
+
"dataType" : "Float16",
|
| 122 |
+
"isOptional" : "0",
|
| 123 |
+
"formattedType" : "State (Float16 1 × 8 × 238 × 128)",
|
| 124 |
+
"shortDescription" : "",
|
| 125 |
+
"shape" : "[1, 8, 238, 128]",
|
| 126 |
+
"name" : "v_0",
|
| 127 |
+
"type" : "State"
|
| 128 |
+
},
|
| 129 |
+
{
|
| 130 |
+
"dataType" : "Float16",
|
| 131 |
+
"isOptional" : "0",
|
| 132 |
+
"formattedType" : "State (Float16 1 × 8 × 238 × 128)",
|
| 133 |
+
"shortDescription" : "",
|
| 134 |
+
"shape" : "[1, 8, 238, 128]",
|
| 135 |
+
"name" : "v_1",
|
| 136 |
+
"type" : "State"
|
| 137 |
+
},
|
| 138 |
+
{
|
| 139 |
+
"dataType" : "Float16",
|
| 140 |
+
"isOptional" : "0",
|
| 141 |
+
"formattedType" : "State (Float16 1 × 8 × 238 × 128)",
|
| 142 |
+
"shortDescription" : "",
|
| 143 |
+
"shape" : "[1, 8, 238, 128]",
|
| 144 |
+
"name" : "v_2",
|
| 145 |
+
"type" : "State"
|
| 146 |
+
},
|
| 147 |
+
{
|
| 148 |
+
"dataType" : "Float16",
|
| 149 |
+
"isOptional" : "0",
|
| 150 |
+
"formattedType" : "State (Float16 1 × 8 × 238 × 128)",
|
| 151 |
+
"shortDescription" : "",
|
| 152 |
+
"shape" : "[1, 8, 238, 128]",
|
| 153 |
+
"name" : "v_3",
|
| 154 |
+
"type" : "State"
|
| 155 |
+
},
|
| 156 |
+
{
|
| 157 |
+
"dataType" : "Float16",
|
| 158 |
+
"isOptional" : "0",
|
| 159 |
+
"formattedType" : "State (Float16 1 × 8 × 238 × 128)",
|
| 160 |
+
"shortDescription" : "",
|
| 161 |
+
"shape" : "[1, 8, 238, 128]",
|
| 162 |
+
"name" : "v_4",
|
| 163 |
+
"type" : "State"
|
| 164 |
+
},
|
| 165 |
+
{
|
| 166 |
+
"dataType" : "Float16",
|
| 167 |
+
"isOptional" : "0",
|
| 168 |
+
"formattedType" : "State (Float16 1 × 8 × 238 × 128)",
|
| 169 |
+
"shortDescription" : "",
|
| 170 |
+
"shape" : "[1, 8, 238, 128]",
|
| 171 |
+
"name" : "v_5",
|
| 172 |
+
"type" : "State"
|
| 173 |
+
},
|
| 174 |
+
{
|
| 175 |
+
"dataType" : "Float16",
|
| 176 |
+
"isOptional" : "0",
|
| 177 |
+
"formattedType" : "State (Float16 1 × 8 × 238 × 128)",
|
| 178 |
+
"shortDescription" : "",
|
| 179 |
+
"shape" : "[1, 8, 238, 128]",
|
| 180 |
+
"name" : "v_6",
|
| 181 |
+
"type" : "State"
|
| 182 |
+
},
|
| 183 |
+
{
|
| 184 |
+
"dataType" : "Float16",
|
| 185 |
+
"isOptional" : "0",
|
| 186 |
+
"formattedType" : "State (Float16 1 × 8 × 238 × 128)",
|
| 187 |
+
"shortDescription" : "",
|
| 188 |
+
"shape" : "[1, 8, 238, 128]",
|
| 189 |
+
"name" : "v_7",
|
| 190 |
+
"type" : "State"
|
| 191 |
+
}
|
| 192 |
+
],
|
| 193 |
+
"availability" : {
|
| 194 |
+
"macOS" : "15.0",
|
| 195 |
+
"tvOS" : "18.0",
|
| 196 |
+
"visionOS" : "2.0",
|
| 197 |
+
"watchOS" : "11.0",
|
| 198 |
+
"iOS" : "18.0",
|
| 199 |
+
"macCatalyst" : "18.0"
|
| 200 |
+
},
|
| 201 |
+
"modelType" : {
|
| 202 |
+
"name" : "MLModelType_mlProgram"
|
| 203 |
+
},
|
| 204 |
+
"inputSchema" : [
|
| 205 |
+
{
|
| 206 |
+
"hasShapeFlexibility" : "0",
|
| 207 |
+
"isOptional" : "0",
|
| 208 |
+
"dataType" : "Int32",
|
| 209 |
+
"formattedType" : "MultiArray (Int32 1 × 1)",
|
| 210 |
+
"shortDescription" : "",
|
| 211 |
+
"shape" : "[1, 1]",
|
| 212 |
+
"name" : "token",
|
| 213 |
+
"type" : "MultiArray"
|
| 214 |
+
},
|
| 215 |
+
{
|
| 216 |
+
"hasShapeFlexibility" : "0",
|
| 217 |
+
"isOptional" : "0",
|
| 218 |
+
"dataType" : "Int32",
|
| 219 |
+
"formattedType" : "MultiArray (Int32 1)",
|
| 220 |
+
"shortDescription" : "",
|
| 221 |
+
"shape" : "[1]",
|
| 222 |
+
"name" : "pos",
|
| 223 |
+
"type" : "MultiArray"
|
| 224 |
+
},
|
| 225 |
+
{
|
| 226 |
+
"hasShapeFlexibility" : "0",
|
| 227 |
+
"isOptional" : "0",
|
| 228 |
+
"dataType" : "Float32",
|
| 229 |
+
"formattedType" : "MultiArray (Float32 8 × 1 × 8 × 188 × 128)",
|
| 230 |
+
"shortDescription" : "",
|
| 231 |
+
"shape" : "[8, 1, 8, 188, 128]",
|
| 232 |
+
"name" : "enc_k",
|
| 233 |
+
"type" : "MultiArray"
|
| 234 |
+
},
|
| 235 |
+
{
|
| 236 |
+
"hasShapeFlexibility" : "0",
|
| 237 |
+
"isOptional" : "0",
|
| 238 |
+
"dataType" : "Float32",
|
| 239 |
+
"formattedType" : "MultiArray (Float32 8 × 1 × 8 × 188 × 128)",
|
| 240 |
+
"shortDescription" : "",
|
| 241 |
+
"shape" : "[8, 1, 8, 188, 128]",
|
| 242 |
+
"name" : "enc_v",
|
| 243 |
+
"type" : "MultiArray"
|
| 244 |
+
},
|
| 245 |
+
{
|
| 246 |
+
"hasShapeFlexibility" : "0",
|
| 247 |
+
"isOptional" : "0",
|
| 248 |
+
"dataType" : "Float32",
|
| 249 |
+
"formattedType" : "MultiArray (Float32 1 × 1 × 1 × 238)",
|
| 250 |
+
"shortDescription" : "",
|
| 251 |
+
"shape" : "[1, 1, 1, 238]",
|
| 252 |
+
"name" : "self_mask",
|
| 253 |
+
"type" : "MultiArray"
|
| 254 |
+
}
|
| 255 |
+
],
|
| 256 |
+
"userDefinedMetadata" : {
|
| 257 |
+
"com.github.apple.coremltools.conversion_date" : "2026-07-01",
|
| 258 |
+
"com.github.apple.coremltools.source" : "torch==2.7.0",
|
| 259 |
+
"com.github.apple.coremltools.version" : "9.0b1",
|
| 260 |
+
"com.github.apple.coremltools.source_dialect" : "TorchScript"
|
| 261 |
+
},
|
| 262 |
+
"generatedClassName" : "canary_decoder_kv",
|
| 263 |
+
"method" : "predict"
|
| 264 |
+
}
|
| 265 |
+
]
|
canary_decoder_kv.mlmodelc/model.mil
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
canary_decoder_kv.mlmodelc/weights/weight.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b1e1ca6a08e0ba5c8bae40847faf728fe77920245a163fe30a52cdd9f9f7dd02
|
| 3 |
+
size 270864448
|
canary_encoder.mlmodelc/analytics/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dbfd16062a736f344edce2c16c2fcb84e9a55ce5979fb1d26192c8846a902b24
|
| 3 |
+
size 243
|
canary_encoder.mlmodelc/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4d912b07f00d4fd24bd9b577faa8692c2075a65e560bfebcc649d68b691f5151
|
| 3 |
+
size 488
|
canary_encoder.mlmodelc/metadata.json
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"metadataOutputVersion" : "3.0",
|
| 4 |
+
"shortDescription" : "Canary-1b-v2 FastConformer encoder (32L, d=1024, ss=8)",
|
| 5 |
+
"outputSchema" : [
|
| 6 |
+
{
|
| 7 |
+
"hasShapeFlexibility" : "0",
|
| 8 |
+
"isOptional" : "0",
|
| 9 |
+
"dataType" : "Float32",
|
| 10 |
+
"formattedType" : "MultiArray (Float32 1 × 188 × 1024)",
|
| 11 |
+
"shortDescription" : "",
|
| 12 |
+
"shape" : "[1, 188, 1024]",
|
| 13 |
+
"name" : "enc_states",
|
| 14 |
+
"type" : "MultiArray"
|
| 15 |
+
},
|
| 16 |
+
{
|
| 17 |
+
"hasShapeFlexibility" : "0",
|
| 18 |
+
"isOptional" : "0",
|
| 19 |
+
"dataType" : "Int32",
|
| 20 |
+
"formattedType" : "MultiArray (Int32 1)",
|
| 21 |
+
"shortDescription" : "",
|
| 22 |
+
"shape" : "[1]",
|
| 23 |
+
"name" : "encoder_length",
|
| 24 |
+
"type" : "MultiArray"
|
| 25 |
+
}
|
| 26 |
+
],
|
| 27 |
+
"storagePrecision" : "Float16",
|
| 28 |
+
"modelParameters" : [
|
| 29 |
+
|
| 30 |
+
],
|
| 31 |
+
"specificationVersion" : 8,
|
| 32 |
+
"mlProgramOperationTypeHistogram" : {
|
| 33 |
+
"Ios17.floor" : 3,
|
| 34 |
+
"Ios17.logicalAnd" : 2,
|
| 35 |
+
"Ios17.reshape" : 193,
|
| 36 |
+
"Ios16.softmax" : 32,
|
| 37 |
+
"Ios17.matmul" : 96,
|
| 38 |
+
"Ios17.transpose" : 227,
|
| 39 |
+
"Split" : 32,
|
| 40 |
+
"Select" : 96,
|
| 41 |
+
"Ios17.expandDims" : 5,
|
| 42 |
+
"Ios17.add" : 230,
|
| 43 |
+
"Tile" : 1,
|
| 44 |
+
"Ios17.sliceByIndex" : 64,
|
| 45 |
+
"Ios16.sigmoid" : 32,
|
| 46 |
+
"Pad" : 64,
|
| 47 |
+
"Ios17.logicalNot" : 2,
|
| 48 |
+
"Ios17.layerNorm" : 160,
|
| 49 |
+
"Ios16.silu" : 96,
|
| 50 |
+
"Ios17.less" : 1,
|
| 51 |
+
"Ios17.conv" : 101,
|
| 52 |
+
"Ios16.relu" : 3,
|
| 53 |
+
"Ios17.cast" : 4,
|
| 54 |
+
"Ios17.linear" : 257,
|
| 55 |
+
"Ios17.mul" : 131
|
| 56 |
+
},
|
| 57 |
+
"computePrecision" : "Mixed (Float16, Float32, Int32)",
|
| 58 |
+
"isUpdatable" : "0",
|
| 59 |
+
"stateSchema" : [
|
| 60 |
+
|
| 61 |
+
],
|
| 62 |
+
"availability" : {
|
| 63 |
+
"macOS" : "14.0",
|
| 64 |
+
"tvOS" : "17.0",
|
| 65 |
+
"visionOS" : "1.0",
|
| 66 |
+
"watchOS" : "10.0",
|
| 67 |
+
"iOS" : "17.0",
|
| 68 |
+
"macCatalyst" : "17.0"
|
| 69 |
+
},
|
| 70 |
+
"modelType" : {
|
| 71 |
+
"name" : "MLModelType_mlProgram"
|
| 72 |
+
},
|
| 73 |
+
"inputSchema" : [
|
| 74 |
+
{
|
| 75 |
+
"hasShapeFlexibility" : "0",
|
| 76 |
+
"isOptional" : "0",
|
| 77 |
+
"dataType" : "Float32",
|
| 78 |
+
"formattedType" : "MultiArray (Float32 1 × 128 × 1501)",
|
| 79 |
+
"shortDescription" : "",
|
| 80 |
+
"shape" : "[1, 128, 1501]",
|
| 81 |
+
"name" : "mel",
|
| 82 |
+
"type" : "MultiArray"
|
| 83 |
+
},
|
| 84 |
+
{
|
| 85 |
+
"hasShapeFlexibility" : "0",
|
| 86 |
+
"isOptional" : "0",
|
| 87 |
+
"dataType" : "Int32",
|
| 88 |
+
"formattedType" : "MultiArray (Int32 1)",
|
| 89 |
+
"shortDescription" : "",
|
| 90 |
+
"shape" : "[1]",
|
| 91 |
+
"name" : "mel_length",
|
| 92 |
+
"type" : "MultiArray"
|
| 93 |
+
}
|
| 94 |
+
],
|
| 95 |
+
"userDefinedMetadata" : {
|
| 96 |
+
"com.github.apple.coremltools.conversion_date" : "2026-06-25",
|
| 97 |
+
"com.github.apple.coremltools.source" : "torch==2.7.0",
|
| 98 |
+
"com.github.apple.coremltools.version" : "9.0b1",
|
| 99 |
+
"com.github.apple.coremltools.source_dialect" : "TorchScript"
|
| 100 |
+
},
|
| 101 |
+
"generatedClassName" : "canary_encoder",
|
| 102 |
+
"method" : "predict"
|
| 103 |
+
}
|
| 104 |
+
]
|
canary_encoder.mlmodelc/model.mil
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
canary_encoder.mlmodelc/weights/weight.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a23ab46649b973c30598b5340f4740101dea8ec6aabfe7f3b336ad3e4c5d71c8
|
| 3 |
+
size 1579377472
|
canary_preprocessor.mlmodelc/analytics/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cc0282e7ce8491ed76924c26495686079d3affc0f6eeb6ed55fdf713fa3aacb4
|
| 3 |
+
size 243
|
canary_preprocessor.mlmodelc/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1edcc2319f81e09463ca63578d405a1642f70858ff1e010b65bb14ce6205a720
|
| 3 |
+
size 485
|
canary_preprocessor.mlmodelc/metadata.json
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"metadataOutputVersion" : "3.0",
|
| 4 |
+
"shortDescription" : "Canary-1b-v2 mel preprocessor (15s window, 128 mels)",
|
| 5 |
+
"outputSchema" : [
|
| 6 |
+
{
|
| 7 |
+
"hasShapeFlexibility" : "0",
|
| 8 |
+
"isOptional" : "0",
|
| 9 |
+
"dataType" : "Float32",
|
| 10 |
+
"formattedType" : "MultiArray (Float32 1 × 128 × 1501)",
|
| 11 |
+
"shortDescription" : "",
|
| 12 |
+
"shape" : "[1, 128, 1501]",
|
| 13 |
+
"name" : "mel",
|
| 14 |
+
"type" : "MultiArray"
|
| 15 |
+
},
|
| 16 |
+
{
|
| 17 |
+
"hasShapeFlexibility" : "0",
|
| 18 |
+
"isOptional" : "0",
|
| 19 |
+
"dataType" : "Int32",
|
| 20 |
+
"formattedType" : "MultiArray (Int32 1)",
|
| 21 |
+
"shortDescription" : "",
|
| 22 |
+
"shape" : "[1]",
|
| 23 |
+
"name" : "mel_length",
|
| 24 |
+
"type" : "MultiArray"
|
| 25 |
+
}
|
| 26 |
+
],
|
| 27 |
+
"storagePrecision" : "Mixed (Float32, Int32)",
|
| 28 |
+
"modelParameters" : [
|
| 29 |
+
|
| 30 |
+
],
|
| 31 |
+
"specificationVersion" : 9,
|
| 32 |
+
"mlProgramOperationTypeHistogram" : {
|
| 33 |
+
"Ios18.expandDims" : 8,
|
| 34 |
+
"Ios18.mul" : 1,
|
| 35 |
+
"Ios18.floorDiv" : 1,
|
| 36 |
+
"Ios18.matmul" : 1,
|
| 37 |
+
"Identity" : 1,
|
| 38 |
+
"Ios18.realDiv" : 3,
|
| 39 |
+
"Ios18.greaterEqual" : 1,
|
| 40 |
+
"Select" : 3,
|
| 41 |
+
"Tile" : 1,
|
| 42 |
+
"Ios18.add" : 4,
|
| 43 |
+
"Ios16.reduceSum" : 4,
|
| 44 |
+
"Ios18.reshape" : 2,
|
| 45 |
+
"Pad" : 1,
|
| 46 |
+
"Ios18.conv" : 2,
|
| 47 |
+
"Ios18.concat" : 1,
|
| 48 |
+
"Ios18.log" : 1,
|
| 49 |
+
"Ios18.sub" : 4,
|
| 50 |
+
"Ios18.cast" : 3,
|
| 51 |
+
"Stack" : 1,
|
| 52 |
+
"Ios18.pow" : 2,
|
| 53 |
+
"Ios18.less" : 1,
|
| 54 |
+
"Ios18.sqrt" : 1,
|
| 55 |
+
"Ios18.sliceByIndex" : 3
|
| 56 |
+
},
|
| 57 |
+
"computePrecision" : "Mixed (Float32, Int32)",
|
| 58 |
+
"isUpdatable" : "0",
|
| 59 |
+
"stateSchema" : [
|
| 60 |
+
|
| 61 |
+
],
|
| 62 |
+
"availability" : {
|
| 63 |
+
"macOS" : "15.0",
|
| 64 |
+
"tvOS" : "18.0",
|
| 65 |
+
"visionOS" : "2.0",
|
| 66 |
+
"watchOS" : "11.0",
|
| 67 |
+
"iOS" : "18.0",
|
| 68 |
+
"macCatalyst" : "18.0"
|
| 69 |
+
},
|
| 70 |
+
"modelType" : {
|
| 71 |
+
"name" : "MLModelType_mlProgram"
|
| 72 |
+
},
|
| 73 |
+
"inputSchema" : [
|
| 74 |
+
{
|
| 75 |
+
"hasShapeFlexibility" : "0",
|
| 76 |
+
"isOptional" : "0",
|
| 77 |
+
"dataType" : "Float32",
|
| 78 |
+
"formattedType" : "MultiArray (Float32 1 × 240000)",
|
| 79 |
+
"shortDescription" : "",
|
| 80 |
+
"shape" : "[1, 240000]",
|
| 81 |
+
"name" : "audio_signal",
|
| 82 |
+
"type" : "MultiArray"
|
| 83 |
+
},
|
| 84 |
+
{
|
| 85 |
+
"hasShapeFlexibility" : "0",
|
| 86 |
+
"isOptional" : "0",
|
| 87 |
+
"dataType" : "Int32",
|
| 88 |
+
"formattedType" : "MultiArray (Int32 1)",
|
| 89 |
+
"shortDescription" : "",
|
| 90 |
+
"shape" : "[1]",
|
| 91 |
+
"name" : "audio_length",
|
| 92 |
+
"type" : "MultiArray"
|
| 93 |
+
}
|
| 94 |
+
],
|
| 95 |
+
"userDefinedMetadata" : {
|
| 96 |
+
"com.github.apple.coremltools.conversion_date" : "2026-06-25",
|
| 97 |
+
"com.github.apple.coremltools.source" : "torch==2.7.0",
|
| 98 |
+
"com.github.apple.coremltools.version" : "9.0b1",
|
| 99 |
+
"com.github.apple.coremltools.source_dialect" : "TorchScript"
|
| 100 |
+
},
|
| 101 |
+
"generatedClassName" : "canary_preprocessor",
|
| 102 |
+
"method" : "predict"
|
| 103 |
+
}
|
| 104 |
+
]
|
canary_preprocessor.mlmodelc/model.mil
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
program(1.3)
|
| 2 |
+
[buildInfo = dict<string, string>({{"coremlc-component-MIL", "3600.16.1"}, {"coremlc-version", "3600.22.1"}, {"coremltools-component-torch", "2.7.0"}, {"coremltools-source-dialect", "TorchScript"}, {"coremltools-version", "9.0b1"}})]
|
| 3 |
+
{
|
| 4 |
+
func main<ios18>(tensor<int32, [1]> audio_length, tensor<fp32, [1, 240000]> audio_signal) {
|
| 5 |
+
int32 var_9 = const()[name = string("op_9"), val = int32(1)];
|
| 6 |
+
int32 var_10 = const()[name = string("op_10"), val = int32(160)];
|
| 7 |
+
fp32 var_24 = const()[name = string("op_24"), val = fp32(0x0p+0)];
|
| 8 |
+
fp32 var_25 = const()[name = string("op_25"), val = fp32(0x1.4f8b58p-17)];
|
| 9 |
+
int32 var_34 = const()[name = string("op_34"), val = int32(512)];
|
| 10 |
+
tensor<int32, [1]> var_35 = add(x = audio_length, y = var_34)[name = string("op_35")];
|
| 11 |
+
int32 var_36 = const()[name = string("op_36"), val = int32(512)];
|
| 12 |
+
tensor<int32, [1]> var_37 = sub(x = var_35, y = var_36)[name = string("op_37")];
|
| 13 |
+
tensor<int32, [1]> floor_div_0 = floor_div(x = var_37, y = var_10)[name = string("floor_div_0")];
|
| 14 |
+
string var_38_dtype_0 = const()[name = string("op_38_dtype_0"), val = string("fp32")];
|
| 15 |
+
fp32 var_39_promoted = const()[name = string("op_39_promoted"), val = fp32(0x1p+0)];
|
| 16 |
+
tensor<fp32, [1]> var_38 = cast(dtype = var_38_dtype_0, x = floor_div_0)[name = string("cast_12")];
|
| 17 |
+
tensor<fp32, [1]> seq_len_1 = add(x = var_38, y = var_39_promoted)[name = string("seq_len_1")];
|
| 18 |
+
string seq_len_dtype_0 = const()[name = string("seq_len_dtype_0"), val = string("int32")];
|
| 19 |
+
tensor<int32, [2]> var_43_begin_0 = const()[name = string("op_43_begin_0"), val = tensor<int32, [2]>([0, 0])];
|
| 20 |
+
tensor<int32, [2]> var_43_end_0 = const()[name = string("op_43_end_0"), val = tensor<int32, [2]>([1, 1])];
|
| 21 |
+
tensor<bool, [2]> var_43_end_mask_0 = const()[name = string("op_43_end_mask_0"), val = tensor<bool, [2]>([true, false])];
|
| 22 |
+
tensor<bool, [2]> var_43_squeeze_mask_0 = const()[name = string("op_43_squeeze_mask_0"), val = tensor<bool, [2]>([false, true])];
|
| 23 |
+
tensor<fp32, [1]> var_43 = slice_by_index(begin = var_43_begin_0, end = var_43_end_0, end_mask = var_43_end_mask_0, squeeze_mask = var_43_squeeze_mask_0, x = audio_signal)[name = string("op_43")];
|
| 24 |
+
tensor<int32, [1]> var_44_axes_0 = const()[name = string("op_44_axes_0"), val = tensor<int32, [1]>([1])];
|
| 25 |
+
tensor<fp32, [1, 1]> var_44 = expand_dims(axes = var_44_axes_0, x = var_43)[name = string("op_44")];
|
| 26 |
+
tensor<int32, [2]> var_46_begin_0 = const()[name = string("op_46_begin_0"), val = tensor<int32, [2]>([0, 1])];
|
| 27 |
+
tensor<int32, [2]> var_46_end_0 = const()[name = string("op_46_end_0"), val = tensor<int32, [2]>([1, 240000])];
|
| 28 |
+
tensor<bool, [2]> var_46_end_mask_0 = const()[name = string("op_46_end_mask_0"), val = tensor<bool, [2]>([true, true])];
|
| 29 |
+
tensor<fp32, [1, 239999]> var_46 = slice_by_index(begin = var_46_begin_0, end = var_46_end_0, end_mask = var_46_end_mask_0, x = audio_signal)[name = string("op_46")];
|
| 30 |
+
tensor<int32, [2]> var_48_begin_0 = const()[name = string("op_48_begin_0"), val = tensor<int32, [2]>([0, 0])];
|
| 31 |
+
tensor<int32, [2]> var_48_end_0 = const()[name = string("op_48_end_0"), val = tensor<int32, [2]>([1, 239999])];
|
| 32 |
+
tensor<bool, [2]> var_48_end_mask_0 = const()[name = string("op_48_end_mask_0"), val = tensor<bool, [2]>([true, false])];
|
| 33 |
+
tensor<fp32, [1, 239999]> var_48 = slice_by_index(begin = var_48_begin_0, end = var_48_end_0, end_mask = var_48_end_mask_0, x = audio_signal)[name = string("op_48")];
|
| 34 |
+
fp32 var_49 = const()[name = string("op_49"), val = fp32(0x1.f0a3d8p-1)];
|
| 35 |
+
tensor<fp32, [1, 239999]> var_50 = mul(x = var_48, y = var_49)[name = string("op_50")];
|
| 36 |
+
tensor<fp32, [1, 239999]> var_51 = sub(x = var_46, y = var_50)[name = string("op_51")];
|
| 37 |
+
bool input_1_interleave_0 = const()[name = string("input_1_interleave_0"), val = bool(false)];
|
| 38 |
+
tensor<fp32, [1, 240000]> input_1 = concat(axis = var_9, interleave = input_1_interleave_0, values = (var_44, var_51))[name = string("input_1")];
|
| 39 |
+
tensor<int32, [3]> var_57 = const()[name = string("op_57"), val = tensor<int32, [3]>([1, 1, 240000])];
|
| 40 |
+
tensor<fp32, [1, 1, 240000]> input_3 = reshape(shape = var_57, x = input_1)[name = string("input_3")];
|
| 41 |
+
fp32 const_3 = const()[name = string("const_3"), val = fp32(0x0p+0)];
|
| 42 |
+
tensor<int32, [6]> input_5_pad_0 = const()[name = string("input_5_pad_0"), val = tensor<int32, [6]>([0, 0, 0, 0, 256, 256])];
|
| 43 |
+
string input_5_mode_0 = const()[name = string("input_5_mode_0"), val = string("reflect")];
|
| 44 |
+
tensor<fp32, [1, 1, 240512]> input_5 = pad(constant_val = const_3, mode = input_5_mode_0, pad = input_5_pad_0, x = input_3)[name = string("input_5")];
|
| 45 |
+
tensor<int32, [2]> var_63 = const()[name = string("op_63"), val = tensor<int32, [2]>([1, 240512])];
|
| 46 |
+
tensor<fp32, [1, 240512]> input = reshape(shape = var_63, x = input_5)[name = string("input")];
|
| 47 |
+
tensor<fp32, [257, 1, 512]> expand_dims_3 = const()[name = string("expand_dims_3"), val = tensor<fp32, [257, 1, 512]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(64)))];
|
| 48 |
+
tensor<fp32, [257, 1, 512]> expand_dims_4 = const()[name = string("expand_dims_4"), val = tensor<fp32, [257, 1, 512]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(526464)))];
|
| 49 |
+
tensor<int32, [1]> expand_dims_5 = const()[name = string("expand_dims_5"), val = tensor<int32, [1]>([160])];
|
| 50 |
+
tensor<int32, [1]> expand_dims_6_axes_0 = const()[name = string("expand_dims_6_axes_0"), val = tensor<int32, [1]>([1])];
|
| 51 |
+
tensor<fp32, [1, 1, 240512]> expand_dims_6 = expand_dims(axes = expand_dims_6_axes_0, x = input)[name = string("expand_dims_6")];
|
| 52 |
+
string conv_0_pad_type_0 = const()[name = string("conv_0_pad_type_0"), val = string("valid")];
|
| 53 |
+
tensor<int32, [2]> conv_0_pad_0 = const()[name = string("conv_0_pad_0"), val = tensor<int32, [2]>([0, 0])];
|
| 54 |
+
tensor<int32, [1]> conv_0_dilations_0 = const()[name = string("conv_0_dilations_0"), val = tensor<int32, [1]>([1])];
|
| 55 |
+
int32 conv_0_groups_0 = const()[name = string("conv_0_groups_0"), val = int32(1)];
|
| 56 |
+
tensor<fp32, [1, 257, 1501]> conv_0 = conv(dilations = conv_0_dilations_0, groups = conv_0_groups_0, pad = conv_0_pad_0, pad_type = conv_0_pad_type_0, strides = expand_dims_5, weight = expand_dims_3, x = expand_dims_6)[name = string("conv_0")];
|
| 57 |
+
string conv_1_pad_type_0 = const()[name = string("conv_1_pad_type_0"), val = string("valid")];
|
| 58 |
+
tensor<int32, [2]> conv_1_pad_0 = const()[name = string("conv_1_pad_0"), val = tensor<int32, [2]>([0, 0])];
|
| 59 |
+
tensor<int32, [1]> conv_1_dilations_0 = const()[name = string("conv_1_dilations_0"), val = tensor<int32, [1]>([1])];
|
| 60 |
+
int32 conv_1_groups_0 = const()[name = string("conv_1_groups_0"), val = int32(1)];
|
| 61 |
+
tensor<fp32, [1, 257, 1501]> conv_1 = conv(dilations = conv_1_dilations_0, groups = conv_1_groups_0, pad = conv_1_pad_0, pad_type = conv_1_pad_type_0, strides = expand_dims_5, weight = expand_dims_4, x = expand_dims_6)[name = string("conv_1")];
|
| 62 |
+
int32 stack_0_axis_0 = const()[name = string("stack_0_axis_0"), val = int32(-1)];
|
| 63 |
+
tensor<fp32, [1, 257, 1501, 2]> stack_0 = stack(axis = stack_0_axis_0, values = (conv_0, conv_1))[name = string("stack_0")];
|
| 64 |
+
fp32 var_17_promoted = const()[name = string("op_17_promoted"), val = fp32(0x1p+1)];
|
| 65 |
+
tensor<fp32, [1, 257, 1501, 2]> var_67 = pow(x = stack_0, y = var_17_promoted)[name = string("op_67")];
|
| 66 |
+
tensor<int32, [1]> var_69_axes_0 = const()[name = string("op_69_axes_0"), val = tensor<int32, [1]>([-1])];
|
| 67 |
+
bool var_69_keep_dims_0 = const()[name = string("op_69_keep_dims_0"), val = bool(false)];
|
| 68 |
+
tensor<fp32, [1, 257, 1501]> var_69 = reduce_sum(axes = var_69_axes_0, keep_dims = var_69_keep_dims_0, x = var_67)[name = string("op_69")];
|
| 69 |
+
tensor<fp32, [1, 257, 1501]> x_9 = identity(x = var_69)[name = string("x_9")];
|
| 70 |
+
tensor<fp32, [1, 128, 257]> const_6 = const()[name = string("const_6"), val = tensor<fp32, [1, 128, 257]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(1052864)))];
|
| 71 |
+
bool x_11_transpose_x_0 = const()[name = string("x_11_transpose_x_0"), val = bool(false)];
|
| 72 |
+
bool x_11_transpose_y_0 = const()[name = string("x_11_transpose_y_0"), val = bool(false)];
|
| 73 |
+
tensor<fp32, [1, 128, 1501]> x_11 = matmul(transpose_x = x_11_transpose_x_0, transpose_y = x_11_transpose_y_0, x = const_6, y = x_9)[name = string("x_11")];
|
| 74 |
+
fp32 var_76 = const()[name = string("op_76"), val = fp32(0x1p-24)];
|
| 75 |
+
tensor<fp32, [1, 128, 1501]> var_77 = add(x = x_11, y = var_76)[name = string("op_77")];
|
| 76 |
+
fp32 x_13_epsilon_0 = const()[name = string("x_13_epsilon_0"), val = fp32(0x1p-149)];
|
| 77 |
+
tensor<fp32, [1, 128, 1501]> x_13 = log(epsilon = x_13_epsilon_0, x = var_77)[name = string("x_13")];
|
| 78 |
+
tensor<int32, [1, 1501]> var_82 = const()[name = string("op_82"), val = tensor<int32, [1, 1501]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(1184512)))];
|
| 79 |
+
tensor<int32, [1]> var_85_axes_0 = const()[name = string("op_85_axes_0"), val = tensor<int32, [1]>([1])];
|
| 80 |
+
tensor<int32, [1]> mel_length = cast(dtype = seq_len_dtype_0, x = seq_len_1)[name = string("cast_11")];
|
| 81 |
+
tensor<int32, [1, 1]> var_85 = expand_dims(axes = var_85_axes_0, x = mel_length)[name = string("op_85")];
|
| 82 |
+
tensor<bool, [1, 1501]> valid_mask = less(x = var_82, y = var_85)[name = string("valid_mask")];
|
| 83 |
+
tensor<int32, [1]> var_87_axes_0 = const()[name = string("op_87_axes_0"), val = tensor<int32, [1]>([1])];
|
| 84 |
+
tensor<bool, [1, 1, 1501]> var_87 = expand_dims(axes = var_87_axes_0, x = valid_mask)[name = string("op_87")];
|
| 85 |
+
tensor<int32, [3]> var_87_after_broadcast_reps_0 = const()[name = string("op_87_after_broadcast_reps_0"), val = tensor<int32, [3]>([1, 128, 1])];
|
| 86 |
+
tensor<bool, [1, 128, 1501]> var_87_after_broadcast = tile(reps = var_87_after_broadcast_reps_0, x = var_87)[name = string("op_87_after_broadcast")];
|
| 87 |
+
tensor<fp32, [1, 128, 1501]> var_24_after_broadcast = const()[name = string("op_24_after_broadcast"), val = tensor<fp32, [1, 128, 1501]>(BLOBFILE(path = string("@model_path/weights/weight.bin"), offset = uint64(1190592)))];
|
| 88 |
+
tensor<fp32, [1, 128, 1501]> var_88 = select(a = x_13, b = var_24_after_broadcast, cond = var_87_after_broadcast)[name = string("op_88")];
|
| 89 |
+
tensor<int32, [1]> x_mean_numerator_axes_0 = const()[name = string("x_mean_numerator_axes_0"), val = tensor<int32, [1]>([2])];
|
| 90 |
+
bool x_mean_numerator_keep_dims_0 = const()[name = string("x_mean_numerator_keep_dims_0"), val = bool(false)];
|
| 91 |
+
tensor<fp32, [1, 128]> x_mean_numerator = reduce_sum(axes = x_mean_numerator_axes_0, keep_dims = x_mean_numerator_keep_dims_0, x = var_88)[name = string("x_mean_numerator")];
|
| 92 |
+
string cast_2_dtype_0 = const()[name = string("cast_2_dtype_0"), val = string("fp32")];
|
| 93 |
+
tensor<int32, [1]> x_mean_denominator_axes_0 = const()[name = string("x_mean_denominator_axes_0"), val = tensor<int32, [1]>([1])];
|
| 94 |
+
bool x_mean_denominator_keep_dims_0 = const()[name = string("x_mean_denominator_keep_dims_0"), val = bool(false)];
|
| 95 |
+
tensor<fp32, [1, 1501]> cast_2 = cast(dtype = cast_2_dtype_0, x = valid_mask)[name = string("cast_10")];
|
| 96 |
+
tensor<fp32, [1]> x_mean_denominator = reduce_sum(axes = x_mean_denominator_axes_0, keep_dims = x_mean_denominator_keep_dims_0, x = cast_2)[name = string("x_mean_denominator")];
|
| 97 |
+
tensor<int32, [1]> var_93_axes_0 = const()[name = string("op_93_axes_0"), val = tensor<int32, [1]>([1])];
|
| 98 |
+
tensor<fp32, [1, 1]> var_93 = expand_dims(axes = var_93_axes_0, x = x_mean_denominator)[name = string("op_93")];
|
| 99 |
+
tensor<fp32, [1, 128]> x_mean = real_div(x = x_mean_numerator, y = var_93)[name = string("x_mean")];
|
| 100 |
+
tensor<int32, [1]> var_96_axes_0 = const()[name = string("op_96_axes_0"), val = tensor<int32, [1]>([2])];
|
| 101 |
+
tensor<fp32, [1, 128, 1]> var_96 = expand_dims(axes = var_96_axes_0, x = x_mean)[name = string("op_96")];
|
| 102 |
+
tensor<fp32, [1, 128, 1501]> var_97 = sub(x = x_13, y = var_96)[name = string("op_97")];
|
| 103 |
+
tensor<fp32, [1, 128, 1501]> var_98 = select(a = var_97, b = var_24_after_broadcast, cond = var_87_after_broadcast)[name = string("op_98")];
|
| 104 |
+
fp32 var_17_promoted_1 = const()[name = string("op_17_promoted_1"), val = fp32(0x1p+1)];
|
| 105 |
+
tensor<fp32, [1, 128, 1501]> var_99 = pow(x = var_98, y = var_17_promoted_1)[name = string("op_99")];
|
| 106 |
+
tensor<int32, [1]> var_101_axes_0 = const()[name = string("op_101_axes_0"), val = tensor<int32, [1]>([2])];
|
| 107 |
+
bool var_101_keep_dims_0 = const()[name = string("op_101_keep_dims_0"), val = bool(false)];
|
| 108 |
+
tensor<fp32, [1, 128]> var_101 = reduce_sum(axes = var_101_axes_0, keep_dims = var_101_keep_dims_0, x = var_99)[name = string("op_101")];
|
| 109 |
+
fp32 var_103 = const()[name = string("op_103"), val = fp32(0x1p+0)];
|
| 110 |
+
tensor<fp32, [1, 1]> var_104 = sub(x = var_93, y = var_103)[name = string("op_104")];
|
| 111 |
+
tensor<fp32, [1, 128]> var_105 = real_div(x = var_101, y = var_104)[name = string("op_105")];
|
| 112 |
+
tensor<fp32, [1, 128]> x_std_1 = sqrt(x = var_105)[name = string("x_std_1")];
|
| 113 |
+
tensor<fp32, [1, 128]> x_std = add(x = x_std_1, y = var_25)[name = string("x_std")];
|
| 114 |
+
tensor<int32, [1]> var_110_axes_0 = const()[name = string("op_110_axes_0"), val = tensor<int32, [1]>([2])];
|
| 115 |
+
tensor<fp32, [1, 128, 1]> var_110 = expand_dims(axes = var_110_axes_0, x = x_std)[name = string("op_110")];
|
| 116 |
+
tensor<fp32, [1, 128, 1501]> x = real_div(x = var_97, y = var_110)[name = string("x")];
|
| 117 |
+
tensor<bool, [1, 1501]> mask = greater_equal(x = var_82, y = var_85)[name = string("mask")];
|
| 118 |
+
tensor<int32, [1]> var_119_axes_0 = const()[name = string("op_119_axes_0"), val = tensor<int32, [1]>([1])];
|
| 119 |
+
tensor<bool, [1, 1, 1501]> var_119 = expand_dims(axes = var_119_axes_0, x = mask)[name = string("op_119")];
|
| 120 |
+
tensor<fp32, [1, 128, 1501]> mel = select(a = var_24, b = x, cond = var_119)[name = string("processed_signal")];
|
| 121 |
+
} -> (mel, mel_length);
|
| 122 |
+
}
|
canary_preprocessor.mlmodelc/weights/weight.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e50ec10d5387fdcf4ef7905025c8df3a454d34a575300c8a852b734c08a82344
|
| 3 |
+
size 1959168
|
metadata.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model": "canary-1b-v2",
|
| 3 |
+
"window_samples": 240000,
|
| 4 |
+
"precision": "FP16",
|
| 5 |
+
"mel_shape": [
|
| 6 |
+
1,
|
| 7 |
+
128,
|
| 8 |
+
1501
|
| 9 |
+
],
|
| 10 |
+
"enc_states_shape": [
|
| 11 |
+
1,
|
| 12 |
+
188,
|
| 13 |
+
1024
|
| 14 |
+
],
|
| 15 |
+
"enc_len": 188,
|
| 16 |
+
"components": {
|
| 17 |
+
"preprocessor": "canary_preprocessor.mlpackage",
|
| 18 |
+
"encoder": "canary_encoder.mlpackage"
|
| 19 |
+
},
|
| 20 |
+
"optimize": {
|
| 21 |
+
"frontend": "preprocessor+encoder (copied from canary_coreml_fp16enc_sliced)",
|
| 22 |
+
"decoder": "kv-cache cross+step (copied from canary_coreml_kv)",
|
| 23 |
+
"deploy": "compute_units=cpu_and_ne",
|
| 24 |
+
"note": "Self-contained KV-cache build: front end (preprocessor + encoder) from canary_coreml_fp16enc_sliced + stateful KV-cache decoder (cross_kv + decoder_kv) from canary_coreml_kv. Run with validate_e2e_kv.py / the Swift KV host."
|
| 25 |
+
},
|
| 26 |
+
"decoder_kv": {
|
| 27 |
+
"cross_file": "canary_cross_kv.mlpackage",
|
| 28 |
+
"step_file": "canary_decoder_kv.mlpackage",
|
| 29 |
+
"l_dec": 238,
|
| 30 |
+
"t_enc": 188,
|
| 31 |
+
"n_layers": 8,
|
| 32 |
+
"n_heads": 8,
|
| 33 |
+
"head_size": 128,
|
| 34 |
+
"max_generation_delta": 50,
|
| 35 |
+
"vocab_size": 16384,
|
| 36 |
+
"pad": 2,
|
| 37 |
+
"eos": 3,
|
| 38 |
+
"seed": [
|
| 39 |
+
16053,
|
| 40 |
+
7,
|
| 41 |
+
4,
|
| 42 |
+
16,
|
| 43 |
+
64,
|
| 44 |
+
64,
|
| 45 |
+
5,
|
| 46 |
+
9,
|
| 47 |
+
11,
|
| 48 |
+
13
|
| 49 |
+
],
|
| 50 |
+
"kv_cache": true,
|
| 51 |
+
"neg_inf": -10000.0
|
| 52 |
+
}
|
| 53 |
+
}
|