CoreML forced aligner — T=768, inline fp16 embedding gather, stride-aware MLMultiArray access, finite -1e4 causal mask
Browse files- README.md +48 -26
- audio_encoder.mlmodelc/analytics/coremldata.bin +3 -0
- audio_encoder.mlmodelc/coremldata.bin +3 -0
- audio_encoder.mlmodelc/metadata.json +102 -0
- audio_encoder.mlmodelc/model.mil +0 -0
- audio_encoder.mlmodelc/weights/weight.bin +3 -0
- audio_encoder.mlpackage/Data/com.apple.CoreML/model.mlmodel +2 -2
- audio_encoder.mlpackage/Data/com.apple.CoreML/weights/weight.bin +2 -2
- audio_encoder.mlpackage/Manifest.json +8 -8
- config.json +5 -1
- embed_tokens.fp16.bin +3 -0
- text_decoder.mlmodelc/analytics/coremldata.bin +3 -0
- text_decoder.mlmodelc/coremldata.bin +3 -0
- text_decoder.mlmodelc/metadata.json +76 -0
- text_decoder.mlmodelc/model.mil +0 -0
- text_decoder.mlmodelc/weights/weight.bin +3 -0
- text_decoder.mlpackage/Data/com.apple.CoreML/model.mlmodel +2 -2
- text_decoder.mlpackage/Data/com.apple.CoreML/weights/weight.bin +2 -2
- text_decoder.mlpackage/Manifest.json +8 -8
README.md
CHANGED
|
@@ -18,49 +18,71 @@ tags:
|
|
| 18 |
- timestamps
|
| 19 |
- neural-engine
|
| 20 |
base_model: Qwen/Qwen3-ForcedAligner-0.6B
|
|
|
|
| 21 |
pipeline_tag: audio-classification
|
| 22 |
---
|
| 23 |
|
| 24 |
# Qwen3-ForcedAligner-0.6B — CoreML INT8
|
| 25 |
|
| 26 |
-
CoreML conversion of [Qwen/Qwen3-ForcedAligner-0.6B](https://huggingface.co/Qwen/Qwen3-ForcedAligner-0.6B) with INT8 palettization for Apple
|
| 27 |
|
| 28 |
-
Predicts word-level timestamps in a single forward pass.
|
| 29 |
|
| 30 |
-
##
|
| 31 |
|
| 32 |
-
|
|
| 33 |
-
|---
|
| 34 |
-
| `
|
| 35 |
-
| `
|
|
|
|
|
|
|
|
|
|
| 36 |
|
| 37 |
-
|
|
|
|
|
|
|
| 38 |
|
| 39 |
```swift
|
|
|
|
|
|
|
| 40 |
let aligner = try await CoreMLForcedAligner.fromPretrained(
|
| 41 |
-
modelId: "aufklarer/Qwen3-ForcedAligner-0.6B-CoreML-INT8"
|
| 42 |
-
|
| 43 |
-
|
|
|
|
|
|
|
|
|
|
| 44 |
```
|
| 45 |
|
| 46 |
-
|
| 47 |
|
| 48 |
-
|
| 49 |
-
|---------|---------|------|----------|
|
| 50 |
-
| CoreML INT4 | Neural Engine | ~630 MB | [aufklarer/Qwen3-ForcedAligner-0.6B-CoreML-INT4](https://huggingface.co/aufklarer/Qwen3-ForcedAligner-0.6B-CoreML-INT4) |
|
| 51 |
-
| **CoreML INT8** | **Neural Engine** | **~1.0 GB** | **aufklarer/Qwen3-ForcedAligner-0.6B-CoreML-INT8** |
|
| 52 |
-
| MLX 4-bit | GPU | ~979 MB | [aufklarer/Qwen3-ForcedAligner-0.6B-4bit](https://huggingface.co/aufklarer/Qwen3-ForcedAligner-0.6B-4bit) |
|
| 53 |
-
| MLX 8-bit | GPU | ~1.4 GB | [aufklarer/Qwen3-ForcedAligner-0.6B-8bit](https://huggingface.co/aufklarer/Qwen3-ForcedAligner-0.6B-8bit) |
|
| 54 |
|
| 55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
|
| 57 |
-
-
|
| 58 |
-
- **Base model**: [Qwen/Qwen3-ForcedAligner-0.6B](https://huggingface.co/Qwen/Qwen3-ForcedAligner-0.6B)
|
| 59 |
|
| 60 |
-
|
|
|
|
|
|
|
| 61 |
|
| 62 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
|
| 64 |
-
|
| 65 |
-
- **Docs**: [soniqo.audio](https://soniqo.audio)
|
| 66 |
-
- **GitHub**: [soniqo/speech-swift](https://github.com/soniqo/speech-swift)
|
|
|
|
| 18 |
- timestamps
|
| 19 |
- neural-engine
|
| 20 |
base_model: Qwen/Qwen3-ForcedAligner-0.6B
|
| 21 |
+
base_model_relation: quantized
|
| 22 |
pipeline_tag: audio-classification
|
| 23 |
---
|
| 24 |
|
| 25 |
# Qwen3-ForcedAligner-0.6B — CoreML INT8
|
| 26 |
|
| 27 |
+
CoreML conversion of [Qwen/Qwen3-ForcedAligner-0.6B](https://huggingface.co/Qwen/Qwen3-ForcedAligner-0.6B) with INT8 kmeans palettization on the two transformer bundles, for Apple Silicon.
|
| 28 |
|
| 29 |
+
Predicts word-level timestamps for audio + text pairs in a single non-autoregressive forward pass.
|
| 30 |
|
| 31 |
+
## Files
|
| 32 |
|
| 33 |
+
| File | Role | Size |
|
| 34 |
+
|---|---|---|
|
| 35 |
+
| `audio_encoder.mlmodelc` / `.mlpackage` | 24-layer block-attention encoder (INT8-palettized); fixed 30 s mel input | ~304 MB |
|
| 36 |
+
| `text_decoder.mlmodelc` / `.mlpackage` | 28-layer non-AR decoder + 5000-class classify head (INT8-palettized); fixed T=768 | ~427 MB |
|
| 37 |
+
| `embed_tokens.fp16.bin` | Raw little-endian fp16 token embedding table, shape [152 064, 1024] (not palettized) | ~297 MB |
|
| 38 |
+
| `config.json` | Runtime config — variant, classify_num, timestamp_segment_time, fixed shapes | small |
|
| 39 |
+
| `vocab.json`, `merges.txt`, `tokenizer_config.json` | Qwen3 BPE tokenizer files | ~5 MB |
|
| 40 |
|
| 41 |
+
The embed-tokens table is shipped as a raw fp16 binary rather than a CoreML package — the Swift runtime memory-maps the file and gathers rows with `vImageConvert_Planar16FtoPlanarF`, which costs ~0.5 ms per alignment instead of the ~70 ms an mlpackage round-trip would cost. Keeping the embedding at fp16 (not palettized) preserves classify-time accuracy across the full vocabulary; the palettization budget is spent on the two large transformer bundles, where it matters most for disk and ANE memory.
|
| 42 |
+
|
| 43 |
+
## Usage (Swift via [speech-swift](https://github.com/soniqo/speech-swift))
|
| 44 |
|
| 45 |
```swift
|
| 46 |
+
import Qwen3ASR
|
| 47 |
+
|
| 48 |
let aligner = try await CoreMLForcedAligner.fromPretrained(
|
| 49 |
+
modelId: "aufklarer/Qwen3-ForcedAligner-0.6B-CoreML-INT8")
|
| 50 |
+
let aligned = try aligner.align(
|
| 51 |
+
audio: pcmSamples,
|
| 52 |
+
text: "Can you guarantee that the replacement part will be shipped tomorrow?",
|
| 53 |
+
sampleRate: 16000,
|
| 54 |
+
language: "English")
|
| 55 |
```
|
| 56 |
|
| 57 |
+
CLI: `speech align audio.wav --engine coreml --aligner-model aufklarer/Qwen3-ForcedAligner-0.6B-CoreML-INT8`
|
| 58 |
|
| 59 |
+
## Performance (M2 Max, 64 GB, debug build, 20 s clip)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
|
| 61 |
+
| Metric | Value |
|
| 62 |
+
|---|---|
|
| 63 |
+
| RTF | 0.014 (69× faster than real-time) |
|
| 64 |
+
| Peak RSS | 697 MB |
|
| 65 |
+
| Median alignment time | ~289 ms |
|
| 66 |
|
| 67 |
+
Per-stage profile (`COREML_ALIGN_PROFILE=1`):
|
|
|
|
| 68 |
|
| 69 |
+
```
|
| 70 |
+
mel=150ms encoder=78ms embedding=0.5ms splice=0ms decoder=54ms argmax=7ms
|
| 71 |
+
```
|
| 72 |
|
| 73 |
+
The decoder uses `MLComputeUnits = .all` because its 28 layers exceed the ~26-layer ANE graph cap; the encoder runs on `.cpuAndNeuralEngine`.
|
| 74 |
+
|
| 75 |
+
## Architecture
|
| 76 |
+
|
| 77 |
+
Same model as the upstream Qwen3-ForcedAligner. Inference is non-autoregressive: one forward pass over a chat-template prompt (system + audio + assistant + `<ts>` word `<ts>` slots), then argmax at the timestamp positions, then LIS monotonicity correction.
|
| 78 |
+
|
| 79 |
+
The causal mask is baked into the exported graph as a constant with a finite ``-1e4`` fill value (not ``-inf``) so the fp16 softmax cannot produce NaN.
|
| 80 |
+
|
| 81 |
+
Conversion source: [soniqo/speech-models/models/forced-aligner/export/convert_coreml.py](https://github.com/soniqo/speech-models).
|
| 82 |
+
|
| 83 |
+
## Variants
|
| 84 |
+
|
| 85 |
+
- This repo: **INT8** — kmeans-palettized text decoder + audio encoder, ~880 MB, similar RTF, ~35% lower peak memory than FP16.
|
| 86 |
+
- Companion: [`aufklarer/Qwen3-ForcedAligner-0.6B-CoreML-FP16`](https://huggingface.co/aufklarer/Qwen3-ForcedAligner-0.6B-CoreML-FP16) — full precision, ~1.7 GB, highest fidelity.
|
| 87 |
|
| 88 |
+
For pure MLX paths (no CoreML), see the `4bit`, `5bit`, `8bit`, and `bf16` siblings under the same HuggingFace org.
|
|
|
|
|
|
audio_encoder.mlmodelc/analytics/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c3cff651be40392d81b73d1c5a449a43a68eb7f5d4a642f0a2efaf315aa4d17e
|
| 3 |
+
size 243
|
audio_encoder.mlmodelc/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d310aae19a7b4bb18c5a9dbbeca9a4afc44062b3b28ef2df72bc3c273b39597e
|
| 3 |
+
size 376
|
audio_encoder.mlmodelc/metadata.json
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"metadataOutputVersion" : "3.0",
|
| 4 |
+
"storagePrecision" : "Mixed (Float16, Palettized (8 bits))",
|
| 5 |
+
"outputSchema" : [
|
| 6 |
+
{
|
| 7 |
+
"hasShapeFlexibility" : "0",
|
| 8 |
+
"isOptional" : "0",
|
| 9 |
+
"dataType" : "Float16",
|
| 10 |
+
"formattedType" : "MultiArray (Float16 1 × 390 × 1024)",
|
| 11 |
+
"shortDescription" : "",
|
| 12 |
+
"shape" : "[1, 390, 1024]",
|
| 13 |
+
"name" : "audio_embeddings",
|
| 14 |
+
"type" : "MultiArray"
|
| 15 |
+
},
|
| 16 |
+
{
|
| 17 |
+
"hasShapeFlexibility" : "0",
|
| 18 |
+
"isOptional" : "0",
|
| 19 |
+
"dataType" : "Int32",
|
| 20 |
+
"formattedType" : "MultiArray (Int32 1)",
|
| 21 |
+
"shortDescription" : "",
|
| 22 |
+
"shape" : "[1]",
|
| 23 |
+
"name" : "output_length",
|
| 24 |
+
"type" : "MultiArray"
|
| 25 |
+
}
|
| 26 |
+
],
|
| 27 |
+
"modelParameters" : [
|
| 28 |
+
|
| 29 |
+
],
|
| 30 |
+
"specificationVersion" : 8,
|
| 31 |
+
"mlProgramOperationTypeHistogram" : {
|
| 32 |
+
"Ios17.logicalAnd" : 2,
|
| 33 |
+
"Ios17.reshape" : 101,
|
| 34 |
+
"Ios16.softmax" : 24,
|
| 35 |
+
"Ios17.matmul" : 48,
|
| 36 |
+
"Ios17.transpose" : 98,
|
| 37 |
+
"Ios17.maximum" : 1,
|
| 38 |
+
"Select" : 1,
|
| 39 |
+
"Ios17.expandDims" : 4,
|
| 40 |
+
"Ios17.add" : 80,
|
| 41 |
+
"Ios17.gather" : 1,
|
| 42 |
+
"Ios17.layerNorm" : 49,
|
| 43 |
+
"Ios17.less" : 1,
|
| 44 |
+
"Ios17.sub" : 8,
|
| 45 |
+
"Ios16.constexprLutToDense" : 153,
|
| 46 |
+
"Ios17.conv" : 3,
|
| 47 |
+
"Ios17.clip" : 6,
|
| 48 |
+
"Ios17.linear" : 147,
|
| 49 |
+
"Ios16.gelu" : 28,
|
| 50 |
+
"Ios17.floorDiv" : 7,
|
| 51 |
+
"Ios17.minimum" : 1,
|
| 52 |
+
"Ios17.cast" : 11,
|
| 53 |
+
"Ios17.greater" : 6,
|
| 54 |
+
"Ios17.mul" : 26
|
| 55 |
+
},
|
| 56 |
+
"computePrecision" : "Mixed (Float16, Int32, UInt16)",
|
| 57 |
+
"isUpdatable" : "0",
|
| 58 |
+
"stateSchema" : [
|
| 59 |
+
|
| 60 |
+
],
|
| 61 |
+
"availability" : {
|
| 62 |
+
"macOS" : "14.0",
|
| 63 |
+
"tvOS" : "17.0",
|
| 64 |
+
"visionOS" : "1.0",
|
| 65 |
+
"watchOS" : "10.0",
|
| 66 |
+
"iOS" : "17.0",
|
| 67 |
+
"macCatalyst" : "17.0"
|
| 68 |
+
},
|
| 69 |
+
"modelType" : {
|
| 70 |
+
"name" : "MLModelType_mlProgram"
|
| 71 |
+
},
|
| 72 |
+
"userDefinedMetadata" : {
|
| 73 |
+
"com.github.apple.coremltools.version" : "8.3.0",
|
| 74 |
+
"com.github.apple.coremltools.source" : "torch==2.3.1",
|
| 75 |
+
"com.github.apple.coremltools.source_dialect" : "TorchScript"
|
| 76 |
+
},
|
| 77 |
+
"inputSchema" : [
|
| 78 |
+
{
|
| 79 |
+
"hasShapeFlexibility" : "0",
|
| 80 |
+
"isOptional" : "0",
|
| 81 |
+
"dataType" : "Float32",
|
| 82 |
+
"formattedType" : "MultiArray (Float32 1 × 128 × 3000)",
|
| 83 |
+
"shortDescription" : "",
|
| 84 |
+
"shape" : "[1, 128, 3000]",
|
| 85 |
+
"name" : "mel",
|
| 86 |
+
"type" : "MultiArray"
|
| 87 |
+
},
|
| 88 |
+
{
|
| 89 |
+
"hasShapeFlexibility" : "0",
|
| 90 |
+
"isOptional" : "0",
|
| 91 |
+
"dataType" : "Int32",
|
| 92 |
+
"formattedType" : "MultiArray (Int32 1)",
|
| 93 |
+
"shortDescription" : "",
|
| 94 |
+
"shape" : "[1]",
|
| 95 |
+
"name" : "mel_length",
|
| 96 |
+
"type" : "MultiArray"
|
| 97 |
+
}
|
| 98 |
+
],
|
| 99 |
+
"generatedClassName" : "audio_encoder",
|
| 100 |
+
"method" : "predict"
|
| 101 |
+
}
|
| 102 |
+
]
|
audio_encoder.mlmodelc/model.mil
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
audio_encoder.mlmodelc/weights/weight.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7b4eddd9b588c002922922840086d08a7b195a6932774c506dc2d4cdc94a1b9b
|
| 3 |
+
size 317035136
|
audio_encoder.mlpackage/Data/com.apple.CoreML/model.mlmodel
CHANGED
|
@@ -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:a8c09d520ef68809a3c3b313c484ab68b1787cc7f2cf9905106ffd60553b95cb
|
| 3 |
+
size 437954
|
audio_encoder.mlpackage/Data/com.apple.CoreML/weights/weight.bin
CHANGED
|
@@ -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:7b4eddd9b588c002922922840086d08a7b195a6932774c506dc2d4cdc94a1b9b
|
| 3 |
+
size 317035136
|
audio_encoder.mlpackage/Manifest.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
| 1 |
{
|
| 2 |
"fileFormatVersion": "1.0.0",
|
| 3 |
"itemInfoEntries": {
|
| 4 |
-
"
|
| 5 |
-
"author": "com.apple.CoreML",
|
| 6 |
-
"description": "CoreML Model Weights",
|
| 7 |
-
"name": "weights",
|
| 8 |
-
"path": "com.apple.CoreML/weights"
|
| 9 |
-
},
|
| 10 |
-
"8D8287BF-F06B-4E15-97EF-5CCF1702CFF9": {
|
| 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": "
|
| 18 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"fileFormatVersion": "1.0.0",
|
| 3 |
"itemInfoEntries": {
|
| 4 |
+
"8C63C029-A00C-40CD-A77E-0D338CBE599A": {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
"author": "com.apple.CoreML",
|
| 6 |
"description": "CoreML Model Specification",
|
| 7 |
"name": "model.mlmodel",
|
| 8 |
"path": "com.apple.CoreML/model.mlmodel"
|
| 9 |
+
},
|
| 10 |
+
"A771C53E-C476-4479-A9D9-3413760251AC": {
|
| 11 |
+
"author": "com.apple.CoreML",
|
| 12 |
+
"description": "CoreML Model Weights",
|
| 13 |
+
"name": "weights",
|
| 14 |
+
"path": "com.apple.CoreML/weights"
|
| 15 |
}
|
| 16 |
},
|
| 17 |
+
"rootModelIdentifier": "8C63C029-A00C-40CD-A77E-0D338CBE599A"
|
| 18 |
}
|
config.json
CHANGED
|
@@ -1,7 +1,11 @@
|
|
| 1 |
{
|
| 2 |
"format": "coreml",
|
|
|
|
| 3 |
"palettization_bits": 8,
|
| 4 |
"hidden_size": 1024,
|
| 5 |
"classify_num": 5000,
|
| 6 |
-
"timestamp_segment_time": 0.08
|
|
|
|
|
|
|
|
|
|
| 7 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"format": "coreml",
|
| 3 |
+
"variant": "int8",
|
| 4 |
"palettization_bits": 8,
|
| 5 |
"hidden_size": 1024,
|
| 6 |
"classify_num": 5000,
|
| 7 |
+
"timestamp_segment_time": 0.08,
|
| 8 |
+
"fixed_mel_frames": 3000,
|
| 9 |
+
"fixed_audio_tokens": 390,
|
| 10 |
+
"text_fixed_t": 768
|
| 11 |
}
|
embed_tokens.fp16.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a6968a6f3a6520111cf9288239a09e766cdebba9067c43e59ef06c6aac8e0512
|
| 3 |
+
size 311427072
|
text_decoder.mlmodelc/analytics/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ac45c534534d1b8c4c28c3823a65ca73e5c511d412bdd712feec35aae77d1c6e
|
| 3 |
+
size 243
|
text_decoder.mlmodelc/coremldata.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:147c6ed553d4ebb7ff9f1cc358416051a08e92a90d94f63c63f1bf8aaa5d96e2
|
| 3 |
+
size 323
|
text_decoder.mlmodelc/metadata.json
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"metadataOutputVersion" : "3.0",
|
| 4 |
+
"storagePrecision" : "Mixed (Float16, Palettized (8 bits))",
|
| 5 |
+
"outputSchema" : [
|
| 6 |
+
{
|
| 7 |
+
"hasShapeFlexibility" : "0",
|
| 8 |
+
"isOptional" : "0",
|
| 9 |
+
"dataType" : "Float16",
|
| 10 |
+
"formattedType" : "MultiArray (Float16 1 × 768 × 5000)",
|
| 11 |
+
"shortDescription" : "",
|
| 12 |
+
"shape" : "[1, 768, 5000]",
|
| 13 |
+
"name" : "logits",
|
| 14 |
+
"type" : "MultiArray"
|
| 15 |
+
}
|
| 16 |
+
],
|
| 17 |
+
"modelParameters" : [
|
| 18 |
+
|
| 19 |
+
],
|
| 20 |
+
"specificationVersion" : 8,
|
| 21 |
+
"mlProgramOperationTypeHistogram" : {
|
| 22 |
+
"Ios17.mul" : 506,
|
| 23 |
+
"Ios17.linear" : 197,
|
| 24 |
+
"Ios17.transpose" : 252,
|
| 25 |
+
"Ios17.sub" : 56,
|
| 26 |
+
"Ios16.constexprLutToDense" : 200,
|
| 27 |
+
"Ios17.rsqrt" : 113,
|
| 28 |
+
"Ios17.matmul" : 56,
|
| 29 |
+
"Ios17.concat" : 56,
|
| 30 |
+
"Ios17.sliceByIndex" : 112,
|
| 31 |
+
"Ios17.add" : 253,
|
| 32 |
+
"Ios16.reduceMean" : 113,
|
| 33 |
+
"Tile" : 56,
|
| 34 |
+
"Ios17.pow" : 113,
|
| 35 |
+
"Ios16.softmax" : 28,
|
| 36 |
+
"Ios17.reshape" : 224,
|
| 37 |
+
"Ios17.cast" : 1,
|
| 38 |
+
"Ios16.silu" : 28
|
| 39 |
+
},
|
| 40 |
+
"computePrecision" : "Mixed (Float16, Float32, Int32)",
|
| 41 |
+
"isUpdatable" : "0",
|
| 42 |
+
"stateSchema" : [
|
| 43 |
+
|
| 44 |
+
],
|
| 45 |
+
"availability" : {
|
| 46 |
+
"macOS" : "14.0",
|
| 47 |
+
"tvOS" : "17.0",
|
| 48 |
+
"visionOS" : "1.0",
|
| 49 |
+
"watchOS" : "10.0",
|
| 50 |
+
"iOS" : "17.0",
|
| 51 |
+
"macCatalyst" : "17.0"
|
| 52 |
+
},
|
| 53 |
+
"modelType" : {
|
| 54 |
+
"name" : "MLModelType_mlProgram"
|
| 55 |
+
},
|
| 56 |
+
"userDefinedMetadata" : {
|
| 57 |
+
"com.github.apple.coremltools.version" : "8.3.0",
|
| 58 |
+
"com.github.apple.coremltools.source" : "torch==2.3.1",
|
| 59 |
+
"com.github.apple.coremltools.source_dialect" : "TorchScript"
|
| 60 |
+
},
|
| 61 |
+
"inputSchema" : [
|
| 62 |
+
{
|
| 63 |
+
"hasShapeFlexibility" : "0",
|
| 64 |
+
"isOptional" : "0",
|
| 65 |
+
"dataType" : "Float32",
|
| 66 |
+
"formattedType" : "MultiArray (Float32 1 × 768 × 1024)",
|
| 67 |
+
"shortDescription" : "",
|
| 68 |
+
"shape" : "[1, 768, 1024]",
|
| 69 |
+
"name" : "inputs_embeds",
|
| 70 |
+
"type" : "MultiArray"
|
| 71 |
+
}
|
| 72 |
+
],
|
| 73 |
+
"generatedClassName" : "text_decoder",
|
| 74 |
+
"method" : "predict"
|
| 75 |
+
}
|
| 76 |
+
]
|
text_decoder.mlmodelc/model.mil
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
text_decoder.mlmodelc/weights/weight.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:083cfeabb070794b7745694564f0154aa4329020c7eb344aff3406f348b25e3f
|
| 3 |
+
size 446498960
|
text_decoder.mlpackage/Data/com.apple.CoreML/model.mlmodel
CHANGED
|
@@ -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:021f16e825a94b093779ca67abc42d5097e1fd75f56b45346b705602be610fc0
|
| 3 |
+
size 667265
|
text_decoder.mlpackage/Data/com.apple.CoreML/weights/weight.bin
CHANGED
|
@@ -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:083cfeabb070794b7745694564f0154aa4329020c7eb344aff3406f348b25e3f
|
| 3 |
+
size 446498960
|
text_decoder.mlpackage/Manifest.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
| 1 |
{
|
| 2 |
"fileFormatVersion": "1.0.0",
|
| 3 |
"itemInfoEntries": {
|
| 4 |
-
"
|
| 5 |
-
"author": "com.apple.CoreML",
|
| 6 |
-
"description": "CoreML Model Specification",
|
| 7 |
-
"name": "model.mlmodel",
|
| 8 |
-
"path": "com.apple.CoreML/model.mlmodel"
|
| 9 |
-
},
|
| 10 |
-
"5E01B5E9-3ED2-4433-B70A-789523FA4835": {
|
| 11 |
"author": "com.apple.CoreML",
|
| 12 |
"description": "CoreML Model Weights",
|
| 13 |
"name": "weights",
|
| 14 |
"path": "com.apple.CoreML/weights"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
}
|
| 16 |
},
|
| 17 |
-
"rootModelIdentifier": "
|
| 18 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"fileFormatVersion": "1.0.0",
|
| 3 |
"itemInfoEntries": {
|
| 4 |
+
"0C8546BF-7845-4333-8C21-8CE8474C52B6": {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
"author": "com.apple.CoreML",
|
| 6 |
"description": "CoreML Model Weights",
|
| 7 |
"name": "weights",
|
| 8 |
"path": "com.apple.CoreML/weights"
|
| 9 |
+
},
|
| 10 |
+
"42F046A4-C822-4051-BD7B-791103EB03DD": {
|
| 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": "42F046A4-C822-4051-BD7B-791103EB03DD"
|
| 18 |
}
|