|
5 | 5 |
|
6 | 6 | ## Demo |
7 | 7 |
|
| 8 | + |
| 9 | +https://github.com/user-attachments/assets/cefd466e-3b1f-47a9-8dc3-f1cf5119045e |
| 10 | + |
| 11 | + |
8 | 12 | ## Speed |
9 | 13 | ### SmallThinker 21B |
10 | | -| Model | Memory(GiB) | i9 14900 | 1+13 8ge4 | rk3588 (16G) | Raspberry PI 5 | |
| 14 | +| Model |
| 15 | + |
| 16 | +https://github.com/user-attachments/assets/37079e94-599b-4e7f-8000-0c095ebe0d59 |
| 17 | + |
| 18 | + | Memory(GiB) | i9 14900 | 1+13 8ge4 | rk3588 (16G) | Raspberry PI 5 | |
11 | 19 | |--------------------------------------|---------------------|----------|-----------|--------------|----------------| |
12 | 20 | | SmallThinker 21B+sparse | 11.47 | 30.19 | 23.03 | 10.84 | 6.61 | |
13 | | -| SmallThinker 21B+sparse +limited memory | 84 | limit 8G | 20.30 | 15.50 | 8.56 | |
| 21 | +| SmallThinker 21B+sparse +limited memory | limit 8G | 20.30 | 15.50 | 8.56 | - | |
14 | 22 | | Qwen3 30B A3B | 16.20 | 33.52 | 20.18 | 9.07 | - | |
15 | | -| Qwen3 30B A3Blimited memory | 81.38 | limit 8G | 10.11 | 0.18 | 6.32 | |
| 23 | +| Qwen3 30B A3Blimited memory | limit 8G | 10.11 | 0.18 | 6.32 | - | |
16 | 24 | | Gemma 3n E2B | 1G, theoretically | 36.88 | 27.06 | 12.50 | 6.66 | |
17 | 25 | | Gemma 3n E4B | 2G, theoretically | 21.93 | 16.58 | 7.37 | 4.01 | |
18 | 26 |
|
|
31 | 39 | Note:i9 14900、1+13 8ge4 use 4 threads,others use the number of threads that can achieve the maximum speed |
32 | 40 |
|
33 | 41 | ## Setup |
34 | | - |
35 | | -1. install clang-21 and mold: |
| 42 | +1. cd smallthinker before compiling |
| 43 | +```bash |
| 44 | +cd smallthinker |
| 45 | +``` |
| 46 | +2. install clang-21 and mold: |
36 | 47 |
|
37 | 48 | ```bash |
38 | 49 | sudo apt install clang-21 mold |
39 | 50 | ``` |
| 51 | +3. init submodule: |
| 52 | + |
| 53 | +```bash |
| 54 | +git submodule update --init --recursive |
| 55 | +``` |
40 | 56 |
|
41 | 57 | ## Convert Model |
42 | 58 | ```bash |
@@ -140,11 +156,12 @@ python get_no_moe_weights_ffn.py /path/to/gguf_q4_0 /path/to/no_moe_gguf_q4_0 |
140 | 156 | ```bash |
141 | 157 | EXPERT_BUNDLE_PATH=/path/to/bundle ./llama-cli -m /path/to/no_moe_gguf_q4_0 --no-cnv --temp 0.6 --top-k 20 --top-p 0.95 --samplers "temperature;top_k;top_p" -p "<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n<|im_start|>user\nCalculate the integral of f(x) = sin(x) from 0 to 3pi/4.<|im_end|>\n<|im_start|>assistant" -t 4 -n 256 -ub 4 |
142 | 158 | ``` |
143 | | -### LM Head Sparsity: |
144 | | -1. The 4B model uses a sparse lm_head which may lead to some loss in precision. If you want to disable it, change the condition at src/llama-model.cpp:7580 to false.But the speed is slower. |
| 159 | +### Note: |
| 160 | +1. The models use a sparse lm_head which may lead to some loss in precision. If you want to disable it, change the condition at src/llama-model.cpp:7580 to false.But the speed is slower. |
| 161 | +2. It may require root privileges when running in Termux when run the Memory-Efficient Version. |
145 | 162 |
|
146 | 163 |
|
147 | 164 | ## Acknowledgements |
148 | 165 |
|
149 | 166 | We would like to thank the following projects: |
150 | | -- [llama.cpp](https://github.com/ggml-org/llama.cpp) |
| 167 | +- [llama.cpp](https://github.com/ggml-org/llama.cpp) |
0 commit comments