Upload README.md
Browse files
README.md
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
library_name: transformers
|
5 |
+
tags:
|
6 |
+
- mergekit
|
7 |
+
- merge
|
8 |
+
- mlx
|
9 |
+
base_model: royallab/MN-LooseCannon-12B-v2
|
10 |
+
---
|
11 |
+
|
12 |
+
# mlx-community/royallab_MN-LooseCannon-12B-v2
|
13 |
+
|
14 |
+
The Model [mlx-community/royallab_MN-LooseCannon-12B-v2](https://huggingface.co/mlx-community/royallab_MN-LooseCannon-12B-v2) was converted to MLX format from [royallab/MN-LooseCannon-12B-v2](https://huggingface.co/royallab/MN-LooseCannon-12B-v2) using mlx-lm version **0.19.0**.
|
15 |
+
|
16 |
+
## Use with mlx
|
17 |
+
|
18 |
+
```bash
|
19 |
+
pip install mlx-lm
|
20 |
+
```
|
21 |
+
|
22 |
+
```python
|
23 |
+
from mlx_lm import load, generate
|
24 |
+
|
25 |
+
model, tokenizer = load("mlx-community/royallab_MN-LooseCannon-12B-v2")
|
26 |
+
|
27 |
+
prompt="hello"
|
28 |
+
|
29 |
+
if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:
|
30 |
+
messages = [{"role": "user", "content": prompt}]
|
31 |
+
prompt = tokenizer.apply_chat_template(
|
32 |
+
messages, tokenize=False, add_generation_prompt=True
|
33 |
+
)
|
34 |
+
|
35 |
+
response = generate(model, tokenizer, prompt=prompt, verbose=True)
|
36 |
+
```
|