Cartesia MLX
This package contains implementations for fast on-device SSM inference on Apple silicon.
Installation
To install this package, first follow the installation instructions for cartesia-metal.
Next (in your Python environment) install the cartesia-mlx package:
pip install cartesia-mlx
Note: This package has been tested on macOS Sonoma 14.1 with the M3 chip.
Models
Language Models
cartesia-ai/Llamba-1B-4bit-mlxcartesia-ai/Llamba-3B-4bit-mlxcartesia-ai/Llamba-8B-4bit-mlxcartesia-ai/Llamba-8B-8bit-mlxcartesia-ai/Mohawk-v0.1-1.3B-4bit-mlxcartesia-ai/Rene-v0.1-1.3b-4bit-mlxcartesia-ai/mamba2-130m-8bit-mlxcartesia-ai/mamba2-130m-mlxcartesia-ai/mamba2-370m-8bit-mlxcartesia-ai/mamba2-780m-8bit-mlxcartesia-ai/mamba2-1.3b-4bit-mlxcartesia-ai/mamba2-2.7b-4bit-mlx
Usage
A simple example script for generation can be found in cartesia-mlx/example.py.
Usage example (clone this repo and run the below from within the cartesia-mlx directory):
python example.py --model cartesia-ai/Mohawk-v0.1-1.3B-4bit-mlx --prompt "Rene Descartes was"
You can pass any of the models listed above to the --model argument; for a full list of command-line options, pass --help.
Performance
Our SSM-based LMs deliver SOTA quality and throughput, with constant tokens per second (tok/s) and memory requirements, making them an ideal choice for on-device applications.
At increasing context size, the throughput of transformer-based LMs drops rapidly, and memory consumption skyrockets, making them inefficient. In contrast, our distilled pure-SSM LlaMamba retains constant tokens per second (tok/s) and memory consumption, unlocking reasoning capabilities over much larger contexts on-device. This constant memory usage is ideal for edge applications.
Rene in MLX
Metadata
Release files for cartesia-mlx 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cartesia_mlx-0.0.2.tar.gz | 21.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cartesia_mlx-0.0.2-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 51.4 kB
Release files / cartesia_mlx-0.0.2.tar.gz
| Download URL | cartesia_mlx-0.0.2.tar.gz |
|---|---|
| Size | 21.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
93b4b27284253bf712e4f178f245e5246be6a82fb97530740a6551394dd72ba5
|
|
BLAKE2b-256 checksum How to use checksums |
b20f91b731d15b00d43d79be7e24cf004cceb23ef925f052b4280702da62cdc0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.11
|
Release files / cartesia_mlx-0.0.2-py2.py3-none-any.whl
| Download URL | cartesia_mlx-0.0.2-py2.py3-none-any.whl |
|---|---|
| Size | 30.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
40f9e6ea611be460ec84c6a4213f4488a98d74708deeddcf2d55e720f3b0a9d8
|
|
BLAKE2b-256 checksum How to use checksums |
415e422c5e826cdb85bf4646768ae923a6d753164ed3e0ae88a20edc759a35b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.11
|