bweng commited on
Commit
341beaa
·
verified ·
1 Parent(s): a26ed29
PldaRho.mlmodelc/analytics/coremldata.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:e16fefb0b66565e7883ada5be64887942904d173684d8912ac3f610d9487faa7
3
  size 243
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8940ea6044dbcbefa22da8cc41e0b485e1fb5ed89aecaf37c6e0c483a97ddcd7
3
  size 243
PldaRho.mlmodelc/coremldata.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:7dadf982dbddb8c2ae6a787edd156973e260bd0f42248fb68635638371024ba0
3
- size 535
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4d9741477f721c79b09fcdfe455110c4b7d4272e2de3496bf1729d966d3ee418
3
+ size 763
PldaRho.mlmodelc/metadata.json CHANGED
@@ -1,15 +1,15 @@
1
  [
2
  {
3
- "shortDescription" : "pyannote community-1 PLDA rho (features scaled by sqrt(phi) for VBx clustering, batch=32)",
4
  "metadataOutputVersion" : "3.0",
5
  "outputSchema" : [
6
  {
7
  "hasShapeFlexibility" : "0",
8
  "isOptional" : "0",
9
  "dataType" : "Float32",
10
- "formattedType" : "MultiArray (Float32 32 × 128)",
11
  "shortDescription" : "",
12
- "shape" : "[32, 128]",
13
  "name" : "rho",
14
  "type" : "MultiArray"
15
  }
@@ -49,18 +49,20 @@
49
  },
50
  "inputSchema" : [
51
  {
52
- "hasShapeFlexibility" : "0",
53
- "isOptional" : "0",
54
  "dataType" : "Float32",
 
 
 
55
  "formattedType" : "MultiArray (Float32 32 × 256)",
56
- "shortDescription" : "",
57
  "shape" : "[32, 256]",
58
  "name" : "embeddings",
59
- "type" : "MultiArray"
60
  }
61
  ],
62
  "userDefinedMetadata" : {
63
- "com.github.apple.coremltools.conversion_date" : "2025-10-03",
64
  "com.github.apple.coremltools.source" : "torch==2.8.0",
65
  "com.github.apple.coremltools.version" : "9.0b1",
66
  "com.github.apple.coremltools.source_dialect" : "TorchScript"
 
1
  [
2
  {
3
+ "shortDescription" : "pyannote community-1 PLDA rho (features scaled by sqrt(phi) for VBx clustering, batch 1-32)",
4
  "metadataOutputVersion" : "3.0",
5
  "outputSchema" : [
6
  {
7
  "hasShapeFlexibility" : "0",
8
  "isOptional" : "0",
9
  "dataType" : "Float32",
10
+ "formattedType" : "MultiArray (Float32)",
11
  "shortDescription" : "",
12
+ "shape" : "[]",
13
  "name" : "rho",
14
  "type" : "MultiArray"
15
  }
 
49
  },
50
  "inputSchema" : [
51
  {
52
+ "shortDescription" : "",
 
53
  "dataType" : "Float32",
54
+ "hasShapeFlexibility" : "1",
55
+ "isOptional" : "0",
56
+ "shapeFlexibility" : "32 × 256 | 1 × 256 | 2 × 256 | 3 × 256 | 4 × 256 | 5 × 256 | 6 × 256 | 7 × 256 | 8 × 256 | 9 × 256 | 10 × 256 | 11 × 256 | 12 × 256 | 13 × 256 | 14 × 256 | 15 × 256 | 16 × 256 | 17 × 256 | 18 × 256 | 19 × 256 | 20 × 256 | 21 × 256 | 22 × 256 | 23 × 256 | 24 × 256 | 25 × 256 | 26 × 256 | 27 × 256 | 28 × 256 | 29 × 256 | 30 × 256 | 31 × 256",
57
  "formattedType" : "MultiArray (Float32 32 × 256)",
58
+ "type" : "MultiArray",
59
  "shape" : "[32, 256]",
60
  "name" : "embeddings",
61
+ "enumeratedShapes" : "[[32, 256], [1, 256], [2, 256], [3, 256], [4, 256], [5, 256], [6, 256], [7, 256], [8, 256], [9, 256], [10, 256], [11, 256], [12, 256], [13, 256], [14, 256], [15, 256], [16, 256], [17, 256], [18, 256], [19, 256], [20, 256], [21, 256], [22, 256], [23, 256], [24, 256], [25, 256], [26, 256], [27, 256], [28, 256], [29, 256], [30, 256], [31, 256]]"
62
  }
63
  ],
64
  "userDefinedMetadata" : {
65
+ "com.github.apple.coremltools.conversion_date" : "2025-10-04",
66
  "com.github.apple.coremltools.source" : "torch==2.8.0",
67
  "com.github.apple.coremltools.version" : "9.0b1",
68
  "com.github.apple.coremltools.source_dialect" : "TorchScript"
PldaRho.mlmodelc/model.mil CHANGED
@@ -1,7 +1,7 @@
1
  program(1.0)
2
  [buildInfo = dict<tensor<string, []>, tensor<string, []>>({{"coremlc-component-MIL", "3500.14.1"}, {"coremlc-version", "3500.32.1"}, {"coremltools-component-torch", "2.8.0"}, {"coremltools-source-dialect", "TorchScript"}, {"coremltools-version", "9.0b1"}})]
3
  {
4
- func main<ios17>(tensor<fp32, [32, 256]> embeddings) {
5
  tensor<fp32, [128]> sqrt_phi = const()[name = tensor<string, []>("sqrt_phi"), val = tensor<fp32, [128]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(64)))];
6
  tensor<fp32, [128, 128]> transform_plda_tr = const()[name = tensor<string, []>("transform_plda_tr"), val = tensor<fp32, [128, 128]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(640)))];
7
  tensor<fp32, [128]> transform_mu = const()[name = tensor<string, []>("transform_mu"), val = tensor<fp32, [128]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(66240)))];
@@ -10,31 +10,31 @@ program(1.0)
10
  tensor<fp32, []> transform_lda_scale = const()[name = tensor<string, []>("transform_lda_scale"), val = tensor<fp32, []>(0x1p+4)];
11
  tensor<fp32, [256]> transform_mean1 = const()[name = tensor<string, []>("transform_mean1"), val = tensor<fp32, [256]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(67392)))];
