manicule-mlx
The Metal-native embedding backend for manicule, on Apple Silicon.
uv pip install manicule manicule-mlx
Then select it:
[embedding]
provider = "mlx"
License — read this first
This package is GPL-3.0-or-later. manicule itself is MIT. They live in one repository and they are not under one license.
| License | |
|---|---|
manicule — everything under src/manicule/ |
MIT |
manicule-plugin-example, manicule-plugin-hostile |
MIT |
manicule-mlx — everything under this directory |
GPL-3.0-or-later |
The reason is one dependency. mlx-embeddings is GPL-3.0, and a backend that links it is very
likely a derivative work. Rather than make the whole project copyleft to obtain one accelerated
backend — which is what manicule did until this split — the backend that carries the obligation
is packaged on its own. MIT code may be incorporated into a GPL work freely; the reverse is not
true, which is why the boundary falls exactly here.
What that means in practice:
- Installing manicule alone gets you an MIT program with no GPL anywhere in its dependency
closure. The
onnxbackend is the default and runs everywhere. - Installing both produces a combined work on your machine that is GPL-3.0. Running it imposes nothing on you — the GPL's obligations attach to distribution. If you redistribute the combination, they attach to you.
- Writing a plugin for manicule does not make it GPL. Writing one that imports
manicule_mlxvery likely does.
Nothing here decides it for you. Take advice if you intend to distribute either manicule or a plugin under other terms.
Why it exists
On Apple Silicon this backend is roughly 4–5× faster than onnxruntime on the indexing path.
Measured on an M4 Max, BAAI/bge-m3, 512-token chunks, batch 32, five interleaved repetitions:
| Chunk length | MLX | onnxruntime | Ratio |
|---|---|---|---|
| 128 tokens | 136.7 chunks/s | 24.5 chunks/s | 5.58× |
| 256 tokens | 64.1 chunks/s | 12.3 chunks/s | 5.23× |
| 512 tokens | 25.6 chunks/s | 6.0 chunks/s | 4.28× |
| ~24 tokens (a query) | 98.7 chunks/s | 80.0 chunks/s | 1.23× |
The gap is on indexing, not on queries. A corpus of 270 000 chunks is about 3 hours here and about 12 on onnxruntime; a single query differs by roughly two milliseconds, which vanishes under the generation call that follows it.
The vectors are the same either way. Cosine agreement between the two backends is
0.99999998 with a largest component difference of 2.1 × 10⁻⁵, retrieval ranking is identical,
and the two write byte-identical canonical fingerprints. backend is excluded from
EmbedFingerprint identity precisely so that installing or removing this package is never a
re-embed. tests/test_parity.py in this package is what licenses that claim, and it is the
reason the test lives here rather than in manicule: the plugin asserts parity against the
reference, in the same CI run.
Requirements
Apple Silicon. mlx-embeddings is marked sys_platform == 'darwin' and platform_machine == 'arm64', so on any other platform this distribution installs and the backend refuses at setup
with a message naming onnx — rather than failing to install and taking the rest of an
environment with it.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file manicule_mlx-0.1.3.tar.gz.
File metadata
- Download URL: manicule_mlx-0.1.3.tar.gz
- Upload date:
- Size: 38.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa100c68bc9021f34728074d9daa2e6c69a83de232b4770fc8337ca01b2b48b3
|
|
| MD5 |
56d6d94da5dcc700bc841f23f1115e5d
|
|
| BLAKE2b-256 |
832dd2ca41d80a255ba9aa069fe599c36a0d6ca3e68140e2ac25b091ff39a567
|
Provenance
The following attestation bundles were made for manicule_mlx-0.1.3.tar.gz:
Publisher:
release.yml on mgd43b/manicule
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
manicule_mlx-0.1.3.tar.gz -
Subject digest:
aa100c68bc9021f34728074d9daa2e6c69a83de232b4770fc8337ca01b2b48b3 - Sigstore transparency entry: 2534306646
- Sigstore integration time:
-
Permalink:
mgd43b/manicule@b0341709f3a3b48b7c2e051782a2a8601bd72528 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mgd43b
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b0341709f3a3b48b7c2e051782a2a8601bd72528 -
Trigger Event:
push
-
Statement type:
File details
Details for the file manicule_mlx-0.1.3-py3-none-any.whl.
File metadata
- Download URL: manicule_mlx-0.1.3-py3-none-any.whl
- Upload date:
- Size: 24.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e3dbbe28080f99278da9d8d306d2b4081eb85addde20f1e0f7758d100157e12
|
|
| MD5 |
8c147db7eb860557d48f39a992a1cbde
|
|
| BLAKE2b-256 |
a38cbbd2298a9c391206fee77a1404807ed2d57376590a799ddf31f76177b791
|
Provenance
The following attestation bundles were made for manicule_mlx-0.1.3-py3-none-any.whl:
Publisher:
release.yml on mgd43b/manicule
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
manicule_mlx-0.1.3-py3-none-any.whl -
Subject digest:
9e3dbbe28080f99278da9d8d306d2b4081eb85addde20f1e0f7758d100157e12 - Sigstore transparency entry: 2534306774
- Sigstore integration time:
-
Permalink:
mgd43b/manicule@b0341709f3a3b48b7c2e051782a2a8601bd72528 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mgd43b
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b0341709f3a3b48b7c2e051782a2a8601bd72528 -
Trigger Event:
push
-
Statement type: