Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: gemma
|
| 3 |
+
datasets:
|
| 4 |
+
- NbAiLab/aurora-sft-2512-filtered
|
| 5 |
+
language:
|
| 6 |
+
- 'no'
|
| 7 |
+
- nb
|
| 8 |
+
- nn
|
| 9 |
+
base_model: NbAiLab/borealis-1b-instruct-preview
|
| 10 |
+
pipeline_tag: image-text-to-text
|
| 11 |
+
library_name: transformers
|
| 12 |
+
tags:
|
| 13 |
+
- conversational
|
| 14 |
+
- instruct
|
| 15 |
+
- experimental
|
| 16 |
+
- mlx
|
| 17 |
+
- mlx-my-repo
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
# Borealis 1B Instruct Preview MLX
|
| 21 |
+
|
| 22 |
+
Converted to **MLX** from [NbAiLab/borealis-1b-instruct-preview](https://huggingface.co/NbAiLab/borealis-1b-instruct-preview) using `mlx-lm` **0.29.1**.
|
| 23 |
+
|
| 24 |
+
**Repo:** https://huggingface.co/NbAiLab/borealis-1b-instruct-preview-mlx
|
| 25 |
+
|
| 26 |
+
## Use with mlx
|
| 27 |
+
|
| 28 |
+
```bash
|
| 29 |
+
pip install mlx-lm
|
| 30 |
+
```
|
| 31 |
+
|
| 32 |
+
```python
|
| 33 |
+
from mlx_lm import load, generate
|
| 34 |
+
|
| 35 |
+
model, tokenizer = load("NbAiLab/borealis-1b-instruct-preview-mlx")
|
| 36 |
+
|
| 37 |
+
prompt = "hei :)"
|
| 38 |
+
|
| 39 |
+
if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:
|
| 40 |
+
messages = [{"role": "user", "content": prompt}]
|
| 41 |
+
prompt = tokenizer.apply_chat_template(
|
| 42 |
+
messages, tokenize=False, add_generation_prompt=True
|
| 43 |
+
)
|
| 44 |
+
|
| 45 |
+
response = generate(model, tokenizer, prompt=prompt, verbose=True)
|
| 46 |
+
print(response)
|
| 47 |
+
```
|