Upload README.md with huggingface_hub
Browse files
README.md
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: other
|
3 |
+
license_name: yandexgpt-5-lite-8b-pretrain
|
4 |
+
license_link: LICENSE
|
5 |
+
language:
|
6 |
+
- ru
|
7 |
+
- en
|
8 |
+
base_model: yandex/YandexGPT-5-Lite-8B-pretrain
|
9 |
+
tags:
|
10 |
+
- mlx
|
11 |
+
---
|
12 |
+
|
13 |
+
# valeriylo/YandexGPT-5-Lite-8B-pretrain-Q8-mlx
|
14 |
+
|
15 |
+
The Model [valeriylo/YandexGPT-5-Lite-8B-pretrain-Q8-mlx](https://huggingface.co/valeriylo/YandexGPT-5-Lite-8B-pretrain-Q8-mlx) was converted to MLX format from [yandex/YandexGPT-5-Lite-8B-pretrain](https://huggingface.co/yandex/YandexGPT-5-Lite-8B-pretrain) using mlx-lm version **0.20.5**.
|
16 |
+
|
17 |
+
## Use with mlx
|
18 |
+
|
19 |
+
```bash
|
20 |
+
pip install mlx-lm
|
21 |
+
```
|
22 |
+
|
23 |
+
```python
|
24 |
+
from mlx_lm import load, generate
|
25 |
+
|
26 |
+
model, tokenizer = load("valeriylo/YandexGPT-5-Lite-8B-pretrain-Q8-mlx")
|
27 |
+
|
28 |
+
prompt="hello"
|
29 |
+
|
30 |
+
if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:
|
31 |
+
messages = [{"role": "user", "content": prompt}]
|
32 |
+
prompt = tokenizer.apply_chat_template(
|
33 |
+
messages, tokenize=False, add_generation_prompt=True
|
34 |
+
)
|
35 |
+
|
36 |
+
response = generate(model, tokenizer, prompt=prompt, verbose=True)
|
37 |
+
```
|