Docs: Update HARDWARE_LEARNINGS and README with low-latency NCCL ring buffer benchmarks and speculative decoding findings

This commit is contained in:
wmantly
2026-09-01 16:06:32 +00:00
parent 261631457c
commit 5f261c191f
2 changed files with 30 additions and 3 deletions
+2 -2
View File
@@ -9,8 +9,8 @@ A production-grade, highly optimized software and hardware configuration for run
* **Model**: `Qwen3.8-27B-Uncensored` (`Q4_K_P` Quantization, 16.68 GB weights)
* **Context Window**: **`262,144 tokens` (Full 256K Context)** with zero OOM crashes
* **Multimodal Vision**: Active (`mmproj` ViT GGUF projector for image recognition)
* **Decode Speed**: **`18.03 tok/s`** (sustained across 3 GPUs in NCCL tensor parallel)
* **Prompt Processing Speed**: **`~127 tok/s`** (using Flash Attention & Turing cuBLAS GEMM)
* **Decode Speed**: **`17.66 18.03 tok/s`** (sustained across 3 GPUs in NCCL tensor parallel)
* **Prompt Processing Speed**: **`140.3 179.4 tok/s`** (2x speedup using low-latency NCCL ring buffers & Flash Attention)
* **Idle Power**: Automatically downclocks CMP cards to 300600 MHz, cutting idle draw from **200W+ down to ~100W** (~100W wall power savings!)
* **API Compatibility**: Fully compatible with **Ollama** (`http://<ip>:11434`), **OpenAI** (`/v1/chat/completions`), and **Anthropic Messages** (`/v1/messages`) for OpenWebUI, Claude Code, and Continue.dev.
+28 -1
View File
@@ -58,7 +58,34 @@ Comparing the hardware profiles of two CMP 50HX cards on the exact same rig:
---
## 5. 20GB VRAM Modding Feasibility (CMP 50HX TU102)
## 6. Low-Latency NCCL Ring Buffer Tuning (2x Prefill Speedup)
* **The Problem**: Default NCCL ring allocations (4MB8MB) introduce high PCIe bus synchronization latency on multi-GPU AllReduce barriers on Turing architecture (`sm_75`).
* **The Solution**:
```bash
export CUDA_DEVICE_MAX_CONNECTIONS=1
export NCCL_BUFFSIZE=2097152 # 2MB ring buffer (aligned to Turing L2 cache lines)
export NCCL_NET_GDR_LEVEL=0 # Pure local PCIe bus routing
export NCCL_P2P_DISABLE=0 # Direct P2P transfers
export NCCL_ALGO=RING # Direct 1-stage ring AllReduce
export NCCL_PROTO=SIMPLE # Eliminates LL128 packet framing overhead over PCIe
```
* **Measured Benchmark**:
* Baseline Prefill Speed: **`72.0 tok/s`**
* Tuned NCCL Prefill Speed: **`140.3 179.4 tok/s`** (**+149% prompt processing throughput!**)
---
## 7. Speculative Decoding & Multimodal (`mmproj`) Interaction
* **The Conflict**: In `llama.cpp`, loading a secondary GGUF draft model (`-md`) simultaneously with a multimodal vision projector (`--mmproj`) causes an internal context initialization conflict inside `libmtmd.so`.
* **The Resolution**:
* **Multimodal Mode**: Use N-gram context-lookup speculation (`--spec-type ngram-simple --spec-ngram-simple-size-n 24 --spec-ngram-simple-size-m 4`), which runs entirely in primary context with 0 additional VRAM and full vision support.
* **Pure Text Mode**: Remove `--mmproj` to enable secondary neural draft models (`-md /opt/models/gguf/Qwen2.5-0.5B-Instruct-Q4_K_M.gguf`).
---
## 8. 20GB VRAM Modding Feasibility (CMP 50HX TU102)
* **Architecture**: CMP 50HX uses the **TU102 PCB layout (320-bit bus, 10 memory pads)**.
* **Memory Swap**: