Views
No views yet
cartesia-metal and cartesia-mlx packages.sudo xcodebuild -licensenanobind, followed by cartesia-metal, and finally cartesia-mlx, with the following commands:1pip install nanobind@git+https://github.com/wjakob/nanobind.git@2f04eac452a6d9142dedb957701bdb20125561e4
2pip install git+https://github.com/cartesia-ai/edge.git#subdirectory=cartesia-metal
3pip install cartesia-mlx1import mlx.core as mx
2import cartesia_mlx as cmx
3
4model = cmx.from_pretrained("cartesia-ai/Rene-v0.1-1.3b-4bit-mlx")
5model.set_dtype(mx.float32)
6
7prompt = "Rene Descartes was"
8
9print(prompt, end="", flush=True)
10for text in model.generate(
11 prompt,
12 max_tokens=500,
13 eval_every_n=5,
14 verbose=True,
15 top_p=0.99,
16 temperature=0.85,
17):
18 print(text, end="", flush=True)