← back to the post

Reproduce: TQ2Q speed across GPU backends

Everything below uses public artifacts and a fixed llama-bench protocol. No special hardware or private builds — clone, build with your GPU backend, download the public GGUFs, run.

1. Build the kernels

The TQ2_0 kernels (CUDA / Metal / HIP / Vulkan) live on our fork's master:

git clone https://github.com/AgntroAI/llama.cpp
cd llama.cpp
# pick the backend for your machine:
cmake -B build -DGGML_CUDA=ON  -DCMAKE_CUDA_ARCHITECTURES=<your arch, e.g. 86>   # NVIDIA
#   -DGGML_METAL=ON     (Apple Silicon)
#   -DGGML_HIP=ON       (AMD ROCm)
#   -DGGML_VULKAN=ON    (any Vulkan device, incl. Intel/AMD iGPUs)
cmake --build build --target llama-bench -j

2. Get the models (public, anonymous download)

huggingface-cli download Agntro/olmoe-1b-7b-TQ2Q-GGUF --local-dir olmoe

3. Run the benchmark (identical everywhere)

llama-bench -m <model.gguf> -ngl 99 -p 512 -n 128 -r 5     # full GPU offload
llama-bench -m <model.gguf> -ngl 0   -p 512 -n 128 -r 5     # CPU baseline for the speedup

Report pp512 (prefill t/s) and tg128 (decode t/s), median ± stddev. -r 5 for stability.

Hazard

Never re-quantize a TQ2Q GGUF. llama.cpp's float-conversion path clamps to [−1, 1] and silently strips the reclaimed 4th code level. Download and run the GGUFs as-is.