PldaProjector Core ML Model for pyannote-v4 (#4)
Browse files- PldaProjector Core ML Model for pyannote-v4 (7998500d725f2244f2984410001f0bb4bdb1a5c4)
- speaker_clusterer/pyannote-v4/W32A32/PldaProjector.mlmodelc/analytics/coremldata.bin +3 -0
- speaker_clusterer/pyannote-v4/W32A32/PldaProjector.mlmodelc/coremldata.bin +3 -0
- speaker_clusterer/pyannote-v4/W32A32/PldaProjector.mlmodelc/metadata.json +69 -0
- speaker_clusterer/pyannote-v4/W32A32/PldaProjector.mlmodelc/model.mil +55 -0
- speaker_clusterer/pyannote-v4/W32A32/PldaProjector.mlmodelc/weights/weight.bin +3 -0
speaker_clusterer/pyannote-v4/W32A32/PldaProjector.mlmodelc/analytics/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3e13c8f4df77ea27cbbcdd6d083c63f5e7b3f32566cc5bf223fab92d40b81b8b
|
| 3 |
+
size 243
|
speaker_clusterer/pyannote-v4/W32A32/PldaProjector.mlmodelc/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6f6820ccf221d4cc7c107101d0ae4d716eb224e4fdffaf8f7ca36af70ae64c40
|
| 3 |
+
size 327
|
speaker_clusterer/pyannote-v4/W32A32/PldaProjector.mlmodelc/metadata.json
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"metadataOutputVersion" : "3.0",
|
| 4 |
+
"storagePrecision" : "Float32",
|
| 5 |
+
"outputSchema" : [
|
| 6 |
+
{
|
| 7 |
+
"hasShapeFlexibility" : "0",
|
| 8 |
+
"isOptional" : "0",
|
| 9 |
+
"dataType" : "Float16",
|
| 10 |
+
"formattedType" : "MultiArray (Float16 1 × 64 × 128)",
|
| 11 |
+
"shortDescription" : "",
|
| 12 |
+
"shape" : "[1, 64, 128]",
|
| 13 |
+
"name" : "plda_embeddings",
|
| 14 |
+
"type" : "MultiArray"
|
| 15 |
+
}
|
| 16 |
+
],
|
| 17 |
+
"modelParameters" : [
|
| 18 |
+
|
| 19 |
+
],
|
| 20 |
+
"specificationVersion" : 7,
|
| 21 |
+
"mlProgramOperationTypeHistogram" : {
|
| 22 |
+
"Ios16.conv" : 2,
|
| 23 |
+
"Ios16.add" : 2,
|
| 24 |
+
"Ios16.mul" : 4,
|
| 25 |
+
"Ios16.rsqrt" : 2,
|
| 26 |
+
"Ios16.sub" : 2,
|
| 27 |
+
"Transpose" : 2,
|
| 28 |
+
"ExpandDims" : 1,
|
| 29 |
+
"Ios16.reduceMean" : 2,
|
| 30 |
+
"Squeeze" : 1,
|
| 31 |
+
"Ios16.cast" : 2
|
| 32 |
+
},
|
| 33 |
+
"computePrecision" : "Mixed (Float16, Float32, Int32)",
|
| 34 |
+
"isUpdatable" : "0",
|
| 35 |
+
"stateSchema" : [
|
| 36 |
+
|
| 37 |
+
],
|
| 38 |
+
"availability" : {
|
| 39 |
+
"macOS" : "13.0",
|
| 40 |
+
"tvOS" : "16.0",
|
| 41 |
+
"visionOS" : "1.0",
|
| 42 |
+
"watchOS" : "9.0",
|
| 43 |
+
"iOS" : "16.0",
|
| 44 |
+
"macCatalyst" : "16.0"
|
| 45 |
+
},
|
| 46 |
+
"modelType" : {
|
| 47 |
+
"name" : "MLModelType_mlProgram"
|
| 48 |
+
},
|
| 49 |
+
"userDefinedMetadata" : {
|
| 50 |
+
"com.github.apple.coremltools.source_dialect" : "TorchScript",
|
| 51 |
+
"com.github.apple.coremltools.source" : "torch==2.5.0",
|
| 52 |
+
"com.github.apple.coremltools.version" : "8.3.0"
|
| 53 |
+
},
|
| 54 |
+
"inputSchema" : [
|
| 55 |
+
{
|
| 56 |
+
"hasShapeFlexibility" : "0",
|
| 57 |
+
"isOptional" : "0",
|
| 58 |
+
"dataType" : "Float16",
|
| 59 |
+
"formattedType" : "MultiArray (Float16 1 × 64 × 256)",
|
| 60 |
+
"shortDescription" : "",
|
| 61 |
+
"shape" : "[1, 64, 256]",
|
| 62 |
+
"name" : "embeddings",
|
| 63 |
+
"type" : "MultiArray"
|
| 64 |
+
}
|
| 65 |
+
],
|
| 66 |
+
"generatedClassName" : "PldaProjector",
|
| 67 |
+
"method" : "predict"
|
| 68 |
+
}
|
| 69 |
+
]
|
speaker_clusterer/pyannote-v4/W32A32/PldaProjector.mlmodelc/model.mil
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
program(1.0)
|
| 2 |
+
[buildInfo = dict<tensor<string, []>, tensor<string, []>>({{"coremlc-component-MIL", "3405.2.1"}, {"coremlc-version", "3404.23.1"}, {"coremltools-component-torch", "2.5.0"}, {"coremltools-source-dialect", "TorchScript"}, {"coremltools-version", "8.3.0"}})]
|
| 3 |
+
{
|
| 4 |
+
func main<ios16>(tensor<fp16, [1, 64, 256]> embeddings) {
|
| 5 |
+
tensor<string, []> cast_0_dtype_0 = const()[name = tensor<string, []>("cast_0_dtype_0"), val = tensor<string, []>("fp32")];
|
| 6 |
+
tensor<fp32, [1, 128, 1, 1]> plda_mean = const()[name = tensor<string, []>("plda_mean"), val = tensor<fp32, [1, 128, 1, 1]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(64)))];
|
| 7 |
+
tensor<fp32, [1, 256, 1, 1]> xvectors_mean = const()[name = tensor<string, []>("xvectors_mean"), val = tensor<fp32, [1, 256, 1, 1]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(640)))];
|
| 8 |
+
tensor<fp32, [128, 256, 1, 1]> lda_proj_weight = const()[name = tensor<string, []>("lda_proj_weight"), val = tensor<fp32, [128, 256, 1, 1]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(1728)))];
|
| 9 |
+
tensor<fp32, [128, 128, 1, 1]> plda_proj_weight = const()[name = tensor<string, []>("plda_proj_weight"), val = tensor<fp32, [128, 128, 1, 1]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(132864)))];
|
| 10 |
+
tensor<int32, [3]> var_11_perm_0 = const()[name = tensor<string, []>("op_11_perm_0"), val = tensor<int32, [3]>([0, 2, 1])];
|
| 11 |
+
tensor<int32, [1]> embeddings_3_axes_0 = const()[name = tensor<string, []>("embeddings_3_axes_0"), val = tensor<int32, [1]>([-2])];
|
| 12 |
+
tensor<fp32, [1, 64, 256]> cast_0 = cast(dtype = cast_0_dtype_0, x = embeddings)[name = tensor<string, []>("cast_5")];
|
| 13 |
+
tensor<fp32, [1, 256, 64]> var_11 = transpose(perm = var_11_perm_0, x = cast_0)[name = tensor<string, []>("transpose_1")];
|
| 14 |
+
tensor<fp32, [1, 256, 1, 64]> embeddings_3 = expand_dims(axes = embeddings_3_axes_0, x = var_11)[name = tensor<string, []>("embeddings_3")];
|
| 15 |
+
tensor<fp32, [1, 256, 1, 64]> inputs_1 = sub(x = embeddings_3, y = xvectors_mean)[name = tensor<string, []>("inputs_1")];
|
| 16 |
+
tensor<fp32, [1, 256, 1, 64]> inputs_sq_1 = mul(x = inputs_1, y = inputs_1)[name = tensor<string, []>("inputs_sq_1")];
|
| 17 |
+
tensor<int32, [1]> variance_1_axes_0 = const()[name = tensor<string, []>("variance_1_axes_0"), val = tensor<int32, [1]>([1])];
|
| 18 |
+
tensor<bool, []> variance_1_keep_dims_0 = const()[name = tensor<string, []>("variance_1_keep_dims_0"), val = tensor<bool, []>(true)];
|
| 19 |
+
tensor<fp32, [1, 1, 1, 64]> variance_1 = reduce_mean(axes = variance_1_axes_0, keep_dims = variance_1_keep_dims_0, x = inputs_sq_1)[name = tensor<string, []>("variance_1")];
|
| 20 |
+
tensor<fp32, []> var_24 = const()[name = tensor<string, []>("op_24"), val = tensor<fp32, []>(0x1.0c6f7ap-20)];
|
| 21 |
+
tensor<fp32, [1, 1, 1, 64]> var_25 = add(x = variance_1, y = var_24)[name = tensor<string, []>("op_25")];
|
| 22 |
+
tensor<fp32, []> var_26_epsilon_0 = const()[name = tensor<string, []>("op_26_epsilon_0"), val = tensor<fp32, []>(0x1.197998p-40)];
|
| 23 |
+
tensor<fp32, [1, 1, 1, 64]> var_26 = rsqrt(epsilon = var_26_epsilon_0, x = var_25)[name = tensor<string, []>("op_26")];
|
| 24 |
+
tensor<fp32, [1, 256, 1, 64]> hidden_states_1 = mul(x = inputs_1, y = var_26)[name = tensor<string, []>("hidden_states_1")];
|
| 25 |
+
tensor<string, []> embeddings_5_pad_type_0 = const()[name = tensor<string, []>("embeddings_5_pad_type_0"), val = tensor<string, []>("valid")];
|
| 26 |
+
tensor<int32, [2]> embeddings_5_strides_0 = const()[name = tensor<string, []>("embeddings_5_strides_0"), val = tensor<int32, [2]>([1, 1])];
|
| 27 |
+
tensor<int32, [4]> embeddings_5_pad_0 = const()[name = tensor<string, []>("embeddings_5_pad_0"), val = tensor<int32, [4]>([0, 0, 0, 0])];
|
| 28 |
+
tensor<int32, [2]> embeddings_5_dilations_0 = const()[name = tensor<string, []>("embeddings_5_dilations_0"), val = tensor<int32, [2]>([1, 1])];
|
| 29 |
+
tensor<int32, []> embeddings_5_groups_0 = const()[name = tensor<string, []>("embeddings_5_groups_0"), val = tensor<int32, []>(1)];
|
| 30 |
+
tensor<fp32, [128]> const_0 = const()[name = tensor<string, []>("const_0"), val = tensor<fp32, [128]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(198464)))];
|
| 31 |
+
tensor<fp32, [1, 128, 1, 64]> inputs = conv(bias = const_0, dilations = embeddings_5_dilations_0, groups = embeddings_5_groups_0, pad = embeddings_5_pad_0, pad_type = embeddings_5_pad_type_0, strides = embeddings_5_strides_0, weight = lda_proj_weight, x = hidden_states_1)[name = tensor<string, []>("inputs")];
|
| 32 |
+
tensor<fp32, [1, 128, 1, 64]> inputs_sq = mul(x = inputs, y = inputs)[name = tensor<string, []>("inputs_sq")];
|
| 33 |
+
tensor<int32, [1]> variance_axes_0 = const()[name = tensor<string, []>("variance_axes_0"), val = tensor<int32, [1]>([1])];
|
| 34 |
+
tensor<bool, []> variance_keep_dims_0 = const()[name = tensor<string, []>("variance_keep_dims_0"), val = tensor<bool, []>(true)];
|
| 35 |
+
tensor<fp32, [1, 1, 1, 64]> variance = reduce_mean(axes = variance_axes_0, keep_dims = variance_keep_dims_0, x = inputs_sq)[name = tensor<string, []>("variance")];
|
| 36 |
+
tensor<fp32, []> var_52 = const()[name = tensor<string, []>("op_52"), val = tensor<fp32, []>(0x1.0c6f7ap-20)];
|
| 37 |
+
tensor<fp32, [1, 1, 1, 64]> var_53 = add(x = variance, y = var_52)[name = tensor<string, []>("op_53")];
|
| 38 |
+
tensor<fp32, []> var_54_epsilon_0 = const()[name = tensor<string, []>("op_54_epsilon_0"), val = tensor<fp32, []>(0x1.197998p-40)];
|
| 39 |
+
tensor<fp32, [1, 1, 1, 64]> var_54 = rsqrt(epsilon = var_54_epsilon_0, x = var_53)[name = tensor<string, []>("op_54")];
|
| 40 |
+
tensor<fp32, [1, 128, 1, 64]> hidden_states = mul(x = inputs, y = var_54)[name = tensor<string, []>("hidden_states")];
|
| 41 |
+
tensor<fp32, [1, 128, 1, 64]> input = sub(x = hidden_states, y = plda_mean)[name = tensor<string, []>("input")];
|
| 42 |
+
tensor<string, []> embeddings_pad_type_0 = const()[name = tensor<string, []>("embeddings_pad_type_0"), val = tensor<string, []>("valid")];
|
| 43 |
+
tensor<int32, [2]> embeddings_strides_0 = const()[name = tensor<string, []>("embeddings_strides_0"), val = tensor<int32, [2]>([1, 1])];
|
| 44 |
+
tensor<int32, [4]> embeddings_pad_0 = const()[name = tensor<string, []>("embeddings_pad_0"), val = tensor<int32, [4]>([0, 0, 0, 0])];
|
| 45 |
+
tensor<int32, [2]> embeddings_dilations_0 = const()[name = tensor<string, []>("embeddings_dilations_0"), val = tensor<int32, [2]>([1, 1])];
|
| 46 |
+
tensor<int32, []> embeddings_groups_0 = const()[name = tensor<string, []>("embeddings_groups_0"), val = tensor<int32, []>(1)];
|
| 47 |
+
tensor<fp32, [1, 128, 1, 64]> embeddings_1 = conv(dilations = embeddings_dilations_0, groups = embeddings_groups_0, pad = embeddings_pad_0, pad_type = embeddings_pad_type_0, strides = embeddings_strides_0, weight = plda_proj_weight, x = input)[name = tensor<string, []>("embeddings")];
|
| 48 |
+
tensor<int32, [1]> var_73_axes_0 = const()[name = tensor<string, []>("op_73_axes_0"), val = tensor<int32, [1]>([-2])];
|
| 49 |
+
tensor<fp32, [1, 128, 64]> var_73 = squeeze(axes = var_73_axes_0, x = embeddings_1)[name = tensor<string, []>("op_73")];
|
| 50 |
+
tensor<int32, [3]> obj_perm_0 = const()[name = tensor<string, []>("obj_perm_0"), val = tensor<int32, [3]>([0, 2, 1])];
|
| 51 |
+
tensor<string, []> cast_3_dtype_0 = const()[name = tensor<string, []>("cast_3_dtype_0"), val = tensor<string, []>("fp16")];
|
| 52 |
+
tensor<fp32, [1, 64, 128]> plda_embeddings_type_fp32 = transpose(perm = obj_perm_0, x = var_73)[name = tensor<string, []>("transpose_0")];
|
| 53 |
+
tensor<fp16, [1, 64, 128]> plda_embeddings = cast(dtype = cast_3_dtype_0, x = plda_embeddings_type_fp32)[name = tensor<string, []>("cast_4")];
|
| 54 |
+
} -> (plda_embeddings);
|
| 55 |
+
}
|
speaker_clusterer/pyannote-v4/W32A32/PldaProjector.mlmodelc/weights/weight.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a1dbbb651a0a67fcfe5334672f459df090fa960917a6ee3a5423245a7ab92ced
|
| 3 |
+
size 199040
|