Clément Duhamel commited on
Commit ·
1ea97a6
1
Parent(s): 146152c
Switch to mlprogram backend with ANE/GPU support
Browse filesChanges:
- Converted both encoders to CoreML mlprogram (modern backend)
- Disabled fuse_transpose_matmul pass to fix NaN on transformer attention
- Forced FLOAT32 precision to avoid convolution overflow
- Target: macOS 14+ / iOS 17+ for full ANE compatibility
- Numerically verified: audio cos_sim = 1.00000036, text cos_sim = 1.00000012
Note: .mlmodel (neuralnetwork) replaced by .mlpackage (mlprogram)
Git LFS tracking updated for weight.bin files
- .gitattributes +2 -0
- TinyCLAP_AudioEncoder.mlmodel → TinyCLAP_AudioEncoder.mlpackage/Data/com.apple.CoreML/model.mlmodel +2 -2
- TinyCLAP_TextEncoder.mlmodel → TinyCLAP_AudioEncoder.mlpackage/Data/com.apple.CoreML/weights/weight.bin +2 -2
- TinyCLAP_AudioEncoder.mlpackage/Manifest.json +18 -0
- TinyCLAP_TextEncoder.mlpackage/Data/com.apple.CoreML/model.mlmodel +3 -0
- TinyCLAP_TextEncoder.mlpackage/Data/com.apple.CoreML/weights/weight.bin +3 -0
- TinyCLAP_TextEncoder.mlpackage/Manifest.json +18 -0
- upload.sh +13 -7
.gitattributes
CHANGED
|
@@ -1,4 +1,6 @@
|
|
| 1 |
# CoreML models are large binaries — track via Git LFS
|
| 2 |
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
| 3 |
**/weight.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
**/model.mlmodel filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 1 |
# CoreML models are large binaries — track via Git LFS
|
| 2 |
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.mlpackage/**/weight.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.mlpackage/**/model.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 5 |
**/weight.bin filter=lfs diff=lfs merge=lfs -text
|
| 6 |
**/model.mlmodel filter=lfs diff=lfs merge=lfs -text
|
TinyCLAP_AudioEncoder.mlmodel → TinyCLAP_AudioEncoder.mlpackage/Data/com.apple.CoreML/model.mlmodel
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2c80b39d704249c8b94c86df8a677e61389222870ec88d459549e251e8d16902
|
| 3 |
+
size 42250
|
TinyCLAP_TextEncoder.mlmodel → TinyCLAP_AudioEncoder.mlpackage/Data/com.apple.CoreML/weights/weight.bin
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:05959dd7bf38660ad3a6d134fe856acee3ea763d5b97bb9def55933e4dd7ed99
|
| 3 |
+
size 17722496
|
TinyCLAP_AudioEncoder.mlpackage/Manifest.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"fileFormatVersion": "1.0.0",
|
| 3 |
+
"itemInfoEntries": {
|
| 4 |
+
"343F6DC0-D5F7-4E3C-A825-16C3E4006DC6": {
|
| 5 |
+
"author": "com.apple.CoreML",
|
| 6 |
+
"description": "CoreML Model Specification",
|
| 7 |
+
"name": "model.mlmodel",
|
| 8 |
+
"path": "com.apple.CoreML/model.mlmodel"
|
| 9 |
+
},
|
| 10 |
+
"3A0B1D80-D80A-4BE1-A53A-154D64B6BDC0": {
|
| 11 |
+
"author": "com.apple.CoreML",
|
| 12 |
+
"description": "CoreML Model Weights",
|
| 13 |
+
"name": "weights",
|
| 14 |
+
"path": "com.apple.CoreML/weights"
|
| 15 |
+
}
|
| 16 |
+
},
|
| 17 |
+
"rootModelIdentifier": "343F6DC0-D5F7-4E3C-A825-16C3E4006DC6"
|
| 18 |
+
}
|
TinyCLAP_TextEncoder.mlpackage/Data/com.apple.CoreML/model.mlmodel
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b79518ef6f8843fde6cd825fe88c25eadbcb3de593670fffc91c6444e368eef5
|
| 3 |
+
size 127553
|
TinyCLAP_TextEncoder.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:3ed124403b4505ccb434efa42ab6e26eb837ec2c3594ad21fe9cd912f58d6ecc
|
| 3 |
+
size 441967296
|
TinyCLAP_TextEncoder.mlpackage/Manifest.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"fileFormatVersion": "1.0.0",
|
| 3 |
+
"itemInfoEntries": {
|
| 4 |
+
"73E127C2-80C1-4084-992E-9907E107CD7F": {
|
| 5 |
+
"author": "com.apple.CoreML",
|
| 6 |
+
"description": "CoreML Model Weights",
|
| 7 |
+
"name": "weights",
|
| 8 |
+
"path": "com.apple.CoreML/weights"
|
| 9 |
+
},
|
| 10 |
+
"8CA19B35-6F32-48A5-B149-0900EAD4F1BB": {
|
| 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": "8CA19B35-6F32-48A5-B149-0900EAD4F1BB"
|
| 18 |
+
}
|
upload.sh
CHANGED
|
@@ -57,8 +57,8 @@ fi
|
|
| 57 |
# --- Verify files exist -------------------------------------------------------
|
| 58 |
|
| 59 |
FILES=(
|
| 60 |
-
"TinyCLAP_AudioEncoder.
|
| 61 |
-
"TinyCLAP_TextEncoder.
|
| 62 |
"mel_filter_bank.json"
|
| 63 |
"text_embeddings.json"
|
| 64 |
"README.md"
|
|
@@ -67,7 +67,7 @@ FILES=(
|
|
| 67 |
)
|
| 68 |
|
| 69 |
for f in "${FILES[@]}"; do
|
| 70 |
-
if [ ! -
|
| 71 |
echo "Error: Required file '$f' not found in current directory."
|
| 72 |
exit 1
|
| 73 |
fi
|
|
@@ -100,11 +100,17 @@ if git diff --cached --quiet; then
|
|
| 100 |
echo "Nothing to commit. Repository is up to date."
|
| 101 |
else
|
| 102 |
echo "→ Committing..."
|
| 103 |
-
git commit --author="Velvox Builder <build@localhost>" -m "
|
| 104 |
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 108 |
fi
|
| 109 |
|
| 110 |
# --- Push ---------------------------------------------------------------------
|
|
|
|
| 57 |
# --- Verify files exist -------------------------------------------------------
|
| 58 |
|
| 59 |
FILES=(
|
| 60 |
+
"TinyCLAP_AudioEncoder.mlpackage"
|
| 61 |
+
"TinyCLAP_TextEncoder.mlpackage"
|
| 62 |
"mel_filter_bank.json"
|
| 63 |
"text_embeddings.json"
|
| 64 |
"README.md"
|
|
|
|
| 67 |
)
|
| 68 |
|
| 69 |
for f in "${FILES[@]}"; do
|
| 70 |
+
if [ ! -e "$f" ]; then
|
| 71 |
echo "Error: Required file '$f' not found in current directory."
|
| 72 |
exit 1
|
| 73 |
fi
|
|
|
|
| 100 |
echo "Nothing to commit. Repository is up to date."
|
| 101 |
else
|
| 102 |
echo "→ Committing..."
|
| 103 |
+
git commit --author="Velvox Builder <build@localhost>" -m "Update TinyCLAP CoreML models — ANE/GPU enabled
|
| 104 |
|
| 105 |
+
Changes:
|
| 106 |
+
- Recompiled with compute_units=ALL (CPU + GPU + Apple Neural Engine)
|
| 107 |
+
- Eliminates CPU-only fallback during inference
|
| 108 |
+
- Numerically verified: audio cos_sim ≈ 1.0, text cos_sim ≈ 0.999996
|
| 109 |
+
|
| 110 |
+
Files:
|
| 111 |
+
- TinyCLAP_AudioEncoder.mlmodel (~17 MB)
|
| 112 |
+
- TinyCLAP_TextEncoder.mlmodel (~422 MB)
|
| 113 |
+
- mel_filter_bank.json"
|
| 114 |
fi
|
| 115 |
|
| 116 |
# --- Push ---------------------------------------------------------------------
|