The official Cartesia MLX library.
Project description
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
Project details
Release history Release notifications | RSS feed
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 cartesia_mlx-0.0.2.tar.gz.
File metadata
- Download URL: cartesia_mlx-0.0.2.tar.gz
- Upload date:
- Size: 21.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93b4b27284253bf712e4f178f245e5246be6a82fb97530740a6551394dd72ba5
|
|
| MD5 |
5d6f6a4f362b19c826dd09734f83004e
|
|
| BLAKE2b-256 |
b20f91b731d15b00d43d79be7e24cf004cceb23ef925f052b4280702da62cdc0
|
File details
Details for the file cartesia_mlx-0.0.2-py2.py3-none-any.whl.
File metadata
- Download URL: cartesia_mlx-0.0.2-py2.py3-none-any.whl
- Upload date:
- Size: 30.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40f9e6ea611be460ec84c6a4213f4488a98d74708deeddcf2d55e720f3b0a9d8
|
|
| MD5 |
208facbadb8916437cb4dfc749de57df
|
|
| BLAKE2b-256 |
415e422c5e826cdb85bf4646768ae923a6d753164ed3e0ae88a20edc759a35b6
|