agentsclimarketplace

Local llm slow diagnosis

Skill bokuwalily/claude-code-skills/skills/local-llm-slow-diagnosis

ローカルLLM(ollama等)がMac/ノートPCで異常に遅い(eval rate 1-2 t/s等)時の原因切り分け。"100% GPU"表示なのに遅い場合に発火。From its SKILL.md

Install
npx -y skills add bokuwalily/claude-code-skills --skill local-llm-slow-diagnosis

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.2 KB, 741 tokens by cl100k_base, as published. Nobody here has run it

Procedure

切り分けは「安く効く順」ではなく「最も見落とす順」で。電力を最後に回すと時間を溶かす。

  1. ollama ps でPROCESSOR列確認。"100% GPU"でも遅いなら以下へ(GPU"割当"≠フルクロック)
  2. メモリ切り分け: memory_pressure | grep free。他モデルを ollama stop <model> して再測定。変化なければメモリは無関係
  3. バージョン: ollama --versiongh api repos/ollama/ollama/releases/latest --jq .tag_name を比較。更新しても変わらなければソフトは無関係
  4. 電力(最重要・盲点): system_profiler SPPowerDataType | grep -iE "Wattage|State of Charge"
    • アダプタW数が低い(8W=iPhone充電器クラス)+バッテリー低残量 → GPUスロットリング確定
    • Apple Siliconノートは給電不足/低バッテリー時にGPUクロックを絞る。AC接続でも起こる
  5. 補助: pmset -g | grep lowpowermode(1なら低電力モード)、pmset -g therm(CPU_Speed_Limit<100でサーマル抑制)

Pitfalls

  • "100% GPU"はGPU割当の意味で、フルクロックの意味ではない。prompt eval も generation も両方遅いなら電力/熱を疑う
  • ollamaバージョン更新やメモリ解放を先に試しがちだが、給電が原因なら全部無駄。電力確認を早める
  • M5等の最新チップはアダプタ70W+必須。8-30Wでは高負荷時に破綻し、充電も追いつかずバッテリーが低残量で張り付く
  • macOSのollamaは手動DMG。CLI更新は brew install --cask --force ollama-app(モデルは~/.ollamaに残り保持される)

Verification

  • アダプタを70W+に替え、バッテリー50%+まで充電後に ollama run <model> --verbose "short task" で eval rate 再測定
  • 10倍以上改善すれば電力が原因だったと確定(実例: 8W時1.28 t/s → 68W時10.73 t/s)

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,144. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.