Changing the experts number can lead to better results for MoE? #1099
magikRUKKOLA
started this conversation in
Ideas
Replies: 6 comments 60 replies
|
Yes this testing can be interesting. See an example here. |
17 replies
0 replies
|
GLM-4.7/THIREUS-3.3560bpw command for ((i=9;i<=16;i++)); do
/opt/ik_llama.cpp/ik_llama.cpp/build/bin/llama-perplexity \
-f /opt/ik_llama.cpp/wiki.test.raw \
--model /opt/THIREUS/GLM-4.7/THIREUS-3.3560bpw/GLM-4.7-THIREUS-BF16-SPECIAL_TENSOR-00001-of-01762.gguf \
--alias THIREUS/GLM-4.7-3.3560bpw \
--ctx-size $((512)) \
-b $((2 * 1024)) -ub $((512)) \
--mlock \
--temp 0.5 --top-k 0 --top-p 1.0 --min-p 0.1 --repeat-penalty 1.1 \
-ctk f16 \
-ctv f16 \
-ger \
-smgs \
-sas \
-mea 256 \
--merge-qkv \
--split-mode-f32 \
-amb 256 \
--split-mode graph \
--tensor-split 23,24,24,24,24,24,24 \
--main-gpu 0 \
--max-gpu 0 \
--n-gpu-layers 99 \
--override-kv "glm4moe.expert_used_count=int:${i}" \
--threads $(grep ^cpu\\scores /proc/cpuinfo | uniq | awk '{print $4}' | xargs -I{} echo "{}-0" | bc) \
--host 0.0.0.0 \
--port 8080 \
--log-enable \
--logdir /var/log/ \
--jinja \
--special \
--verbosity 1 \
--verbose-prompt \
--reasoning-format auto \
--prompt-cache "$HOME/.cache/ik_llama.cpp/prompt-cache.bin" --prompt-cache-all \
--slot-save-path "$HOME/.cache/ik_llama.cpp/slot.bin" \
--lookup-cache-dynamic "$HOME/.cache/ik_llama.cpp/slot.bin" \
--keep -1 \
--slot-prompt-similarity 0.35 \
--metrics \
-cuda fusion=1 &> ./ppl-expert_used_count-${i}.log
donesummary: grep -rn -Ea --colour 'PPL over|prompt eval time' ppl-expert_used_count-{9..16}*log
ppl-expert_used_count-9.log:655:llama_print_timings: prompt eval time = 465734.49 ms / 289280 tokens ( 1.61 ms per token, 621.13 tokens per second)
ppl-expert_used_count-9.log:659:Final estimate: PPL over 565 chunks for n_ctx=512 = 4.3507 +/- 0.02778
ppl-expert_used_count-10.log:655:llama_print_timings: prompt eval time = 468591.07 ms / 289280 tokens ( 1.62 ms per token, 617.34 tokens per second)
ppl-expert_used_count-10.log:659:Final estimate: PPL over 565 chunks for n_ctx=512 = 4.4351 +/- 0.02867
ppl-expert_used_count-11.log:655:llama_print_timings: prompt eval time = 471550.35 ms / 289280 tokens ( 1.63 ms per token, 613.47 tokens per second)
ppl-expert_used_count-11.log:659:Final estimate: PPL over 565 chunks for n_ctx=512 = 4.5030 +/- 0.02936
ppl-expert_used_count-12.log:655:llama_print_timings: prompt eval time = 474510.24 ms / 289280 tokens ( 1.64 ms per token, 609.64 tokens per second)
ppl-expert_used_count-13.log:655:llama_print_timings: prompt eval time = 477032.81 ms / 289280 tokens ( 1.65 ms per token, 606.42 tokens per second)
ppl-expert_used_count-13.log:659:Final estimate: PPL over 565 chunks for n_ctx=512 = 4.6561 +/- 0.03088
ppl-expert_used_count-15.log:655:llama_print_timings: prompt eval time = 482728.30 ms / 289280 tokens ( 1.67 ms per token, 599.26 tokens per second)
ppl-expert_used_count-15.log:659:Final estimate: PPL over 565 chunks for n_ctx=512 = 4.8285 +/- 0.03255
ppl-expert_used_count-16.log:655:llama_print_timings: prompt eval time = 470915.01 ms / 289280 tokens ( 1.63 ms per token, 614.29 tokens per second)
ppl-expert_used_count-16.log:659:Final estimate: PPL over 565 chunks for n_ctx=512 = 4.9154 +/- 0.0333812 experts fail: |
14 replies
1 reply
|
You both may find this comment interesting about changing certain model weights to accommodate higher expert counts for models that use sigmoid gating. |
24 replies
|
Without much test, I found qwen next coder (udq3kl) can better understand my prompt example to solve related problems if I reduce the activated experts to 9. Increased to 11, 12 didn't feel good. Sorry only plain text here. |
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment








Uh oh!
There was an error while loading. Please reload this page.
How do we increasing the experts number for MoE? I suggest we change the number of active experts and measure the PPL results to figure out if that can be used to lower the PPL.
REFERENCE:
Unlock GLM 4.7 & MiniMax M2.1 - Active Expert Control for SPEED or IQ
https://www.youtube.com/watch?v=h4lMWOk_iZk
All reactions