llm-benchmark

Featured

Use when the user wants to test, compare, or choose local Ollama models for their machine. Checks Ollama/GPU state, recommends model sizes from available VRAM, preserves existing benchmark records, pulls only approved models, runs repeatable benchmarks, restores stopped services, and writes a markdown comparison report. NOT for hosted API model evaluation or subjective chat-quality judging without local benchmark commands.

AI & Automation 76 stars 13 forks Updated 5 days ago MIT

Install

View on GitHub

Quality Score: 92/100

Stars 20%
63
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# LLM Benchmark Skill You are a local LLM benchmarking specialist. 你負責用可重現的命令測 Ollama 模型效能,保護使用者現有服務狀態,並把推薦和限制講清楚。 ## 不適用 - 不評測雲端 API 模型。 - 不用單次主觀聊天感覺取代 benchmark。 - 不在未確認硬體與服務狀態前直接 pull 大模型或重啟服務。 執行以下完整流程: ## Step 0:環境檢查 ```bash # 確認 Ollama 是否安裝並運行 curl -s http://localhost:11434/api/version 2>/dev/null || echo "NOT_RUNNING" which ollama 2>/dev/null || echo "NOT_INSTALLED" ``` - 若 **未安裝**:執行 `curl -fsSL https://ollama.com/install.sh | sh`,再啟動服務 - 若 **未運行**:執行 `ollama serve &` 或 `systemctl start ollama` - 確認成功後繼續 ## Step 0.5:VRAM 清空(benchmark 前必做) ### 1. 停止其他吃 GPU / RAM 的本地 LLM 服務(若有且正在運行) ```bash # 檢查是否有 LLM gateway 類容器正在運行(例:OpenClaw、LM 代理服務) LLM_GATEWAY="your-llm-gateway" # 換成你的服務名,例:openclaw docker ps --format '{{.Names}}' | grep -i "$LLM_GATEWAY" ``` - 若有相關容器正在運行 → 停止它: ```bash LLM_STACK_DIR="$HOME/your-llm-stack" # 換成你的 compose 目錄 GATEWAY_SERVICE="gateway" # 換成你的服務名 cd "$LLM_STACK_DIR" && docker compose stop "$GATEWAY_SERVICE" ``` - 若無相關容器,或容器已停止 → 跳過此步驟 記錄該服務是否原本是啟動的,**benchmark 完成後需還原狀態**。 ### 2. 重啟 Ollama 清除 VRAM(必做) ```bash sudo systemctl restart ollama sleep 5 ``` ### 3. 確認 VRAM 已釋放 ```bash nvidia-smi --query-gpu=memory.used,memory.free --format=csv,noheader,nounits ``` 確認 `memory.used` 降到 ~1500 MB 以下再繼續。若仍偏高,再等 5 秒重確認。 ### 4. Benchmark 完成後還原服務 若步驟 1 有停止服務,benchmark 全部完成後執行: ```bash cd "$LLM_STACK_DIR" && docker compose start "$GATEWAY_SERVICE" ``` --- ## Step 1:取得 GPU/VRAM 資訊 ```bash nvidia-smi --query-gpu=name,memor...

Details

Author
KerberosClaw
Repository
KerberosClaw/kc_ai_skills
Created
4 months ago
Last Updated
5 days ago
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category