Views
No views yet
1from mlx_lm import load, generate
2
3model, tokenizer = load("mlx-community/Nemotron-Mini-4B-Instruct-nvfp4-4bit-mlx")
4
5prompt = (
6 "<extra_id_0>System\n"
7 "You are a helpful, honest AI assistant.\n\n"
8 "<extra_id_1>User\n"
9 "Who are you?\n"
10 "<extra_id_1>Assistant\n"
11)
12
13print(generate(model, tokenizer, prompt, max_tokens=256))| Variant | tok/s |
|---|---|
| bf16 (this) | 2.47 |
| 4-bit default | 4.37 |
| mxfp4-q4 | 4.56 |
| nvfp4-q4 | 9.69 |
| mixed-3-6 | 9.72 |