File size: 1,095 Bytes
529bf7a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
abeae54
 
 
 
529bf7a
abeae54
529bf7a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
language: en
library_name: mlx
pipeline_tag: text-generation
tags:
- mlx
- hunyuan
- hy3
- moe
- text-generation
license: apache-2.0
base_model: tencent/Hy3
---

# kernelpool/Hy3-6bit

This model [kernelpool/Hy3-6bit](https://huggingface.co/kernelpool/Hy3-6bit) was
converted to MLX format from [tencent/Hy3](https://huggingface.co/tencent/Hy3)
using mlx-lm version **0.31.3**.

## Use with mlx

This model requires Hy3 support from [mlx-lm PR #1211](https://github.com/ml-explore/mlx-lm/pull/1211),
which has not yet been merged. Until it is included in an mlx-lm release, install
mlx-lm from the PR branch:

```bash
pip install git+https://github.com/ml-explore/mlx-lm.git@refs/pull/1211/head
```

```python
from mlx_lm import load, generate

model, tokenizer = load("kernelpool/Hy3-6bit")

prompt = "hello"

if tokenizer.chat_template is not None:
    messages = [{"role": "user", "content": prompt}]
    prompt = tokenizer.apply_chat_template(
        messages, add_generation_prompt=True, return_dict=False,
    )

response = generate(model, tokenizer, prompt=prompt, verbose=True)
```