clapkit T1: LAION CLAP both encoders, fp16 (spectrogram-input audio + RoBERTa text), pre-norm
Browse files- CHECKSUMS.sha256 +16 -0
- README.md +120 -0
- clap_audio.mlmodelc/analytics/coremldata.bin +3 -0
- clap_audio.mlmodelc/coremldata.bin +3 -0
- clap_audio.mlmodelc/metadata.json +79 -0
- clap_audio.mlmodelc/model.mil +0 -0
- clap_audio.mlmodelc/weights/weight.bin +3 -0
- clap_audio.mlpackage/Data/com.apple.CoreML/model.mlmodel +3 -0
- clap_audio.mlpackage/Data/com.apple.CoreML/weights/weight.bin +3 -0
- clap_audio.mlpackage/Manifest.json +18 -0
- clap_text.mlmodelc/analytics/coremldata.bin +3 -0
- clap_text.mlmodelc/coremldata.bin +3 -0
- clap_text.mlmodelc/metadata.json +93 -0
- clap_text.mlmodelc/model.mil +0 -0
- clap_text.mlmodelc/weights/weight.bin +3 -0
- clap_text.mlpackage/Data/com.apple.CoreML/model.mlmodel +3 -0
- clap_text.mlpackage/Data/com.apple.CoreML/weights/weight.bin +3 -0
- clap_text.mlpackage/Manifest.json +18 -0
CHECKSUMS.sha256
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
29fbf161ab063c891080f328de0ee4ed80fdbaef4b5d36c4086c38da582aa7c4 ./clap_audio.mlmodelc/analytics/coremldata.bin
|
| 2 |
+
652c4652d19b4a7e926468e14582442f047389145576827068f6ae47f97ebb3e ./clap_audio.mlmodelc/coremldata.bin
|
| 3 |
+
44ea8733243b41a005a6aa25144fbde165c5e3f80ede79889f2d039da6a65ec4 ./clap_audio.mlmodelc/metadata.json
|
| 4 |
+
1ecf76edf7846153623485a98c0a3d047e660cc68ee10a6d21a39664d309db52 ./clap_audio.mlmodelc/model.mil
|
| 5 |
+
723fe6aab7c4af1c671a210a35c289c67763bc6a7532b9df155a0c3fc0c3c9d7 ./clap_audio.mlmodelc/weights/weight.bin
|
| 6 |
+
60ee442fc798667c56c884b05de76b8e85bf192ee18f7faa09b866e05c32460c ./clap_audio.mlpackage/Data/com.apple.CoreML/model.mlmodel
|
| 7 |
+
723fe6aab7c4af1c671a210a35c289c67763bc6a7532b9df155a0c3fc0c3c9d7 ./clap_audio.mlpackage/Data/com.apple.CoreML/weights/weight.bin
|
| 8 |
+
0ff7841663a6ffb424d0eebe85fcefbe2e0e5ed32ce70ba78a76e774c8d27fa6 ./clap_audio.mlpackage/Manifest.json
|
| 9 |
+
6ce0a63b5bf13fc8f60fb1b8956373a2317d0a7349a0b6899ce5030eb9f8aef6 ./clap_text.mlmodelc/analytics/coremldata.bin
|
| 10 |
+
edbf40e51518ad8f65a1d070f4c0e9b87fea644e6d69eb9eb55652e9fc697885 ./clap_text.mlmodelc/coremldata.bin
|
| 11 |
+
8592b665a1e5a2d9b9078917b3dc9aedb0eb3fa8b8b4ae4630ee78b953082a7c ./clap_text.mlmodelc/metadata.json
|
| 12 |
+
0ec4d567c8d26a1aac4e161b1bdea6f9cd36441ec9e1da51fa5d28d79c22b744 ./clap_text.mlmodelc/model.mil
|
| 13 |
+
7f4e15e9ccb0ffbc2341eec286e9d9934d3d3d8d6465dfddebed248bddc0e3dd ./clap_text.mlmodelc/weights/weight.bin
|
| 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
|
README.md
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-4.0
|
| 3 |
+
tags:
|
| 4 |
+
- coreml
|
| 5 |
+
- clap
|
| 6 |
+
- audio-text
|
| 7 |
+
- htsat
|
| 8 |
+
- roberta
|
| 9 |
+
- zero-shot-audio-classification
|
| 10 |
+
- apple-neural-engine
|
| 11 |
+
library_name: coremlit
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# clapkit-coreml — fp16-safe CoreML conversions of LAION CLAP (both encoders)
|
| 15 |
+
|
| 16 |
+
CoreML conversions of **[laion/clap-htsat-unfused](https://huggingface.co/laion/clap-htsat-unfused)**
|
| 17 |
+
— both towers of the CLAP audio↔text model — converted from the PyTorch source
|
| 18 |
+
(`transformers` `ClapModel`) with the campaign's **fp16-survivable numerical guard
|
| 19 |
+
discipline**, so they are correct on the Apple GPU and Neural Engine, not just CPU.
|
| 20 |
+
|
| 21 |
+
Consumed by the `clapkit` crate of the
|
| 22 |
+
[coremlit](https://github.com/findit-studio/coremlit) workspace (Rust, sync,
|
| 23 |
+
sans-I/O). Each graph emits the final **512-d joint-space embedding pre-L2-norm**;
|
| 24 |
+
the caller performs the L2 normalization (this keeps the fp16 `rsqrt` guard class
|
| 25 |
+
out of the graph entirely).
|
| 26 |
+
|
| 27 |
+
## Contents
|
| 28 |
+
|
| 29 |
+
| artifact | form | what it is |
|
| 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 |
+
|
| 39 |
+
| encoder | input(s) | output |
|
| 40 |
+
|---|---|---|
|
| 41 |
+
| audio | `input_features` fp32 `[1, 1, 1001, 64]` (log-mel) | `audio_embeds` fp32 `[1, 512]` (pre-norm) |
|
| 42 |
+
| text | `input_ids` int32 `[1, 512]`, `attention_mask` int32 `[1, 512]` | `text_embeds` fp32 `[1, 512]` (pre-norm) |
|
| 43 |
+
|
| 44 |
+
- **Audio is 48 kHz mono**, a documented deviation from the workspace's 16 kHz
|
| 45 |
+
convention (CLAP's native rate). One inference = one fixed 480,000-sample (10 s)
|
| 46 |
+
window → the `[1, 1, 1001, 64]` mel.
|
| 47 |
+
- **Text length is fixed at 512** (the model's max). Padding a shorter prompt to
|
| 48 |
+
512 with the attention mask reproduces the natural-length embedding exactly
|
| 49 |
+
(verified cosine `1.0`), because RoBERTa derives positions from `input_ids` and
|
| 50 |
+
the mask zeroes the padding.
|
| 51 |
+
|
| 52 |
+
## The mel frontend lives in Rust (spectrogram-input), by measurement
|
| 53 |
+
|
| 54 |
+
The audio graph takes the **log-mel spectrogram**, not raw audio. Riding the
|
| 55 |
+
STFT + Slaney-mel + `power_to_dB` frontend *inside* the graph was attempted and
|
| 56 |
+
rejected on measurement:
|
| 57 |
+
|
| 58 |
+
- a faithful in-graph STFT reproduces HF's `ClapFeatureExtractor` mel only in
|
| 59 |
+
**float64** (the reference promotes to f64; an in-graph f32 STFT lands **0.55–0.90
|
| 60 |
+
cosine** away from the correct path end-to-end) — f64 is hostile to an fp16 ANE
|
| 61 |
+
graph;
|
| 62 |
+
- the `power_to_dB` floor `amin = 1e-10` is **1680× below fp16's smallest subnormal
|
| 63 |
+
(`2^-24`)** — exactly the vanishing-guard class this campaign guards against.
|
| 64 |
+
|
| 65 |
+
So the mel is a **Rust port validated bit-for-bit against textclap's `mel.rs`**
|
| 66 |
+
(the frontend oracle). Its parameters: `n_fft = 1024`, `hop = 480`, `n_mels = 64`,
|
| 67 |
+
`fmin = 50`, `fmax = 14000`, periodic Hann, Slaney scale + Slaney norm,
|
| 68 |
+
`center=True` reflect padding, `10·log10(max(·, 1e-10))`, HTSAT input-norm `none`,
|
| 69 |
+
time-major `[1001, 64]` → reshaped to `[1, 1, 1001, 64]`.
|
| 70 |
+
|
| 71 |
+
## Verification (measured, this conversion)
|
| 72 |
+
|
| 73 |
+
- **MIL-level fp16-guard audit CLEAN** — 55 guard sites total (audio 30, text 25),
|
| 74 |
+
every effective floor ≥ `2^-24`; no decomposed `softmax→log`; no unresolved
|
| 75 |
+
guards. The text tower's LayerNorm `eps = 1e-12` (below fp16 subnormal) is raised
|
| 76 |
+
to `2^-24` by the fp16 conversion; audio LayerNorm/BatchNorm `eps ≈ 1e-5` survive
|
| 77 |
+
as-is. Normalization is out of the graph, so there is no `rsqrt`/`real_div` guard.
|
| 78 |
+
- **PyTorch fp32 vs CoreML fp32 (CPU)** on real inputs: worst cosine **1.00000000**
|
| 79 |
+
(audio, 10 real clips: music / speech / SFX / ambient) and **1.00000000** (text,
|
| 80 |
+
12 varied prompts). The graph conversion is faithful; the HTSAT `reshape_mel2img`
|
| 81 |
+
bicubic resize is reproduced by an exact baked-constant matmul.
|
| 82 |
+
- **CoreML fp16 vs fp32**, worst cosine per compute unit:
|
| 83 |
+
|
| 84 |
+
| encoder | ALL | CPU+GPU | CPU |
|
| 85 |
+
|---|---|---|---|
|
| 86 |
+
| audio | 0.99999573 | 0.99999390 | 0.99996626 |
|
| 87 |
+
| text | 0.99994979 | 0.99999733 | 0.99987553 |
|
| 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.
|
| 94 |
+
- **audio**: the HTSAT graph currently **fails ANE compilation** (`ANECCompile()`)
|
| 95 |
+
and falls back to GPU/CPU — still fp16-clean there. Consumers should not assume
|
| 96 |
+
ANE placement for the audio tower; `clapkit` selects the compute unit and does
|
| 97 |
+
not assert ANE.
|
| 98 |
+
|
| 99 |
+
## Toolchain (pinned)
|
| 100 |
+
|
| 101 |
+
coremltools 9.0 · torch 2.5.1 · transformers 5.14.0 · numpy 1.26.4 · python 3.11.15.
|
| 102 |
+
Source revision: `laion/clap-htsat-unfused@8fa0f1c6d0433df6e97c127f64b2a1d6c0dcda8a`.
|
| 103 |
+
|
| 104 |
+
## Upstream provenance & licensing
|
| 105 |
+
|
| 106 |
+
These are **derivative conversions**: the same LAION CLAP weights, re-emitted as
|
| 107 |
+
CoreML graphs (projection heads in-graph, L2-norm out, mel frontend externalized).
|
| 108 |
+
|
| 109 |
+
| component | upstream | license |
|
| 110 |
+
|---|---|---|
|
| 111 |
+
| both encoders | [laion/clap-htsat-unfused](https://huggingface.co/laion/clap-htsat-unfused) | see note |
|
| 112 |
+
| tokenizer (used by `clapkit`, not redistributed here) | [Xenova/clap-htsat-unfused](https://huggingface.co/Xenova/clap-htsat-unfused) `@c28f2883…` (`tokenizer.json` sha `dc239041…`) | derived from the RoBERTa tokenizer |
|
| 113 |
+
|
| 114 |
+
> **License note.** Attribution to `laion/clap-htsat-unfused` is provided as
|
| 115 |
+
> required. The LAION CLAP checkpoints are commonly attributed as **CC-BY-4.0**
|
| 116 |
+
> (the position taken by the consuming project and reflected in the front-matter),
|
| 117 |
+
> while the current upstream HF model card declares **apache-2.0**. Both licenses
|
| 118 |
+
> require attribution, which this repository provides; downstream users should
|
| 119 |
+
> honor whichever the upstream author intends. If you are the upstream author and
|
| 120 |
+
> want changes to this redistribution, please open a discussion.
|
clap_audio.mlmodelc/analytics/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:29fbf161ab063c891080f328de0ee4ed80fdbaef4b5d36c4086c38da582aa7c4
|
| 3 |
+
size 243
|
clap_audio.mlmodelc/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:652c4652d19b4a7e926468e14582442f047389145576827068f6ae47f97ebb3e
|
| 3 |
+
size 589
|
clap_audio.mlmodelc/metadata.json
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"metadataOutputVersion" : "3.0",
|
| 4 |
+
"shortDescription" : "CLAP audio encoder (spectrogram-input): mel [1,1,1001,64] -> 512-d joint embedding, L2-norm applied by the caller",
|
| 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" : "Float16",
|
| 18 |
+
"modelParameters" : [
|
| 19 |
+
|
| 20 |
+
],
|
| 21 |
+
"author" : "clapkit T1: laion\/clap-htsat-unfused audio tower (HTSAT + audio_projection), pre-norm",
|
| 22 |
+
"specificationVersion" : 8,
|
| 23 |
+
"mlProgramOperationTypeHistogram" : {
|
| 24 |
+
"Ios17.mul" : 12,
|
| 25 |
+
"Ios17.linear" : 77,
|
| 26 |
+
"Ios17.transpose" : 79,
|
| 27 |
+
"Ios17.matmul" : 25,
|
| 28 |
+
"Ios17.conv" : 1,
|
| 29 |
+
"Ios17.gather" : 20,
|
| 30 |
+
"Ios17.add" : 41,
|
| 31 |
+
"Ios17.sliceByIndex" : 18,
|
| 32 |
+
"Ios17.batchNorm" : 1,
|
| 33 |
+
"Ios17.concat" : 4,
|
| 34 |
+
"Ios16.softmax" : 12,
|
| 35 |
+
"Ios16.gelu" : 12,
|
| 36 |
+
"Ios16.reduceMean" : 1,
|
| 37 |
+
"Ios16.relu" : 1,
|
| 38 |
+
"Ios17.reshape" : 130,
|
| 39 |
+
"Ios17.layerNorm" : 29,
|
| 40 |
+
"Ios17.cast" : 2
|
| 41 |
+
},
|
| 42 |
+
"computePrecision" : "Mixed (Float16, Float32, Int32, UInt16)",
|
| 43 |
+
"isUpdatable" : "0",
|
| 44 |
+
"stateSchema" : [
|
| 45 |
+
|
| 46 |
+
],
|
| 47 |
+
"availability" : {
|
| 48 |
+
"macOS" : "14.0",
|
| 49 |
+
"tvOS" : "17.0",
|
| 50 |
+
"visionOS" : "1.0",
|
| 51 |
+
"watchOS" : "10.0",
|
| 52 |
+
"iOS" : "17.0",
|
| 53 |
+
"macCatalyst" : "17.0"
|
| 54 |
+
},
|
| 55 |
+
"modelType" : {
|
| 56 |
+
"name" : "MLModelType_mlProgram"
|
| 57 |
+
},
|
| 58 |
+
"inputSchema" : [
|
| 59 |
+
{
|
| 60 |
+
"hasShapeFlexibility" : "0",
|
| 61 |
+
"isOptional" : "0",
|
| 62 |
+
"dataType" : "Float32",
|
| 63 |
+
"formattedType" : "MultiArray (Float32 1 × 1 × 1001 × 64)",
|
| 64 |
+
"shortDescription" : "",
|
| 65 |
+
"shape" : "[1, 1, 1001, 64]",
|
| 66 |
+
"name" : "input_features",
|
| 67 |
+
"type" : "MultiArray"
|
| 68 |
+
}
|
| 69 |
+
],
|
| 70 |
+
"userDefinedMetadata" : {
|
| 71 |
+
"com.github.apple.coremltools.conversion_date" : "2026-07-18",
|
| 72 |
+
"com.github.apple.coremltools.source" : "torch==2.5.1",
|
| 73 |
+
"com.github.apple.coremltools.version" : "9.0",
|
| 74 |
+
"com.github.apple.coremltools.source_dialect" : "TorchScript"
|
| 75 |
+
},
|
| 76 |
+
"generatedClassName" : "clap_audio",
|
| 77 |
+
"method" : "predict"
|
| 78 |
+
}
|
| 79 |
+
]
|
clap_audio.mlmodelc/model.mil
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
clap_audio.mlmodelc/weights/weight.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:723fe6aab7c4af1c671a210a35c289c67763bc6a7532b9df155a0c3fc0c3c9d7
|
| 3 |
+
size 60562432
|
clap_audio.mlpackage/Data/com.apple.CoreML/model.mlmodel
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:60ee442fc798667c56c884b05de76b8e85bf192ee18f7faa09b866e05c32460c
|
| 3 |
+
size 225224
|
clap_audio.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:723fe6aab7c4af1c671a210a35c289c67763bc6a7532b9df155a0c3fc0c3c9d7
|
| 3 |
+
size 60562432
|
clap_audio.mlpackage/Manifest.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"fileFormatVersion": "1.0.0",
|
| 3 |
+
"itemInfoEntries": {
|
| 4 |
+
"2B049E29-0466-4DD5-9DC7-673A6A97CE6F": {
|
| 5 |
+
"author": "com.apple.CoreML",
|
| 6 |
+
"description": "CoreML Model Specification",
|
| 7 |
+
"name": "model.mlmodel",
|
| 8 |
+
"path": "com.apple.CoreML/model.mlmodel"
|
| 9 |
+
},
|
| 10 |
+
"DC7C3634-A1E3-42D3-9D0C-22CFE01170D0": {
|
| 11 |
+
"author": "com.apple.CoreML",
|
| 12 |
+
"description": "CoreML Model Weights",
|
| 13 |
+
"name": "weights",
|
| 14 |
+
"path": "com.apple.CoreML/weights"
|
| 15 |
+
}
|
| 16 |
+
},
|
| 17 |
+
"rootModelIdentifier": "2B049E29-0466-4DD5-9DC7-673A6A97CE6F"
|
| 18 |
+
}
|
clap_text.mlmodelc/analytics/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6ce0a63b5bf13fc8f60fb1b8956373a2317d0a7349a0b6899ce5030eb9f8aef6
|
| 3 |
+
size 243
|
clap_text.mlmodelc/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:edbf40e51518ad8f65a1d070f4c0e9b87fea644e6d69eb9eb55652e9fc697885
|
| 3 |
+
size 606
|
clap_text.mlmodelc/metadata.json
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"metadataOutputVersion" : "3.0",
|
| 4 |
+
"shortDescription" : "CLAP text encoder: input_ids\/attention_mask [1,512] -> 512-d joint embedding, L2-norm applied by the caller",
|
| 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" : "Float16",
|
| 18 |
+
"modelParameters" : [
|
| 19 |
+
|
| 20 |
+
],
|
| 21 |
+
"author" : "clapkit T1: laion\/clap-htsat-unfused text tower (RoBERTa + text_projection), pre-norm",
|
| 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" : 2,
|
| 31 |
+
"Ios17.add" : 40,
|
| 32 |
+
"Ios17.sliceByIndex" : 1,
|
| 33 |
+
"Ios17.gatherAlongAxis" : 1,
|
| 34 |
+
"Ios17.gatherNd" : 1,
|
| 35 |
+
"Ios17.gather" : 3,
|
| 36 |
+
"Ios17.layerNorm" : 25,
|
| 37 |
+
"Ios17.tanh" : 1,
|
| 38 |
+
"Ios16.gelu" : 12,
|
| 39 |
+
"Ios17.cast" : 6,
|
| 40 |
+
"Ios16.relu" : 1,
|
| 41 |
+
"Ios17.linear" : 75,
|
| 42 |
+
"Ios17.greaterEqual" : 1,
|
| 43 |
+
"Ios16.cumsum" : 1,
|
| 44 |
+
"Ios17.mul" : 13
|
| 45 |
+
},
|
| 46 |
+
"computePrecision" : "Mixed (Float16, Float32, Int32, Int8, UInt16)",
|
| 47 |
+
"isUpdatable" : "0",
|
| 48 |
+
"stateSchema" : [
|
| 49 |
+
|
| 50 |
+
],
|
| 51 |
+
"availability" : {
|
| 52 |
+
"macOS" : "14.0",
|
| 53 |
+
"tvOS" : "17.0",
|
| 54 |
+
"visionOS" : "1.0",
|
| 55 |
+
"watchOS" : "10.0",
|
| 56 |
+
"iOS" : "17.0",
|
| 57 |
+
"macCatalyst" : "17.0"
|
| 58 |
+
},
|
| 59 |
+
"modelType" : {
|
| 60 |
+
"name" : "MLModelType_mlProgram"
|
| 61 |
+
},
|
| 62 |
+
"inputSchema" : [
|
| 63 |
+
{
|
| 64 |
+
"hasShapeFlexibility" : "0",
|
| 65 |
+
"isOptional" : "0",
|
| 66 |
+
"dataType" : "Int32",
|
| 67 |
+
"formattedType" : "MultiArray (Int32 1 × 512)",
|
| 68 |
+
"shortDescription" : "",
|
| 69 |
+
"shape" : "[1, 512]",
|
| 70 |
+
"name" : "input_ids",
|
| 71 |
+
"type" : "MultiArray"
|
| 72 |
+
},
|
| 73 |
+
{
|
| 74 |
+
"hasShapeFlexibility" : "0",
|
| 75 |
+
"isOptional" : "0",
|
| 76 |
+
"dataType" : "Int32",
|
| 77 |
+
"formattedType" : "MultiArray (Int32 1 × 512)",
|
| 78 |
+
"shortDescription" : "",
|
| 79 |
+
"shape" : "[1, 512]",
|
| 80 |
+
"name" : "attention_mask",
|
| 81 |
+
"type" : "MultiArray"
|
| 82 |
+
}
|
| 83 |
+
],
|
| 84 |
+
"userDefinedMetadata" : {
|
| 85 |
+
"com.github.apple.coremltools.conversion_date" : "2026-07-18",
|
| 86 |
+
"com.github.apple.coremltools.source" : "torch==2.5.1",
|
| 87 |
+
"com.github.apple.coremltools.version" : "9.0",
|
| 88 |
+
"com.github.apple.coremltools.source_dialect" : "TorchScript"
|
| 89 |
+
},
|
| 90 |
+
"generatedClassName" : "clap_text",
|
| 91 |
+
"method" : "predict"
|
| 92 |
+
}
|
| 93 |
+
]
|
clap_text.mlmodelc/model.mil
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
clap_text.mlmodelc/weights/weight.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7f4e15e9ccb0ffbc2341eec286e9d9934d3d3d8d6465dfddebed248bddc0e3dd
|
| 3 |
+
size 251665792
|
clap_text.mlpackage/Data/com.apple.CoreML/model.mlmodel
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6c68d30cf088f657428175055e25e01552c5af56769b119dc25b7463d7135ade
|
| 3 |
+
size 147601
|
clap_text.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:7f4e15e9ccb0ffbc2341eec286e9d9934d3d3d8d6465dfddebed248bddc0e3dd
|
| 3 |
+
size 251665792
|
clap_text.mlpackage/Manifest.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"fileFormatVersion": "1.0.0",
|
| 3 |
+
"itemInfoEntries": {
|
| 4 |
+
"294DDB9A-5C5F-4DEA-B14F-6614D82E2A56": {
|
| 5 |
+
"author": "com.apple.CoreML",
|
| 6 |
+
"description": "CoreML Model Weights",
|
| 7 |
+
"name": "weights",
|
| 8 |
+
"path": "com.apple.CoreML/weights"
|
| 9 |
+
},
|
| 10 |
+
"D6451709-22A7-4307-8C0F-C6BA31754263": {
|
| 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": "D6451709-22A7-4307-8C0F-C6BA31754263"
|
| 18 |
+
}
|