Files
variet_llm/docs/final_performance_report.md
2026-04-05 00:43:39 +09:00

2.1 KiB

Gemma4 26B-A4B 성능 최적화 결과

최종 업데이트: 2026-04-05 환경: RTX 3060 12GB, llama.cpp (b8660, CUDA 12.4)

최적 설정

llama-bench.exe -m models\gemma-4-26B-A4B-it-Q4_K_M.gguf ^
  -ngl 999 ^
  -fa 1 ^
  -ctk q8_0 -ctv q8_0 ^
  -t 6 ^
  -ot "ffn_(up|down|gate)_exps=CPU" ^
  -p 512 -n 256 -r 3 --progress -o md

핵심 파라미터 설명

파라미터 설명
-ngl 999 전체 비전문가 레이어 전부 GPU
`-ot "ffn_(up down gate)_exps=CPU"`
-t 6 6 스레드 L3 캐시 경합 최소화 (12→6)
-fa 1 Flash Attn VRAM 효율적 어텐션
-ctk/-ctv q8_0 q8_0 KV 캐시 양자화

튜닝 결과 비교표

설정 pp512 (t/s) tg256 (t/s) 비고
-t 12, q8_0 (초기) 697.63 ± 34.87 37.64 ± 0.37 기준선
-t 4, q8_0 713.88 ± 21.88 41.09 ± 0.38 +9.2%
-t 6, q8_0 722.23 ± 21.27 41.51 ± 0.24 +10.3%
-t 8, q8_0 717.74 ± 32.21 40.79 ± 0.22 +8.4%
-t 4, q4_0 733.33 ± 20.72 40.95 ± 0.44 q4_0 효과 없음
-t 6, q4_0 742.96 ± 29.67 41.52 ± 0.14 pp 최고, 분산 최소

서버 실행 시 최적 설정 (llama-server)

llama_bin_run\llama-server.exe ^
  --model models\gemma-4-26B-A4B-it-Q4_K_M.gguf ^
  -ngl 999 ^
  -fa on ^
  --cache-type-k q8_0 ^
  --cache-type-v q8_0 ^
  -t 6 ^
  -ot "ffn_(up|down|gate)_exps=CPU" ^
  -c 4096 ^
  -np 1 ^
  --mlock ^
  --prio 2 ^
  --port 8000 ^
  --host 0.0.0.0

모델 요약

항목
모델 Gemma4 26B-A4B (MoE)
양자화 Q4_K_M (15.63 GiB)
전체 파라미터 25.23B
활성 파라미터 ~4B/토큰
프롬프트 속도 ~722-743 t/s
생성 속도 ~41.5 t/s

Qwen3.5 122B-A10B 최적 설정 (참고)

항목
모델 크기 71.27 GiB (Q4_K_M)
최적 스레드 -t 4
CPU MoE --cpu-moe
생성 속도 ~10.9 t/s
배치 파일 start_qwen_122b_optimized.bat