Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,7 +1,33 @@
|
|
| 1 |
---
|
| 2 |
language: en
|
| 3 |
-
pipeline_tag: text-generation
|
| 4 |
tags:
|
| 5 |
- mlx
|
| 6 |
library_name: mlx
|
|
|
|
| 7 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
language: en
|
|
|
|
| 3 |
tags:
|
| 4 |
- mlx
|
| 5 |
library_name: mlx
|
| 6 |
+
pipeline_tag: text-generation
|
| 7 |
---
|
| 8 |
+
|
| 9 |
+
# mlx-community/DeepSeek-V4-Flash-2bit-DQ
|
| 10 |
+
|
| 11 |
+
Made possible by [Lambda.ai](https://huggingface.co/lambda) ❤️
|
| 12 |
+
|
| 13 |
+
## Use with mlx
|
| 14 |
+
|
| 15 |
+
```bash
|
| 16 |
+
pip install mlx-lm
|
| 17 |
+
```
|
| 18 |
+
|
| 19 |
+
```python
|
| 20 |
+
from mlx_lm import load, generate
|
| 21 |
+
|
| 22 |
+
model, tokenizer = load("mlx-community/DeepSeek-V4-Flash-2bit-DQ")
|
| 23 |
+
|
| 24 |
+
prompt = "hello"
|
| 25 |
+
|
| 26 |
+
if tokenizer.chat_template is not None:
|
| 27 |
+
messages = [{"role": "user", "content": prompt}]
|
| 28 |
+
prompt = tokenizer.apply_chat_template(
|
| 29 |
+
messages, add_generation_prompt=True, return_dict=False,
|
| 30 |
+
)
|
| 31 |
+
|
| 32 |
+
response = generate(model, tokenizer, prompt=prompt, verbose=True)
|
| 33 |
+
```
|