{
  "generatedBy": "bench.mjs",
  "startedAt": "2026-10-03T21:44:10.267Z",
  "finishedAt": "2026-10-03T21:44:10.918Z",
  "machine": {
    "cpu": "Apple M1",
    "os": "Darwin 26.3",
    "arch": "arm64",
    "node": "v22.18.0",
    "python": "Python 3.13.5"
  },
  "metricCount": 29,
  "metrics": [
    {
      "metric": "llamacpp_build",
      "value": "b11351",
      "unit": "",
      "note": "official llama-b11351-bin-macos-arm64.tar.gz"
    },
    {
      "metric": "ollama_version",
      "value": "0.35.1",
      "unit": ""
    },
    {
      "metric": "model",
      "value": "qwen2.5-coder:7b (Ollama library blob, Q4_K_M GGUF)",
      "unit": ""
    },
    {
      "metric": "gguf_n_layer",
      "value": 28,
      "unit": "layers",
      "note": "llama.cpp print_info from GGUF metadata"
    },
    {
      "metric": "gguf_n_head_kv",
      "value": 4,
      "unit": "heads",
      "note": "llama.cpp print_info"
    },
    {
      "metric": "gguf_head_dim",
      "value": 128,
      "unit": "",
      "note": "llama.cpp print_info n_embd_head_k"
    },
    {
      "metric": "llamacpp_c16384_f16_actual_mib",
      "value": 896,
      "unit": "MiB",
      "note": "llama_kv_cache: size line"
    },
    {
      "metric": "llamacpp_c16384_f16_predicted_mib",
      "value": 896,
      "unit": "MiB",
      "note": "kvCacheBytes(layers=28, kvHeads=4, headDim=128, context=16384, bytesPerElement=2)"
    },
    {
      "metric": "llamacpp_c16384_f16_actual_over_predicted",
      "value": 1,
      "unit": "ratio",
      "note": "1.0 = exact"
    },
    {
      "metric": "llamacpp_c16384_q4_0_actual_mib",
      "value": 252,
      "unit": "MiB",
      "note": "llama_kv_cache: size line"
    },
    {
      "metric": "llamacpp_c16384_q4_0_predicted_mib",
      "value": 224,
      "unit": "MiB",
      "note": "kvCacheBytes(layers=28, kvHeads=4, headDim=128, context=16384, bytesPerElement=0.5)"
    },
    {
      "metric": "llamacpp_c16384_q4_0_actual_over_predicted",
      "value": 1.125,
      "unit": "ratio",
      "note": "1.0 = exact"
    },
    {
      "metric": "llamacpp_c16384_q8_0_actual_mib",
      "value": 476,
      "unit": "MiB",
      "note": "llama_kv_cache: size line"
    },
    {
      "metric": "llamacpp_c16384_q8_0_predicted_mib",
      "value": 448,
      "unit": "MiB",
      "note": "kvCacheBytes(layers=28, kvHeads=4, headDim=128, context=16384, bytesPerElement=1)"
    },
    {
      "metric": "llamacpp_c16384_q8_0_actual_over_predicted",
      "value": 1.0625,
      "unit": "ratio",
      "note": "1.0 = exact"
    },
    {
      "metric": "llamacpp_c32768_f16_actual_mib",
      "value": 1792,
      "unit": "MiB",
      "note": "llama_kv_cache: size line"
    },
    {
      "metric": "llamacpp_c32768_f16_predicted_mib",
      "value": 1792,
      "unit": "MiB",
      "note": "kvCacheBytes(layers=28, kvHeads=4, headDim=128, context=32768, bytesPerElement=2)"
    },
    {
      "metric": "llamacpp_c32768_f16_actual_over_predicted",
      "value": 1,
      "unit": "ratio",
      "note": "1.0 = exact"
    },
    {
      "metric": "llamacpp_c4096_f16_actual_mib",
      "value": 224,
      "unit": "MiB",
      "note": "llama_kv_cache: size line"
    },
    {
      "metric": "llamacpp_c4096_f16_predicted_mib",
      "value": 224,
      "unit": "MiB",
      "note": "kvCacheBytes(layers=28, kvHeads=4, headDim=128, context=4096, bytesPerElement=2)"
    },
    {
      "metric": "llamacpp_c4096_f16_actual_over_predicted",
      "value": 1,
      "unit": "ratio",
      "note": "1.0 = exact"
    },
    {
      "metric": "ollama_ctx16384_f16_actual_mib",
      "value": 896,
      "unit": "MiB",
      "note": "Ollama server log llama_kv_cache line (OLLAMA_CONTEXT_LENGTH set)"
    },
    {
      "metric": "ollama_ctx16384_f16_predicted_mib",
      "value": 896,
      "unit": "MiB",
      "note": "kvCacheBytes with the same architecture numbers"
    },
    {
      "metric": "ollama_ctx16384_f16_ollama_ps",
      "value": "5.9 GB, 23%/77% CPU/GPU, context 16384",
      "unit": "",
      "note": "`ollama ps` SIZE, PROCESSOR, CONTEXT"
    },
    {
      "metric": "ollama_ctx16384_q8_0_actual_mib",
      "value": 476,
      "unit": "MiB",
      "note": "Ollama server log llama_kv_cache line (OLLAMA_CONTEXT_LENGTH set)"
    },
    {
      "metric": "ollama_ctx16384_q8_0_predicted_mib",
      "value": 448,
      "unit": "MiB",
      "note": "kvCacheBytes with the same architecture numbers"
    },
    {
      "metric": "ollama_ctx16384_q8_0_ollama_ps",
      "value": "5.9 GB, 24%/76% CPU/GPU, context 16384",
      "unit": "",
      "note": "`ollama ps` SIZE, PROCESSOR, CONTEXT"
    },
    {
      "metric": "q8_0_measured_bytes_per_element",
      "value": 1.0625,
      "unit": "bytes",
      "note": "llama.cpp q8_0 cache size / f16 cache size x 2 at 16384 tokens; the calculator assumes 1"
    },
    {
      "metric": "q4_0_measured_bytes_per_element",
      "value": 0.5625,
      "unit": "bytes",
      "note": "llama.cpp q4_0 cache size / f16 cache size x 2 at 16384 tokens; the calculator assumes 0.5"
    }
  ],
  "log": [
    ""
  ]
}
