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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
| 3 |
+
"title": "MLX Benchmark Result",
|
| 4 |
+
"description": "Structured result envelope for a single benchmark suite run",
|
| 5 |
+
"type": "object",
|
| 6 |
+
"required": [
|
| 7 |
+
"schema_version",
|
| 8 |
+
"timestamp",
|
| 9 |
+
"git_sha",
|
| 10 |
+
"trigger",
|
| 11 |
+
"suite",
|
| 12 |
+
"model",
|
| 13 |
+
"system",
|
| 14 |
+
"results"
|
| 15 |
+
],
|
| 16 |
+
"additionalProperties": false,
|
| 17 |
+
"properties": {
|
| 18 |
+
"schema_version": {
|
| 19 |
+
"type": "string",
|
| 20 |
+
"const": "1",
|
| 21 |
+
"description": "Schema version — bump when making breaking changes"
|
| 22 |
+
},
|
| 23 |
+
"timestamp": {
|
| 24 |
+
"type": "string",
|
| 25 |
+
"format": "date-time",
|
| 26 |
+
"description": "ISO 8601 UTC timestamp of when the run started"
|
| 27 |
+
},
|
| 28 |
+
"git_sha": {
|
| 29 |
+
"type": "string",
|
| 30 |
+
"minLength": 7,
|
| 31 |
+
"description": "Full or short git commit SHA of the repo at run time"
|
| 32 |
+
},
|
| 33 |
+
"trigger": {
|
| 34 |
+
"type": "string",
|
| 35 |
+
"enum": ["schedule", "pr", "workflow_dispatch", "local"],
|
| 36 |
+
"description": "What triggered this benchmark run"
|
| 37 |
+
},
|
| 38 |
+
"pr_number": {
|
| 39 |
+
"type": ["integer", "null"],
|
| 40 |
+
"description": "Pull request number if trigger is 'pr', otherwise null"
|
| 41 |
+
},
|
| 42 |
+
"suite": {
|
| 43 |
+
"type": "string",
|
| 44 |
+
"enum": [
|
| 45 |
+
"throughput",
|
| 46 |
+
"ttft",
|
| 47 |
+
"tool-calling",
|
| 48 |
+
"code-accuracy",
|
| 49 |
+
"framework-eval",
|
| 50 |
+
"capability-comparison",
|
| 51 |
+
"coding",
|
| 52 |
+
"reasoning",
|
| 53 |
+
"knowledge",
|
| 54 |
+
"evalplus",
|
| 55 |
+
"math-hard"
|
| 56 |
+
],
|
| 57 |
+
"description": "Which benchmark suite was executed"
|
| 58 |
+
},
|
| 59 |
+
"model": {
|
| 60 |
+
"type": "string",
|
| 61 |
+
"description": "Model name/ID used for inference (e.g. Qwen3.5-122B-A10B-4bit)"
|
| 62 |
+
},
|
| 63 |
+
"skipped": {
|
| 64 |
+
"type": "boolean",
|
| 65 |
+
"description": "True when the suite was skipped (e.g. MLX server unavailable on standard runner)"
|
| 66 |
+
},
|
| 67 |
+
"system": {
|
| 68 |
+
"type": "object",
|
| 69 |
+
"required": ["os", "chip", "memory_gb"],
|
| 70 |
+
"additionalProperties": false,
|
| 71 |
+
"properties": {
|
| 72 |
+
"os": {
|
| 73 |
+
"type": "string",
|
| 74 |
+
"description": "Operating system and version (e.g. macOS 15.3.2)"
|
| 75 |
+
},
|
| 76 |
+
"chip": {
|
| 77 |
+
"type": "string",
|
| 78 |
+
"description": "CPU/chip model (e.g. Apple M4 Max)"
|
| 79 |
+
},
|
| 80 |
+
"memory_gb": {
|
| 81 |
+
"type": "integer",
|
| 82 |
+
"description": "Total system RAM in GB"
|
| 83 |
+
},
|
| 84 |
+
"vllm_mlx_version": {
|
| 85 |
+
"type": "string",
|
| 86 |
+
"description": "vllm-mlx package version if available"
|
| 87 |
+
},
|
| 88 |
+
"runner": {
|
| 89 |
+
"type": "string",
|
| 90 |
+
"description": "GitHub Actions runner label (e.g. macos-latest, self-hosted)"
|
| 91 |
+
}
|
| 92 |
+
}
|
| 93 |
+
},
|
| 94 |
+
"results": {
|
| 95 |
+
"type": "array",
|
| 96 |
+
"description": "Individual test/metric results",
|
| 97 |
+
"items": {
|
| 98 |
+
"type": "object",
|
| 99 |
+
"required": ["name", "metric", "value", "unit"],
|
| 100 |
+
"additionalProperties": false,
|
| 101 |
+
"properties": {
|
| 102 |
+
"name": {
|
| 103 |
+
"type": "string",
|
| 104 |
+
"description": "Test or measurement name (e.g. 'langgraph', 'tok_per_sec_512')"
|
| 105 |
+
},
|
| 106 |
+
"metric": {
|
| 107 |
+
"type": "string",
|
| 108 |
+
"description": "Metric type (e.g. 'latency', 'throughput', 'score', 'f1')"
|
| 109 |
+
},
|
| 110 |
+
"value": {
|
| 111 |
+
"type": "number",
|
| 112 |
+
"description": "Numeric metric value"
|
| 113 |
+
},
|
| 114 |
+
"unit": {
|
| 115 |
+
"type": "string",
|
| 116 |
+
"description": "Unit of measurement (e.g. 'seconds', 'tok/s', 'ratio', 'bool')"
|
| 117 |
+
},
|
| 118 |
+
"tags": {
|
| 119 |
+
"type": "object",
|
| 120 |
+
"description": "Arbitrary string key-value metadata (e.g. framework, output_tokens)",
|
| 121 |
+
"additionalProperties": {
|
| 122 |
+
"type": "string"
|
| 123 |
+
}
|
| 124 |
+
},
|
| 125 |
+
"raw": {
|
| 126 |
+
"description": "Original unmodified output from the underlying tool or script"
|
| 127 |
+
}
|
| 128 |
+
}
|
| 129 |
+
}
|
| 130 |
+
},
|
| 131 |
+
"memory_snapshots": {
|
| 132 |
+
"type": "array",
|
| 133 |
+
"description": "Memory usage measurements at different phases of the run",
|
| 134 |
+
"items": {
|
| 135 |
+
"type": "object",
|
| 136 |
+
"required": ["phase", "rss_gb"],
|
| 137 |
+
"additionalProperties": false,
|
| 138 |
+
"properties": {
|
| 139 |
+
"phase": {
|
| 140 |
+
"type": "string",
|
| 141 |
+
"description": "Run phase (e.g. 'before', 'loading', 'peak', 'after')"
|
| 142 |
+
},
|
| 143 |
+
"rss_gb": {
|
| 144 |
+
"type": "number",
|
| 145 |
+
"description": "Process RSS memory in GB"
|
| 146 |
+
},
|
| 147 |
+
"free_gb": {
|
| 148 |
+
"type": "number",
|
| 149 |
+
"description": "Free system memory in GB"
|
| 150 |
+
},
|
| 151 |
+
"wired_gb": {
|
| 152 |
+
"type": "number",
|
| 153 |
+
"description": "Wired (non-pageable) memory in GB"
|
| 154 |
+
},
|
| 155 |
+
"swap_mb": {
|
| 156 |
+
"type": "number",
|
| 157 |
+
"description": "Swap usage in MB"
|
| 158 |
+
}
|
| 159 |
+
}
|
| 160 |
+
}
|
| 161 |
+
},
|
| 162 |
+
"errors": {
|
| 163 |
+
"type": "array",
|
| 164 |
+
"description": "Non-fatal errors or warnings encountered during the run",
|
| 165 |
+
"items": {
|
| 166 |
+
"type": "string"
|
| 167 |
+
}
|
| 168 |
+
}
|
| 169 |
+
}
|
| 170 |
+
}
|