{
  "suite": "courses/model-quantization/02-hessian-gptq-and-awq-ptq (ferrite v0.2)",
  "elapsed_sec": 1295.27,
  "environment": {
    "gpu_name": "NVIDIA L4",
    "compute_capability": "sm_89",
    "total_vram_mib": 22563.1,
    "pytorch_version": "2.14.1+cu130",
    "transformers_version": "5.23.0",
    "python_version": "3.13.16"
  },
  "scratch_gptq_cholesky": {
    "matrix_shape": [
      1024,
      2048
    ],
    "block1_ms": 1027.08,
    "block128_ms": 420.36,
    "block128_speedup_x": 2.44,
    "block1_vs_block128_max_abs_diff": 2.040034807748725e-15,
    "rank_deficient_undamped_cholesky_failed": true,
    "output_mse_comparison": {
      "w4_g128": {
        "rtn_output_mse": 1.7385547,
        "gptq_no_desc_act_mse": 0.0786177,
        "gptq_desc_act_true_mse": 0.0164772,
        "gptq_over_rtn_mse_reduction_x": 105.51,
        "desc_act_gain_over_sequential_x": 4.77
      },
      "w3_g128": {
        "rtn_output_mse": 9.7610397,
        "gptq_no_desc_act_mse": 0.5814285,
        "gptq_desc_act_true_mse": 0.0918694,
        "gptq_over_rtn_mse_reduction_x": 106.25,
        "desc_act_gain_over_sequential_x": 6.33
      }
    },
    "dequant_contiguous_ms": 0.0317,
    "dequant_gidx_gather_ms": 0.0415,
    "gidx_gather_slowdown_x": 1.31
  },
  "scratch_awq_scaling_and_fusion": {
    "awq_vs_rtn_and_mixed_fp16": {
      "w4_g128": {
        "rtn_mse": 0.1804458,
        "random_1pct_fp16_mse": 0.1803719,
        "salient_1pct_mixed_fp16_mse": 0.0059331,
        "awq_uniform_int_mse": 0.0288415,
        "optimal_alpha": 0.3,
        "awq_mse_reduction_vs_rtn_x": 6.26,
        "sample_grid_curve": [
          {
            "alpha": 0.0,
            "output_mse": 0.18044576
          },
          {
            "alpha": 0.25,
            "output_mse": 0.03223266
          },
          {
            "alpha": 0.5,
            "output_mse": 0.05580009
          },
          {
            "alpha": 0.75,
            "output_mse": 0.19251975
          },
          {
            "alpha": 1.0,
            "output_mse": 0.33404061
          }
        ]
      },
      "w3_g128": {
        "rtn_mse": 0.9888513,
        "random_1pct_fp16_mse": 0.9884303,
        "salient_1pct_mixed_fp16_mse": 0.0323824,
        "awq_uniform_int_mse": 0.1591168,
        "optimal_alpha": 0.3,
        "awq_mse_reduction_vs_rtn_x": 6.21,
        "sample_grid_curve": [
          {
            "alpha": 0.0,
            "output_mse": 0.98885131
          },
          {
            "alpha": 0.25,
            "output_mse": 0.17772484
          },
          {
            "alpha": 0.5,
            "output_mse": 0.23075634
          },
          {
            "alpha": 0.75,
            "output_mse": 0.37921333
          },
          {
            "alpha": 1.0,
            "output_mse": 0.45287246
          }
        ]
      }
    },
    "rmsnorm_fusion_fp32_max_err": 3.814697265625e-06,
    "swiglu_up_proj_fusion_fp32_rel_err": 5.574036663347215e-07,
    "swiglu_up_proj_fusion_fp64_max_err": 1.3500311979441904e-13,
    "swiglu_wrong_gate_fusion_rel_err": 0.14652
  },
  "qwen3_4b_ptq_arena": {
    "model_id": "Qwen/Qwen3-4B",
    "num_layers_quantized": 36,
    "num_linear_projections_quantized": 252,
    "mixed_calib_sha256": "880a9117651dfc68",
    "prose_calib_sha256": "df9ac03c0b3697cf",
    "unseen_eval_sha256": "90fd16d4953e7437",
    "peak_vram_gib": 9.92,
    "arena_results": {
      "bf16_baseline": {
        "quant_sec": 0.0,
        "heldout_nll": 3.48832,
        "heldout_ppl": 32.7309,
        "kl_vs_bf16": 0.0,
        "top1_token_agreement": 1.0,
        "structured_pass_rate": 1.0,
        "structured_passed": "6/6"
      },
      "rtn_w4_g128": {
        "quant_sec": 0.87,
        "heldout_nll": 3.56473,
        "heldout_ppl": 35.33,
        "kl_vs_bf16": 0.335397,
        "top1_token_agreement": 0.8538,
        "structured_pass_rate": 1.0,
        "structured_passed": "6/6"
      },
      "rtn_w3_g128": {
        "quant_sec": 0.87,
        "heldout_nll": 5.68876,
        "heldout_ppl": 295.5273,
        "kl_vs_bf16": 3.069685,
        "top1_token_agreement": 0.3538,
        "structured_pass_rate": 0.0,
        "structured_passed": "0/6"
      },
      "gptq_w4_g128_act_seq": {
        "quant_sec": 206.21,
        "heldout_nll": 3.46468,
        "heldout_ppl": 31.9661,
        "kl_vs_bf16": 0.151584,
        "top1_token_agreement": 0.8585,
        "structured_pass_rate": 1.0,
        "structured_passed": "6/6"
      },
      "gptq_w3_g128_no_desc_act": {
        "quant_sec": 171.12,
        "heldout_nll": 4.28627,
        "heldout_ppl": 72.6952,
        "kl_vs_bf16": 1.261997,
        "top1_token_agreement": 0.5849,
        "structured_pass_rate": 0.5,
        "structured_passed": "3/6"
      },
      "gptq_w3_g128_no_true_seq": {
        "quant_sec": 205.9,
        "heldout_nll": 4.11449,
        "heldout_ppl": 61.2208,
        "kl_vs_bf16": 1.007436,
        "top1_token_agreement": 0.5896,
        "structured_pass_rate": 0.8333,
        "structured_passed": "5/6"
      },
      "gptq_w3_g128_act_seq": {
        "quant_sec": 205.18,
        "heldout_nll": 3.93254,
        "heldout_ppl": 51.0367,
        "kl_vs_bf16": 0.907143,
        "top1_token_agreement": 0.6415,
        "structured_pass_rate": 0.6667,
        "structured_passed": "4/6"
      },
      "gptq_w3_g128_prose_mismatch_calib": {
        "quant_sec": 205.0,
        "heldout_nll": 7.39705,
        "heldout_ppl": 1631.1707,
        "kl_vs_bf16": 4.820005,
        "top1_token_agreement": 0.316,
        "structured_pass_rate": 0.0,
        "structured_passed": "0/6"
      },
      "awq_w4_g128": {
        "quant_sec": 20.15,
        "heldout_nll": 3.55079,
        "heldout_ppl": 34.8409,
        "kl_vs_bf16": 0.221438,
        "top1_token_agreement": 0.8585,
        "structured_pass_rate": 1.0,
        "structured_passed": "6/6"
      },
      "awq_w3_g128": {
        "quant_sec": 20.17,
        "heldout_nll": 4.36865,
        "heldout_ppl": 78.9367,
        "kl_vs_bf16": 1.410738,
        "top1_token_agreement": 0.5519,
        "structured_pass_rate": 0.8333,
        "structured_passed": "5/6"
      }
    }
  }
}
