johnsmith968530 commited on
Commit
8359e27
·
verified ·
1 Parent(s): 42eedd2

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +22 -20
README.md CHANGED
@@ -19,24 +19,26 @@ This model [johnsmith968530/miromind-ai-MiroThinker-v1.0-8B-MLX-8bit](https://hu
19
  converted to MLX format from [miromind-ai/MiroThinker-v1.0-8B](https://huggingface.co/miromind-ai/MiroThinker-v1.0-8B)
20
  using mlx-lm version **0.28.3**.
21
 
22
- ## Use with mlx
23
-
24
  ```bash
25
- pip install mlx-lm
26
- ```
27
-
28
- ```python
29
- from mlx_lm import load, generate
30
-
31
- model, tokenizer = load("johnsmith968530/miromind-ai-MiroThinker-v1.0-8B-MLX-8bit")
32
-
33
- prompt = "hello"
34
-
35
- if tokenizer.chat_template is not None:
36
- messages = [{"role": "user", "content": prompt}]
37
- prompt = tokenizer.apply_chat_template(
38
- messages, add_generation_prompt=True
39
- )
40
-
41
- response = generate(model, tokenizer, prompt=prompt, verbose=True)
42
- ```
 
 
 
 
 
19
  converted to MLX format from [miromind-ai/MiroThinker-v1.0-8B](https://huggingface.co/miromind-ai/MiroThinker-v1.0-8B)
20
  using mlx-lm version **0.28.3**.
21
 
 
 
22
  ```bash
23
+ export MODEL1_MAJOR="miromind-ai"
24
+ export MODEL1_MINOR="MiroThinker-v1.0-8B"
25
+ export MODEL1_Q_BITS="8"
26
+ export MODEL1_DTS="$(date -z UTC +%Y%m%d_%H%M%SZ)"
27
+
28
+ echodo () { echo "$@" && "$@"; }
29
+ mkdir -p /tmp/mlx/lm/convert
30
+
31
+ # uv tool install -U mlx-lm
32
+
33
+ echodo time mlx_lm.convert \
34
+ --hf-path "$MODEL1_MAJOR/$MODEL1_MINOR" \
35
+ --mlx-path "/tmp/mlx/lm/convert/$MODEL1_DTS" \
36
+ --quantize \
37
+ --q-bits "$MODEL1_Q_BITS" \
38
+ --upload-repo \
39
+ "johnsmith968530/$MODEL1_MAJOR-$MODEL1_MINOR-MLX-${MODEL1_Q_BITS}bit"
40
+
41
+ # I tested the result using LM Studio 0.3.31
42
+ # on a MacBook Air, 13 inch, M4, 2025 with 32 GB unified memory
43
+ # macOS Tahoe 26.1.
44
+ ```