The official Cartesia MLX library.
Project description
Cartesia MLX
This package contains implementations for fast on-device SSM inference on Apple silicon.
Installation
This package requires the cartesia-metal
package.
To install this package, first install Xcode which can be downloaded from https://developer.apple.com/xcode/.
Accept the license agreement with:
sudo xcodebuild -license
Install metal extension:
pip install cartesia-metal
Install the package:
pip install cartesia-mlx
Models
Language Models
cartesia-ai/Rene-v0.1-1.3b-4bit-mlx
cartesia-ai/mamba2-130m-8bit-mlx
cartesia-ai/mamba2-130m-mlx
cartesia-ai/mamba2-370m-8bit-mlx
cartesia-ai/mamba2-780m-8bit-mlx
cartesia-ai/mamba2-1.3b-4bit-mlx
cartesia-ai/mamba2-2.7b-4bit-mlx
Usage:
import mlx.core as mx
import cartesia_mlx as cmx
model = cmx.from_pretrained('cartesia-ai/mamba2-130m-8bit-mlx')
model.set_dtype(mx.float32)
prompt = "Rene Descartes was"
print(prompt, end="", flush=True)
for text in model.generate(
prompt,
max_tokens=500,
eval_every_n=5,
verbose=True,
top_p=0.99,
temperature=0.85,
):
print(text, end="", flush=True)
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
cartesia-mlx-0.0.1rc1.tar.gz
(16.3 kB
view hashes)
Built Distribution
Close
Hashes for cartesia_mlx-0.0.1rc1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d4f75c7efe704a109259efb300755550cde550b1ea60112711e055aaaa281cc |
|
MD5 | ca4127becc0bf2963117a83f42ce281d |
|
BLAKE2b-256 | 7adfe5d269fcabed5a0eec44258cda42aeaaeaaba8a86b5f37f6b0b01ebd29b5 |