← 文章總覽

F1 · Cloud & Infra

Profiling llama.cpp with Arm Streamline

L02 · 15 分鐘 · Arm Linux server; specific hardware not stated

導讀

在 Arm Neoverse 或 Cortex-A 平台上建置啟用 KleidiAI 的 llama.cpp,整合 Arm Streamline marker annotations 與 annotation channels,擷取 Arm CPU 上的 LLM inference timeline。工作流將 token generation 拆分為 Prefill 與 Decode,進一步觀察 compute graph、tensor shape、KleidiAI kernel 及多執行緒行為,呈現 Prefill 以 GEMM 為主、Decode 以 GEMV 為主的運算特徵。這套 profiling 方法串接開源 LLM runtime、Arm 最佳化 kernel 與 CPU-level performance data,為開發者提供以實際執行證據定位瓶頸與調校方向的分析基線。

驗證範圍

  • 定位為 Arm CPU 上的 llama.cpp profiling reference workflow,使用指定的 llama.cpp b6202、KleidiAI build、Streamline annotations 與 gator data capture,驗證 Prefill、Decode、operator 與多執行緒行為可被觀察。
  • 硬軟體依賴包括 Arm Neoverse 或 Cortex-A Linux/Android 平台、Arm Performance Studio 或 Development Studio、相符版本的 gator、PMU 存取權限,以及可供 llama-cli 執行的 GGUF 模型。
  • 範圍聚焦於 profiling instrumentation 與執行行為分析;觀察結果會受模型、prompt、llama.cpp 版本、build flags、thread configuration 與硬體影響,未涵蓋自動效能最佳化、跨平台 benchmarking 或 production workload tuning。
原文出處: https://learn.arm.com/learning-paths/servers-and-cloud-computing/llama_cpp_streamline/
本頁為導讀與驗證範圍標註,非官方內容轉載。