Update README.md
Browse files
README.md
CHANGED
|
@@ -13,26 +13,4 @@ pipeline_tag: text-generation
|
|
| 13 |
|
| 14 |
This model [ethicalabs/granite-4.0-h-small-base-MLX](https://huggingface.co/ethicalabs/granite-4.0-h-small-base-MLX) was
|
| 15 |
converted to MLX format from [ibm-granite/granite-4.0-h-small-base](https://huggingface.co/ibm-granite/granite-4.0-h-small-base)
|
| 16 |
-
using mlx-lm version **0.28.2**.
|
| 17 |
-
|
| 18 |
-
## Use with mlx
|
| 19 |
-
|
| 20 |
-
```bash
|
| 21 |
-
pip install mlx-lm
|
| 22 |
-
```
|
| 23 |
-
|
| 24 |
-
```python
|
| 25 |
-
from mlx_lm import load, generate
|
| 26 |
-
|
| 27 |
-
model, tokenizer = load("ethicalabs/granite-4.0-h-small-base-MLX")
|
| 28 |
-
|
| 29 |
-
prompt = "hello"
|
| 30 |
-
|
| 31 |
-
if tokenizer.chat_template is not None:
|
| 32 |
-
messages = [{"role": "user", "content": prompt}]
|
| 33 |
-
prompt = tokenizer.apply_chat_template(
|
| 34 |
-
messages, add_generation_prompt=True
|
| 35 |
-
)
|
| 36 |
-
|
| 37 |
-
response = generate(model, tokenizer, prompt=prompt, verbose=True)
|
| 38 |
-
```
|
|
|
|
| 13 |
|
| 14 |
This model [ethicalabs/granite-4.0-h-small-base-MLX](https://huggingface.co/ethicalabs/granite-4.0-h-small-base-MLX) was
|
| 15 |
converted to MLX format from [ibm-granite/granite-4.0-h-small-base](https://huggingface.co/ibm-granite/granite-4.0-h-small-base)
|
| 16 |
+
using mlx-lm version **0.28.2**.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|