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