#!/usr/bin/env python3 """SC-1: checkpoint schema + NaN audit (no GPU). Usage: sc1_schema.py CKPT""" import json, struct, os, sys import numpy as np CKPT = sys.argv[1] idx = json.load(open(f"{CKPT}/model.safetensors.index.json")) wm = idx["weight_map"] cfg = json.load(open(f"{CKPT}/config.json")) books = {int(k): v for k, v in cfg["quantization_config"]["aqlm_layer_books"].items()} assert cfg["quantization_config"]["quant_method"] == "nvfp4_aqlm_hybrid" # 1. byte accounting total = 0 headers = {} for shard in sorted(set(wm.values())): with open(f"{CKPT}/{shard}", "rb") as fh: n = struct.unpack("