12
  tensor<fp32, []> var_4 = const()[name = tensor<string, []>("op_4"), val = tensor<fp32, []>(0x1.197998p-40)];
13
- tensor<fp32, [32, 256]> x_1 = sub(x = embeddings, y = transform_mean1)[name = tensor<string, []>("x_1")];
14
- tensor<fp32, [32, 256]> var_17 = mul(x = x_1, y = x_1)[name = tensor<string, []>("op_17")];
15
  tensor<int32, [1]> var_19_axes_0 = const()[name = tensor<string, []>("op_19_axes_0"), val = tensor<int32, [1]>([-1])];
16
  tensor<bool, []> var_19_keep_dims_0 = const()[name = tensor<string, []>("op_19_keep_dims_0"), val = tensor<bool, []>(true)];
17
- tensor<fp32, [32, 1]> var_19 = reduce_sum(axes = var_19_axes_0, keep_dims = var_19_keep_dims_0, x = var_17)[name = tensor<string, []>("op_19")];
18
  tensor<fp32, []> const_0 = const()[name = tensor<string, []>("const_0"), val = tensor<fp32, []>(0x1.fffffep+127)];
19
- tensor<fp32, [32, 1]> clip_0 = clip(alpha = var_4, beta = const_0, x = var_19)[name = tensor<string, []>("clip_0")];
20
- tensor<fp32, [32, 1]> norm_1 = sqrt(x = clip_0)[name = tensor<string, []>("norm_1")];
21
- tensor<fp32, [32, 256]> normalized1 = real_div(x = x_1, y = norm_1)[name = tensor<string, []>("normalized1")];
22
  tensor<fp32, [128, 256]> transpose_0 = const()[name = tensor<string, []>("transpose_0"), val = tensor<fp32, [128, 256]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(68480)))];
23
  tensor<fp32, [128]> var_23_bias_0 = const()[name = tensor<string, []>("op_23_bias_0"), val = tensor<fp32, [128]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(199616)))];
24
- tensor<fp32, [32, 128]> var_23 = linear(bias = var_23_bias_0, weight = transpose_0, x = normalized1)[name = tensor<string, []>("op_23")];
25
- tensor<fp32, [32, 128]> projected = mul(x = var_23, y = transform_lda_scale)[name = tensor<string, []>("projected")];
26
- tensor<fp32, [32, 128]> x = sub(x = projected, y = transform_mean2)[name = tensor<string, []>("x")];
27
- tensor<fp32, [32, 128]> var_26 = mul(x = x, y = x)[name = tensor<string, []>("op_26")];
28
  tensor<int32, [1]> var_28_axes_0 = const()[name = tensor<string, []>("op_28_axes_0"), val = tensor<int32, [1]>([-1])];
29
  tensor<bool, []> var_28_keep_dims_0 = const()[name = tensor<string, []>("op_28_keep_dims_0"), val = tensor<bool, []>(true)];
30
- tensor<fp32, [32, 1]> var_28 = reduce_sum(axes = var_28_axes_0, keep_dims = var_28_keep_dims_0, x = var_26)[name = tensor<string, []>("op_28")];
31
  tensor<fp32, []> const_1 = const()[name = tensor<string, []>("const_1"), val = tensor<fp32, []>(0x1.fffffep+127)];
32
- tensor<fp32, [32, 1]> clip_1 = clip(alpha = var_4, beta = const_1, x = var_28)[name = tensor<string, []>("clip_1")];
33
- tensor<fp32, [32, 1]> norm = sqrt(x = clip_1)[name = tensor<string, []>("norm")];
34
- tensor<fp32, [32, 128]> var_31 = real_div(x = x, y = norm)[name = tensor<string, []>("op_31")];
35
- tensor<fp32, [32, 128]> normalized2 = mul(x = var_31, y = transform_lda_dim_scale)[name = tensor<string, []>("normalized2")];
36
- tensor<fp32, [32, 128]> plda_centered = sub(x = normalized2, y = transform_mu)[name = tensor<string, []>("plda_centered")];
37
- tensor<fp32, [32, 128]> features = linear(bias = var_23_bias_0, weight = transform_plda_tr, x = plda_centered)[name = tensor<string, []>("features")];
38
- tensor<fp32, [32, 128]> rho = mul(x = features, y = sqrt_phi)[name = tensor<string, []>("op_36")];
39
  } -> (rho);
40
  }
 
1
  program(1.0)
2
  [buildInfo = dict<tensor<string, []>, tensor<string, []>>({{"coremlc-component-MIL", "3500.14.1"}, {"coremlc-version", "3500.32.1"}, {"coremltools-component-torch", "2.8.0"}, {"coremltools-source-dialect", "TorchScript"}, {"coremltools-version", "9.0b1"}})]
3
  {
4
+ func main<ios17>(tensor<fp32, [?, 256]> embeddings) [FlexibleShapeInformation = tuple<tuple<tensor<string, []>, dict<tensor<string, []>, tensor<int32, [?]>>>, tuple<tensor<string, []>, dict<tensor<string, []>, dict<tensor<string, []>, tensor<int32, [?]>>>>>((("DefaultShapes", {{"embeddings", [32, 256]}}), ("EnumeratedShapes", {{"embeddings_1_1_1_10_256_", {{"embeddings", [10, 256]}}}, {"embeddings_1_1_1_11_256_", {{"embeddings", [11, 256]}}}, {"embeddings_1_1_1_12_256_", {{"embeddings", [12, 256]}}}, {"embeddings_1_1_1_13_256_", {{"embeddings", [13, 256]}}}, {"embeddings_1_1_1_14_256_", {{"embeddings", [14, 256]}}}, {"embeddings_1_1_1_15_256_", {{"embeddings", [15, 256]}}}, {"embeddings_1_1_1_16_256_", {{"embeddings", [16, 256]}}}, {"embeddings_1_1_1_17_256_", {{"embeddings", [17, 256]}}}, {"embeddings_1_1_1_18_256_", {{"embeddings", [18, 256]}}}, {"embeddings_1_1_1_19_256_", {{"embeddings", [19, 256]}}}, {"embeddings_1_1_1_1_256_", {{"embeddings", [1, 256]}}}, {"embeddings_1_1_1_20_256_", {{"embeddings", [20, 256]}}}, {"embeddings_1_1_1_21_256_", {{"embeddings", [21, 256]}}}, {"embeddings_1_1_1_22_256_", {{"embeddings", [22, 256]}}}, {"embeddings_1_1_1_23_256_", {{"embeddings", [23, 256]}}}, {"embeddings_1_1_1_24_256_", {{"embeddings", [24, 256]}}}, {"embeddings_1_1_1_25_256_", {{"embeddings", [25, 256]}}}, {"embeddings_1_1_1_26_256_", {{"embeddings", [26, 256]}}}, {"embeddings_1_1_1_27_256_", {{"embeddings", [27, 256]}}}, {"embeddings_1_1_1_28_256_", {{"embeddings", [28, 256]}}}, {"embeddings_1_1_1_29_256_", {{"embeddings", [29, 256]}}}, {"embeddings_1_1_1_2_256_", {{"embeddings", [2, 256]}}}, {"embeddings_1_1_1_30_256_", {{"embeddings", [30, 256]}}}, {"embeddings_1_1_1_31_256_", {{"embeddings", [31, 256]}}}, {"embeddings_1_1_1_32_256_", {{"embeddings", [32, 256]}}}, {"embeddings_1_1_1_3_256_", {{"embeddings", [3, 256]}}}, {"embeddings_1_1_1_4_256_", {{"embeddings", [4, 256]}}}, {"embeddings_1_1_1_5_256_", {{"embeddings", [5, 256]}}}, {"embeddings_1_1_1_6_256_", {{"embeddings", [6, 256]}}}, {"embeddings_1_1_1_7_256_", {{"embeddings", [7, 256]}}}, {"embeddings_1_1_1_8_256_", {{"embeddings", [8, 256]}}}, {"embeddings_1_1_1_9_256_", {{"embeddings", [9, 256]}}}})))] {
5
  tensor<fp32, [128]> sqrt_phi = const()[name = tensor<string, []>("sqrt_phi"), val = tensor<fp32, [128]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(64)))];
6
  tensor<fp32, [128, 128]> transform_plda_tr = const()[name = tensor<string, []>("transform_plda_tr"), val = tensor<fp32, [128, 128]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(640)))];
7
  tensor<fp32, [128]> transform_mu = const()[name = tensor<string, []>("transform_mu"), val = tensor<fp32, [128]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(66240)))];
 
10
  tensor<fp32, []> transform_lda_scale = const()[name = tensor<string, []>("transform_lda_scale"), val = tensor<fp32, []>(0x1p+4)];
11
  tensor<fp32, [256]> transform_mean1 = const()[name = tensor<string, []>("transform_mean1"), val = tensor<fp32, [256]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(67392)))];
12
  tensor<fp32, []> var_4 = const()[name = tensor<string, []>("op_4"), val = tensor<fp32, []>(0x1.197998p-40)];
13
+ tensor<fp32, [?, 256]> x_1 = sub(x = embeddings, y = transform_mean1)[name = tensor<string, []>("x_1")];
14
+ tensor<fp32, [?, 256]> var_17 = mul(x = x_1, y = x_1)[name = tensor<string, []>("op_17")];
15
  tensor<int32, [1]> var_19_axes_0 = const()[name = tensor<string, []>("op_19_axes_0"), val = tensor<int32, [1]>([-1])];
