Upload README.md with huggingface_hub
Browse files
README.md
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: cc-by-nc-4.0
|
3 |
+
language:
|
4 |
+
- zh
|
5 |
+
- en
|
6 |
+
- de
|
7 |
+
- fr
|
8 |
+
- ja
|
9 |
+
- ko
|
10 |
+
- nl
|
11 |
+
- es
|
12 |
+
- it
|
13 |
+
- pt
|
14 |
+
- pl
|
15 |
+
base_model: HKUSTAudio/Llasa-1B-Multilingual
|
16 |
+
tags:
|
17 |
+
- Text-to-Speech
|
18 |
+
- mlx
|
19 |
+
- mlx-my-repo
|
20 |
+
pipeline_tag: text-to-speech
|
21 |
+
---
|
22 |
+
|
23 |
+
# nhe-ai/Llasa-1B-Multilingual-mlx-4Bit
|
24 |
+
|
25 |
+
The Model [nhe-ai/Llasa-1B-Multilingual-mlx-4Bit](https://huggingface.co/nhe-ai/Llasa-1B-Multilingual-mlx-4Bit) was converted to MLX format from [HKUSTAudio/Llasa-1B-Multilingual](https://huggingface.co/HKUSTAudio/Llasa-1B-Multilingual) using mlx-lm version **0.22.3**.
|
26 |
+
|
27 |
+
## Use with mlx
|
28 |
+
|
29 |
+
```bash
|
30 |
+
pip install mlx-lm
|
31 |
+
```
|
32 |
+
|
33 |
+
```python
|
34 |
+
from mlx_lm import load, generate
|
35 |
+
|
36 |
+
model, tokenizer = load("nhe-ai/Llasa-1B-Multilingual-mlx-4Bit")
|
37 |
+
|
38 |
+
prompt="hello"
|
39 |
+
|
40 |
+
if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:
|
41 |
+
messages = [{"role": "user", "content": prompt}]
|
42 |
+
prompt = tokenizer.apply_chat_template(
|
43 |
+
messages, tokenize=False, add_generation_prompt=True
|
44 |
+
)
|
45 |
+
|
46 |
+
response = generate(model, tokenizer, prompt=prompt, verbose=True)
|
47 |
+
```
|