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
+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**: