Add int8 (8-bit k-means-palettized) weight-only tier of both encoders
Browse filesclap_audio_int8 / clap_text_int8: 8-bit per-tensor k-means palettization of the shipped fp16 weights (activations stay fp16), ~2x smaller. Chosen over linear int8 by measurement (text worst cosine vs fp16: kmeans 0.99873 vs linear 0.99571). int8-vs-fp16 embedding cosine worst: audio 0.99971, text 0.99873. Zero-shot ranking + cross-placement behavior unchanged. coremltools 9.0.
- CHECKSUMS.sha256 +16 -0
- README.md +57 -1
- clap_audio_int8.mlmodelc/analytics/coremldata.bin +3 -0
- clap_audio_int8.mlmodelc/coremldata.bin +3 -0
- clap_audio_int8.mlmodelc/metadata.json +80 -0
- clap_audio_int8.mlmodelc/model.mil +0 -0
- clap_audio_int8.mlmodelc/weights/weight.bin +3 -0
- clap_audio_int8.mlpackage/Data/com.apple.CoreML/model.mlmodel +3 -0
- clap_audio_int8.mlpackage/Data/com.apple.CoreML/weights/weight.bin +3 -0
- clap_audio_int8.mlpackage/Manifest.json +18 -0
- clap_text_int8.mlmodelc/analytics/coremldata.bin +3 -0
- clap_text_int8.mlmodelc/coremldata.bin +3 -0
- clap_text_int8.mlmodelc/metadata.json +94 -0
- clap_text_int8.mlmodelc/model.mil +0 -0
- clap_text_int8.mlmodelc/weights/weight.bin +3 -0
- clap_text_int8.mlpackage/Data/com.apple.CoreML/model.mlmodel +3 -0
- clap_text_int8.mlpackage/Data/com.apple.CoreML/weights/weight.bin +3 -0
- clap_text_int8.mlpackage/Manifest.json +18 -0
CHECKSUMS.sha256
CHANGED
|
@@ -14,3 +14,19 @@ edbf40e51518ad8f65a1d070f4c0e9b87fea644e6d69eb9eb55652e9fc697885 ./clap_text.ml
|
|
| 14 |
6c68d30cf088f657428175055e25e01552c5af56769b119dc25b7463d7135ade ./clap_text.mlpackage/Data/com.apple.CoreML/model.mlmodel
|
| 15 |
7f4e15e9ccb0ffbc2341eec286e9d9934d3d3d8d6465dfddebed248bddc0e3dd ./clap_text.mlpackage/Data/com.apple.CoreML/weights/weight.bin
|
| 16 |
ff9a1b297cd1593982aff0eb36cf867f0cbb9af67eac749c0fe7545cd13450dc ./clap_text.mlpackage/Manifest.json
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
6c68d30cf088f657428175055e25e01552c5af56769b119dc25b7463d7135ade ./clap_text.mlpackage/Data/com.apple.CoreML/model.mlmodel
|
| 15 |
7f4e15e9ccb0ffbc2341eec286e9d9934d3d3d8d6465dfddebed248bddc0e3dd ./clap_text.mlpackage/Data/com.apple.CoreML/weights/weight.bin
|
| 16 |
ff9a1b297cd1593982aff0eb36cf867f0cbb9af67eac749c0fe7545cd13450dc ./clap_text.mlpackage/Manifest.json
|
| 17 |
+
4455479a6d65004fe95d582246675cc9167c0b8fb6e0e673ad9db4009c0443de ./clap_audio_int8.mlmodelc/analytics/coremldata.bin
|
| 18 |
+
4bee9628bdf8821a391b32a7d23967c3c6712ae72088a318266583f35743ac33 ./clap_audio_int8.mlmodelc/coremldata.bin
|
| 19 |
+
c5c466395cfb5a58ae9ed6f44e208492c59c6a1a245919928d08d87a8ffcf964 ./clap_audio_int8.mlmodelc/metadata.json
|
| 20 |
+
1cdbbcc0911e9a9d427119e182dc3efa93d90b7159a614d372d397aff7861bb1 ./clap_audio_int8.mlmodelc/model.mil
|
| 21 |
+
b3a37ec5550dcdd6932b314b830275ebcba013748421e1a517760b9afeabafb8 ./clap_audio_int8.mlmodelc/weights/weight.bin
|
| 22 |
+
0dfa76a3a646e8001a923afb7e3c530791a7d2ec4840c4c0bcc1a4e0666d95e8 ./clap_audio_int8.mlpackage/Data/com.apple.CoreML/model.mlmodel
|
| 23 |
+
b3a37ec5550dcdd6932b314b830275ebcba013748421e1a517760b9afeabafb8 ./clap_audio_int8.mlpackage/Data/com.apple.CoreML/weights/weight.bin
|
| 24 |
+
25e72daa127949f1d7a09388d7498e987aa08a3a2dcb602555caf4fc6c462b96 ./clap_audio_int8.mlpackage/Manifest.json
|
| 25 |
+
b914a93d50ae8336aad0977e28c4c1f84dccc39f7845fcd1660c43d565ca6fb7 ./clap_text_int8.mlmodelc/analytics/coremldata.bin
|
| 26 |
+
95bc733c2b0d3d2fa64edf548f77a50f344c020cce382a0b96c46477ad4a0b84 ./clap_text_int8.mlmodelc/coremldata.bin
|
| 27 |
+
0ed552101f045f5864c9d7212bffe09b478a2c1e8c39ec1d2732f95d206ee1df ./clap_text_int8.mlmodelc/metadata.json
|
| 28 |
+
0cc3ccdcf48e622a4701fa44e4c2096f0bead887461cb400e2b4af4e5641c2ee ./clap_text_int8.mlmodelc/model.mil
|
| 29 |
+
f181a595cefce402335499c32ea2f9727ef334afea9c592a2eabebb4172350a0 ./clap_text_int8.mlmodelc/weights/weight.bin
|
| 30 |
+
468bdc0392942630945fc0e5ae65ba87f4576028d8899ba6f5125aeb122e69c5 ./clap_text_int8.mlpackage/Data/com.apple.CoreML/model.mlmodel
|
| 31 |
+
f181a595cefce402335499c32ea2f9727ef334afea9c592a2eabebb4172350a0 ./clap_text_int8.mlpackage/Data/com.apple.CoreML/weights/weight.bin
|
| 32 |
+
f6aed740178a9f3696c7dfb22fa9378b1ebfcbb3f167b5c2761ac43694779c42 ./clap_text_int8.mlpackage/Manifest.json
|
README.md
CHANGED
|
@@ -30,9 +30,13 @@ out of the graph entirely).
|
|
| 30 |
|---|---|---|
|
| 31 |
| `clap_audio.{mlpackage,mlmodelc}` | fp16 | HTSAT audio tower + `audio_projection` (spectrogram-input) |
|
| 32 |
| `clap_text.{mlpackage,mlmodelc}` | fp16 | RoBERTa text tower + `text_projection` |
|
|
|
|
|
|
|
| 33 |
|
| 34 |
`.mlpackage` is the canonical distributable; `.mlmodelc` is the compiled form the
|
| 35 |
-
test suite loads directly. `CHECKSUMS.sha256` covers every file.
|
|
|
|
|
|
|
| 36 |
|
| 37 |
### I/O contract (pinned from the artifact metadata)
|
| 38 |
|
|
@@ -88,6 +92,58 @@ time-major `[1001, 64]` → reshaped to `[1, 1, 1001, 64]`.
|
|
| 88 |
|
| 89 |
fp16 is clean on every placement — **fp16 is shipped** (no fp32 fallback needed).
|
| 90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
## Placement guidance (measured, never marketed)
|
| 92 |
|
| 93 |
- **text**: compiles for and runs on the ANE/GPU/CPU; fp16-clean on all.
|
|
|
|
| 30 |
|---|---|---|
|
| 31 |
| `clap_audio.{mlpackage,mlmodelc}` | fp16 | HTSAT audio tower + `audio_projection` (spectrogram-input) |
|
| 32 |
| `clap_text.{mlpackage,mlmodelc}` | fp16 | RoBERTa text tower + `text_projection` |
|
| 33 |
+
| `clap_audio_int8.{mlpackage,mlmodelc}` | int8 | audio tower — 8-bit k-means-palettized weights (weight-only; activations fp16) |
|
| 34 |
+
| `clap_text_int8.{mlpackage,mlmodelc}` | int8 | text tower — 8-bit k-means-palettized weights (weight-only; activations fp16) |
|
| 35 |
|
| 36 |
`.mlpackage` is the canonical distributable; `.mlmodelc` is the compiled form the
|
| 37 |
+
test suite loads directly. `CHECKSUMS.sha256` covers every file. The `_int8`
|
| 38 |
+
siblings are an **optional ~2× smaller** tier (see "int8 weight-only tier" below);
|
| 39 |
+
the fp16 graphs remain the default.
|
| 40 |
|
| 41 |
### I/O contract (pinned from the artifact metadata)
|
| 42 |
|
|
|
|
| 92 |
|
| 93 |
fp16 is clean on every placement — **fp16 is shipped** (no fp32 fallback needed).
|
| 94 |
|
| 95 |
+
## int8 weight-only tier (optional, ~2× smaller)
|
| 96 |
+
|
| 97 |
+
Alongside the fp16 graphs this repo ships an **8-bit weight-only** tier of both
|
| 98 |
+
towers — `clap_audio_int8` / `clap_text_int8`. Weights are stored 8-bit and
|
| 99 |
+
dequantized to fp16 at runtime; **activations stay fp16** (identical graph maths,
|
| 100 |
+
only the constant weights are compressed). Produced from the shipped fp16
|
| 101 |
+
`.mlpackage`s by coremltools post-training compression — no reconversion, same
|
| 102 |
+
source weights.
|
| 103 |
+
|
| 104 |
+
- **Method: 8-bit k-means palettization, per-tensor**
|
| 105 |
+
(`coremltools.optimize.coreml.palettize_weights`, `nbits=8`, `mode="kmeans"`,
|
| 106 |
+
`weight_threshold=2048`). Chosen over linear-symmetric int8
|
| 107 |
+
(`linear_quantize_weights`) **by measurement**: on the text tower linear int8
|
| 108 |
+
costs up to **0.43%** cosine (worst 0.99571 vs fp16) while k-means costs
|
| 109 |
+
**0.13%** (worst 0.99873); on audio the two are close (0.99965 vs 0.99971).
|
| 110 |
+
k-means wins on both towers and is decisive on text, so it is the shipped `_int8`
|
| 111 |
+
tier. Tiny bias / LayerNorm-gain tensors (< 2048 elements) stay fp16; one RoBERTa
|
| 112 |
+
attention-mask fill constant (±inf) is likewise left uncompressed.
|
| 113 |
+
- **int8-vs-fp16 embedding cosine** (identical inputs, CPU; the conversion
|
| 114 |
+
verification set — 10 real clips + 12 varied prompts including CJK — plus the
|
| 115 |
+
committed `golden_mel` fixture):
|
| 116 |
+
|
| 117 |
+
| tower | worst | mean |
|
| 118 |
+
|---|---|---|
|
| 119 |
+
| audio | 0.99970584 | 0.99982787 |
|
| 120 |
+
| text | 0.99873250 | 0.99965990 |
|
| 121 |
+
|
| 122 |
+
Well inside a 0.5% cosine budget on both towers. (int8-vs-fp32-**source** worst:
|
| 123 |
+
audio 0.99967, text 0.99897 — barely further from the PyTorch source than fp16
|
| 124 |
+
itself, which is 0.99997 / 0.99988.)
|
| 125 |
+
- **Zero-shot ranking unchanged.** The end-to-end gate (a ~192 s speech clip → 20
|
| 126 |
+
windows → aggregate → 4-anchor zero-shot score) returns the **identical ranking**
|
| 127 |
+
on int8 as on fp16: top label "This is a sound of a person speaking" at logit
|
| 128 |
+
**8.88** (fp16 8.82), same order for music / dog / rain, same margins.
|
| 129 |
+
- **Placement unchanged.** Cross-compute-unit agreement holds (audio 0.99998, text
|
| 130 |
+
0.99994 — ≥ the 0.9999 band on All / CPU+NE / CPU+GPU / CPU). Audio still fails
|
| 131 |
+
`ANECCompile()` and falls back to GPU/CPU; text still compiles for the ANE — the
|
| 132 |
+
palettized weights change neither.
|
| 133 |
+
- **Size** (`weight.bin` bytes, fp16 → int8):
|
| 134 |
+
|
| 135 |
+
| tower | fp16 | int8 | ratio |
|
| 136 |
+
|---|---|---|---|
|
| 137 |
+
| audio | 60,562,432 | 30,409,920 | 1.99× |
|
| 138 |
+
| text | 251,665,792 | 125,746,688 | 2.00× |
|
| 139 |
+
|
| 140 |
+
Compiled `.mlmodelc`: audio 58 MB → 29 MB, text 240 MB → 120 MB.
|
| 141 |
+
|
| 142 |
+
Same toolchain pin as the fp16 conversion (coremltools 9.0; scikit-learn provides
|
| 143 |
+
the k-means step). The int8 tier is a pure recompression of the pinned fp16
|
| 144 |
+
artifacts, so its provenance and licensing are exactly those of the fp16 graphs
|
| 145 |
+
below.
|
| 146 |
+
|
| 147 |
## Placement guidance (measured, never marketed)
|
| 148 |
|
| 149 |
- **text**: compiles for and runs on the ANE/GPU/CPU; fp16-clean on all.
|
clap_audio_int8.mlmodelc/analytics/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4455479a6d65004fe95d582246675cc9167c0b8fb6e0e673ad9db4009c0443de
|
| 3 |
+
size 243
|
clap_audio_int8.mlmodelc/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4bee9628bdf8821a391b32a7d23967c3c6712ae72088a318266583f35743ac33
|
| 3 |
+
size 613
|
clap_audio_int8.mlmodelc/metadata.json
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"metadataOutputVersion" : "3.0",
|
| 4 |
+
"shortDescription" : "CLAP audio encoder (HTSAT + audio_projection), spectrogram-input — int8 weight-only (int8_kmeans)",
|
| 5 |
+
"outputSchema" : [
|
| 6 |
+
{
|
| 7 |
+
"hasShapeFlexibility" : "0",
|
| 8 |
+
"isOptional" : "0",
|
| 9 |
+
"dataType" : "Float32",
|
| 10 |
+
"formattedType" : "MultiArray (Float32 1 × 512)",
|
| 11 |
+
"shortDescription" : "",
|
| 12 |
+
"shape" : "[1, 512]",
|
| 13 |
+
"name" : "audio_embeds",
|
| 14 |
+
"type" : "MultiArray"
|
| 15 |
+
}
|
| 16 |
+
],
|
| 17 |
+
"storagePrecision" : "Mixed (Float16, Palettized (8 bits))",
|
| 18 |
+
"modelParameters" : [
|
| 19 |
+
|
| 20 |
+
],
|
| 21 |
+
"author" : "clapkit T1: laion\/clap-htsat-unfused audio tower (HTSAT + audio_projection), pre-norm | int8 weight-only (int8_kmeans) tier",
|
| 22 |
+
"specificationVersion" : 8,
|
| 23 |
+
"mlProgramOperationTypeHistogram" : {
|
| 24 |
+
"Ios17.mul" : 12,
|
| 25 |
+
"Ios17.linear" : 77,
|
| 26 |
+
"Ios17.transpose" : 79,
|
| 27 |
+
"Ios16.constexprLutToDense" : 93,
|
| 28 |
+
"Ios17.matmul" : 25,
|
| 29 |
+
"Ios17.conv" : 1,
|
| 30 |
+
"Ios17.gather" : 20,
|
| 31 |
+
"Ios17.add" : 41,
|
| 32 |
+
"Ios17.sliceByIndex" : 18,
|
| 33 |
+
"Ios17.batchNorm" : 1,
|
| 34 |
+
"Ios17.concat" : 4,
|
| 35 |
+
"Ios16.softmax" : 12,
|
| 36 |
+
"Ios16.gelu" : 12,
|
| 37 |
+
"Ios16.reduceMean" : 1,
|
| 38 |
+
"Ios16.relu" : 1,
|
| 39 |
+
"Ios17.reshape" : 130,
|
| 40 |
+
"Ios17.layerNorm" : 29,
|
| 41 |
+
"Ios17.cast" : 2
|
| 42 |
+
},
|
| 43 |
+
"computePrecision" : "Mixed (Float16, Float32, Int32, UInt16)",
|
| 44 |
+
"isUpdatable" : "0",
|
| 45 |
+
"stateSchema" : [
|
| 46 |
+
|
| 47 |
+
],
|
| 48 |
+
"availability" : {
|
| 49 |
+
"macOS" : "14.0",
|
| 50 |
+
"tvOS" : "17.0",
|
| 51 |
+
"visionOS" : "1.0",
|
| 52 |
+
"watchOS" : "10.0",
|
| 53 |
+
"iOS" : "17.0",
|
| 54 |
+
"macCatalyst" : "17.0"
|
| 55 |
+
},
|
| 56 |
+
"modelType" : {
|
| 57 |
+
"name" : "MLModelType_mlProgram"
|
| 58 |
+
},
|
| 59 |
+
"inputSchema" : [
|
| 60 |
+
{
|
| 61 |
+
"hasShapeFlexibility" : "0",
|
| 62 |
+
"isOptional" : "0",
|
| 63 |
+
"dataType" : "Float32",
|
| 64 |
+
"formattedType" : "MultiArray (Float32 1 × 1 × 1001 × 64)",
|
| 65 |
+
"shortDescription" : "",
|
| 66 |
+
"shape" : "[1, 1, 1001, 64]",
|
| 67 |
+
"name" : "input_features",
|
| 68 |
+
"type" : "MultiArray"
|
| 69 |
+
}
|
| 70 |
+
],
|
| 71 |
+
"userDefinedMetadata" : {
|
| 72 |
+
"com.github.apple.coremltools.conversion_date" : "2026-07-18",
|
| 73 |
+
"com.github.apple.coremltools.source" : "torch==2.5.1",
|
| 74 |
+
"com.github.apple.coremltools.version" : "9.0",
|
| 75 |
+
"com.github.apple.coremltools.source_dialect" : "TorchScript"
|
| 76 |
+
},
|
| 77 |
+
"generatedClassName" : "clap_audio_int8_kmeans",
|
| 78 |
+
"method" : "predict"
|
| 79 |
+
}
|
| 80 |
+
]
|
clap_audio_int8.mlmodelc/model.mil
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
clap_audio_int8.mlmodelc/weights/weight.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b3a37ec5550dcdd6932b314b830275ebcba013748421e1a517760b9afeabafb8
|
| 3 |
+
size 30409920
|
clap_audio_int8.mlpackage/Data/com.apple.CoreML/model.mlmodel
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0dfa76a3a646e8001a923afb7e3c530791a7d2ec4840c4c0bcc1a4e0666d95e8
|
| 3 |
+
size 239348
|
clap_audio_int8.mlpackage/Data/com.apple.CoreML/weights/weight.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b3a37ec5550dcdd6932b314b830275ebcba013748421e1a517760b9afeabafb8
|
| 3 |
+
size 30409920
|
clap_audio_int8.mlpackage/Manifest.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"fileFormatVersion": "1.0.0",
|
| 3 |
+
"itemInfoEntries": {
|
| 4 |
+
"4DD6422A-5E33-4740-A410-AD78A02EA811": {
|
| 5 |
+
"author": "com.apple.CoreML",
|
| 6 |
+
"description": "CoreML Model Specification",
|
| 7 |
+
"name": "model.mlmodel",
|
| 8 |
+
"path": "com.apple.CoreML/model.mlmodel"
|
| 9 |
+
},
|
| 10 |
+
"9B4A7D10-2F98-4170-9A92-0E30990F6E18": {
|
| 11 |
+
"author": "com.apple.CoreML",
|
| 12 |
+
"description": "CoreML Model Weights",
|
| 13 |
+
"name": "weights",
|
| 14 |
+
"path": "com.apple.CoreML/weights"
|
| 15 |
+
}
|
| 16 |
+
},
|
| 17 |
+
"rootModelIdentifier": "4DD6422A-5E33-4740-A410-AD78A02EA811"
|
| 18 |
+
}
|
clap_text_int8.mlmodelc/analytics/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b914a93d50ae8336aad0977e28c4c1f84dccc39f7845fcd1660c43d565ca6fb7
|
| 3 |
+
size 243
|
clap_text_int8.mlmodelc/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:95bc733c2b0d3d2fa64edf548f77a50f344c020cce382a0b96c46477ad4a0b84
|
| 3 |
+
size 617
|
clap_text_int8.mlmodelc/metadata.json
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"metadataOutputVersion" : "3.0",
|
| 4 |
+
"shortDescription" : "CLAP text encoder (RoBERTa + text_projection) — int8 weight-only (int8_kmeans)",
|
| 5 |
+
"outputSchema" : [
|
| 6 |
+
{
|
| 7 |
+
"hasShapeFlexibility" : "0",
|
| 8 |
+
"isOptional" : "0",
|
| 9 |
+
"dataType" : "Float32",
|
| 10 |
+
"formattedType" : "MultiArray (Float32 1 × 512)",
|
| 11 |
+
"shortDescription" : "",
|
| 12 |
+
"shape" : "[1, 512]",
|
| 13 |
+
"name" : "text_embeds",
|
| 14 |
+
"type" : "MultiArray"
|
| 15 |
+
}
|
| 16 |
+
],
|
| 17 |
+
"storagePrecision" : "Mixed (Float16, Palettized (8 bits))",
|
| 18 |
+
"modelParameters" : [
|
| 19 |
+
|
| 20 |
+
],
|
| 21 |
+
"author" : "clapkit T1: laion\/clap-htsat-unfused text tower (RoBERTa + text_projection), pre-norm | int8 weight-only (int8_kmeans) tier",
|
| 22 |
+
"specificationVersion" : 8,
|
| 23 |
+
"mlProgramOperationTypeHistogram" : {
|
| 24 |
+
"Ios17.notEqual" : 1,
|
| 25 |
+
"Ios17.reshape" : 48,
|
| 26 |
+
"Ios17.logicalAnd" : 1,
|
| 27 |
+
"Ios16.softmax" : 12,
|
| 28 |
+
"Ios17.matmul" : 24,
|
| 29 |
+
"Ios17.transpose" : 48,
|
| 30 |
+
"Select" : 3,
|
| 31 |
+
"Ios17.add" : 41,
|
| 32 |
+
"Ios17.sliceByIndex" : 1,
|
| 33 |
+
"Ios17.gatherAlongAxis" : 1,
|
| 34 |
+
"Ios17.gatherNd" : 1,
|
| 35 |
+
"Ios17.gather" : 3,
|
| 36 |
+
"Ios17.layerNorm" : 25,
|
| 37 |
+
"Ios16.gelu" : 12,
|
| 38 |
+
"Ios17.cast" : 6,
|
| 39 |
+
"Ios16.constexprLutToDense" : 79,
|
| 40 |
+
"Ios17.tanh" : 1,
|
| 41 |
+
"Ios16.relu" : 1,
|
| 42 |
+
"Ios17.linear" : 75,
|
| 43 |
+
"Ios17.greaterEqual" : 2,
|
| 44 |
+
"Ios16.cumsum" : 1,
|
| 45 |
+
"Ios17.mul" : 13
|
| 46 |
+
},
|
| 47 |
+
"computePrecision" : "Mixed (Float16, Float32, Int32, Int8, UInt16)",
|
| 48 |
+
"isUpdatable" : "0",
|
| 49 |
+
"stateSchema" : [
|
| 50 |
+
|
| 51 |
+
],
|
| 52 |
+
"availability" : {
|
| 53 |
+
"macOS" : "14.0",
|
| 54 |
+
"tvOS" : "17.0",
|
| 55 |
+
"visionOS" : "1.0",
|
| 56 |
+
"watchOS" : "10.0",
|
| 57 |
+
"iOS" : "17.0",
|
| 58 |
+
"macCatalyst" : "17.0"
|
| 59 |
+
},
|
| 60 |
+
"modelType" : {
|
| 61 |
+
"name" : "MLModelType_mlProgram"
|
| 62 |
+
},
|
| 63 |
+
"inputSchema" : [
|
| 64 |
+
{
|
| 65 |
+
"hasShapeFlexibility" : "0",
|
| 66 |
+
"isOptional" : "0",
|
| 67 |
+
"dataType" : "Int32",
|
| 68 |
+
"formattedType" : "MultiArray (Int32 1 × 512)",
|
| 69 |
+
"shortDescription" : "",
|
| 70 |
+
"shape" : "[1, 512]",
|
| 71 |
+
"name" : "input_ids",
|
| 72 |
+
"type" : "MultiArray"
|
| 73 |
+
},
|
| 74 |
+
{
|
| 75 |
+
"hasShapeFlexibility" : "0",
|
| 76 |
+
"isOptional" : "0",
|
| 77 |
+
"dataType" : "Int32",
|
| 78 |
+
"formattedType" : "MultiArray (Int32 1 × 512)",
|
| 79 |
+
"shortDescription" : "",
|
| 80 |
+
"shape" : "[1, 512]",
|
| 81 |
+
"name" : "attention_mask",
|
| 82 |
+
"type" : "MultiArray"
|
| 83 |
+
}
|
| 84 |
+
],
|
| 85 |
+
"userDefinedMetadata" : {
|
| 86 |
+
"com.github.apple.coremltools.conversion_date" : "2026-07-18",
|
| 87 |
+
"com.github.apple.coremltools.source" : "torch==2.5.1",
|
| 88 |
+
"com.github.apple.coremltools.version" : "9.0",
|
| 89 |
+
"com.github.apple.coremltools.source_dialect" : "TorchScript"
|
| 90 |
+
},
|
| 91 |
+
"generatedClassName" : "clap_text_int8_kmeans",
|
| 92 |
+
"method" : "predict"
|
| 93 |
+
}
|
| 94 |
+
]
|
clap_text_int8.mlmodelc/model.mil
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
clap_text_int8.mlmodelc/weights/weight.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f181a595cefce402335499c32ea2f9727ef334afea9c592a2eabebb4172350a0
|
| 3 |
+
size 125746688
|
clap_text_int8.mlpackage/Data/com.apple.CoreML/model.mlmodel
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:468bdc0392942630945fc0e5ae65ba87f4576028d8899ba6f5125aeb122e69c5
|
| 3 |
+
size 160269
|
clap_text_int8.mlpackage/Data/com.apple.CoreML/weights/weight.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f181a595cefce402335499c32ea2f9727ef334afea9c592a2eabebb4172350a0
|
| 3 |
+
size 125746688
|
clap_text_int8.mlpackage/Manifest.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"fileFormatVersion": "1.0.0",
|
| 3 |
+
"itemInfoEntries": {
|
| 4 |
+
"77FCF9B8-1057-4833-877D-1D93B4F0B351": {
|
| 5 |
+
"author": "com.apple.CoreML",
|
| 6 |
+
"description": "CoreML Model Weights",
|
| 7 |
+
"name": "weights",
|
| 8 |
+
"path": "com.apple.CoreML/weights"
|
| 9 |
+
},
|
| 10 |
+
"C5028B06-BB64-4D12-B086-117B2D0852DB": {
|
| 11 |
+
"author": "com.apple.CoreML",
|
| 12 |
+
"description": "CoreML Model Specification",
|
| 13 |
+
"name": "model.mlmodel",
|
| 14 |
+
"path": "com.apple.CoreML/model.mlmodel"
|
| 15 |
+
}
|
| 16 |
+
},
|
| 17 |
+
"rootModelIdentifier": "C5028B06-BB64-4D12-B086-117B2D0852DB"
|
| 18 |
+
}
|