{
  "suite": "courses/model-quantization/04-gguf-kquants-and-marlin-kernels (ferrite v0.4)",
  "elapsed_sec": 835.13,
  "environment": {
    "gpu_name": "NVIDIA L4",
    "compute_capability": "sm_89",
    "total_vram_mib": 22563.1,
    "pytorch_version": "2.14.1+cu130",
    "triton_version": "3.8.0",
    "transformers_version": "5.23.0",
    "python_version": "3.13.16"
  },
  "scratch_awq_packing_and_triton": {
    "awq_0x6400_magic_fp16_max_abs_err": 0.0,
    "triton_w4a16_numerical_parity": {
      "M_1": {
        "dispatch_path": "splitk_gemv",
        "max_abs_diff_vs_bf16_ref": 0.015625,
        "rel_l2_err": 0.0013692
      },
      "M_4": {
        "dispatch_path": "splitk_gemv",
        "max_abs_diff_vs_bf16_ref": 0.015625,
        "rel_l2_err": 0.001327
      },
      "M_8": {
        "dispatch_path": "splitk_gemv",
        "max_abs_diff_vs_bf16_ref": 0.015625,
        "rel_l2_err": 0.0015425
      },
      "M_16": {
        "dispatch_path": "tensorcore_tl_dot",
        "max_abs_diff_vs_bf16_ref": 0.015625,
        "rel_l2_err": 0.0014606
      },
      "M_64": {
        "dispatch_path": "tensorcore_tl_dot",
        "max_abs_diff_vs_bf16_ref": 0.015625,
        "rel_l2_err": 0.0014524
      },
      "M_256": {
        "dispatch_path": "tensorcore_tl_dot",
        "max_abs_diff_vs_bf16_ref": 0.015625,
        "rel_l2_err": 0.0014572
      }
    }
  },
  "scratch_gguf_v3_codec": {
    "q8_0_bytes_differing_vs_official_gguf": 0,
    "q4_k_dequant_max_abs_diff_vs_official_gguf": 0.0,
    "q4_k_q8_k_integer_vec_dot_rel_err": 0.006448,
    "gguf_v3_header_and_reversed_shape_verified": true,
    "tensor_data_offset_bytes": 384,
    "imatrix_ablation_75x_outlier": {
      "w2_subblock_plain_mse": 4.59135,
      "w2_subblock_imatrix_mse": 0.25137,
      "w2_imatrix_mse_reduction_x": 18.27,
      "q4_k_plain_mse": 0.156929,
      "q4_k_imatrix_mse": 0.020265
    }
  },
  "kernel_bandwidth_arena": {
    "shape": {
      "k": 4096,
      "n": 14336,
      "group_size": 128
    },
    "bf16_weight_mib": 112.0,
    "w4_packed_total_mib": 29.75,
    "empirical_d2d_hbm_peak_gbps": 230.19,
    "tinygemm_backend": "torchao_int4_tinygemm",
    "sweep": [
      {
        "m_tokens": 1,
        "bf16_ms": 0.4527,
        "bf16_eff_gbps": 259.5,
        "unfused_dequant_ms": 5.9996,
        "triton_tc_only_ms": 0.1326,
        "ferrite_triton_dual_ms": 0.0892,
        "ferrite_triton_speedup_x": 5.076,
        "ferrite_triton_eff_gbps": 350.18,
        "ferrite_triton_pct_of_empirical_hbm": 152.1,
        "tinygemm_ms": 0.1244,
        "tinygemm_speedup_x": 3.638,
        "tinygemm_eff_gbps": 250.98,
        "tinygemm_pct_of_empirical_hbm": 109.0
      },
      {
        "m_tokens": 2,
        "bf16_ms": 0.4809,
        "bf16_eff_gbps": 244.37,
        "unfused_dequant_ms": 6.1156,
        "triton_tc_only_ms": 0.1339,
        "ferrite_triton_dual_ms": 0.1551,
        "ferrite_triton_speedup_x": 3.1,
        "ferrite_triton_eff_gbps": 201.56,
        "ferrite_triton_pct_of_empirical_hbm": 87.6,
        "tinygemm_ms": 0.1357,
        "tinygemm_speedup_x": 3.543,
        "tinygemm_eff_gbps": 230.37,
        "tinygemm_pct_of_empirical_hbm": 100.1
      },
      {
        "m_tokens": 4,
        "bf16_ms": 0.4729,
        "bf16_eff_gbps": 248.66,
        "unfused_dequant_ms": 6.1049,
        "triton_tc_only_ms": 0.1368,
        "ferrite_triton_dual_ms": 0.2613,
        "ferrite_triton_speedup_x": 1.81,
        "ferrite_triton_eff_gbps": 119.95,
        "ferrite_triton_pct_of_empirical_hbm": 52.1,
        "tinygemm_ms": 0.1379,
        "tinygemm_speedup_x": 3.429,
        "tinygemm_eff_gbps": 227.27,
        "tinygemm_pct_of_empirical_hbm": 98.7
      },
      {
        "m_tokens": 8,
        "bf16_ms": 0.4774,
        "bf16_eff_gbps": 246.6,
        "unfused_dequant_ms": 6.1071,
        "triton_tc_only_ms": 0.1409,
        "ferrite_triton_dual_ms": 0.3739,
        "ferrite_triton_speedup_x": 1.277,
        "ferrite_triton_eff_gbps": 84.22,
        "ferrite_triton_pct_of_empirical_hbm": 36.6,
        "tinygemm_ms": 0.1431,
        "tinygemm_speedup_x": 3.337,
        "tinygemm_eff_gbps": 220.09,
        "tinygemm_pct_of_empirical_hbm": 95.6
      },
      {
        "m_tokens": 16,
        "bf16_ms": 0.4802,
        "bf16_eff_gbps": 245.8,
        "unfused_dequant_ms": 6.1113,
        "triton_tc_only_ms": 0.1537,
        "ferrite_triton_dual_ms": 0.1528,
        "ferrite_triton_speedup_x": 3.143,
        "ferrite_triton_eff_gbps": 208.04,
        "ferrite_triton_pct_of_empirical_hbm": 90.4,
        "tinygemm_ms": 0.2214,
        "tinygemm_speedup_x": 2.168,
        "tinygemm_eff_gbps": 143.54,
        "tinygemm_pct_of_empirical_hbm": 62.4
      },
      {
        "m_tokens": 32,
        "bf16_ms": 0.5204,
        "bf16_eff_gbps": 227.93,
        "unfused_dequant_ms": 6.1101,
        "triton_tc_only_ms": 0.3075,
        "ferrite_triton_dual_ms": 0.3288,
        "ferrite_triton_speedup_x": 1.583,
        "ferrite_triton_eff_gbps": 98.48,
        "ferrite_triton_pct_of_empirical_hbm": 42.8,
        "tinygemm_ms": 0.4663,
        "tinygemm_speedup_x": 1.116,
        "tinygemm_eff_gbps": 69.43,
        "tinygemm_pct_of_empirical_hbm": 30.2
      },
      {
        "m_tokens": 64,
        "bf16_ms": 0.5294,
        "bf16_eff_gbps": 226.31,
        "unfused_dequant_ms": 6.1216,
        "triton_tc_only_ms": 0.3554,
        "ferrite_triton_dual_ms": 0.4069,
        "ferrite_triton_speedup_x": 1.301,
        "ferrite_triton_eff_gbps": 82.46,
        "ferrite_triton_pct_of_empirical_hbm": 35.8,
        "tinygemm_ms": 0.8955,
        "tinygemm_speedup_x": 0.591,
        "tinygemm_eff_gbps": 37.47,
        "tinygemm_pct_of_empirical_hbm": 16.3
      },
      {
        "m_tokens": 128,
        "bf16_ms": 0.5387,
        "bf16_eff_gbps": 226.76,
        "unfused_dequant_ms": 6.1338,
        "triton_tc_only_ms": 0.8412,
        "ferrite_triton_dual_ms": 0.8533,
        "ferrite_triton_speedup_x": 0.631,
        "ferrite_triton_eff_gbps": 42.09,
        "ferrite_triton_pct_of_empirical_hbm": 18.3,
        "tinygemm_ms": 1.7162,
        "tinygemm_speedup_x": 0.314,
        "tinygemm_eff_gbps": 20.93,
        "tinygemm_pct_of_empirical_hbm": 9.1
      },
      {
        "m_tokens": 512,
        "bf16_ms": 0.9943,
        "bf16_eff_gbps": 137.1,
        "unfused_dequant_ms": 6.4151,
        "triton_tc_only_ms": 3.4723,
        "ferrite_triton_dual_ms": 3.4884,
        "ferrite_triton_speedup_x": 0.285,
        "ferrite_triton_eff_gbps": 14.35,
        "ferrite_triton_pct_of_empirical_hbm": 6.2,
        "tinygemm_ms": 6.7989,
        "tinygemm_speedup_x": 0.146,
        "tinygemm_eff_gbps": 7.36,
        "tinygemm_pct_of_empirical_hbm": 3.2
      }
    ]
  },
  "llama_cpp_qwen3_4b_arena": {
    "model_id": "Qwen/Qwen3-4B",
    "q4_k_m_tensor_dtype_inspection": {
      "file_size_mib": 2381.59,
      "total_tensors": 398,
      "effective_bits_per_weight": 4.9548,
      "dtype_breakdown": {
        "F32": {
          "tensors": 145,
          "elements": 196096,
          "bytes": 784384
        },
        "Q6_K": {
          "tensors": 37,
          "elements": 884408320,
          "bytes": 725491200
        },
        "Q4_K": {
          "tensors": 216,
          "elements": 3137863680,
          "bytes": 1765048320
        }
      }
    },
    "variants": {
      "BF16": {
        "file_size_gib": 7.498,
        "heldout_ppl": 8.6909,
        "pp512_tok_per_s": 4169.31,
        "tg128_tok_per_s": 30.45,
        "decode_effective_bw_gbps": 245.15
      },
      "Q8_0": {
        "file_size_gib": 3.986,
        "heldout_ppl": 8.7499,
        "pp512_tok_per_s": 4653.04,
        "tg128_tok_per_s": 51.24,
        "decode_effective_bw_gbps": 219.33
      },
      "Q4_K_M": {
        "file_size_gib": 2.326,
        "heldout_ppl": 8.7097,
        "pp512_tok_per_s": 4485.07,
        "tg128_tok_per_s": 79.47,
        "decode_effective_bw_gbps": 198.45
      },
      "Q3_K_M": {
        "file_size_gib": 1.933,
        "heldout_ppl": 9.4958,
        "pp512_tok_per_s": 4067.71,
        "tg128_tok_per_s": 88.5,
        "decode_effective_bw_gbps": 183.69
      },
      "Q2_K_no_imatrix": {
        "file_size_gib": 1.555,
        "heldout_ppl": 11.0474,
        "pp512_tok_per_s": 3549.11,
        "tg128_tok_per_s": 105.44,
        "decode_effective_bw_gbps": 176.03
      },
      "Q2_K_with_imatrix": {
        "file_size_gib": 1.555,
        "heldout_ppl": 9.6959,
        "pp512_tok_per_s": 3551.58,
        "tg128_tok_per_s": 105.32,
        "decode_effective_bw_gbps": 175.83
      },
      "IQ3_XXS_with_imatrix": {
        "file_size_gib": 1.555,
        "heldout_ppl": 9.6445,
        "pp512_tok_per_s": 4306.51,
        "tg128_tok_per_s": 101.01,
        "decode_effective_bw_gbps": 168.7
      }
    }
  }
}
