47 lines
981 B
Markdown
47 lines
981 B
Markdown
|
|
---
|
||
|
|
license: apache-2.0
|
||
|
|
language:
|
||
|
|
- nb
|
||
|
|
- nn
|
||
|
|
- 'no'
|
||
|
|
- en
|
||
|
|
base_model: norallm/normistral-11b-translate
|
||
|
|
library_name: mlx
|
||
|
|
pipeline_tag: text-generation
|
||
|
|
tags:
|
||
|
|
- translation
|
||
|
|
- norwegian
|
||
|
|
- english
|
||
|
|
- bokmaal
|
||
|
|
- nynorsk
|
||
|
|
- mlx
|
||
|
|
---
|
||
|
|
|
||
|
|
# SlimGroove/normistral-11b-translate-mlx
|
||
|
|
|
||
|
|
This model [SlimGroove/normistral-11b-translate-mlx](https://huggingface.co/SlimGroove/normistral-11b-translate-mlx) was
|
||
|
|
converted to MLX format from [norallm/normistral-11b-translate](https://huggingface.co/norallm/normistral-11b-translate)
|
||
|
|
using mlx-lm version **0.29.1**.
|
||
|
|
|
||
|
|
## Use with mlx
|
||
|
|
|
||
|
|
```bash
|
||
|
|
pip install mlx-lm
|
||
|
|
```
|
||
|
|
|
||
|
|
```python
|
||
|
|
from mlx_lm import load, generate
|
||
|
|
|
||
|
|
model, tokenizer = load("SlimGroove/normistral-11b-translate-mlx")
|
||
|
|
|
||
|
|
prompt = "hello"
|
||
|
|
|
||
|
|
if tokenizer.chat_template is not None:
|
||
|
|
messages = [{"role": "user", "content": prompt}]
|
||
|
|
prompt = tokenizer.apply_chat_template(
|
||
|
|
messages, add_generation_prompt=True
|
||
|
|
)
|
||
|
|
|
||
|
|
response = generate(model, tokenizer, prompt=prompt, verbose=True)
|
||
|
|
```
|