Reddit r/LocalLLaMA (开源AI)· /u/randomjapaneselearn·· 16 天前AI 评分47
llama.cpp 的 -ngl -1 参数排查:模型装进 GPU 仍高 CPU 占用的原因
Solved High CPU usage when model fit in GPU, beware of -ngl -1 llama.cpp layers offloading to GPU and llama-fit-param
AI 导读
一位用户在 3090 上运行 llama.cpp 加载 27B 模型(131072 上下文)时遇到高 CPU 占用,日志显示 -ngl -1(即 auto)未能稳定卸载全部 66 层,改为 -ngl all 后所有层全部进入 GPU。该改动还把生成速度从 60 t/s 提升到 76 t/s。作者推测 -ngl -1 表示 auto,-2 才表示 all,并提醒遇到类似情况直接用 all。
来源:Reddit r/LocalLLaMA (开源AI) · reddit.com