16
  tensor<bool, []> var_19_keep_dims_0 = const()[name = tensor<string, []>("op_19_keep_dims_0"), val = tensor<bool, []>(true)];
17
+ tensor<fp32, [?, 1]> var_19 = reduce_sum(axes = var_19_axes_0, keep_dims = var_19_keep_dims_0, x = var_17)[name = tensor<string, []>("op_19")];
18
  tensor<fp32, []> const_0 = const()[name = tensor<string, []>("const_0"), val = tensor<fp32, []>(0x1.fffffep+127)];
19
+ tensor<fp32, [?, 1]> clip_0 = clip(alpha = var_4, beta = const_0, x = var_19)[name = tensor<string, []>("clip_0")];
20
+ tensor<fp32, [?, 1]> norm_1 = sqrt(x = clip_0)[name = tensor<string, []>("norm_1")];
21
+ tensor<fp32, [?, 256]> normalized1 = real_div(x = x_1, y = norm_1)[name = tensor<string, []>("normalized1")];
22
  tensor<fp32, [128, 256]> transpose_0 = const()[name = tensor<string, []>("transpose_0"), val = tensor<fp32, [128, 256]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(68480)))];
23
  tensor<fp32, [128]> var_23_bias_0 = const()[name = tensor<string, []>("op_23_bias_0"), val = tensor<fp32, [128]>(BLOBFILE(path = tensor<string, []>("@model_path/weights/weight.bin"), offset = tensor<uint64, []>(199616)))];
24
+ tensor<fp32, [?, 128]> var_23 = linear(bias = var_23_bias_0, weight = transpose_0, x = normalized1)[name = tensor<string, []>("op_23")];
25
+ tensor<fp32, [?, 128]> projected = mul(x = var_23, y = transform_lda_scale)[name = tensor<string, []>("projected")];
26
+ tensor<fp32, [?, 128]> x = sub(x = projected, y = transform_mean2)[name = tensor<string, []>("x")];
27
+ tensor<fp32, [?, 128]> var_26 = mul(x = x, y = x)[name = tensor<string, []>("op_26")];
28
  tensor<int32, [1]> var_28_axes_0 = const()[name = tensor<string, []>("op_28_axes_0"), val = tensor<int32, [1]>([-1])];
29
  tensor<bool, []> var_28_keep_dims_0 = const()[name = tensor<string, []>("op_28_keep_dims_0"), val = tensor<bool, []>(true)];
30
+ tensor<fp32, [?, 1]> var_28 = reduce_sum(axes = var_28_axes_0, keep_dims = var_28_keep_dims_0, x = var_26)[name = tensor<string, []>("op_28")];
31
  tensor<fp32, []> const_1 = const()[name = tensor<string, []>("const_1"), val = tensor<fp32, []>(0x1.fffffep+127)];
32
+ tensor<fp32, [?, 1]> clip_1 = clip(alpha = var_4, beta = const_1, x = var_28)[name = tensor<string, []>("clip_1")];
33
+ tensor<fp32, [?, 1]> norm = sqrt(x = clip_1)[name = tensor<string, []>("norm")];
34
+ tensor<fp32, [?, 128]> var_31 = real_div(x = x, y = norm)[name = tensor<string, []>("op_31")];
35
+ tensor<fp32, [?, 128]> normalized2 = mul(x = var_31, y = transform_lda_dim_scale)[name = tensor<string, []>("normalized2")];
36
+ tensor<fp32, [?, 128]> plda_centered = sub(x = normalized2, y = transform_mu)[name = tensor<string, []>("plda_centered")];
37
+ tensor<fp32, [?, 128]> features = linear(bias = var_23_bias_0, weight = transform_plda_tr, x = plda_centered)[name = tensor<string, []>("features")];
38
+ tensor<fp32, [?, 128]> rho = mul(x = features, y = sqrt_phi)[name = tensor<string, []>("op_36")];
39
  } -> (rho);
40
  }