Upload README.md with huggingface_hub
Browse files
README.md
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: katanemo/Arch-Router-1.5B
|
3 |
+
language:
|
4 |
+
- en
|
5 |
+
library_name: transformers
|
6 |
+
license: other
|
7 |
+
license_name: katanemo-research
|
8 |
+
license_link: https://huggingface.co/katanemo/Arch-Router-1.5B/blob/main/LICENSE
|
9 |
+
pipeline_tag: text-generation
|
10 |
+
tags:
|
11 |
+
- routing
|
12 |
+
- preference
|
13 |
+
- arxiv:2506.16655
|
14 |
+
- llm
|
15 |
+
- mlx
|
16 |
+
- mlx-my-repo
|
17 |
+
paper: https://arxiv.org/abs/2506.16655
|
18 |
+
---
|
19 |
+
|
20 |
+
# huangang/Arch-Router-1.5B-mlx-4Bit
|
21 |
+
|
22 |
+
The Model [huangang/Arch-Router-1.5B-mlx-4Bit](https://huggingface.co/huangang/Arch-Router-1.5B-mlx-4Bit) was converted to MLX format from [katanemo/Arch-Router-1.5B](https://huggingface.co/katanemo/Arch-Router-1.5B) using mlx-lm version **0.22.3**.
|
23 |
+
|
24 |
+
## Use with mlx
|
25 |
+
|
26 |
+
```bash
|
27 |
+
pip install mlx-lm
|
28 |
+
```
|
29 |
+
|
30 |
+
```python
|
31 |
+
from mlx_lm import load, generate
|
32 |
+
|
33 |
+
model, tokenizer = load("huangang/Arch-Router-1.5B-mlx-4Bit")
|
34 |
+
|
35 |
+
prompt="hello"
|
36 |
+
|
37 |
+
if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:
|
38 |
+
messages = [{"role": "user", "content": prompt}]
|
39 |
+
prompt = tokenizer.apply_chat_template(
|
40 |
+
messages, tokenize=False, add_generation_prompt=True
|
41 |
+
)
|
42 |
+
|
43 |
+
response = generate(model, tokenizer, prompt=prompt, verbose=True)
|
44 |
+
```
|