diff --git a/README.md b/README.md index aae3bcd35..e6333363e 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,22 @@ +## SM75 prefill test + +On an NVIDIA CMP 50HX with the Qwen3.8-27B IQ2_XXS GGUF, `build-best.sh` (`GGML_CUDA_FORCE_CUBLAS=ON`, `GGML_CUDA_SM75_Q8_0_FAST_HALF=ON`) measured 761.12 tokens/s for `pp1024`, versus 618.29 tokens/s with forced MMQ (+23%). Both builds used `GGML_CUDA_SM75_Q8_0_FAST_HALF=ON`, 99 GPU layers, FlashAttention, a Q8_0 V cache, and batch and ubatch sizes of 1024. `tg128` was 23.21 tokens/s with cuBLAS and 23.39 with MMQ, so the gain was in prefill. Results may differ on other GPUs or models. + +This result is for Turing (SM75); it is not a Blackwell result. The SM75 dispatch and Q8 conversion paths do not run on Blackwell. + +Build and measure: + +```sh +./build-best.sh +./build-best/bin/llama-bench \ + -m /path/to/Qwen3.8-27B-UD-IQ2_XXS.gguf \ + -p 1024 -n 0 -b 1024 -ub 1024 -ngl 99 \ + -fa on -ctv q8_0 -r 5 +``` + ## Quick start A few options to get `llama.cpp` installed on your machine: diff --git a/build-moe.sh b/build-best.sh similarity index 71% rename from build-moe.sh rename to build-best.sh index 905c52d0a..d969c3bc5 100755 --- a/build-moe.sh +++ b/build-best.sh @@ -3,8 +3,8 @@ set -euo pipefail root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd) -# Keep the existing MoE build's forced-cuBLAS setting. -cmake -S "$root" -B "$root/build-cublas" \ +# Build the SM75 cuBLAS path with the Q8_0 fast-half experiment enabled. +cmake -S "$root" -B "$root/build-best" \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_C_COMPILER=gcc-14 -DCMAKE_CXX_COMPILER=g++-14 \ -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc \ @@ -12,6 +12,7 @@ cmake -S "$root" -B "$root/build-cublas" \ -DGGML_NATIVE=ON -DGGML_OPENMP=ON \ -DGGML_CUDA=ON -DGGML_VULKAN=OFF -DGGML_BLAS=OFF \ -DGGML_CUDA_FORCE_MMQ=OFF -DGGML_CUDA_FORCE_CUBLAS=ON \ + -DGGML_CUDA_SM75_Q8_0_FAST_HALF=ON \ -DLLAMA_BUILD_TESTS=ON -DLLAMA_BUILD_TOOLS=ON -cmake --build "$root/build-cublas" --parallel "${CMAKE_BUILD_PARALLEL_LEVEL:-12}" \ +cmake --build "$root/build-best" --parallel "${CMAKE_BUILD_PARALLEL_LEVEL:-12}" \ --target llama-server llama-cli llama-bench test-backend-ops