Upload README.md with huggingface_hub
Browse files
README.md
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: llama3.1
|
3 |
+
language:
|
4 |
+
- en
|
5 |
+
inference: false
|
6 |
+
fine-tuning: false
|
7 |
+
tags:
|
8 |
+
- nvidia
|
9 |
+
- llama3.1
|
10 |
+
- mlx
|
11 |
+
- mlx-my-repo
|
12 |
+
datasets:
|
13 |
+
- nvidia/HelpSteer2
|
14 |
+
base_model: nvidia/Llama-3.1-Nemotron-70B-Instruct-HF
|
15 |
+
pipeline_tag: text-generation
|
16 |
+
library_name: transformers
|
17 |
+
---
|
18 |
+
|
19 |
+
# cnfusion/Llama-3.1-Nemotron-70B-Instruct-HF-Q2-mlx
|
20 |
+
|
21 |
+
The Model [cnfusion/Llama-3.1-Nemotron-70B-Instruct-HF-Q2-mlx](https://huggingface.co/cnfusion/Llama-3.1-Nemotron-70B-Instruct-HF-Q2-mlx) was converted to MLX format from [nvidia/Llama-3.1-Nemotron-70B-Instruct-HF](https://huggingface.co/nvidia/Llama-3.1-Nemotron-70B-Instruct-HF) using mlx-lm version **0.19.2**.
|
22 |
+
|
23 |
+
## Use with mlx
|
24 |
+
|
25 |
+
```bash
|
26 |
+
pip install mlx-lm
|
27 |
+
```
|
28 |
+
|
29 |
+
```python
|
30 |
+
from mlx_lm import load, generate
|
31 |
+
|
32 |
+
model, tokenizer = load("cnfusion/Llama-3.1-Nemotron-70B-Instruct-HF-Q2-mlx")
|
33 |
+
|
34 |
+
prompt="hello"
|
35 |
+
|
36 |
+
if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:
|
37 |
+
messages = [{"role": "user", "content": prompt}]
|
38 |
+
prompt = tokenizer.apply_chat_template(
|
39 |
+
messages, tokenize=False, add_generation_prompt=True
|
40 |
+
)
|
41 |
+
|
42 |
+
response = generate(model, tokenizer, prompt=prompt, verbose=True)
|
43 |
+
```
|