Skip to content

llama.cpp Maxwell - OPTI_002

Latest

Choose a tag to compare

@nuke1984 nuke1984 released this 03 Dec 17:54
· 1 commit to maxwell since this release

This source release is a proof of work for CUDA optimizations on NVIDIA Maxwell GPUs. The project is published for reference and is not actively maintained.

  • Upstream base: ggml-org/llama.cpp v0.6.0, commit d81235049 (build 11429).
  • Maxwell source: commit 4d6bf2e61 (build 11432), the source for the llama-server build used by the Ornith 1.5 9B Q4 and Q8 Tensor Split launch scripts.

The patches extend the internal CUDA AllReduce to four GPUs and pre-Volta architectures, add a Maxwell-specific MMVQ path for sm_50, and tune MMVQ decoding to two warps on Maxwell.

Build

The reference configuration used CUDA 12.8 and GCC 13.3 on Linux. From the extracted source archive or a checkout of this tag:

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DGGML_CUDA=ON -DGGML_CUDA_NO_VMM=ON \
  '-DCMAKE_CUDA_ARCHITECTURES=50;86' \
  '-DGGML_CUDA_FA_QUANTS=q4_0-q4_0;q8_0-q8_0;f16-f16;bf16-bf16'
cmake --build build --config Release --target llama-server -j

Ornith Tensor Split configuration

The reference setup used four Tesla M10 GPUs (CUDA1 through CUDA4), with an RTX 3060 idle at CUDA0. Use --list-devices to find the device IDs on your system.

./build/bin/llama-server -m /path/to/Ornith-1.5-9B-Q4_K_M.gguf \
  --device CUDA1,CUDA2,CUDA3,CUDA4 --split-mode tensor --tensor-split 25,25,25,25 \
  -ngl 999 -c 4000 -ctk q8_0 -ctv q8_0 --flash-attn on --load-mode dio \
  --host 127.0.0.1 --port 8181

For the 8-bit model, use Ornith-1.5-9B-Q8_0.gguf in the same command.