adrgrondin commited on
Commit
0a29e17
·
verified ·
1 Parent(s): 9215a4c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +28 -0
README.md CHANGED
@@ -8,3 +8,31 @@ tags:
8
  base_model: ibm-granite/granite-4.0-h-micro
9
  pipeline_tag: text-generation
10
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  base_model: ibm-granite/granite-4.0-h-micro
9
  pipeline_tag: text-generation
10
  ---
11
+
12
+ # mlx-community/granite-4.0-h-micro-4bit
13
+
14
+ This model [mlx-community/granite-4.0-h-micro-4bit](https://huggingface.co/mlx-community/granite-4.0-h-micro-4bit) was
15
+ converted to MLX format from [ibm-granite/granite-4.0-h-micro](https://huggingface.co/ibm-granite/granite-4.0-h-micro)
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("mlx-community/granite-4.0-h-micro-4bit")
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
+ ```