How pseboek/llm_benchmark works
LLM Model Scout discovers local and catalogued model candidates, ranks them for local hardware, and supports a human-approved queue → download → benchmark → reassessment workflow. Benchmark results and source status are persisted in SQLite and surfaced through reports and a historical Streamlit dashboard. The README documents these product stages; source excerpts establish several calls, while some CLI and benchmark wiring is supported only by README statements and SOURCE INDEX references.
Main entry points: main.py CLI workflow · pipeline.py Source orchestration · ollama_benchmark.py Ollama measurements · database.py Scout history
Components 25
Discovery
- CLI workflow
src/main.py - Source orchestration
src/pipeline.py - Candidate normalization
src/discovery.py - Ollama inventory
src/sources/ollama.py - Hugging Face adapter
src/sources/huggingface.py - Artificial Analysis adapter
src/sources/artificial_analysis.py - SWE-bench adapter
src/sources/swebench.py - HTTP utilities
src/sources/http.py
Evaluation
- Ranking and champion deltas
src/scoring.py - Adaptive evaluation
src/adaptive.py - Response quality grading
src/grading.py
Benchmarking
- Candidate review queue
src/benchmark_queue.py - Approved download plan
src/download_queue.py - Benchmark task planning
src/benchmark_plan.py - Benchmark execution
benchmark/runner.py - Ollama measurements
ollama_benchmark.py - Hardware telemetry
src/telemetry.py
Persistence
- Scout history
src/database.py
Reporting
- Reports and comparison
src/report.py - Historical dashboard
dashboard.py
Other components
- Scout operator
- Ollama service
- Hugging Face
- Artificial Analysis
- SWE-bench
Connections 32
- Scout operator → CLI workflow: invokes
README.md - CLI workflow → Source orchestration: starts discovery
src/main.py - Source orchestration → Ollama inventory: loads candidates
src/pipeline.py - Source orchestration → Hugging Face adapter: loads candidates
src/pipeline.py - Source orchestration → Artificial Analysis adapter: loads candidates
src/pipeline.py - Source orchestration → SWE-bench adapter: loads candidates
src/pipeline.py - Source orchestration → Candidate normalization: deduplicates
src/pipeline.py - Ollama inventory → Ollama service: queries tags
src/sources/ollama.py - Hugging Face adapter → HTTP utilities: requests JSON
src/sources/huggingface.py - Artificial Analysis adapter → HTTP utilities: requests JSON
src/sources/artificial_analysis.py - SWE-bench adapter → HTTP utilities: configures endpoint
src/sources/swebench.py - Hugging Face adapter → Hugging Face: fetches models
src/sources/huggingface.py - Artificial Analysis adapter → Artificial Analysis: fetches models
src/sources/artificial_analysis.py - SWE-bench adapter → SWE-bench: fetches leaderboard
src/sources/swebench.py - CLI workflow → Ranking and champion deltas: scores candidates
src/main.py - Ranking and champion deltas → Candidate normalization: normalizes names
src/scoring.py - CLI workflow → Adaptive evaluation: runs adaptive mode
src/main.py - CLI workflow → Candidate review queue: creates review queue
src/main.py - CLI workflow → Approved download plan: manages download approval
src/main.py - CLI workflow → Benchmark task planning: creates task plan
src/main.py - CLI workflow → Benchmark execution: runs approved plan
src/main.py - Benchmark execution → Ollama measurements: executes measurements
README.md - Ollama measurements → Ollama service: sends generation requests
README.md - Ollama measurements → Response quality grading: grades responses
ollama_benchmark.py - Ollama measurements → Hardware telemetry: captures hardware metrics
ollama_benchmark.py - CLI workflow → Scout history: persists candidates and runs
src/main.py - Ollama measurements → Scout history: stores benchmark results
README.md - CLI workflow → Reports and comparison: generates report
src/main.py - Reports and comparison → Ranking and champion deltas: ranks and compares
src/report.py - CLI workflow → Historical dashboard: opens dashboard
README.md - Scout history → Historical dashboard: serves history
README.md - Scout history → Reports and comparison: supplies history
README.md