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