Skip to content
所有標籤

#cuda

4 篇文章
tech deep-dive 自架推論服務

TensorRT-LLM:編譯換效能的 NVIDIA 專用 LLM 推論引擎

TensorRT-LLM 是 NVIDIA 的開源 LLM 推論庫(Apache 2.0),用離線編譯把模型權重與計算圖轉成最佳化的 TensorRT engine,再用自訂 CUDA kernel、in-flight batching 與多種平行化壓出硬體極限。代價是只支援 NVIDIA GPU、編譯要數十分鐘、換模型或量化就要重新 build。

CS336 Lecture 5:GPU 快不是因為每個 thread 快,而是資料少搬幾次

第五講從 SM、warp 與記憶體階層解釋 GPU,再用低精度、fusion、recomputation、coalescing 與 tiling 統一常見優化;FlashAttention 正是這些原則在 attention 上的組合。

CS336 Lecture 6:寫 Triton kernel 前,先學會 benchmark 與 profile

第六講把 GPU 原理落到 kernel:benchmark 看不同尺寸如何縮放,profiler 看實際呼叫與時間,再以 Triton 實作 GeLU、softmax、reduction 與 tiled matmul;快的前提是先量對。

ai guide

llama.cpp — 從純 C++ 到消費級硬體上的 LLM 推論引擎

llama.cpp 是目前最廣泛使用的本地 LLM 推論引擎,用純 C/C++ 實作,支援 CPU、Metal、CUDA、Vulkan 等多後端,搭配 GGUF 量化格式讓消費級硬體能跑數十億參數的模型。