Upload 2 files
Browse files- README.md +58 -3
- Rene-v0.1-1.3b-4bit-mlx.safetensors +3 -0
README.md
CHANGED
@@ -1,3 +1,58 @@
|
|
1 |
-
---
|
2 |
-
license: apache-2.0
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
language:
|
4 |
+
- en
|
5 |
+
tags:
|
6 |
+
- rene
|
7 |
+
- mamba
|
8 |
+
- mlx
|
9 |
+
- cartesia
|
10 |
+
---
|
11 |
+
|
12 |
+
# Model Card for Rene-v0.1-1.3b-4bit-mlx
|
13 |
+
|
14 |
+
This is an [MLX](https://ml-explore.github.io/mlx)-compatible version of the [Rene-v0.1-1.3b](https://huggingface.co/cartesia-ai/Rene-v0.1-1.3b-pytorch) model, quantized to 4 bits. It uses the [allenai/OLMo-1B-hf](https://huggingface.co/allenai/OLMo-1B-hf) tokenizer.
|
15 |
+
For more details, see our [blog post](https://cartesia.ai/blog/on-device).
|
16 |
+
|
17 |
+
## Usage
|
18 |
+
### Installation
|
19 |
+
This model requires the `cartesia-metal` and `cartesia-mlx` packages.
|
20 |
+
|
21 |
+
Installation requires Xcode, which can be downloaded from https://developer.apple.com/xcode/. Accept the license agreement with:
|
22 |
+
```shell
|
23 |
+
sudo xcodebuild -license
|
24 |
+
```
|
25 |
+
|
26 |
+
Install the required dependencies: the exact version of `nanobind`, followed by `cartesia-metal`, and finally `cartesia-mlx`, with the following commands:
|
27 |
+
```shell
|
28 |
+
pip install nanobind@git+https://github.com/wjakob/nanobind.git@2f04eac452a6d9142dedb957701bdb20125561e4
|
29 |
+
pip install git+https://github.com/cartesia-ai/edge.git#subdirectory=cartesia-metal
|
30 |
+
pip install cartesia-mlx
|
31 |
+
```
|
32 |
+
|
33 |
+
Note: This package has been tested on macOS Sonoma 14.1 with the M3 chip.
|
34 |
+
|
35 |
+
### Generation example
|
36 |
+
```python
|
37 |
+
import mlx.core as mx
|
38 |
+
import cartesia_mlx as cmx
|
39 |
+
|
40 |
+
model = cmx.from_pretrained("cartesia-ai/Rene-v0.1-1.3b-4bit-mlx")
|
41 |
+
model.set_dtype(mx.float32)
|
42 |
+
|
43 |
+
prompt = "Rene Descartes was"
|
44 |
+
|
45 |
+
print(prompt, end="", flush=True)
|
46 |
+
for text in model.generate(
|
47 |
+
prompt,
|
48 |
+
max_tokens=500,
|
49 |
+
eval_every_n=5,
|
50 |
+
verbose=True,
|
51 |
+
top_p=0.99,
|
52 |
+
temperature=0.85,
|
53 |
+
):
|
54 |
+
print(text, end="", flush=True)
|
55 |
+
```
|
56 |
+
|
57 |
+
## About Cartesia
|
58 |
+
At [Cartesia](https://cartesia.ai/), we're building real-time multimodal intelligence for every device.
|
Rene-v0.1-1.3b-4bit-mlx.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8c84a045f41970c7692dc76e0980c566ea37dddd66e30f94338a4ecddd2efbc2
|
3 |
+
size 1246866256
|