oceanicity commited on
Commit
f089580
·
verified ·
1 Parent(s): 43fe984

Add files using upload-large-folder tool

Browse files
Files changed (29) hide show
  1. README.md +38 -0
  2. chunk_0.mlpackage/Data/com.apple.CoreML/model.mlmodel +3 -0
  3. chunk_0.mlpackage/Data/com.apple.CoreML/weights/weight.bin +3 -0
  4. chunk_0.mlpackage/Manifest.json +18 -0
  5. chunk_1.mlpackage/Data/com.apple.CoreML/model.mlmodel +3 -0
  6. chunk_1.mlpackage/Data/com.apple.CoreML/weights/weight.bin +3 -0
  7. chunk_1.mlpackage/Manifest.json +18 -0
  8. chunk_2.mlpackage/Data/com.apple.CoreML/model.mlmodel +3 -0
  9. chunk_2.mlpackage/Data/com.apple.CoreML/weights/weight.bin +3 -0
  10. chunk_2.mlpackage/Manifest.json +18 -0
  11. chunk_3.mlpackage/Data/com.apple.CoreML/model.mlmodel +3 -0
  12. chunk_3.mlpackage/Data/com.apple.CoreML/weights/weight.bin +3 -0
  13. chunk_3.mlpackage/Manifest.json +18 -0
  14. chunk_4.mlpackage/Data/com.apple.CoreML/model.mlmodel +3 -0
  15. chunk_4.mlpackage/Data/com.apple.CoreML/weights/weight.bin +3 -0
  16. chunk_4.mlpackage/Manifest.json +18 -0
  17. chunk_5.mlpackage/Data/com.apple.CoreML/model.mlmodel +3 -0
  18. chunk_5.mlpackage/Data/com.apple.CoreML/weights/weight.bin +3 -0
  19. chunk_5.mlpackage/Manifest.json +18 -0
  20. chunk_6.mlpackage/Data/com.apple.CoreML/model.mlmodel +3 -0
  21. chunk_6.mlpackage/Data/com.apple.CoreML/weights/weight.bin +3 -0
  22. chunk_6.mlpackage/Manifest.json +18 -0
  23. chunk_7.mlpackage/Data/com.apple.CoreML/model.mlmodel +3 -0
  24. chunk_7.mlpackage/Data/com.apple.CoreML/weights/weight.bin +3 -0
  25. chunk_7.mlpackage/Manifest.json +18 -0
  26. embeddings.npy +3 -0
  27. lm_head.mlpackage/Data/com.apple.CoreML/model.mlmodel +3 -0
  28. lm_head.mlpackage/Data/com.apple.CoreML/weights/weight.bin +3 -0
  29. lm_head.mlpackage/Manifest.json +18 -0
README.md ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: oceanicity/Qwen3-4B-Instruct-2507
3
+ library_name: coreml
4
+ tags:
5
+ - text-generation
6
+ - coreml
7
+ - apple-silicon
8
+ - 8-bit
9
+ - quantized
10
+ - qwen
11
+ ---
12
+
13
+ # Qwen3-4B-Instruct - CoreML (8-Bit Quantised)
14
+
15
+ This is an 8-bit quantised CoreML conversion of the [oceanicity/Qwen3-4B-Instruct-2507](https://huggingface.co/oceanicity/Qwen3-4B-Instruct-2507) model. It has been heavily optimised for fast, efficient, and low-memory inference on Apple Silicon using the Apple Neural Engine (ANE).
16
+
17
+ Conversion and quantisation work was performed using a customised version of [0seba's coremlmodels tool](https://github.com/0seba/coremlmodels).
18
+
19
+ ## Model Details
20
+ - **Architecture:** Qwen3 (4 Billion Parameters)
21
+ - **Precision:** 8-bit Weights (Linear Symmetric, Per-Channel) / 16-bit Activations
22
+ - **Context Length:** 8,192 Tokens (KV Cache)
23
+ - **Format:** CoreML `.mlpackage` chunks
24
+
25
+ ## Optimisations Applied
26
+ - **Linear-to-Conv2d Patching:** Transformer linear layers were patched into 1x1 convolutions to better align with the Neural Engine backend.
27
+ - **RMSNorm Fusion:** Layer normalisation layers were fused using CoreMLTools graph passes to prevent FP16 overflow.
28
+ - **Chunking:** The model was split into 8 chunks to safely bypass the Neural Engine's hardware memory limits per segment.
29
+ - **Vocabulary Chunking:** The massive LM head was exported as a standalone chunked model to bypass the ~16,384 dimension limit on Apple Silicon.
30
+ - **Pre-computed Position Embeddings:** RoPE embeddings were computed statically during tracing to avoid precision loss and runtime math overhead.
31
+
32
+ ## Files Included
33
+ - `chunk_0.mlpackage` through `chunk_7.mlpackage`: The core transformer layers.
34
+ - `lm_head.mlpackage`: The chunked vocabulary output head.
35
+ - `embeddings.npy`: The standalone token embedding weights.
36
+
37
+ ## Usage
38
+ This model is ready to be used in CoreML inference pipelines that support multi-chunked stateful transformers. Ensure that your inference engine stitches the chunks together sequentially and routes the KV cache states appropriately.
chunk_0.mlpackage/Data/com.apple.CoreML/model.mlmodel ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d72b99cd9ee893ab92b3a2a07af8e32961d81d5aeae2453fa1117a7770d7b96f
3
+ size 234631
chunk_0.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:255d391aaaf105393b676ebbbcda59a43df5167018850879a821abf8447ca1a9
3
+ size 507276352
chunk_0.mlpackage/Manifest.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "fileFormatVersion": "1.0.0",
3
+ "itemInfoEntries": {
4
+ "3C4C4B24-4AF8-4585-9C1C-1FAF868F6B73": {
5
+ "author": "com.apple.CoreML",
6
+ "description": "CoreML Model Weights",
7
+ "name": "weights",
8
+ "path": "com.apple.CoreML/weights"
9
+ },
10
+ "4516D45A-F658-4BD4-9011-E4E1AB57D907": {
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": "4516D45A-F658-4BD4-9011-E4E1AB57D907"
18
+ }
chunk_1.mlpackage/Data/com.apple.CoreML/model.mlmodel ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d72b99cd9ee893ab92b3a2a07af8e32961d81d5aeae2453fa1117a7770d7b96f
3
+ size 234631
chunk_1.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:093e67b8f6a6384b3c7fe1050ba65eff6473308ba7fb65aaa8fcf695ae0d15a9
3
+ size 507276352
chunk_1.mlpackage/Manifest.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "fileFormatVersion": "1.0.0",
3
+ "itemInfoEntries": {
4
+ "2DED1C0D-D0AF-4295-B9B4-465E71FA03ED": {
5
+ "author": "com.apple.CoreML",
6
+ "description": "CoreML Model Specification",
7
+ "name": "model.mlmodel",
8
+ "path": "com.apple.CoreML/model.mlmodel"
9
+ },
10
+ "9F73F851-3EB1-43D6-A746-CD0549B07C95": {
11
+ "author": "com.apple.CoreML",
12
+ "description": "CoreML Model Weights",
13
+ "name": "weights",
14
+ "path": "com.apple.CoreML/weights"
15
+ }
16
+ },
17
+ "rootModelIdentifier": "2DED1C0D-D0AF-4295-B9B4-465E71FA03ED"
18
+ }
chunk_2.mlpackage/Data/com.apple.CoreML/model.mlmodel ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d72b99cd9ee893ab92b3a2a07af8e32961d81d5aeae2453fa1117a7770d7b96f
3
+ size 234631
chunk_2.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:c4950dff882094e67d5d310b58bd37b9d74eb542142e20ebab6e889ade934707
3
+ size 507276352
chunk_2.mlpackage/Manifest.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "fileFormatVersion": "1.0.0",
3
+ "itemInfoEntries": {
4
+ "041B62D5-F52F-49BE-B3F3-1013EBE4AA88": {
5
+ "author": "com.apple.CoreML",
6
+ "description": "CoreML Model Weights",
7
+ "name": "weights",
8
+ "path": "com.apple.CoreML/weights"
9
+ },
10
+ "C1697977-BD4C-4505-BB62-435B3CB3A6DC": {
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": "C1697977-BD4C-4505-BB62-435B3CB3A6DC"
18
+ }
chunk_3.mlpackage/Data/com.apple.CoreML/model.mlmodel ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d72b99cd9ee893ab92b3a2a07af8e32961d81d5aeae2453fa1117a7770d7b96f
3
+ size 234631
chunk_3.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:5c5ec16b0114f82e4aec89e7885357955eb5326b6fef8095220a2f281db7b022
3
+ size 507276352
chunk_3.mlpackage/Manifest.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "fileFormatVersion": "1.0.0",
3
+ "itemInfoEntries": {
4
+ "796D866D-730A-4FDB-BF2E-793D38FA912C": {
5
+ "author": "com.apple.CoreML",
6
+ "description": "CoreML Model Weights",
7
+ "name": "weights",
8
+ "path": "com.apple.CoreML/weights"
9
+ },
10
+ "EBC31B9E-711A-4636-93E7-C8DF2982D06C": {
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": "EBC31B9E-711A-4636-93E7-C8DF2982D06C"
18
+ }
chunk_4.mlpackage/Data/com.apple.CoreML/model.mlmodel ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d72b99cd9ee893ab92b3a2a07af8e32961d81d5aeae2453fa1117a7770d7b96f
3
+ size 234631
chunk_4.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:bf27297aa5b3a5e993ca70fb61fe071d2524da271216b8406f8e9766be9c9218
3
+ size 507276352
chunk_4.mlpackage/Manifest.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "fileFormatVersion": "1.0.0",
3
+ "itemInfoEntries": {
4
+ "33FDED6E-DFB7-4361-9EA6-6DBB90E15854": {
5
+ "author": "com.apple.CoreML",
6
+ "description": "CoreML Model Weights",
7
+ "name": "weights",
8
+ "path": "com.apple.CoreML/weights"
9
+ },
10
+ "93A3AB51-6C0B-4EC2-82DE-321E98959477": {
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": "93A3AB51-6C0B-4EC2-82DE-321E98959477"
18
+ }
chunk_5.mlpackage/Data/com.apple.CoreML/model.mlmodel ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d72b99cd9ee893ab92b3a2a07af8e32961d81d5aeae2453fa1117a7770d7b96f
3
+ size 234631
chunk_5.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:0c81e21b64a3ccd29a9d167eaca9bda85f0460a4d0bc942e829894f02ae62617
3
+ size 507276352
chunk_5.mlpackage/Manifest.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "fileFormatVersion": "1.0.0",
3
+ "itemInfoEntries": {
4
+ "8DADA1E5-0366-448D-A905-F9F278E1D51B": {
5
+ "author": "com.apple.CoreML",
6
+ "description": "CoreML Model Specification",
7
+ "name": "model.mlmodel",
8
+ "path": "com.apple.CoreML/model.mlmodel"
9
+ },
10
+ "EC62FA5D-38DF-4A17-A9CC-2C72695B734C": {
11
+ "author": "com.apple.CoreML",
12
+ "description": "CoreML Model Weights",
13
+ "name": "weights",
14
+ "path": "com.apple.CoreML/weights"
15
+ }
16
+ },
17
+ "rootModelIdentifier": "8DADA1E5-0366-448D-A905-F9F278E1D51B"
18
+ }
chunk_6.mlpackage/Data/com.apple.CoreML/model.mlmodel ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d72b99cd9ee893ab92b3a2a07af8e32961d81d5aeae2453fa1117a7770d7b96f
3
+ size 234631
chunk_6.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:55ba91df21326e7b13f37da146102abcc19402a303fe23c06ebf2e8af499f924
3
+ size 507276352
chunk_6.mlpackage/Manifest.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "fileFormatVersion": "1.0.0",
3
+ "itemInfoEntries": {
4
+ "4C357D2C-464D-4675-ABB1-1F9CA995B9FD": {
5
+ "author": "com.apple.CoreML",
6
+ "description": "CoreML Model Specification",
7
+ "name": "model.mlmodel",
8
+ "path": "com.apple.CoreML/model.mlmodel"
9
+ },
10
+ "EED91872-DAF6-49EB-A3AE-89CE8E8E2023": {
11
+ "author": "com.apple.CoreML",
12
+ "description": "CoreML Model Weights",
13
+ "name": "weights",
14
+ "path": "com.apple.CoreML/weights"
15
+ }
16
+ },
17
+ "rootModelIdentifier": "4C357D2C-464D-4675-ABB1-1F9CA995B9FD"
18
+ }
chunk_7.mlpackage/Data/com.apple.CoreML/model.mlmodel ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fd44c2fa723ef5de11f6b66b07fa1029819491516b3030452ccc7bff862c09d4
3
+ size 53810
chunk_7.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:a53675dc8f61b8c3e6f4d2a8236d2140d47ce3604da045a42a284263be0b06f3
3
+ size 103248512
chunk_7.mlpackage/Manifest.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "fileFormatVersion": "1.0.0",
3
+ "itemInfoEntries": {
4
+ "019FD19E-3365-40D8-A130-605BCB688D60": {
5
+ "author": "com.apple.CoreML",
6
+ "description": "CoreML Model Specification",
7
+ "name": "model.mlmodel",
8
+ "path": "com.apple.CoreML/model.mlmodel"
9
+ },
10
+ "B5F08179-FEC7-4498-A56C-CD5B5B336697": {
11
+ "author": "com.apple.CoreML",
12
+ "description": "CoreML Model Weights",
13
+ "name": "weights",
14
+ "path": "com.apple.CoreML/weights"
15
+ }
16
+ },
17
+ "rootModelIdentifier": "019FD19E-3365-40D8-A130-605BCB688D60"
18
+ }
embeddings.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:00e192df9c1acace5c016ba051ede3f4a036a147d1dafef2a5569195c9f2aa34
3
+ size 777912448
lm_head.mlpackage/Data/com.apple.CoreML/model.mlmodel ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dca5ea47e7b4aed28987d6ae50fe358fa981b26c11cb4f9aaf3ec70b4bc9ac2a
3
+ size 65009
lm_head.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:bfcc26df9482d5bcbf7adca59e48b959b9dfd9957db61e3e52e580a441ba00bd
3
+ size 777913984
lm_head.mlpackage/Manifest.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "fileFormatVersion": "1.0.0",
3
+ "itemInfoEntries": {
4
+ "1C815E65-E745-4338-922A-7CB18BFE0BFE": {
5
+ "author": "com.apple.CoreML",
6
+ "description": "CoreML Model Weights",
7
+ "name": "weights",
8
+ "path": "com.apple.CoreML/weights"
9
+ },
10
+ "1D9BB6FC-0A5D-4CA5-B744-8CFA3CF532D1": {
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": "1D9BB6FC-0A5D-4CA5-B744-8CFA3CF532D1"
18
+ }