spicyneuron commited on
Commit
1dd92a9
·
verified ·
1 Parent(s): 4a65b34

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +46 -0
README.md CHANGED
@@ -8,3 +8,49 @@ tags:
8
  - mlx
9
  base_model: MiniMaxAI/MiniMax-M2.7
10
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  - mlx
9
  base_model: MiniMaxAI/MiniMax-M2.7
10
  ---
11
+
12
+ [MiniMax-M2.7](MiniMaxAI/MiniMax-M2.7) optimized for MLX. A mixed-precision quant that balances speed, memory, and accuracy.
13
+
14
+ - 4 bit baseline with important layers at 5, 6, 8, and BF16.
15
+ -
16
+
17
+ # Usage
18
+
19
+ ```sh
20
+ # Start server at http://localhost:8080/chat/completions
21
+ uvx --from mlx-lm mlx_lm.server \
22
+ --host 127.0.0.1 \
23
+ --port 8080 \
24
+ --model spicyneuron/MiniMax-M2.7-MLX-4.9bit
25
+ ```
26
+
27
+ # Methodology
28
+
29
+ Quantized with a [mlx-lm fork](https://github.com/ml-explore/mlx-lm/pull/922), drawing inspiration from Unsloth/AesSedai/ubergarm style mixed-precision GGUFs.
30
+ MLX quantization options differ than llama.cpp, but the principles are the same:
31
+
32
+ - Sensitive layers like MoE routing, attention, and output embeddings get higher precision
33
+ - More tolerant layers like MoE experts get lower precision
34
+
35
+ # Benchmarks
36
+
37
+ metric | mlx-community_MiniMax-M2.7-4bit | baa-ai_MiniMax-M2.7-RAM-155GB-MLX | 4.9 bit (this model)
38
+ --- | --- | --- | ---
39
+ bpw | 4.501 | 5.4278 | 4.915
40
+ peak memory (1024/512) | 129.632 | 156.051 | 141.458
41
+ prompt tok/s (1024) | 739.996 ± 1.565 | 708.147 ± 0.818 | 723.742 ± 0.880
42
+ gen tok/s (512) | 48.703 ± 0.116 | 40.253 ± 0.077 | 42.270 ± 0.143
43
+ perplexity | 9.120 ± 0.047 | 8.835 ± 0.045 | 4.590 ± 0.027
44
+ hellaswag | 0.504 ± 0.011 | 0.509 ± 0.011 | 0.512 ± 0.011
45
+ piqa | 0.786 ± 0.01 | 0.787 ± 0.01 | 0.791 ± 0.009
46
+ winogrande | 0.636 ± 0.014 | 0.661 ± 0.013 | 0.666 ± 0.013
47
+
48
+ Tested on a Mac Studio M3 Ultra with:
49
+
50
+ ```
51
+ mlx_lm.perplexity --sequence-length 2048 --seed 123
52
+ mlx_lm.benchmark --prompt-tokens 1024 --generation-tokens 512 --num-trials 5
53
+ mlx_lm.evaluate --tasks hellaswag --seed 123 --num-shots 0 --limit 2000
54
+ mlx_lm.evaluate --tasks piqa --seed 123 --num-shots 0 --limit 2000
55
+ mlx_lm.evaluate --tasks winogrande --seed 123 --num-shots 0 --limit 2000
56
+ ```