Use 4 GiB tier (1 GiB arena) in v1/v2 examples
Browse files
README.md
CHANGED
|
@@ -34,35 +34,37 @@ hf download unsloth/flint-GGUF flint-UD-Q4_K_XL.gguf --local-dir models
|
|
| 34 |
|
| 35 |
## Run
|
| 36 |
|
| 37 |
-
|
| 38 |
|
| 39 |
-
**native** (unmodified llama.cpp MoE path, needs about 24 GiB RAM):
|
| 40 |
|
| 41 |
```bash
|
| 42 |
SDQ_PAGER=0 build/bin/llama-cli -m models/flint-UD-Q4_K_XL.gguf -c 512 \
|
| 43 |
-p 'Explain in one sentence why the sky is blue.' -n 32 -t 16 --temp 0 -st --simple-io
|
| 44 |
```
|
| 45 |
|
| 46 |
-
**v1** (expert paging, mode C). Preload and row-parallel default to on, so turn them off explicitly
|
| 47 |
|
| 48 |
```bash
|
| 49 |
-
SDQ_PAGER=1 SDQ_ARENA_MB=
|
| 50 |
build/bin/llama-cli -m models/flint-UD-Q4_K_XL.gguf -c 512 \
|
| 51 |
-p 'Explain in one sentence why the sky is blue.' -n 32 -t 16 --temp 0 -st --simple-io
|
| 52 |
```
|
| 53 |
|
| 54 |
-
**v2** (default settings
|
| 55 |
|
| 56 |
```bash
|
| 57 |
-
SDQ_PAGER=1 SDQ_ARENA_MB=
|
| 58 |
build/bin/llama-cli -m models/flint-UD-Q4_K_XL.gguf -c 512 \
|
| 59 |
-p 'Explain in one sentence why the sky is blue.' -n 32 -t 16 --temp 0 -st --simple-io
|
| 60 |
```
|
| 61 |
|
|
|
|
|
|
|
| 62 |
Use 16 threads (`-t 16`). Row-parallel needs more threads than the number of experts used per step (6), so at least 7.
|
| 63 |
|
| 64 |
## Notes
|
| 65 |
|
| 66 |
-
- Memory:
|
| 67 |
-
-
|
| 68 |
- Output matches native greedy decoding at 8 threads; at 16 threads it diverges after a few tokens (float reordering). See the report.
|
|
|
|
| 34 |
|
| 35 |
## Run
|
| 36 |
|
| 37 |
+
Examples use the 4 GiB memory tier (`SDQ_ARENA_MB=1024`, a 1 GiB expert arena). Prompt: `Explain in one sentence why the sky is blue.`
|
| 38 |
|
| 39 |
+
**native** (unmodified llama.cpp MoE path, needs about 24 GiB RAM, so it does not fit in 4 GiB):
|
| 40 |
|
| 41 |
```bash
|
| 42 |
SDQ_PAGER=0 build/bin/llama-cli -m models/flint-UD-Q4_K_XL.gguf -c 512 \
|
| 43 |
-p 'Explain in one sentence why the sky is blue.' -n 32 -t 16 --temp 0 -st --simple-io
|
| 44 |
```
|
| 45 |
|
| 46 |
+
**v1** (expert paging, mode C). Preload and row-parallel default to on, so turn them off explicitly:
|
| 47 |
|
| 48 |
```bash
|
| 49 |
+
SDQ_PAGER=1 SDQ_ARENA_MB=1024 SDQ_PRELOAD=0 SDQ_ROW_PARALLEL=0 \
|
| 50 |
build/bin/llama-cli -m models/flint-UD-Q4_K_XL.gguf -c 512 \
|
| 51 |
-p 'Explain in one sentence why the sky is blue.' -n 32 -t 16 --temp 0 -st --simple-io
|
| 52 |
```
|
| 53 |
|
| 54 |
+
**v2** (default settings, preload and row-parallel on). At 4 GiB the arena cannot hold all experts, so v2 runs the same path as v1 here:
|
| 55 |
|
| 56 |
```bash
|
| 57 |
+
SDQ_PAGER=1 SDQ_ARENA_MB=1024 \
|
| 58 |
build/bin/llama-cli -m models/flint-UD-Q4_K_XL.gguf -c 512 \
|
| 59 |
-p 'Explain in one sentence why the sky is blue.' -n 32 -t 16 --temp 0 -st --simple-io
|
| 60 |
```
|
| 61 |
|
| 62 |
+
v2 changes behavior only when the arena holds all 12,032 experts (≥ 28.6 GiB, for example `SDQ_ARENA_MB=29400`).
|
| 63 |
+
|
| 64 |
Use 16 threads (`-t 16`). Row-parallel needs more threads than the number of experts used per step (6), so at least 7.
|
| 65 |
|
| 66 |
## Notes
|
| 67 |
|
| 68 |
+
- Memory at 4 GiB tier: peak 2.76 GiB. The process needs about 1.8 GiB plus the arena. Under a 2 GiB limit a 128 MiB arena works (peak 1.89 GiB); 256 MiB does not.
|
| 69 |
+
- Generation speed, 4 GiB tier, 16 threads (median): v1 4.6 t/s, v2 4.6 t/s (same path). At 32 GiB with full arena: native 19.4 t/s, v1 5.5 t/s, v2 13.7 t/s. Details are in the report.
|
| 70 |
- Output matches native greedy decoding at 8 threads; at 16 threads it diverges after a few tokens (float reordering). See the report.
|