# MLX Knife Benchmarks **Status:** Phase 0 - Organic Data Collection (WIP) ## What's Here? This directory contains benchmark infrastructure for mlx-knife: - Empirical performance and compatibility data from E2E tests - Tools for analysis and visualization - Schema definitions for structured reports ## Directory Structure ``` benchmarks/ ├── reports/ # JSONL test reports + Markdown analyses │ ├── 2025-12-20-v2.0.4b3.jsonl # Raw data (one file per test run) │ └── BENCHMARK-*.md # Generated analysis reports ├── schemas/ # JSON Schema definitions │ ├── report-v0.1.schema.json # legacy schema │ ├── report-v0.2.2.schema.json # Current schema │ └── report-current.schema.json # Symlink → current schema ├── tools/ # Standalone tools │ ├── memmon.py # Memory monitor (background sampling) │ └── memplot.py # Memory timeline visualizer ├── generate_benchmark_report.py # Report generator (Template v1.1) ├── validate_reports.py # Schema validation ├── README.md # ← You are here └── TESTING.md # Benchmark handbook (How-To) ``` ## Tools | Tool | Purpose | |------|---------| | `generate_benchmark_report.py` | JSONL → Markdown report (Template v1.1) | | `validate_reports.py` | Schema validation of JSONL files | | `tools/memmon.py` | Memory + CPU + GPU monitoring (200ms sampling) | | `tools/memplot.py` | Interactive 3-row timeline (Memory/CPU/GPU, HTML) | ## Schema **Current:** v0.2.2 (Phase 0 - Test Infrastructure) | Version | Release | Content | |---------|---------|---------| | v0.1.0 | 2.0.3 | Minimal: test, outcome, duration, model | | v0.2.0 | 2.0.4-beta.3 | + hardware_profile, system_health, quality_flags | | v0.2.1 | 2.0.4-beta.7 | + inference_modality (vision/text/audio) | | v0.2.2 | 2.0.4-beta.9 | + test_start_ts, test_end_ts (precise timing) | | v1.0.0 | Future | Model benchmarks (mlxk-benchmark package) | **Schema Strategy:** No v0.3.x planned. v0.2.x → v1.0.0 directly. - v0.x = Test infrastructure ("Was the test run clean?") - v1.x = Model benchmarks ("How good is the model?") See `schemas/LEARNINGS-FOR-v1.0.md` for details. ## Recent Reports Latest baseline reports are in `reports/` directory: - Pattern: `BENCHMARK-