diff --git a/.gitattributes b/.gitattributes index bed0738c7eeb449bca98b5d2f33c89a1ee56349a..4cf55e12bfb21e48361d6c6baf8bcc2fc7fde624 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,60 +1,3 @@ -*.7z filter=lfs diff=lfs merge=lfs -text -*.arrow filter=lfs diff=lfs merge=lfs -text -*.avro filter=lfs diff=lfs merge=lfs -text -*.bin filter=lfs diff=lfs merge=lfs -text -*.bz2 filter=lfs diff=lfs merge=lfs -text -*.ckpt filter=lfs diff=lfs merge=lfs -text -*.ftz filter=lfs diff=lfs merge=lfs -text -*.gz filter=lfs diff=lfs merge=lfs -text -*.h5 filter=lfs diff=lfs merge=lfs -text -*.joblib filter=lfs diff=lfs merge=lfs -text -*.lfs.* filter=lfs diff=lfs merge=lfs -text -*.lz4 filter=lfs diff=lfs merge=lfs -text -*.mds filter=lfs diff=lfs merge=lfs -text -*.mlmodel filter=lfs diff=lfs merge=lfs -text -*.model filter=lfs diff=lfs merge=lfs -text -*.msgpack filter=lfs diff=lfs merge=lfs -text -*.npy filter=lfs diff=lfs merge=lfs -text -*.npz filter=lfs diff=lfs merge=lfs -text -*.onnx filter=lfs diff=lfs merge=lfs -text -*.ot filter=lfs diff=lfs merge=lfs -text -*.parquet filter=lfs diff=lfs merge=lfs -text -*.pb filter=lfs diff=lfs merge=lfs -text -*.pickle filter=lfs diff=lfs merge=lfs -text -*.pkl filter=lfs diff=lfs merge=lfs -text -*.pt filter=lfs diff=lfs merge=lfs -text -*.pth filter=lfs diff=lfs merge=lfs -text -*.rar filter=lfs diff=lfs merge=lfs -text *.safetensors filter=lfs diff=lfs merge=lfs -text -saved_model/**/* filter=lfs diff=lfs merge=lfs -text -*.tar.* filter=lfs diff=lfs merge=lfs -text -*.tar filter=lfs diff=lfs merge=lfs -text -*.tflite filter=lfs diff=lfs merge=lfs -text -*.tgz filter=lfs diff=lfs merge=lfs -text -*.wasm filter=lfs diff=lfs merge=lfs -text -*.xz filter=lfs diff=lfs merge=lfs -text -*.zip filter=lfs diff=lfs merge=lfs -text -*.zst filter=lfs diff=lfs merge=lfs -text -*tfevents* filter=lfs diff=lfs merge=lfs -text -# Audio files - uncompressed -*.pcm filter=lfs diff=lfs merge=lfs -text -*.sam filter=lfs diff=lfs merge=lfs -text -*.raw filter=lfs diff=lfs merge=lfs -text -# Audio files - compressed -*.aac filter=lfs diff=lfs merge=lfs -text -*.flac filter=lfs diff=lfs merge=lfs -text -*.mp3 filter=lfs diff=lfs merge=lfs -text -*.ogg filter=lfs diff=lfs merge=lfs -text -*.wav filter=lfs diff=lfs merge=lfs -text -# Image files - uncompressed -*.bmp filter=lfs diff=lfs merge=lfs -text -*.gif filter=lfs diff=lfs merge=lfs -text -*.png filter=lfs diff=lfs merge=lfs -text -*.tiff filter=lfs diff=lfs merge=lfs -text -# Image files - compressed -*.jpg filter=lfs diff=lfs merge=lfs -text -*.jpeg filter=lfs diff=lfs merge=lfs -text -*.webp filter=lfs diff=lfs merge=lfs -text -# Video files - compressed -*.mp4 filter=lfs diff=lfs merge=lfs -text -*.webm filter=lfs diff=lfs merge=lfs -text +*.gguf filter=lfs diff=lfs merge=lfs -text +*.npy filter=lfs diff=lfs merge=lfs -text diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..549136910abf88a45e5abd84ee099b80ea6ebb43 --- /dev/null +++ b/README.md @@ -0,0 +1,620 @@ +--- +license: "mit" +tags: +- format-fixture +- random-init +- rtn +- optimizer-not-run +--- + +# microfloat tiny CPU format fixture reproducibility + +Complete tiny random FORMAT fixture evidence. Round-to-nearest (RTN) storage/reader exercise only; **optimizer-not-run**. No GPTQ/AWQ/AutoRound optimization, calibrated ModelOpt/CT/QAT quality, trained-model quality ranking, GPU parity, or native serving-kernel correctness claim. + +Reconstructed weights are evaluated by the captured native forward. KL is own-head, full-vocabulary on the recorded panel, not a benchmark of training quality. Advisory reconstruction and activation omissions are retained verbatim in the raw evidence. + +This is a **dataset evidence bundle**, not a multi-model model repository. Each consumer model has its own repository: + +- https://huggingface.co/malaiwah/glm-moe-dsa-tiny-random-ct-mxfp4-rtn-format +- https://huggingface.co/malaiwah/glm-moe-dsa-tiny-random-ct-nvfp4-rtn-format +- https://huggingface.co/malaiwah/glm-moe-dsa-tiny-random-modelopt-nvfp4-rtn-format +- https://huggingface.co/malaiwah/glm-moe-dsa-tiny-random-fp8-ue8m0-rtn-format +- https://huggingface.co/malaiwah/glm-moe-dsa-tiny-random-modelopt-mixed-rtn-format + +Raw model/source trees, original cards/licenses, captures, reports and retained scripts are preserved under `raw/`. `qualification.json` records checked results, `source-inventory.json` records every original source byte, and `publication-plan.json` records the exact commands and provenance. Each upstream source retains its own license; the dataset license does not relicense bundled code or checkpoints. + +## Reproduction commands and source hashes + +Commands below are recorded argv, not executed by this publisher. Restore each recorded input from the dataset raw trees and map original absolute paths to your workspace. Retained tools/dependency files and byte hashes are in `source-inventory.json`; do not substitute moving upstream branches. + +```json +[ + { + "cwd": "/tmp/qfs-explorer-development", + "argv": [ + "/tmp/qfs-quant-venv/bin/python", + "-c", + "import runpy,sys,torch; torch.set_num_threads(2); torch.set_num_interop_threads(2); p=sys.argv.pop(1); sys.path.insert(0,str(__import__('pathlib').Path(p).parent)); sys.argv[0]=p; runpy.run_path(p,run_name='__main__')", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-quant-microfloat-release/proof-public/ct-mxfp4/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--author", + "malaiwah", + "--schedule", + "layer-outer", + "--layer-residency", + "stream", + "--disclosures", + "[{\"code\": \"rtn_format_fixture\", \"severity\": \"info\", \"affects_comparability\": false, \"detail\": \"Local RTN-format fixture; optimizer-not-run; no model-quality or serving-kernel equivalence claim.\"}]", + "--model", + "/tmp/qfs-complete-tiny-fixture/model", + "--out", + "/tmp/qfs-quant-microfloat-release/proof-public/ct-mxfp4/root", + "--dataset-id", + "fidelity--quant-integration.root", + "--dataset-name", + "Local quant integration root", + "--role", + "root" + ] + }, + { + "cwd": "/tmp/qfs-explorer-development", + "argv": [ + "/tmp/qfs-quant-venv/bin/python", + "-c", + "import runpy,sys,torch; torch.set_num_threads(2); torch.set_num_interop_threads(2); p=sys.argv.pop(1); sys.path.insert(0,str(__import__('pathlib').Path(p).parent)); sys.argv[0]=p; runpy.run_path(p,run_name='__main__')", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-quant-microfloat-release/proof-public/ct-mxfp4/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--author", + "malaiwah", + "--schedule", + "layer-outer", + "--layer-residency", + "stream", + "--disclosures", + "[{\"code\": \"rtn_format_fixture\", \"severity\": \"info\", \"affects_comparability\": false, \"detail\": \"Local RTN-format fixture; optimizer-not-run; no model-quality or serving-kernel equivalence claim.\"}]", + "--model", + "/tmp/qfs-quant-microfloat-release/stage-main/ct-mxfp4", + "--out", + "/tmp/qfs-quant-microfloat-release/proof-public/ct-mxfp4/candidate", + "--dataset-id", + "fidelity--quant-integration.candidate", + "--dataset-name", + "Local quant integration candidate", + "--role", + "quant", + "--codec", + "mxfp4", + "--declared-bits", + "4.0", + "--scope-file", + "/tmp/qfs-quant-microfloat-release/stage-main/ct-mxfp4/scope.json" + ] + }, + { + "cwd": "/tmp/qfs-explorer-development", + "argv": [ + "/tmp/qfs-quant-venv/bin/python", + "-c", + "import runpy,sys,torch; torch.set_num_threads(2); torch.set_num_interop_threads(2); p=sys.argv.pop(1); sys.path.insert(0,str(__import__('pathlib').Path(p).parent)); sys.argv[0]=p; runpy.run_path(p,run_name='__main__')", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "compare", + "--reference", + "/tmp/qfs-quant-microfloat-release/proof-public/ct-mxfp4/root", + "--candidate", + "/tmp/qfs-quant-microfloat-release/proof-public/ct-mxfp4/candidate", + "--out", + "/tmp/qfs-quant-microfloat-release/proof-public/ct-mxfp4/comparison", + "--force-compute", + "--device", + "cpu", + "--replay-device", + "numpy", + "--replay-dtype", + "float32", + "--verify-tensors", + "--own-heads" + ] + }, + { + "cwd": "/tmp/qfs-explorer-development", + "argv": [ + "/tmp/qfs-quant-venv/bin/python", + "-c", + "import runpy,sys,torch; torch.set_num_threads(2); torch.set_num_interop_threads(2); p=sys.argv.pop(1); sys.path.insert(0,str(__import__('pathlib').Path(p).parent)); sys.argv[0]=p; runpy.run_path(p,run_name='__main__')", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-quant-microfloat-release/proof-public/ct-nvfp4/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--author", + "malaiwah", + "--schedule", + "layer-outer", + "--layer-residency", + "stream", + "--disclosures", + "[{\"code\": \"rtn_format_fixture\", \"severity\": \"info\", \"affects_comparability\": false, \"detail\": \"Local RTN-format fixture; optimizer-not-run; no model-quality or serving-kernel equivalence claim.\"}]", + "--model", + "/tmp/qfs-complete-tiny-fixture/model", + "--out", + "/tmp/qfs-quant-microfloat-release/proof-public/ct-nvfp4/root", + "--dataset-id", + "fidelity--quant-integration.root", + "--dataset-name", + "Local quant integration root", + "--role", + "root" + ] + }, + { + "cwd": "/tmp/qfs-explorer-development", + "argv": [ + "/tmp/qfs-quant-venv/bin/python", + "-c", + "import runpy,sys,torch; torch.set_num_threads(2); torch.set_num_interop_threads(2); p=sys.argv.pop(1); sys.path.insert(0,str(__import__('pathlib').Path(p).parent)); sys.argv[0]=p; runpy.run_path(p,run_name='__main__')", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-quant-microfloat-release/proof-public/ct-nvfp4/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--author", + "malaiwah", + "--schedule", + "layer-outer", + "--layer-residency", + "stream", + "--disclosures", + "[{\"code\": \"rtn_format_fixture\", \"severity\": \"info\", \"affects_comparability\": false, \"detail\": \"Local RTN-format fixture; optimizer-not-run; no model-quality or serving-kernel equivalence claim.\"}]", + "--model", + "/tmp/qfs-quant-microfloat-release/stage-main/ct-nvfp4", + "--out", + "/tmp/qfs-quant-microfloat-release/proof-public/ct-nvfp4/candidate", + "--dataset-id", + "fidelity--quant-integration.candidate", + "--dataset-name", + "Local quant integration candidate", + "--role", + "quant", + "--codec", + "nvfp4", + "--declared-bits", + "4.0", + "--scope-file", + "/tmp/qfs-quant-microfloat-release/stage-main/ct-nvfp4/scope.json" + ] + }, + { + "cwd": "/tmp/qfs-explorer-development", + "argv": [ + "/tmp/qfs-quant-venv/bin/python", + "-c", + "import runpy,sys,torch; torch.set_num_threads(2); torch.set_num_interop_threads(2); p=sys.argv.pop(1); sys.path.insert(0,str(__import__('pathlib').Path(p).parent)); sys.argv[0]=p; runpy.run_path(p,run_name='__main__')", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "compare", + "--reference", + "/tmp/qfs-quant-microfloat-release/proof-public/ct-nvfp4/root", + "--candidate", + "/tmp/qfs-quant-microfloat-release/proof-public/ct-nvfp4/candidate", + "--out", + "/tmp/qfs-quant-microfloat-release/proof-public/ct-nvfp4/comparison", + "--force-compute", + "--device", + "cpu", + "--replay-device", + "numpy", + "--replay-dtype", + "float32", + "--verify-tensors", + "--own-heads" + ] + }, + { + "cwd": "/tmp/qfs-explorer-development", + "argv": [ + "/tmp/qfs-quant-venv/bin/python", + "-c", + "import runpy,sys,torch; torch.set_num_threads(2); torch.set_num_interop_threads(2); p=sys.argv.pop(1); sys.path.insert(0,str(__import__('pathlib').Path(p).parent)); sys.argv[0]=p; runpy.run_path(p,run_name='__main__')", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-quant-microfloat-release/proof-public/modelopt-nvfp4/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--author", + "malaiwah", + "--schedule", + "layer-outer", + "--layer-residency", + "stream", + "--disclosures", + "[{\"code\": \"rtn_format_fixture\", \"severity\": \"info\", \"affects_comparability\": false, \"detail\": \"Local RTN-format fixture; optimizer-not-run; no model-quality or serving-kernel equivalence claim.\"}]", + "--model", + "/tmp/qfs-complete-tiny-fixture/model", + "--out", + "/tmp/qfs-quant-microfloat-release/proof-public/modelopt-nvfp4/root", + "--dataset-id", + "fidelity--quant-integration.root", + "--dataset-name", + "Local quant integration root", + "--role", + "root" + ] + }, + { + "cwd": "/tmp/qfs-explorer-development", + "argv": [ + "/tmp/qfs-quant-venv/bin/python", + "-c", + "import runpy,sys,torch; torch.set_num_threads(2); torch.set_num_interop_threads(2); p=sys.argv.pop(1); sys.path.insert(0,str(__import__('pathlib').Path(p).parent)); sys.argv[0]=p; runpy.run_path(p,run_name='__main__')", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-quant-microfloat-release/proof-public/modelopt-nvfp4/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--author", + "malaiwah", + "--schedule", + "layer-outer", + "--layer-residency", + "stream", + "--disclosures", + "[{\"code\": \"rtn_format_fixture\", \"severity\": \"info\", \"affects_comparability\": false, \"detail\": \"Local RTN-format fixture; optimizer-not-run; no model-quality or serving-kernel equivalence claim.\"}]", + "--model", + "/tmp/qfs-quant-microfloat-release/stage-main/modelopt-nvfp4", + "--out", + "/tmp/qfs-quant-microfloat-release/proof-public/modelopt-nvfp4/candidate", + "--dataset-id", + "fidelity--quant-integration.candidate", + "--dataset-name", + "Local quant integration candidate", + "--role", + "quant", + "--codec", + "nvfp4", + "--declared-bits", + "4.0", + "--scope-file", + "/tmp/qfs-quant-microfloat-release/stage-main/modelopt-nvfp4/scope.json" + ] + }, + { + "cwd": "/tmp/qfs-explorer-development", + "argv": [ + "/tmp/qfs-quant-venv/bin/python", + "-c", + "import runpy,sys,torch; torch.set_num_threads(2); torch.set_num_interop_threads(2); p=sys.argv.pop(1); sys.path.insert(0,str(__import__('pathlib').Path(p).parent)); sys.argv[0]=p; runpy.run_path(p,run_name='__main__')", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "compare", + "--reference", + "/tmp/qfs-quant-microfloat-release/proof-public/modelopt-nvfp4/root", + "--candidate", + "/tmp/qfs-quant-microfloat-release/proof-public/modelopt-nvfp4/candidate", + "--out", + "/tmp/qfs-quant-microfloat-release/proof-public/modelopt-nvfp4/comparison", + "--force-compute", + "--device", + "cpu", + "--replay-device", + "numpy", + "--replay-dtype", + "float32", + "--verify-tensors", + "--own-heads" + ] + }, + { + "cwd": "/tmp/qfs-explorer-development", + "argv": [ + "/tmp/qfs-quant-venv/bin/python", + "-c", + "import runpy,sys,torch; torch.set_num_threads(2); torch.set_num_interop_threads(2); p=sys.argv.pop(1); sys.path.insert(0,str(__import__('pathlib').Path(p).parent)); sys.argv[0]=p; runpy.run_path(p,run_name='__main__')", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-quant-microfloat-release/proof-public/fp8-ue8m0/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--author", + "malaiwah", + "--schedule", + "layer-outer", + "--layer-residency", + "stream", + "--disclosures", + "[{\"code\": \"rtn_format_fixture\", \"severity\": \"info\", \"affects_comparability\": false, \"detail\": \"Local RTN-format fixture; optimizer-not-run; no model-quality or serving-kernel equivalence claim.\"}]", + "--model", + "/tmp/qfs-complete-tiny-fixture/model", + "--out", + "/tmp/qfs-quant-microfloat-release/proof-public/fp8-ue8m0/root", + "--dataset-id", + "fidelity--quant-integration.root", + "--dataset-name", + "Local quant integration root", + "--role", + "root" + ] + }, + { + "cwd": "/tmp/qfs-explorer-development", + "argv": [ + "/tmp/qfs-quant-venv/bin/python", + "-c", + "import runpy,sys,torch; torch.set_num_threads(2); torch.set_num_interop_threads(2); p=sys.argv.pop(1); sys.path.insert(0,str(__import__('pathlib').Path(p).parent)); sys.argv[0]=p; runpy.run_path(p,run_name='__main__')", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-quant-microfloat-release/proof-public/fp8-ue8m0/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--author", + "malaiwah", + "--schedule", + "layer-outer", + "--layer-residency", + "stream", + "--disclosures", + "[{\"code\": \"rtn_format_fixture\", \"severity\": \"info\", \"affects_comparability\": false, \"detail\": \"Local RTN-format fixture; optimizer-not-run; no model-quality or serving-kernel equivalence claim.\"}]", + "--model", + "/tmp/qfs-quant-microfloat-release/stage-main/fp8-ue8m0", + "--out", + "/tmp/qfs-quant-microfloat-release/proof-public/fp8-ue8m0/candidate", + "--dataset-id", + "fidelity--quant-integration.candidate", + "--dataset-name", + "Local quant integration candidate", + "--role", + "quant", + "--codec", + "fp8_e4m3", + "--declared-bits", + "8.0", + "--scope-file", + "/tmp/qfs-quant-microfloat-release/stage-main/fp8-ue8m0/scope.json" + ] + }, + { + "cwd": "/tmp/qfs-explorer-development", + "argv": [ + "/tmp/qfs-quant-venv/bin/python", + "-c", + "import runpy,sys,torch; torch.set_num_threads(2); torch.set_num_interop_threads(2); p=sys.argv.pop(1); sys.path.insert(0,str(__import__('pathlib').Path(p).parent)); sys.argv[0]=p; runpy.run_path(p,run_name='__main__')", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "compare", + "--reference", + "/tmp/qfs-quant-microfloat-release/proof-public/fp8-ue8m0/root", + "--candidate", + "/tmp/qfs-quant-microfloat-release/proof-public/fp8-ue8m0/candidate", + "--out", + "/tmp/qfs-quant-microfloat-release/proof-public/fp8-ue8m0/comparison", + "--force-compute", + "--device", + "cpu", + "--replay-device", + "numpy", + "--replay-dtype", + "float32", + "--verify-tensors", + "--own-heads" + ] + }, + { + "cwd": "/tmp/qfs-explorer-development", + "argv": [ + "/tmp/qfs-quant-venv/bin/python", + "-c", + "import runpy,sys,torch; torch.set_num_threads(2); torch.set_num_interop_threads(2); p=sys.argv.pop(1); sys.path.insert(0,str(__import__('pathlib').Path(p).parent)); sys.argv[0]=p; runpy.run_path(p,run_name='__main__')", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-quant-microfloat-release/proof-public/modelopt-mixed/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--author", + "malaiwah", + "--schedule", + "layer-outer", + "--layer-residency", + "stream", + "--disclosures", + "[{\"code\": \"rtn_format_fixture\", \"severity\": \"info\", \"affects_comparability\": false, \"detail\": \"Local RTN-format fixture; optimizer-not-run; no model-quality or serving-kernel equivalence claim.\"}]", + "--model", + "/tmp/qfs-complete-tiny-fixture/model", + "--out", + "/tmp/qfs-quant-microfloat-release/proof-public/modelopt-mixed/root", + "--dataset-id", + "fidelity--quant-integration.root", + "--dataset-name", + "Local quant integration root", + "--role", + "root" + ] + }, + { + "cwd": "/tmp/qfs-explorer-development", + "argv": [ + "/tmp/qfs-quant-venv/bin/python", + "-c", + "import runpy,sys,torch; torch.set_num_threads(2); torch.set_num_interop_threads(2); p=sys.argv.pop(1); sys.path.insert(0,str(__import__('pathlib').Path(p).parent)); sys.argv[0]=p; runpy.run_path(p,run_name='__main__')", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-quant-microfloat-release/proof-public/modelopt-mixed/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--author", + "malaiwah", + "--schedule", + "layer-outer", + "--layer-residency", + "stream", + "--disclosures", + "[{\"code\": \"rtn_format_fixture\", \"severity\": \"info\", \"affects_comparability\": false, \"detail\": \"Local RTN-format fixture; optimizer-not-run; no model-quality or serving-kernel equivalence claim.\"}]", + "--model", + "/tmp/qfs-quant-microfloat-release/stage-main/modelopt-mixed", + "--out", + "/tmp/qfs-quant-microfloat-release/proof-public/modelopt-mixed/candidate", + "--dataset-id", + "fidelity--quant-integration.candidate", + "--dataset-name", + "Local quant integration candidate", + "--role", + "quant", + "--codec", + "mixed", + "--declared-bits", + "4.0", + "--scope-file", + "/tmp/qfs-quant-microfloat-release/stage-main/modelopt-mixed/scope.json" + ] + }, + { + "cwd": "/tmp/qfs-explorer-development", + "argv": [ + "/tmp/qfs-quant-venv/bin/python", + "-c", + "import runpy,sys,torch; torch.set_num_threads(2); torch.set_num_interop_threads(2); p=sys.argv.pop(1); sys.path.insert(0,str(__import__('pathlib').Path(p).parent)); sys.argv[0]=p; runpy.run_path(p,run_name='__main__')", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "compare", + "--reference", + "/tmp/qfs-quant-microfloat-release/proof-public/modelopt-mixed/root", + "--candidate", + "/tmp/qfs-quant-microfloat-release/proof-public/modelopt-mixed/candidate", + "--out", + "/tmp/qfs-quant-microfloat-release/proof-public/modelopt-mixed/comparison", + "--force-compute", + "--device", + "cpu", + "--replay-device", + "numpy", + "--replay-dtype", + "float32", + "--verify-tensors", + "--own-heads" + ] + } +] +``` + +The publication receipt is written locally only after anonymous verification of complete remote bytes at exact commits. Publication is not additional model or serving qualification. diff --git a/publication-plan.json b/publication-plan.json new file mode 100644 index 0000000000000000000000000000000000000000..bddbca92449d208f0d74ca6a3d3a4db862326b7d --- /dev/null +++ b/publication-plan.json @@ -0,0 +1,839 @@ +{ + "bundle": "microfloat-cpu-format-v1", + "candidates": [ + { + "activation_omissions": [ + "Reconstructed weights only; no activation quantization, QAT, calibration or GPU kernel validation" + ], + "architecture_restrictions": [ + "GLM MoE DSA, dense and routed expert matrices; decoded BF16 execution, not full original quantized release" + ], + "classification": "lossy", + "control_max_kld": null, + "evidence": { + "candidate": "candidate", + "comparison": "comparison/comparison-receipt.json", + "dir": "/tmp/qfs-quant-microfloat-release/proof-public/ct-mxfp4", + "reference": "root" + }, + "format": "ct-mxfp4; CPU RTN format fixture", + "head_policy": "native", + "model_dir": "/tmp/qfs-quant-microfloat-release/stage-main/ct-mxfp4", + "name": "ct-mxfp4", + "repo_id": "malaiwah/glm-moe-dsa-tiny-random-ct-mxfp4-rtn-format", + "source": { + "license": "mit", + "license_file": "/tmp/qfs-complete-tiny-fixture/model/LICENSE", + "model_dir": "/tmp/qfs-complete-tiny-fixture/model", + "pin": { + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "a1a973330e4e912678adbd8ea41e8b86b1c9dccb" + }, + "pin_evidence": { + "files_pointer": "/source_sha256", + "path": "/tmp/qfs-quant-microfloat-release/stage-main/ct-mxfp4/provenance.json", + "repository_pointer": "/source/repository", + "revision_pointer": "/source/revision" + } + } + }, + { + "activation_omissions": [ + "Reconstructed weights only; no activation quantization, QAT, calibration or GPU kernel validation" + ], + "architecture_restrictions": [ + "GLM MoE DSA, dense and routed expert matrices; decoded BF16 execution, not full original quantized release" + ], + "classification": "lossy", + "control_max_kld": null, + "evidence": { + "candidate": "candidate", + "comparison": "comparison/comparison-receipt.json", + "dir": "/tmp/qfs-quant-microfloat-release/proof-public/ct-nvfp4", + "reference": "root" + }, + "format": "ct-nvfp4; CPU RTN format fixture", + "head_policy": "native", + "model_dir": "/tmp/qfs-quant-microfloat-release/stage-main/ct-nvfp4", + "name": "ct-nvfp4", + "repo_id": "malaiwah/glm-moe-dsa-tiny-random-ct-nvfp4-rtn-format", + "source": { + "license": "mit", + "license_file": "/tmp/qfs-complete-tiny-fixture/model/LICENSE", + "model_dir": "/tmp/qfs-complete-tiny-fixture/model", + "pin": { + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "a1a973330e4e912678adbd8ea41e8b86b1c9dccb" + }, + "pin_evidence": { + "files_pointer": "/source_sha256", + "path": "/tmp/qfs-quant-microfloat-release/stage-main/ct-nvfp4/provenance.json", + "repository_pointer": "/source/repository", + "revision_pointer": "/source/revision" + } + } + }, + { + "activation_omissions": [ + "Reconstructed weights only; no activation quantization, QAT, calibration or GPU kernel validation" + ], + "architecture_restrictions": [ + "GLM MoE DSA, dense and routed expert matrices; decoded BF16 execution, not full original quantized release" + ], + "classification": "lossy", + "control_max_kld": null, + "evidence": { + "candidate": "candidate", + "comparison": "comparison/comparison-receipt.json", + "dir": "/tmp/qfs-quant-microfloat-release/proof-public/modelopt-nvfp4", + "reference": "root" + }, + "format": "modelopt-nvfp4; CPU RTN format fixture", + "head_policy": "native", + "model_dir": "/tmp/qfs-quant-microfloat-release/stage-main/modelopt-nvfp4", + "name": "modelopt-nvfp4", + "repo_id": "malaiwah/glm-moe-dsa-tiny-random-modelopt-nvfp4-rtn-format", + "source": { + "license": "mit", + "license_file": "/tmp/qfs-complete-tiny-fixture/model/LICENSE", + "model_dir": "/tmp/qfs-complete-tiny-fixture/model", + "pin": { + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "a1a973330e4e912678adbd8ea41e8b86b1c9dccb" + }, + "pin_evidence": { + "files_pointer": "/source_sha256", + "path": "/tmp/qfs-quant-microfloat-release/stage-main/modelopt-nvfp4/provenance.json", + "repository_pointer": "/source/repository", + "revision_pointer": "/source/revision" + } + } + }, + { + "activation_omissions": [ + "Reconstructed weights only; no activation quantization, QAT, calibration or GPU kernel validation" + ], + "architecture_restrictions": [ + "GLM MoE DSA, dense and routed expert matrices; decoded BF16 execution, not full original quantized release" + ], + "classification": "lossy", + "control_max_kld": null, + "evidence": { + "candidate": "candidate", + "comparison": "comparison/comparison-receipt.json", + "dir": "/tmp/qfs-quant-microfloat-release/proof-public/fp8-ue8m0", + "reference": "root" + }, + "format": "fp8-ue8m0; CPU RTN format fixture", + "head_policy": "native", + "model_dir": "/tmp/qfs-quant-microfloat-release/stage-main/fp8-ue8m0", + "name": "fp8-ue8m0", + "repo_id": "malaiwah/glm-moe-dsa-tiny-random-fp8-ue8m0-rtn-format", + "source": { + "license": "mit", + "license_file": "/tmp/qfs-complete-tiny-fixture/model/LICENSE", + "model_dir": "/tmp/qfs-complete-tiny-fixture/model", + "pin": { + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "a1a973330e4e912678adbd8ea41e8b86b1c9dccb" + }, + "pin_evidence": { + "files_pointer": "/source_sha256", + "path": "/tmp/qfs-quant-microfloat-release/stage-main/fp8-ue8m0/provenance.json", + "repository_pointer": "/source/repository", + "revision_pointer": "/source/revision" + } + } + }, + { + "activation_omissions": [ + "Reconstructed weights only; no activation quantization, QAT, calibration or GPU kernel validation" + ], + "architecture_restrictions": [ + "GLM MoE DSA, dense and routed expert matrices; decoded BF16 execution, not full original quantized release" + ], + "classification": "lossy", + "control_max_kld": null, + "evidence": { + "candidate": "candidate", + "comparison": "comparison/comparison-receipt.json", + "dir": "/tmp/qfs-quant-microfloat-release/proof-public/modelopt-mixed", + "reference": "root" + }, + "format": "modelopt-mixed; CPU RTN format fixture", + "head_policy": "native", + "model_dir": "/tmp/qfs-quant-microfloat-release/stage-main/modelopt-mixed", + "name": "modelopt-mixed", + "repo_id": "malaiwah/glm-moe-dsa-tiny-random-modelopt-mixed-rtn-format", + "source": { + "license": "mit", + "license_file": "/tmp/qfs-complete-tiny-fixture/model/LICENSE", + "model_dir": "/tmp/qfs-complete-tiny-fixture/model", + "pin": { + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "a1a973330e4e912678adbd8ea41e8b86b1c9dccb" + }, + "pin_evidence": { + "files_pointer": "/source_sha256", + "path": "/tmp/qfs-quant-microfloat-release/stage-main/modelopt-mixed/provenance.json", + "repository_pointer": "/source/repository", + "revision_pointer": "/source/revision" + } + } + } + ], + "commands": [ + { + "argv": [ + "/tmp/qfs-quant-venv/bin/python", + "-c", + "import runpy,sys,torch; torch.set_num_threads(2); torch.set_num_interop_threads(2); p=sys.argv.pop(1); sys.path.insert(0,str(__import__('pathlib').Path(p).parent)); sys.argv[0]=p; runpy.run_path(p,run_name='__main__')", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-quant-microfloat-release/proof-public/ct-mxfp4/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--author", + "malaiwah", + "--schedule", + "layer-outer", + "--layer-residency", + "stream", + "--disclosures", + "[{\"code\": \"rtn_format_fixture\", \"severity\": \"info\", \"affects_comparability\": false, \"detail\": \"Local RTN-format fixture; optimizer-not-run; no model-quality or serving-kernel equivalence claim.\"}]", + "--model", + "/tmp/qfs-complete-tiny-fixture/model", + "--out", + "/tmp/qfs-quant-microfloat-release/proof-public/ct-mxfp4/root", + "--dataset-id", + "fidelity--quant-integration.root", + "--dataset-name", + "Local quant integration root", + "--role", + "root" + ], + "cwd": "/tmp/qfs-explorer-development" + }, + { + "argv": [ + "/tmp/qfs-quant-venv/bin/python", + "-c", + "import runpy,sys,torch; torch.set_num_threads(2); torch.set_num_interop_threads(2); p=sys.argv.pop(1); sys.path.insert(0,str(__import__('pathlib').Path(p).parent)); sys.argv[0]=p; runpy.run_path(p,run_name='__main__')", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-quant-microfloat-release/proof-public/ct-mxfp4/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--author", + "malaiwah", + "--schedule", + "layer-outer", + "--layer-residency", + "stream", + "--disclosures", + "[{\"code\": \"rtn_format_fixture\", \"severity\": \"info\", \"affects_comparability\": false, \"detail\": \"Local RTN-format fixture; optimizer-not-run; no model-quality or serving-kernel equivalence claim.\"}]", + "--model", + "/tmp/qfs-quant-microfloat-release/stage-main/ct-mxfp4", + "--out", + "/tmp/qfs-quant-microfloat-release/proof-public/ct-mxfp4/candidate", + "--dataset-id", + "fidelity--quant-integration.candidate", + "--dataset-name", + "Local quant integration candidate", + "--role", + "quant", + "--codec", + "mxfp4", + "--declared-bits", + "4.0", + "--scope-file", + "/tmp/qfs-quant-microfloat-release/stage-main/ct-mxfp4/scope.json" + ], + "cwd": "/tmp/qfs-explorer-development" + }, + { + "argv": [ + "/tmp/qfs-quant-venv/bin/python", + "-c", + "import runpy,sys,torch; torch.set_num_threads(2); torch.set_num_interop_threads(2); p=sys.argv.pop(1); sys.path.insert(0,str(__import__('pathlib').Path(p).parent)); sys.argv[0]=p; runpy.run_path(p,run_name='__main__')", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "compare", + "--reference", + "/tmp/qfs-quant-microfloat-release/proof-public/ct-mxfp4/root", + "--candidate", + "/tmp/qfs-quant-microfloat-release/proof-public/ct-mxfp4/candidate", + "--out", + "/tmp/qfs-quant-microfloat-release/proof-public/ct-mxfp4/comparison", + "--force-compute", + "--device", + "cpu", + "--replay-device", + "numpy", + "--replay-dtype", + "float32", + "--verify-tensors", + "--own-heads" + ], + "cwd": "/tmp/qfs-explorer-development" + }, + { + "argv": [ + "/tmp/qfs-quant-venv/bin/python", + "-c", + "import runpy,sys,torch; torch.set_num_threads(2); torch.set_num_interop_threads(2); p=sys.argv.pop(1); sys.path.insert(0,str(__import__('pathlib').Path(p).parent)); sys.argv[0]=p; runpy.run_path(p,run_name='__main__')", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-quant-microfloat-release/proof-public/ct-nvfp4/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--author", + "malaiwah", + "--schedule", + "layer-outer", + "--layer-residency", + "stream", + "--disclosures", + "[{\"code\": \"rtn_format_fixture\", \"severity\": \"info\", \"affects_comparability\": false, \"detail\": \"Local RTN-format fixture; optimizer-not-run; no model-quality or serving-kernel equivalence claim.\"}]", + "--model", + "/tmp/qfs-complete-tiny-fixture/model", + "--out", + "/tmp/qfs-quant-microfloat-release/proof-public/ct-nvfp4/root", + "--dataset-id", + "fidelity--quant-integration.root", + "--dataset-name", + "Local quant integration root", + "--role", + "root" + ], + "cwd": "/tmp/qfs-explorer-development" + }, + { + "argv": [ + "/tmp/qfs-quant-venv/bin/python", + "-c", + "import runpy,sys,torch; torch.set_num_threads(2); torch.set_num_interop_threads(2); p=sys.argv.pop(1); sys.path.insert(0,str(__import__('pathlib').Path(p).parent)); sys.argv[0]=p; runpy.run_path(p,run_name='__main__')", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-quant-microfloat-release/proof-public/ct-nvfp4/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--author", + "malaiwah", + "--schedule", + "layer-outer", + "--layer-residency", + "stream", + "--disclosures", + "[{\"code\": \"rtn_format_fixture\", \"severity\": \"info\", \"affects_comparability\": false, \"detail\": \"Local RTN-format fixture; optimizer-not-run; no model-quality or serving-kernel equivalence claim.\"}]", + "--model", + "/tmp/qfs-quant-microfloat-release/stage-main/ct-nvfp4", + "--out", + "/tmp/qfs-quant-microfloat-release/proof-public/ct-nvfp4/candidate", + "--dataset-id", + "fidelity--quant-integration.candidate", + "--dataset-name", + "Local quant integration candidate", + "--role", + "quant", + "--codec", + "nvfp4", + "--declared-bits", + "4.0", + "--scope-file", + "/tmp/qfs-quant-microfloat-release/stage-main/ct-nvfp4/scope.json" + ], + "cwd": "/tmp/qfs-explorer-development" + }, + { + "argv": [ + "/tmp/qfs-quant-venv/bin/python", + "-c", + "import runpy,sys,torch; torch.set_num_threads(2); torch.set_num_interop_threads(2); p=sys.argv.pop(1); sys.path.insert(0,str(__import__('pathlib').Path(p).parent)); sys.argv[0]=p; runpy.run_path(p,run_name='__main__')", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "compare", + "--reference", + "/tmp/qfs-quant-microfloat-release/proof-public/ct-nvfp4/root", + "--candidate", + "/tmp/qfs-quant-microfloat-release/proof-public/ct-nvfp4/candidate", + "--out", + "/tmp/qfs-quant-microfloat-release/proof-public/ct-nvfp4/comparison", + "--force-compute", + "--device", + "cpu", + "--replay-device", + "numpy", + "--replay-dtype", + "float32", + "--verify-tensors", + "--own-heads" + ], + "cwd": "/tmp/qfs-explorer-development" + }, + { + "argv": [ + "/tmp/qfs-quant-venv/bin/python", + "-c", + "import runpy,sys,torch; torch.set_num_threads(2); torch.set_num_interop_threads(2); p=sys.argv.pop(1); sys.path.insert(0,str(__import__('pathlib').Path(p).parent)); sys.argv[0]=p; runpy.run_path(p,run_name='__main__')", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-quant-microfloat-release/proof-public/modelopt-nvfp4/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--author", + "malaiwah", + "--schedule", + "layer-outer", + "--layer-residency", + "stream", + "--disclosures", + "[{\"code\": \"rtn_format_fixture\", \"severity\": \"info\", \"affects_comparability\": false, \"detail\": \"Local RTN-format fixture; optimizer-not-run; no model-quality or serving-kernel equivalence claim.\"}]", + "--model", + "/tmp/qfs-complete-tiny-fixture/model", + "--out", + "/tmp/qfs-quant-microfloat-release/proof-public/modelopt-nvfp4/root", + "--dataset-id", + "fidelity--quant-integration.root", + "--dataset-name", + "Local quant integration root", + "--role", + "root" + ], + "cwd": "/tmp/qfs-explorer-development" + }, + { + "argv": [ + "/tmp/qfs-quant-venv/bin/python", + "-c", + "import runpy,sys,torch; torch.set_num_threads(2); torch.set_num_interop_threads(2); p=sys.argv.pop(1); sys.path.insert(0,str(__import__('pathlib').Path(p).parent)); sys.argv[0]=p; runpy.run_path(p,run_name='__main__')", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-quant-microfloat-release/proof-public/modelopt-nvfp4/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--author", + "malaiwah", + "--schedule", + "layer-outer", + "--layer-residency", + "stream", + "--disclosures", + "[{\"code\": \"rtn_format_fixture\", \"severity\": \"info\", \"affects_comparability\": false, \"detail\": \"Local RTN-format fixture; optimizer-not-run; no model-quality or serving-kernel equivalence claim.\"}]", + "--model", + "/tmp/qfs-quant-microfloat-release/stage-main/modelopt-nvfp4", + "--out", + "/tmp/qfs-quant-microfloat-release/proof-public/modelopt-nvfp4/candidate", + "--dataset-id", + "fidelity--quant-integration.candidate", + "--dataset-name", + "Local quant integration candidate", + "--role", + "quant", + "--codec", + "nvfp4", + "--declared-bits", + "4.0", + "--scope-file", + "/tmp/qfs-quant-microfloat-release/stage-main/modelopt-nvfp4/scope.json" + ], + "cwd": "/tmp/qfs-explorer-development" + }, + { + "argv": [ + "/tmp/qfs-quant-venv/bin/python", + "-c", + "import runpy,sys,torch; torch.set_num_threads(2); torch.set_num_interop_threads(2); p=sys.argv.pop(1); sys.path.insert(0,str(__import__('pathlib').Path(p).parent)); sys.argv[0]=p; runpy.run_path(p,run_name='__main__')", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "compare", + "--reference", + "/tmp/qfs-quant-microfloat-release/proof-public/modelopt-nvfp4/root", + "--candidate", + "/tmp/qfs-quant-microfloat-release/proof-public/modelopt-nvfp4/candidate", + "--out", + "/tmp/qfs-quant-microfloat-release/proof-public/modelopt-nvfp4/comparison", + "--force-compute", + "--device", + "cpu", + "--replay-device", + "numpy", + "--replay-dtype", + "float32", + "--verify-tensors", + "--own-heads" + ], + "cwd": "/tmp/qfs-explorer-development" + }, + { + "argv": [ + "/tmp/qfs-quant-venv/bin/python", + "-c", + "import runpy,sys,torch; torch.set_num_threads(2); torch.set_num_interop_threads(2); p=sys.argv.pop(1); sys.path.insert(0,str(__import__('pathlib').Path(p).parent)); sys.argv[0]=p; runpy.run_path(p,run_name='__main__')", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-quant-microfloat-release/proof-public/fp8-ue8m0/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--author", + "malaiwah", + "--schedule", + "layer-outer", + "--layer-residency", + "stream", + "--disclosures", + "[{\"code\": \"rtn_format_fixture\", \"severity\": \"info\", \"affects_comparability\": false, \"detail\": \"Local RTN-format fixture; optimizer-not-run; no model-quality or serving-kernel equivalence claim.\"}]", + "--model", + "/tmp/qfs-complete-tiny-fixture/model", + "--out", + "/tmp/qfs-quant-microfloat-release/proof-public/fp8-ue8m0/root", + "--dataset-id", + "fidelity--quant-integration.root", + "--dataset-name", + "Local quant integration root", + "--role", + "root" + ], + "cwd": "/tmp/qfs-explorer-development" + }, + { + "argv": [ + "/tmp/qfs-quant-venv/bin/python", + "-c", + "import runpy,sys,torch; torch.set_num_threads(2); torch.set_num_interop_threads(2); p=sys.argv.pop(1); sys.path.insert(0,str(__import__('pathlib').Path(p).parent)); sys.argv[0]=p; runpy.run_path(p,run_name='__main__')", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-quant-microfloat-release/proof-public/fp8-ue8m0/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--author", + "malaiwah", + "--schedule", + "layer-outer", + "--layer-residency", + "stream", + "--disclosures", + "[{\"code\": \"rtn_format_fixture\", \"severity\": \"info\", \"affects_comparability\": false, \"detail\": \"Local RTN-format fixture; optimizer-not-run; no model-quality or serving-kernel equivalence claim.\"}]", + "--model", + "/tmp/qfs-quant-microfloat-release/stage-main/fp8-ue8m0", + "--out", + "/tmp/qfs-quant-microfloat-release/proof-public/fp8-ue8m0/candidate", + "--dataset-id", + "fidelity--quant-integration.candidate", + "--dataset-name", + "Local quant integration candidate", + "--role", + "quant", + "--codec", + "fp8_e4m3", + "--declared-bits", + "8.0", + "--scope-file", + "/tmp/qfs-quant-microfloat-release/stage-main/fp8-ue8m0/scope.json" + ], + "cwd": "/tmp/qfs-explorer-development" + }, + { + "argv": [ + "/tmp/qfs-quant-venv/bin/python", + "-c", + "import runpy,sys,torch; torch.set_num_threads(2); torch.set_num_interop_threads(2); p=sys.argv.pop(1); sys.path.insert(0,str(__import__('pathlib').Path(p).parent)); sys.argv[0]=p; runpy.run_path(p,run_name='__main__')", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "compare", + "--reference", + "/tmp/qfs-quant-microfloat-release/proof-public/fp8-ue8m0/root", + "--candidate", + "/tmp/qfs-quant-microfloat-release/proof-public/fp8-ue8m0/candidate", + "--out", + "/tmp/qfs-quant-microfloat-release/proof-public/fp8-ue8m0/comparison", + "--force-compute", + "--device", + "cpu", + "--replay-device", + "numpy", + "--replay-dtype", + "float32", + "--verify-tensors", + "--own-heads" + ], + "cwd": "/tmp/qfs-explorer-development" + }, + { + "argv": [ + "/tmp/qfs-quant-venv/bin/python", + "-c", + "import runpy,sys,torch; torch.set_num_threads(2); torch.set_num_interop_threads(2); p=sys.argv.pop(1); sys.path.insert(0,str(__import__('pathlib').Path(p).parent)); sys.argv[0]=p; runpy.run_path(p,run_name='__main__')", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-quant-microfloat-release/proof-public/modelopt-mixed/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--author", + "malaiwah", + "--schedule", + "layer-outer", + "--layer-residency", + "stream", + "--disclosures", + "[{\"code\": \"rtn_format_fixture\", \"severity\": \"info\", \"affects_comparability\": false, \"detail\": \"Local RTN-format fixture; optimizer-not-run; no model-quality or serving-kernel equivalence claim.\"}]", + "--model", + "/tmp/qfs-complete-tiny-fixture/model", + "--out", + "/tmp/qfs-quant-microfloat-release/proof-public/modelopt-mixed/root", + "--dataset-id", + "fidelity--quant-integration.root", + "--dataset-name", + "Local quant integration root", + "--role", + "root" + ], + "cwd": "/tmp/qfs-explorer-development" + }, + { + "argv": [ + "/tmp/qfs-quant-venv/bin/python", + "-c", + "import runpy,sys,torch; torch.set_num_threads(2); torch.set_num_interop_threads(2); p=sys.argv.pop(1); sys.path.insert(0,str(__import__('pathlib').Path(p).parent)); sys.argv[0]=p; runpy.run_path(p,run_name='__main__')", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-quant-microfloat-release/proof-public/modelopt-mixed/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--author", + "malaiwah", + "--schedule", + "layer-outer", + "--layer-residency", + "stream", + "--disclosures", + "[{\"code\": \"rtn_format_fixture\", \"severity\": \"info\", \"affects_comparability\": false, \"detail\": \"Local RTN-format fixture; optimizer-not-run; no model-quality or serving-kernel equivalence claim.\"}]", + "--model", + "/tmp/qfs-quant-microfloat-release/stage-main/modelopt-mixed", + "--out", + "/tmp/qfs-quant-microfloat-release/proof-public/modelopt-mixed/candidate", + "--dataset-id", + "fidelity--quant-integration.candidate", + "--dataset-name", + "Local quant integration candidate", + "--role", + "quant", + "--codec", + "mixed", + "--declared-bits", + "4.0", + "--scope-file", + "/tmp/qfs-quant-microfloat-release/stage-main/modelopt-mixed/scope.json" + ], + "cwd": "/tmp/qfs-explorer-development" + }, + { + "argv": [ + "/tmp/qfs-quant-venv/bin/python", + "-c", + "import runpy,sys,torch; torch.set_num_threads(2); torch.set_num_interop_threads(2); p=sys.argv.pop(1); sys.path.insert(0,str(__import__('pathlib').Path(p).parent)); sys.argv[0]=p; runpy.run_path(p,run_name='__main__')", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "compare", + "--reference", + "/tmp/qfs-quant-microfloat-release/proof-public/modelopt-mixed/root", + "--candidate", + "/tmp/qfs-quant-microfloat-release/proof-public/modelopt-mixed/candidate", + "--out", + "/tmp/qfs-quant-microfloat-release/proof-public/modelopt-mixed/comparison", + "--force-compute", + "--device", + "cpu", + "--replay-device", + "numpy", + "--replay-dtype", + "float32", + "--verify-tensors", + "--own-heads" + ], + "cwd": "/tmp/qfs-explorer-development" + } + ], + "evidence_license": "mit", + "evidence_repo_id": "malaiwah/qfs-microfloat-tiny-cpu-format-v1", + "owner": "malaiwah", + "retain": [ + { + "kind": "dependency", + "name": "requirements-verified.txt", + "path": "/tmp/qfs-quant-integration/requirements-verified.txt" + }, + { + "kind": "script", + "name": "smoke_capture.py", + "path": "/tmp/qfs-quant-integration/smoke_capture.py" + }, + { + "kind": "source", + "name": "engines--tools--hf_capture.py", + "path": "/tmp/qfs-explorer-development/engines/tools/hf_capture.py" + }, + { + "kind": "source", + "name": "engines--tools--layer_outer.py", + "path": "/tmp/qfs-explorer-development/engines/tools/layer_outer.py" + }, + { + "kind": "source", + "name": "engines--tools--quant_stream.py", + "path": "/tmp/qfs-explorer-development/engines/tools/quant_stream.py" + }, + { + "kind": "source", + "name": "engines--tools--affine_surface.py", + "path": "/tmp/qfs-explorer-development/engines/tools/affine_surface.py" + }, + { + "kind": "source", + "name": "engines--tools--microscale_surface.py", + "path": "/tmp/qfs-explorer-development/engines/tools/microscale_surface.py" + }, + { + "kind": "source", + "name": "engines--tools--gguf_qwen35.py", + "path": "/tmp/qfs-explorer-development/engines/tools/gguf_qwen35.py" + }, + { + "kind": "source", + "name": "engines--tools--gguf_surface.py", + "path": "/tmp/qfs-explorer-development/engines/tools/gguf_surface.py" + }, + { + "kind": "source", + "name": "bin--fidelity--dscompare.py", + "path": "/tmp/qfs-explorer-development/bin/fidelity/dscompare.py" + }, + { + "kind": "script", + "name": "build_microfloat.py", + "path": "/tmp/qfs-quant-microfloat-release/build_microfloat.py" + }, + { + "kind": "oracle", + "name": "oracle-report.json", + "path": "/tmp/qfs-quant-microfloat-release/probe-main.json" + } + ], + "schema": "qfs.fixture-publication-plan.v1", + "title": "microfloat tiny CPU format fixture reproducibility" +} diff --git a/qualification.json b/qualification.json new file mode 100644 index 0000000000000000000000000000000000000000..a7b8e378061ff8abb0d58adb40765c490634201a --- /dev/null +++ b/qualification.json @@ -0,0 +1,1550 @@ +[ + { + "checkpoint_identity_sha256": "aa51ae526ba79294a678ada6189d0418fa78f1d5e51091e5d10696c56d3470ed", + "classification": "lossy", + "comparison_receipt_sha256": "c8a4ea7eb65d3ad812514a3faadd0913f27d2cf03e45f11d170682ded1b6726d", + "decode": { + "activation_quantization": null, + "checkpoint_bytes_read": 125392, + "comparison_class": "advisory", + "components_consumed": 212, + "components_not_consumed": [], + "components_planned": 212, + "formats_decoded": { + "mxfp4-pack-quantized": 106 + }, + "method": "microfloat-weight-reconstruction", + "modules_decoded": 106, + "modules_not_decoded": [], + "modules_planned": 106, + "output_dtype": "bfloat16", + "quantization_config": { + "config_groups": { + "group_0": { + "format": "mxfp4-pack-quantized", + "input_activations": null, + "output_activations": null, + "targets": [ + "model.layers.0.mlp.down_proj", + "model.layers.0.mlp.gate_proj", + "model.layers.0.mlp.up_proj", + "model.layers.0.self_attn.indexer.weights_proj", + "model.layers.0.self_attn.indexer.wk", + "model.layers.0.self_attn.indexer.wq_b", + "model.layers.0.self_attn.kv_a_proj_with_mqa", + "model.layers.0.self_attn.o_proj", + "model.layers.0.self_attn.q_a_proj", + "model.layers.0.self_attn.q_b_proj", + "model.layers.1.mlp.experts.0.down_proj", + "model.layers.1.mlp.experts.0.gate_proj", + "model.layers.1.mlp.experts.0.up_proj", + "model.layers.1.mlp.experts.1.down_proj", + "model.layers.1.mlp.experts.1.gate_proj", + "model.layers.1.mlp.experts.1.up_proj", + "model.layers.1.mlp.experts.2.down_proj", + "model.layers.1.mlp.experts.2.gate_proj", + "model.layers.1.mlp.experts.2.up_proj", + "model.layers.1.mlp.experts.3.down_proj", + "model.layers.1.mlp.experts.3.gate_proj", + "model.layers.1.mlp.experts.3.up_proj", + "model.layers.1.mlp.experts.4.down_proj", + "model.layers.1.mlp.experts.4.gate_proj", + "model.layers.1.mlp.experts.4.up_proj", + "model.layers.1.mlp.experts.5.down_proj", + "model.layers.1.mlp.experts.5.gate_proj", + "model.layers.1.mlp.experts.5.up_proj", + "model.layers.1.mlp.experts.6.down_proj", + "model.layers.1.mlp.experts.6.gate_proj", + "model.layers.1.mlp.experts.6.up_proj", + "model.layers.1.mlp.experts.7.down_proj", + "model.layers.1.mlp.experts.7.gate_proj", + "model.layers.1.mlp.experts.7.up_proj", + "model.layers.1.mlp.shared_experts.down_proj", + "model.layers.1.mlp.shared_experts.gate_proj", + "model.layers.1.mlp.shared_experts.up_proj", + "model.layers.1.self_attn.kv_a_proj_with_mqa", + "model.layers.1.self_attn.o_proj", + "model.layers.1.self_attn.q_a_proj", + "model.layers.1.self_attn.q_b_proj", + "model.layers.2.mlp.experts.0.down_proj", + "model.layers.2.mlp.experts.0.gate_proj", + "model.layers.2.mlp.experts.0.up_proj", + "model.layers.2.mlp.experts.1.down_proj", + "model.layers.2.mlp.experts.1.gate_proj", + "model.layers.2.mlp.experts.1.up_proj", + "model.layers.2.mlp.experts.2.down_proj", + "model.layers.2.mlp.experts.2.gate_proj", + "model.layers.2.mlp.experts.2.up_proj", + "model.layers.2.mlp.experts.3.down_proj", + "model.layers.2.mlp.experts.3.gate_proj", + "model.layers.2.mlp.experts.3.up_proj", + "model.layers.2.mlp.experts.4.down_proj", + "model.layers.2.mlp.experts.4.gate_proj", + "model.layers.2.mlp.experts.4.up_proj", + "model.layers.2.mlp.experts.5.down_proj", + "model.layers.2.mlp.experts.5.gate_proj", + "model.layers.2.mlp.experts.5.up_proj", + "model.layers.2.mlp.experts.6.down_proj", + "model.layers.2.mlp.experts.6.gate_proj", + "model.layers.2.mlp.experts.6.up_proj", + "model.layers.2.mlp.experts.7.down_proj", + "model.layers.2.mlp.experts.7.gate_proj", + "model.layers.2.mlp.experts.7.up_proj", + "model.layers.2.mlp.shared_experts.down_proj", + "model.layers.2.mlp.shared_experts.gate_proj", + "model.layers.2.mlp.shared_experts.up_proj", + "model.layers.2.self_attn.indexer.weights_proj", + "model.layers.2.self_attn.indexer.wk", + "model.layers.2.self_attn.indexer.wq_b", + "model.layers.2.self_attn.kv_a_proj_with_mqa", + "model.layers.2.self_attn.o_proj", + "model.layers.2.self_attn.q_a_proj", + "model.layers.2.self_attn.q_b_proj", + "model.layers.3.mlp.experts.0.down_proj", + "model.layers.3.mlp.experts.0.gate_proj", + "model.layers.3.mlp.experts.0.up_proj", + "model.layers.3.mlp.experts.1.down_proj", + "model.layers.3.mlp.experts.1.gate_proj", + "model.layers.3.mlp.experts.1.up_proj", + "model.layers.3.mlp.experts.2.down_proj", + "model.layers.3.mlp.experts.2.gate_proj", + "model.layers.3.mlp.experts.2.up_proj", + "model.layers.3.mlp.experts.3.down_proj", + "model.layers.3.mlp.experts.3.gate_proj", + "model.layers.3.mlp.experts.3.up_proj", + "model.layers.3.mlp.experts.4.down_proj", + "model.layers.3.mlp.experts.4.gate_proj", + "model.layers.3.mlp.experts.4.up_proj", + "model.layers.3.mlp.experts.5.down_proj", + "model.layers.3.mlp.experts.5.gate_proj", + "model.layers.3.mlp.experts.5.up_proj", + "model.layers.3.mlp.experts.6.down_proj", + "model.layers.3.mlp.experts.6.gate_proj", + "model.layers.3.mlp.experts.6.up_proj", + "model.layers.3.mlp.experts.7.down_proj", + "model.layers.3.mlp.experts.7.gate_proj", + "model.layers.3.mlp.experts.7.up_proj", + "model.layers.3.mlp.shared_experts.down_proj", + "model.layers.3.mlp.shared_experts.gate_proj", + "model.layers.3.mlp.shared_experts.up_proj", + "model.layers.3.self_attn.kv_a_proj_with_mqa", + "model.layers.3.self_attn.o_proj", + "model.layers.3.self_attn.q_a_proj", + "model.layers.3.self_attn.q_b_proj" + ], + "weights": { + "dynamic": false, + "group_size": 32, + "num_bits": 4, + "scale_dtype": "torch.uint8", + "strategy": "group", + "symmetric": true, + "type": "float" + } + } + }, + "format": "mxfp4-pack-quantized", + "ignore": [], + "quant_method": "compressed-tensors", + "quantization_status": "compressed" + }, + "reader_evidence": { + "decode_plan_sha256": "2bb2eef8f5dea9e0662e3fce6fbb6ecf22842b18c7192484e78ea5a8850ce9fa", + "gate_header_barrier": false, + "source_files": { + "engines/tools/affine_surface.py": "37e7074797d53ae836e0af12fdbd2dc36c88778098aa44c72c1cd936d2b4c053", + "engines/tools/microscale_surface.py": "588923f0a4700436221923c794a8c112971d9f08e75c746742b0f0ede7921682", + "engines/tools/nvfp4_surface.py": "044b6fd2ee22d58512476e96060f7fa09030212a33736da1393c0103eb73e0c8", + "engines/tools/quant_stream.py": "7c6cc4cbe399d066eaff80ccf1e3d3190185f194644f738a404d3c537ad8e1ab" + } + }, + "reference": "compressed-tensors@0.18.0; DeepSeek-V4-Flash@60d8d70770c6776ff598c94bb586a859a38244f1/inference/kernel.py; nvidia/Qwen3.8-Flash-Next-NVFP4@fc694b54fb0174e0913e6adf86691ef85a4ead47/config.json+headers", + "scientific_disclosure": "Stored-weight reconstruction only; no native quantized GEMM, activation arithmetic, or quantizer optimization quality claim.", + "scope": "weights_reconstructed" + }, + "disclosures": [ + { + "affects_comparability": false, + "code": "native_head_replay", + "detail": "HEAD-1d: each side replayed through its own sealed head (reference 2364995d4009, candidate 2364995d4009); head error is inside the measurement, as under HEAD-2, and nothing is substituted. The heads are content-identical.", + "severity": "info" + }, + { + "affects_comparability": true, + "code": "weights_reconstructed", + "detail": "candidate was captured from a WEIGHTS-ONLY RECONSTRUCTION (microfloat-weight-reconstruction, output bfloat16). The stored weights were decoded before the model forward; native quantized GEMM and serving activation arithmetic are not measured. Decoder provenance is in the sealed runtime receipt. The comparison is advisory.", + "severity": "caveat" + } + ], + "head_application": "native_head", + "kld_nats": 0.000866341033772075, + "measurement_scope": { + "contexts": 4, + "covers_full_panel": true, + "position_filter": "all", + "positions_per_context": 63, + "scored_positions": 252, + "subset_detail": null + }, + "name": "ct-mxfp4", + "scope": { + "activation_quantization": null, + "assignments": [ + { + "bits_per_weight": 4, + "format": "ct-mxfp4", + "layer_range": "all", + "note": "4 tensors: model.layers.N.self_attn.o_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "attn.o", + "treatment": "quantized" + }, + { + "bits_per_weight": null, + "format": "mixed", + "layer_range": "0-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 12 x native:bf16@16 (model.layers.N.self_attn.indexer.k_norm.bias, model.layers.N.self_attn.indexer.k_norm.weight, model.layers.N.self_attn.kv_a_layernorm.weight); 6 x quantized:ct-mxfp4@4 (model.layers.N.self_attn.indexer.weights_proj.weight, model.layers.N.self_attn.indexer.wk.weight, model.layers.N.self_attn.indexer.wq_b.weight). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "attn.other", + "treatment": "quantized" + }, + { + "bits_per_weight": null, + "format": "mixed", + "layer_range": "0-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 4 x native:bf16@16 (model.layers.N.self_attn.kv_b_proj.weight); 12 x quantized:ct-mxfp4@4 (model.layers.N.self_attn.kv_a_proj_with_mqa.weight, model.layers.N.self_attn.q_a_proj.weight, model.layers.N.self_attn.q_b_proj.weight). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "attn.qkv", + "treatment": "quantized" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": "all", + "note": "1 tensors: model.embed_tokens.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "embed_tokens", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": "all", + "note": "1 tensors: lm_head.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "lm_head", + "treatment": "native" + }, + { + "bits_per_weight": 4, + "format": "ct-mxfp4", + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.down_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "mlp.down", + "treatment": "quantized" + }, + { + "bits_per_weight": 4, + "format": "ct-mxfp4", + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.gate_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "mlp.gate", + "treatment": "quantized" + }, + { + "bits_per_weight": 4, + "format": "ct-mxfp4", + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "mlp.up", + "treatment": "quantized" + }, + { + "bits_per_weight": 4, + "format": "ct-mxfp4", + "layer_range": "all", + "note": "72 tensors: model.layers.N.mlp.experts.E.down_proj.weight, model.layers.N.mlp.experts.E.gate_proj.weight, model.layers.N.mlp.experts.E.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "moe.experts", + "treatment": "quantized" + }, + { + "bits_per_weight": null, + "format": "mixed", + "layer_range": "1-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 3 x native:bf16@16 (model.layers.N.mlp.gate.weight); 3 x native:fp32@32 (model.layers.N.mlp.gate.e_score_correction_bias). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "moe.router", + "treatment": "native" + }, + { + "bits_per_weight": 4, + "format": "ct-mxfp4", + "layer_range": "all", + "note": "9 tensors: model.layers.N.mlp.shared_experts.down_proj.weight, model.layers.N.mlp.shared_experts.gate_proj.weight, model.layers.N.mlp.shared_experts.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "moe.shared_expert", + "treatment": "quantized" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": "all", + "note": "9 tensors: model.layers.N.input_layernorm.weight, model.layers.N.post_attention_layernorm.weight, model.norm.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "norm", + "treatment": "native" + } + ], + "head_policy": "native", + "kv_cache_dtype": "bf16", + "mtp_included": false, + "policy": "mixed" + }, + "source_checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e" + }, + { + "checkpoint_identity_sha256": "8c943a9a4f3620b5a9014721f9f6565d25e868dd1e68407f28b618216a248317", + "classification": "lossy", + "comparison_receipt_sha256": "53824e510d77db71eefa6beb9403fbe7db4a4290cef2a119dc02b2ec9ffb3d1a", + "decode": { + "activation_quantization": null, + "checkpoint_bytes_read": 136664, + "comparison_class": "advisory", + "components_consumed": 330, + "components_not_consumed": [], + "components_planned": 330, + "formats_decoded": { + "nvfp4-pack-quantized": 110 + }, + "method": "microfloat-weight-reconstruction", + "modules_decoded": 110, + "modules_not_decoded": [], + "modules_planned": 110, + "output_dtype": "bfloat16", + "quantization_config": { + "config_groups": { + "group_0": { + "format": "nvfp4-pack-quantized", + "input_activations": null, + "output_activations": null, + "targets": [ + "model.layers.0.mlp.down_proj", + "model.layers.0.mlp.gate_proj", + "model.layers.0.mlp.up_proj", + "model.layers.0.self_attn.indexer.weights_proj", + "model.layers.0.self_attn.indexer.wk", + "model.layers.0.self_attn.indexer.wq_b", + "model.layers.0.self_attn.kv_a_proj_with_mqa", + "model.layers.0.self_attn.kv_b_proj", + "model.layers.0.self_attn.o_proj", + "model.layers.0.self_attn.q_a_proj", + "model.layers.0.self_attn.q_b_proj", + "model.layers.1.mlp.experts.0.down_proj", + "model.layers.1.mlp.experts.0.gate_proj", + "model.layers.1.mlp.experts.0.up_proj", + "model.layers.1.mlp.experts.1.down_proj", + "model.layers.1.mlp.experts.1.gate_proj", + "model.layers.1.mlp.experts.1.up_proj", + "model.layers.1.mlp.experts.2.down_proj", + "model.layers.1.mlp.experts.2.gate_proj", + "model.layers.1.mlp.experts.2.up_proj", + "model.layers.1.mlp.experts.3.down_proj", + "model.layers.1.mlp.experts.3.gate_proj", + "model.layers.1.mlp.experts.3.up_proj", + "model.layers.1.mlp.experts.4.down_proj", + "model.layers.1.mlp.experts.4.gate_proj", + "model.layers.1.mlp.experts.4.up_proj", + "model.layers.1.mlp.experts.5.down_proj", + "model.layers.1.mlp.experts.5.gate_proj", + "model.layers.1.mlp.experts.5.up_proj", + "model.layers.1.mlp.experts.6.down_proj", + "model.layers.1.mlp.experts.6.gate_proj", + "model.layers.1.mlp.experts.6.up_proj", + "model.layers.1.mlp.experts.7.down_proj", + "model.layers.1.mlp.experts.7.gate_proj", + "model.layers.1.mlp.experts.7.up_proj", + "model.layers.1.mlp.shared_experts.down_proj", + "model.layers.1.mlp.shared_experts.gate_proj", + "model.layers.1.mlp.shared_experts.up_proj", + "model.layers.1.self_attn.kv_a_proj_with_mqa", + "model.layers.1.self_attn.kv_b_proj", + "model.layers.1.self_attn.o_proj", + "model.layers.1.self_attn.q_a_proj", + "model.layers.1.self_attn.q_b_proj", + "model.layers.2.mlp.experts.0.down_proj", + "model.layers.2.mlp.experts.0.gate_proj", + "model.layers.2.mlp.experts.0.up_proj", + "model.layers.2.mlp.experts.1.down_proj", + "model.layers.2.mlp.experts.1.gate_proj", + "model.layers.2.mlp.experts.1.up_proj", + "model.layers.2.mlp.experts.2.down_proj", + "model.layers.2.mlp.experts.2.gate_proj", + "model.layers.2.mlp.experts.2.up_proj", + "model.layers.2.mlp.experts.3.down_proj", + "model.layers.2.mlp.experts.3.gate_proj", + "model.layers.2.mlp.experts.3.up_proj", + "model.layers.2.mlp.experts.4.down_proj", + "model.layers.2.mlp.experts.4.gate_proj", + "model.layers.2.mlp.experts.4.up_proj", + "model.layers.2.mlp.experts.5.down_proj", + "model.layers.2.mlp.experts.5.gate_proj", + "model.layers.2.mlp.experts.5.up_proj", + "model.layers.2.mlp.experts.6.down_proj", + "model.layers.2.mlp.experts.6.gate_proj", + "model.layers.2.mlp.experts.6.up_proj", + "model.layers.2.mlp.experts.7.down_proj", + "model.layers.2.mlp.experts.7.gate_proj", + "model.layers.2.mlp.experts.7.up_proj", + "model.layers.2.mlp.shared_experts.down_proj", + "model.layers.2.mlp.shared_experts.gate_proj", + "model.layers.2.mlp.shared_experts.up_proj", + "model.layers.2.self_attn.indexer.weights_proj", + "model.layers.2.self_attn.indexer.wk", + "model.layers.2.self_attn.indexer.wq_b", + "model.layers.2.self_attn.kv_a_proj_with_mqa", + "model.layers.2.self_attn.kv_b_proj", + "model.layers.2.self_attn.o_proj", + "model.layers.2.self_attn.q_a_proj", + "model.layers.2.self_attn.q_b_proj", + "model.layers.3.mlp.experts.0.down_proj", + "model.layers.3.mlp.experts.0.gate_proj", + "model.layers.3.mlp.experts.0.up_proj", + "model.layers.3.mlp.experts.1.down_proj", + "model.layers.3.mlp.experts.1.gate_proj", + "model.layers.3.mlp.experts.1.up_proj", + "model.layers.3.mlp.experts.2.down_proj", + "model.layers.3.mlp.experts.2.gate_proj", + "model.layers.3.mlp.experts.2.up_proj", + "model.layers.3.mlp.experts.3.down_proj", + "model.layers.3.mlp.experts.3.gate_proj", + "model.layers.3.mlp.experts.3.up_proj", + "model.layers.3.mlp.experts.4.down_proj", + "model.layers.3.mlp.experts.4.gate_proj", + "model.layers.3.mlp.experts.4.up_proj", + "model.layers.3.mlp.experts.5.down_proj", + "model.layers.3.mlp.experts.5.gate_proj", + "model.layers.3.mlp.experts.5.up_proj", + "model.layers.3.mlp.experts.6.down_proj", + "model.layers.3.mlp.experts.6.gate_proj", + "model.layers.3.mlp.experts.6.up_proj", + "model.layers.3.mlp.experts.7.down_proj", + "model.layers.3.mlp.experts.7.gate_proj", + "model.layers.3.mlp.experts.7.up_proj", + "model.layers.3.mlp.shared_experts.down_proj", + "model.layers.3.mlp.shared_experts.gate_proj", + "model.layers.3.mlp.shared_experts.up_proj", + "model.layers.3.self_attn.kv_a_proj_with_mqa", + "model.layers.3.self_attn.kv_b_proj", + "model.layers.3.self_attn.o_proj", + "model.layers.3.self_attn.q_a_proj", + "model.layers.3.self_attn.q_b_proj" + ], + "weights": { + "dynamic": false, + "group_size": 16, + "num_bits": 4, + "scale_dtype": "torch.float8_e4m3fn", + "strategy": "tensor_group", + "symmetric": true, + "type": "float" + } + } + }, + "format": "nvfp4-pack-quantized", + "ignore": [], + "quant_method": "compressed-tensors", + "quantization_status": "compressed" + }, + "reader_evidence": { + "decode_plan_sha256": "b460ed95a3e245541b4d510acbaa5efd96d1d87e0b04d2da3d97e814ee542427", + "gate_header_barrier": false, + "source_files": { + "engines/tools/affine_surface.py": "37e7074797d53ae836e0af12fdbd2dc36c88778098aa44c72c1cd936d2b4c053", + "engines/tools/microscale_surface.py": "588923f0a4700436221923c794a8c112971d9f08e75c746742b0f0ede7921682", + "engines/tools/nvfp4_surface.py": "044b6fd2ee22d58512476e96060f7fa09030212a33736da1393c0103eb73e0c8", + "engines/tools/quant_stream.py": "7c6cc4cbe399d066eaff80ccf1e3d3190185f194644f738a404d3c537ad8e1ab" + } + }, + "reference": "compressed-tensors@0.18.0; DeepSeek-V4-Flash@60d8d70770c6776ff598c94bb586a859a38244f1/inference/kernel.py; nvidia/Qwen3.8-Flash-Next-NVFP4@fc694b54fb0174e0913e6adf86691ef85a4ead47/config.json+headers", + "scientific_disclosure": "Stored-weight reconstruction only; no native quantized GEMM, activation arithmetic, or quantizer optimization quality claim.", + "scope": "weights_reconstructed" + }, + "disclosures": [ + { + "affects_comparability": false, + "code": "native_head_replay", + "detail": "HEAD-1d: each side replayed through its own sealed head (reference 2364995d4009, candidate 2364995d4009); head error is inside the measurement, as under HEAD-2, and nothing is substituted. The heads are content-identical.", + "severity": "info" + }, + { + "affects_comparability": true, + "code": "weights_reconstructed", + "detail": "candidate was captured from a WEIGHTS-ONLY RECONSTRUCTION (microfloat-weight-reconstruction, output bfloat16). The stored weights were decoded before the model forward; native quantized GEMM and serving activation arithmetic are not measured. Decoder provenance is in the sealed runtime receipt. The comparison is advisory.", + "severity": "caveat" + } + ], + "head_application": "native_head", + "kld_nats": 0.0007752665823432193, + "measurement_scope": { + "contexts": 4, + "covers_full_panel": true, + "position_filter": "all", + "positions_per_context": 63, + "scored_positions": 252, + "subset_detail": null + }, + "name": "ct-nvfp4", + "scope": { + "activation_quantization": null, + "assignments": [ + { + "bits_per_weight": 4, + "format": "ct-nvfp4", + "layer_range": "all", + "note": "4 tensors: model.layers.N.self_attn.o_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "attn.o", + "treatment": "quantized" + }, + { + "bits_per_weight": null, + "format": "mixed", + "layer_range": "0-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 12 x native:bf16@16 (model.layers.N.self_attn.indexer.k_norm.bias, model.layers.N.self_attn.indexer.k_norm.weight, model.layers.N.self_attn.kv_a_layernorm.weight); 6 x quantized:ct-nvfp4@4 (model.layers.N.self_attn.indexer.weights_proj.weight, model.layers.N.self_attn.indexer.wk.weight, model.layers.N.self_attn.indexer.wq_b.weight). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "attn.other", + "treatment": "quantized" + }, + { + "bits_per_weight": 4, + "format": "ct-nvfp4", + "layer_range": "all", + "note": "16 tensors: model.layers.N.self_attn.kv_a_proj_with_mqa.weight, model.layers.N.self_attn.kv_b_proj.weight, model.layers.N.self_attn.q_a_proj.weight, model.layers.N.self_attn.q_b_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "attn.qkv", + "treatment": "quantized" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": "all", + "note": "1 tensors: model.embed_tokens.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "embed_tokens", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": "all", + "note": "1 tensors: lm_head.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "lm_head", + "treatment": "native" + }, + { + "bits_per_weight": 4, + "format": "ct-nvfp4", + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.down_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "mlp.down", + "treatment": "quantized" + }, + { + "bits_per_weight": 4, + "format": "ct-nvfp4", + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.gate_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "mlp.gate", + "treatment": "quantized" + }, + { + "bits_per_weight": 4, + "format": "ct-nvfp4", + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "mlp.up", + "treatment": "quantized" + }, + { + "bits_per_weight": 4, + "format": "ct-nvfp4", + "layer_range": "all", + "note": "72 tensors: model.layers.N.mlp.experts.E.down_proj.weight, model.layers.N.mlp.experts.E.gate_proj.weight, model.layers.N.mlp.experts.E.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "moe.experts", + "treatment": "quantized" + }, + { + "bits_per_weight": null, + "format": "mixed", + "layer_range": "1-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 3 x native:bf16@16 (model.layers.N.mlp.gate.weight); 3 x native:fp32@32 (model.layers.N.mlp.gate.e_score_correction_bias). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "moe.router", + "treatment": "native" + }, + { + "bits_per_weight": 4, + "format": "ct-nvfp4", + "layer_range": "all", + "note": "9 tensors: model.layers.N.mlp.shared_experts.down_proj.weight, model.layers.N.mlp.shared_experts.gate_proj.weight, model.layers.N.mlp.shared_experts.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "moe.shared_expert", + "treatment": "quantized" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": "all", + "note": "9 tensors: model.layers.N.input_layernorm.weight, model.layers.N.post_attention_layernorm.weight, model.norm.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "norm", + "treatment": "native" + } + ], + "head_policy": "native", + "kv_cache_dtype": "bf16", + "mtp_included": false, + "policy": "mixed" + }, + "source_checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e" + }, + { + "checkpoint_identity_sha256": "2fb12f3cf616cdb60b7003e9900d0cbc659c01df01c34cd0ae67f7ad5ad4bb6b", + "classification": "lossy", + "comparison_receipt_sha256": "5dcaf9dda1bf5084fa38578a18531f6aed8c99ee64aedffee8f70b1c4063bb4b", + "decode": { + "activation_quantization": null, + "checkpoint_bytes_read": 136664, + "comparison_class": "advisory", + "components_consumed": 330, + "components_not_consumed": [], + "components_planned": 330, + "formats_decoded": { + "modelopt-nvfp4": 110 + }, + "method": "microfloat-weight-reconstruction", + "modules_decoded": 110, + "modules_not_decoded": [], + "modules_planned": 110, + "output_dtype": "bfloat16", + "quantization_config": { + "group_size": 16, + "num_bits": 4, + "quant_algo": "NVFP4", + "quant_method": "modelopt", + "with_input_scale": false + }, + "reader_evidence": { + "decode_plan_sha256": "bbdc8be9985af40d3a7adbcf3c895e105558d28af93c1b018b08d9e500a5c15e", + "gate_header_barrier": false, + "source_files": { + "engines/tools/affine_surface.py": "37e7074797d53ae836e0af12fdbd2dc36c88778098aa44c72c1cd936d2b4c053", + "engines/tools/microscale_surface.py": "588923f0a4700436221923c794a8c112971d9f08e75c746742b0f0ede7921682", + "engines/tools/nvfp4_surface.py": "044b6fd2ee22d58512476e96060f7fa09030212a33736da1393c0103eb73e0c8", + "engines/tools/quant_stream.py": "7c6cc4cbe399d066eaff80ccf1e3d3190185f194644f738a404d3c537ad8e1ab" + } + }, + "reference": "compressed-tensors@0.18.0; DeepSeek-V4-Flash@60d8d70770c6776ff598c94bb586a859a38244f1/inference/kernel.py; nvidia/Qwen3.8-Flash-Next-NVFP4@fc694b54fb0174e0913e6adf86691ef85a4ead47/config.json+headers", + "scientific_disclosure": "Stored-weight reconstruction only; no native quantized GEMM, activation arithmetic, or quantizer optimization quality claim.", + "scope": "weights_reconstructed" + }, + "disclosures": [ + { + "affects_comparability": false, + "code": "native_head_replay", + "detail": "HEAD-1d: each side replayed through its own sealed head (reference 2364995d4009, candidate 2364995d4009); head error is inside the measurement, as under HEAD-2, and nothing is substituted. The heads are content-identical.", + "severity": "info" + }, + { + "affects_comparability": true, + "code": "weights_reconstructed", + "detail": "candidate was captured from a WEIGHTS-ONLY RECONSTRUCTION (microfloat-weight-reconstruction, output bfloat16). The stored weights were decoded before the model forward; native quantized GEMM and serving activation arithmetic are not measured. Decoder provenance is in the sealed runtime receipt. The comparison is advisory.", + "severity": "caveat" + } + ], + "head_application": "native_head", + "kld_nats": 0.0007775931894536412, + "measurement_scope": { + "contexts": 4, + "covers_full_panel": true, + "position_filter": "all", + "positions_per_context": 63, + "scored_positions": 252, + "subset_detail": null + }, + "name": "modelopt-nvfp4", + "scope": { + "activation_quantization": null, + "assignments": [ + { + "bits_per_weight": 4, + "format": "modelopt-nvfp4", + "layer_range": "all", + "note": "4 tensors: model.layers.N.self_attn.o_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "attn.o", + "treatment": "quantized" + }, + { + "bits_per_weight": null, + "format": "mixed", + "layer_range": "0-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 12 x native:bf16@16 (model.layers.N.self_attn.indexer.k_norm.bias, model.layers.N.self_attn.indexer.k_norm.weight, model.layers.N.self_attn.kv_a_layernorm.weight); 6 x quantized:modelopt-nvfp4@4 (model.layers.N.self_attn.indexer.weights_proj.weight, model.layers.N.self_attn.indexer.wk.weight, model.layers.N.self_attn.indexer.wq_b.weight). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "attn.other", + "treatment": "quantized" + }, + { + "bits_per_weight": 4, + "format": "modelopt-nvfp4", + "layer_range": "all", + "note": "16 tensors: model.layers.N.self_attn.kv_a_proj_with_mqa.weight, model.layers.N.self_attn.kv_b_proj.weight, model.layers.N.self_attn.q_a_proj.weight, model.layers.N.self_attn.q_b_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "attn.qkv", + "treatment": "quantized" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": "all", + "note": "1 tensors: model.embed_tokens.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "embed_tokens", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": "all", + "note": "1 tensors: lm_head.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "lm_head", + "treatment": "native" + }, + { + "bits_per_weight": 4, + "format": "modelopt-nvfp4", + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.down_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "mlp.down", + "treatment": "quantized" + }, + { + "bits_per_weight": 4, + "format": "modelopt-nvfp4", + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.gate_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "mlp.gate", + "treatment": "quantized" + }, + { + "bits_per_weight": 4, + "format": "modelopt-nvfp4", + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "mlp.up", + "treatment": "quantized" + }, + { + "bits_per_weight": 4, + "format": "modelopt-nvfp4", + "layer_range": "all", + "note": "72 tensors: model.layers.N.mlp.experts.E.down_proj.weight, model.layers.N.mlp.experts.E.gate_proj.weight, model.layers.N.mlp.experts.E.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "moe.experts", + "treatment": "quantized" + }, + { + "bits_per_weight": null, + "format": "mixed", + "layer_range": "1-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 3 x native:bf16@16 (model.layers.N.mlp.gate.weight); 3 x native:fp32@32 (model.layers.N.mlp.gate.e_score_correction_bias). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "moe.router", + "treatment": "native" + }, + { + "bits_per_weight": 4, + "format": "modelopt-nvfp4", + "layer_range": "all", + "note": "9 tensors: model.layers.N.mlp.shared_experts.down_proj.weight, model.layers.N.mlp.shared_experts.gate_proj.weight, model.layers.N.mlp.shared_experts.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "moe.shared_expert", + "treatment": "quantized" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": "all", + "note": "9 tensors: model.layers.N.input_layernorm.weight, model.layers.N.post_attention_layernorm.weight, model.norm.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "norm", + "treatment": "native" + } + ], + "head_policy": "native", + "kv_cache_dtype": "bf16", + "mtp_included": false, + "policy": "mixed" + }, + "source_checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e" + }, + { + "checkpoint_identity_sha256": "7239a3bd9a4ca38a32c32d110586c688197ee04f6662bc900a175d3107ad9a18", + "classification": "lossy", + "comparison_receipt_sha256": "0db49970160ff0d412b90abce7062ef372cd1ad62c016cf9614cb6a834f3470e", + "decode": { + "activation_quantization": { + "applied_to_weights": false, + "declared": { + "activation_scheme": "dynamic", + "scale_fmt": "ue8m0" + }, + "kv_cache_scheme": null, + "scope": "weights-reconstructed/advisory; activation-not-captured", + "stored_components": [] + }, + "checkpoint_bytes_read": 242286, + "comparison_class": "advisory", + "components_consumed": 220, + "components_not_consumed": [], + "components_planned": 220, + "formats_decoded": { + "fp8-ue8m0": 110 + }, + "method": "microfloat-weight-reconstruction", + "modules_decoded": 110, + "modules_not_decoded": [], + "modules_planned": 110, + "output_dtype": "bfloat16", + "quantization_config": { + "activation_scheme": "dynamic", + "fmt": "e4m3", + "quant_method": "fp8", + "scale_fmt": "ue8m0", + "weight_block_size": [ + 128, + 128 + ] + }, + "reader_evidence": { + "decode_plan_sha256": "5ba92234f4b0487318ab6ee1ebd8c7bdc20a826d3376a4ad5933500488a6ca6f", + "gate_header_barrier": false, + "source_files": { + "engines/tools/affine_surface.py": "37e7074797d53ae836e0af12fdbd2dc36c88778098aa44c72c1cd936d2b4c053", + "engines/tools/microscale_surface.py": "588923f0a4700436221923c794a8c112971d9f08e75c746742b0f0ede7921682", + "engines/tools/nvfp4_surface.py": "044b6fd2ee22d58512476e96060f7fa09030212a33736da1393c0103eb73e0c8", + "engines/tools/quant_stream.py": "7c6cc4cbe399d066eaff80ccf1e3d3190185f194644f738a404d3c537ad8e1ab" + } + }, + "reference": "compressed-tensors@0.18.0; DeepSeek-V4-Flash@60d8d70770c6776ff598c94bb586a859a38244f1/inference/kernel.py; nvidia/Qwen3.8-Flash-Next-NVFP4@fc694b54fb0174e0913e6adf86691ef85a4ead47/config.json+headers", + "scientific_disclosure": "Stored-weight reconstruction only; no native quantized GEMM, activation arithmetic, or quantizer optimization quality claim.", + "scope": "weights_reconstructed" + }, + "disclosures": [ + { + "affects_comparability": false, + "code": "native_head_replay", + "detail": "HEAD-1d: each side replayed through its own sealed head (reference 2364995d4009, candidate 2364995d4009); head error is inside the measurement, as under HEAD-2, and nothing is substituted. The heads are content-identical.", + "severity": "info" + }, + { + "affects_comparability": true, + "code": "weights_reconstructed", + "detail": "candidate was captured from a WEIGHTS-ONLY RECONSTRUCTION (microfloat-weight-reconstruction, output bfloat16). The stored weights were decoded before the model forward; native quantized GEMM and serving activation arithmetic are not measured. Decoder provenance is in the sealed runtime receipt. The comparison is advisory.", + "severity": "caveat" + }, + { + "affects_comparability": true, + "code": "activation_quantization_not_captured", + "detail": "candidate was captured from a bf16 materialisation of its weights (microfloat-weight-reconstruction); the checkpoint declares activation quantization (dynamic, reader-declared activation quantization; see sealed decode evidence) that a weights-only capture does not apply, so a served deployment also quantizes activations at runtime. That term is not in this number, which is expected to understate the served divergence; it is not a mathematical bound. The comparison is advisory.", + "severity": "caveat" + } + ], + "head_application": "native_head", + "kld_nats": 0.00020246177849756768, + "measurement_scope": { + "contexts": 4, + "covers_full_panel": true, + "position_filter": "all", + "positions_per_context": 63, + "scored_positions": 252, + "subset_detail": null + }, + "name": "fp8-ue8m0", + "scope": { + "activation_quantization": null, + "assignments": [ + { + "bits_per_weight": 8, + "format": "fp8-ue8m0", + "layer_range": "all", + "note": "4 tensors: model.layers.N.self_attn.o_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "attn.o", + "treatment": "quantized" + }, + { + "bits_per_weight": null, + "format": "mixed", + "layer_range": "0-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 12 x native:bf16@16 (model.layers.N.self_attn.indexer.k_norm.bias, model.layers.N.self_attn.indexer.k_norm.weight, model.layers.N.self_attn.kv_a_layernorm.weight); 6 x quantized:fp8-ue8m0@8 (model.layers.N.self_attn.indexer.weights_proj.weight, model.layers.N.self_attn.indexer.wk.weight, model.layers.N.self_attn.indexer.wq_b.weight). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "attn.other", + "treatment": "quantized" + }, + { + "bits_per_weight": 8, + "format": "fp8-ue8m0", + "layer_range": "all", + "note": "16 tensors: model.layers.N.self_attn.kv_a_proj_with_mqa.weight, model.layers.N.self_attn.kv_b_proj.weight, model.layers.N.self_attn.q_a_proj.weight, model.layers.N.self_attn.q_b_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "attn.qkv", + "treatment": "quantized" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": "all", + "note": "1 tensors: model.embed_tokens.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "embed_tokens", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": "all", + "note": "1 tensors: lm_head.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "lm_head", + "treatment": "native" + }, + { + "bits_per_weight": 8, + "format": "fp8-ue8m0", + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.down_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "mlp.down", + "treatment": "quantized" + }, + { + "bits_per_weight": 8, + "format": "fp8-ue8m0", + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.gate_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "mlp.gate", + "treatment": "quantized" + }, + { + "bits_per_weight": 8, + "format": "fp8-ue8m0", + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "mlp.up", + "treatment": "quantized" + }, + { + "bits_per_weight": 8, + "format": "fp8-ue8m0", + "layer_range": "all", + "note": "72 tensors: model.layers.N.mlp.experts.E.down_proj.weight, model.layers.N.mlp.experts.E.gate_proj.weight, model.layers.N.mlp.experts.E.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "moe.experts", + "treatment": "quantized" + }, + { + "bits_per_weight": null, + "format": "mixed", + "layer_range": "1-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 3 x native:bf16@16 (model.layers.N.mlp.gate.weight); 3 x native:fp32@32 (model.layers.N.mlp.gate.e_score_correction_bias). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "moe.router", + "treatment": "native" + }, + { + "bits_per_weight": 8, + "format": "fp8-ue8m0", + "layer_range": "all", + "note": "9 tensors: model.layers.N.mlp.shared_experts.down_proj.weight, model.layers.N.mlp.shared_experts.gate_proj.weight, model.layers.N.mlp.shared_experts.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "moe.shared_expert", + "treatment": "quantized" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": "all", + "note": "9 tensors: model.layers.N.input_layernorm.weight, model.layers.N.post_attention_layernorm.weight, model.norm.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "norm", + "treatment": "native" + } + ], + "head_policy": "native", + "kv_cache_dtype": "bf16", + "mtp_included": false, + "policy": "mixed" + }, + "source_checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e" + }, + { + "checkpoint_identity_sha256": "822ca7cc58e9909f2832e980051622ccb4a4a4ce1472c618a45e3f4863beb013", + "classification": "lossy", + "comparison_receipt_sha256": "3a8413a6ebb35c46f92ba0ef5513d8fa9ce93cb26024f2d00bf5a4b1bf176136", + "decode": { + "activation_quantization": null, + "checkpoint_bytes_read": 207190, + "comparison_class": "advisory", + "components_consumed": 257, + "components_not_consumed": [], + "components_planned": 257, + "formats_decoded": { + "modelopt-fp8-block": 36, + "modelopt-fp8-tensor": 37, + "modelopt-nvfp4": 37 + }, + "method": "microfloat-weight-reconstruction", + "modules_decoded": 110, + "modules_not_decoded": [], + "modules_planned": 110, + "output_dtype": "bfloat16", + "quantization_config": { + "quant_algo": "MIXED_PRECISION", + "quant_method": "modelopt", + "quantized_layers": { + "model.layers.0.mlp.down_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.0.mlp.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.0.mlp.up_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.0.self_attn.indexer.weights_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.0.self_attn.indexer.wk": { + "quant_algo": "FP8" + }, + "model.layers.0.self_attn.indexer.wq_b": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.0.self_attn.kv_a_proj_with_mqa": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.0.self_attn.kv_b_proj": { + "quant_algo": "FP8" + }, + "model.layers.0.self_attn.o_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.0.self_attn.q_a_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.0.self_attn.q_b_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.experts.0.down_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.1.mlp.experts.0.gate_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.1.mlp.experts.0.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.experts.1.down_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.1.mlp.experts.1.gate_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.1.mlp.experts.1.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.experts.2.down_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.1.mlp.experts.2.gate_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.1.mlp.experts.2.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.experts.3.down_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.1.mlp.experts.3.gate_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.1.mlp.experts.3.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.experts.4.down_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.1.mlp.experts.4.gate_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.1.mlp.experts.4.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.experts.5.down_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.1.mlp.experts.5.gate_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.1.mlp.experts.5.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.experts.6.down_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.1.mlp.experts.6.gate_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.1.mlp.experts.6.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.experts.7.down_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.1.mlp.experts.7.gate_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.1.mlp.experts.7.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.shared_experts.down_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.1.mlp.shared_experts.gate_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.1.mlp.shared_experts.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.self_attn.kv_a_proj_with_mqa": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.1.self_attn.kv_b_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.1.self_attn.o_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.self_attn.q_a_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.1.self_attn.q_b_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.mlp.experts.0.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.experts.0.gate_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.2.mlp.experts.0.up_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.mlp.experts.1.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.experts.1.gate_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.2.mlp.experts.1.up_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.mlp.experts.2.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.experts.2.gate_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.2.mlp.experts.2.up_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.mlp.experts.3.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.experts.3.gate_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.2.mlp.experts.3.up_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.mlp.experts.4.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.experts.4.gate_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.2.mlp.experts.4.up_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.mlp.experts.5.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.experts.5.gate_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.2.mlp.experts.5.up_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.mlp.experts.6.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.experts.6.gate_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.2.mlp.experts.6.up_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.mlp.experts.7.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.experts.7.gate_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.2.mlp.experts.7.up_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.mlp.shared_experts.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.shared_experts.gate_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.2.mlp.shared_experts.up_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.self_attn.indexer.weights_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.self_attn.indexer.wk": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.2.self_attn.indexer.wq_b": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.self_attn.kv_a_proj_with_mqa": { + "quant_algo": "FP8" + }, + "model.layers.2.self_attn.kv_b_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.2.self_attn.o_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.self_attn.q_a_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.self_attn.q_b_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.3.mlp.experts.0.down_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.3.mlp.experts.0.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.experts.0.up_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.3.mlp.experts.1.down_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.3.mlp.experts.1.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.experts.1.up_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.3.mlp.experts.2.down_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.3.mlp.experts.2.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.experts.2.up_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.3.mlp.experts.3.down_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.3.mlp.experts.3.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.experts.3.up_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.3.mlp.experts.4.down_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.3.mlp.experts.4.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.experts.4.up_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.3.mlp.experts.5.down_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.3.mlp.experts.5.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.experts.5.up_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.3.mlp.experts.6.down_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.3.mlp.experts.6.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.experts.6.up_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.3.mlp.experts.7.down_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.3.mlp.experts.7.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.experts.7.up_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.3.mlp.shared_experts.down_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.3.mlp.shared_experts.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.shared_experts.up_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.3.self_attn.kv_a_proj_with_mqa": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.3.self_attn.kv_b_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.self_attn.o_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.3.self_attn.q_a_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.3.self_attn.q_b_proj": { + "quant_algo": "FP8" + } + } + }, + "reader_evidence": { + "decode_plan_sha256": "de7e9aa33267002a2ab5284d6438d4e3dff7617b953904356ff486590972f79f", + "gate_header_barrier": false, + "source_files": { + "engines/tools/affine_surface.py": "37e7074797d53ae836e0af12fdbd2dc36c88778098aa44c72c1cd936d2b4c053", + "engines/tools/microscale_surface.py": "588923f0a4700436221923c794a8c112971d9f08e75c746742b0f0ede7921682", + "engines/tools/nvfp4_surface.py": "044b6fd2ee22d58512476e96060f7fa09030212a33736da1393c0103eb73e0c8", + "engines/tools/quant_stream.py": "7c6cc4cbe399d066eaff80ccf1e3d3190185f194644f738a404d3c537ad8e1ab" + } + }, + "reference": "compressed-tensors@0.18.0; DeepSeek-V4-Flash@60d8d70770c6776ff598c94bb586a859a38244f1/inference/kernel.py; nvidia/Qwen3.8-Flash-Next-NVFP4@fc694b54fb0174e0913e6adf86691ef85a4ead47/config.json+headers", + "scientific_disclosure": "Stored-weight reconstruction only; no native quantized GEMM, activation arithmetic, or quantizer optimization quality claim.", + "scope": "weights_reconstructed" + }, + "disclosures": [ + { + "affects_comparability": false, + "code": "native_head_replay", + "detail": "HEAD-1d: each side replayed through its own sealed head (reference 2364995d4009, candidate 2364995d4009); head error is inside the measurement, as under HEAD-2, and nothing is substituted. The heads are content-identical.", + "severity": "info" + }, + { + "affects_comparability": true, + "code": "weights_reconstructed", + "detail": "candidate was captured from a WEIGHTS-ONLY RECONSTRUCTION (microfloat-weight-reconstruction, output bfloat16). The stored weights were decoded before the model forward; native quantized GEMM and serving activation arithmetic are not measured. Decoder provenance is in the sealed runtime receipt. The comparison is advisory.", + "severity": "caveat" + } + ], + "head_application": "native_head", + "kld_nats": 0.0005261778079916031, + "measurement_scope": { + "contexts": 4, + "covers_full_panel": true, + "position_filter": "all", + "positions_per_context": 63, + "scored_positions": 252, + "subset_detail": null + }, + "name": "modelopt-mixed", + "scope": { + "activation_quantization": null, + "assignments": [ + { + "bits_per_weight": 8, + "format": "modelopt-fp8-block", + "layer_range": "0,3", + "note": "2 tensors: model.layers.N.self_attn.o_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "attn.o", + "treatment": "quantized" + }, + { + "bits_per_weight": 8, + "format": "modelopt-fp8-tensor", + "layer_range": "1", + "note": "1 tensors: model.layers.N.self_attn.o_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "attn.o", + "treatment": "quantized" + }, + { + "bits_per_weight": 4, + "format": "modelopt-nvfp4", + "layer_range": "2", + "note": "1 tensors: model.layers.N.self_attn.o_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "attn.o", + "treatment": "quantized" + }, + { + "bits_per_weight": null, + "format": "mixed", + "layer_range": "0-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 12 x native:bf16@16 (model.layers.N.self_attn.indexer.k_norm.bias, model.layers.N.self_attn.indexer.k_norm.weight, model.layers.N.self_attn.kv_a_layernorm.weight); 2 x quantized:modelopt-fp8-block@8 (model.layers.N.self_attn.indexer.wk.weight, model.layers.N.self_attn.indexer.wq_b.weight); 2 x quantized:modelopt-fp8-tensor@8 (model.layers.N.self_attn.indexer.weights_proj.weight, model.layers.N.self_attn.indexer.wk.weight); 2 x quantized:modelopt-nvfp4@4 (model.layers.N.self_attn.indexer.weights_proj.weight, model.layers.N.self_attn.indexer.wq_b.weight). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "attn.other", + "treatment": "quantized" + }, + { + "bits_per_weight": null, + "format": "mixed", + "layer_range": "0-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 4 x quantized:modelopt-fp8-block@8 (model.layers.N.self_attn.kv_a_proj_with_mqa.weight, model.layers.N.self_attn.kv_b_proj.weight, model.layers.N.self_attn.q_a_proj.weight); 6 x quantized:modelopt-fp8-tensor@8 (model.layers.N.self_attn.kv_a_proj_with_mqa.weight, model.layers.N.self_attn.kv_b_proj.weight, model.layers.N.self_attn.q_a_proj.weight); 6 x quantized:modelopt-nvfp4@4 (model.layers.N.self_attn.kv_a_proj_with_mqa.weight, model.layers.N.self_attn.kv_b_proj.weight, model.layers.N.self_attn.q_a_proj.weight). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "attn.qkv", + "treatment": "quantized" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": "all", + "note": "1 tensors: model.embed_tokens.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "embed_tokens", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": "all", + "note": "1 tensors: lm_head.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "lm_head", + "treatment": "native" + }, + { + "bits_per_weight": 4, + "format": "modelopt-nvfp4", + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.down_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "mlp.down", + "treatment": "quantized" + }, + { + "bits_per_weight": 8, + "format": "modelopt-fp8-tensor", + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.gate_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "mlp.gate", + "treatment": "quantized" + }, + { + "bits_per_weight": 8, + "format": "modelopt-fp8-block", + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "mlp.up", + "treatment": "quantized" + }, + { + "bits_per_weight": null, + "format": "mixed", + "layer_range": "1-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 24 x quantized:modelopt-fp8-block@8 (model.layers.N.mlp.experts.E.down_proj.weight, model.layers.N.mlp.experts.E.gate_proj.weight, model.layers.N.mlp.experts.E.up_proj.weight); 24 x quantized:modelopt-fp8-tensor@8 (model.layers.N.mlp.experts.E.down_proj.weight, model.layers.N.mlp.experts.E.gate_proj.weight, model.layers.N.mlp.experts.E.up_proj.weight); 24 x quantized:modelopt-nvfp4@4 (model.layers.N.mlp.experts.E.down_proj.weight, model.layers.N.mlp.experts.E.gate_proj.weight, model.layers.N.mlp.experts.E.up_proj.weight). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "moe.experts", + "treatment": "quantized" + }, + { + "bits_per_weight": null, + "format": "mixed", + "layer_range": "1-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 3 x native:bf16@16 (model.layers.N.mlp.gate.weight); 3 x native:fp32@32 (model.layers.N.mlp.gate.e_score_correction_bias). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "moe.router", + "treatment": "native" + }, + { + "bits_per_weight": null, + "format": "mixed", + "layer_range": "1-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 3 x quantized:modelopt-fp8-block@8 (model.layers.N.mlp.shared_experts.down_proj.weight, model.layers.N.mlp.shared_experts.gate_proj.weight, model.layers.N.mlp.shared_experts.up_proj.weight); 3 x quantized:modelopt-fp8-tensor@8 (model.layers.N.mlp.shared_experts.down_proj.weight, model.layers.N.mlp.shared_experts.gate_proj.weight, model.layers.N.mlp.shared_experts.up_proj.weight); 3 x quantized:modelopt-nvfp4@4 (model.layers.N.mlp.shared_experts.down_proj.weight, model.layers.N.mlp.shared_experts.gate_proj.weight, model.layers.N.mlp.shared_experts.up_proj.weight). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "moe.shared_expert", + "treatment": "quantized" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": "all", + "note": "9 tensors: model.layers.N.input_layernorm.weight, model.layers.N.post_attention_layernorm.weight, model.norm.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "norm", + "treatment": "native" + } + ], + "head_policy": "native", + "kv_cache_dtype": "bf16", + "mtp_included": false, + "policy": "mixed" + }, + "source_checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e" + } +] diff --git a/raw/candidates/ct-mxfp4/evidence/candidate/README.md b/raw/candidates/ct-mxfp4/evidence/candidate/README.md new file mode 100644 index 0000000000000000000000000000000000000000..b52bda0af470c0fa26e5143ed91c692026d62a4b --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/candidate/README.md @@ -0,0 +1,95 @@ +--- +license: mit +tags: +- fidelity +- kl-divergence +- fidelity-provenance +- fidelity-dataset +- fidelity-quant +x_fidelity: + spec: https://github.com/malaiwah/quant-fidelity-suite/blob/main/docs/FIDELITY-DATASET-SPEC.md + spec_version: fidelity-provenance/v1 + role: fidelity-dataset + captured_model: + repository: /tmp/qfs-quant-microfloat-release/stage-main/ct-mxfp4 + revision: null + role: quant + form: hidden + lane: other + panel: + panel_id: panel--panel + suite_token_hash_sha256: 525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36 + contexts: 4 + scored_positions: 252 + repository: null + revision: null + head: + policy: native + quantized: false + bits: 16 + lm_head_tensor_content_sha256: 2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510 + lm_head_file_sha256: 07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913 + final_norm_tensor_content_sha256: null + final_norm_file_sha256: null + equality_receipt: null + replay_permitted: true + scope_digest: attn.o=quantized:ct-mxfp4@4|attn.other=quantized:mixed|attn.qkv=quantized:mixed|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=quantized:ct-mxfp4@4|mlp.gate=quantized:ct-mxfp4@4|mlp.up=quantized:ct-mxfp4@4|moe.experts=quantized:ct-mxfp4@4|moe.router=native:mixed|moe.shared_expert=quantized:ct-mxfp4@4|norm=native:bf16@16|head=native|kv=bf16 + seal: + manifest: fidelity-dataset.json + dataset_sha256: null + checksums: checksums.txt + checksums_sha256: '0000000000000000000000000000000000000000000000000000000000000000' + note: 'written before the seal: dataset_sha256 and checksums_sha256 are digests of the tree this file + is inside, so they cannot appear in it. Read them from fidelity-dataset.json.' + interop: + compatible_with: + - kimi-k3-distribution-fidelity/1 + k3_compat_emitted: false + registry: + dataset: malaiwah/quant-fidelity-registry + schema_version: quant-fidelity-registry/v1 + artifact_id: null + measurement_ids: [] + snapshot: null + fidelity_dataset: + repository: null + revision: null + dataset_sha256: null + capture_content_digest: 95413ca78defc45614f623378c6cbebd919f1c429546e0c92997030a812f2876 + form: hidden + role: quant + measurements: [] +--- +# Local quant integration candidate + +A **quant** fidelity dataset in **hidden form**, produced by `engines/tools/hf_capture.py` from `/tmp/qfs-quant-microfloat-release/stage-main/ct-mxfp4`. + +## The cut + +the final hidden state handed to lm_head -- after the text model's final norm and immediately before the head matmul -- captured as the head module's input via torch.nn.Module.register_forward_pre_hook; replay applies the head ONLY (no final norm at replay time: the capture already sits after it). Same cut as engines/tools/hidden_replay.py and as Festr's kimi-k3 hidden-replay qualification. + +## What is here + +| | | +|---|---| +| records | 4 | +| scored positions | 252 | +| context length | 64 | +| hidden width | 64 | +| vocab size | 260 | +| capture bytes (hidden form) | 33348 | +| the same capture in logit form would be | 262080 bytes (8x) | +| scope policy | mixed | +| lane | other | + +## Does the model still generate sensibly + +`The capital of France is` -> `�` (p=0.0068, entropy 5.548 of a possible 5.561 nats). Recorded, not enforced. One extra window through the same schedule; its hidden state was discarded and is not part of this dataset. + +## How to check it + +``` +bin/fidelity-dataset verify +``` + +Full specification: diff --git a/raw/candidates/ct-mxfp4/evidence/candidate/capture/hidden_0000.safetensors b/raw/candidates/ct-mxfp4/evidence/candidate/capture/hidden_0000.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..6b26410eb3c8f52a5449c85f47ae0a55888365b0 --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/candidate/capture/hidden_0000.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0d1f5e1f4c7b7306fe5734fc8327b15888b0783aba848e04ae760404c5037960 +size 8337 diff --git a/raw/candidates/ct-mxfp4/evidence/candidate/capture/hidden_0001.safetensors b/raw/candidates/ct-mxfp4/evidence/candidate/capture/hidden_0001.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..fb7a95b93350afdcb7277abc4c78c33f7d395fe3 --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/candidate/capture/hidden_0001.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a5749a836a7ed4349e649e7c9a0a641f990f1aee64b762540dd3af6977aa56ee +size 8337 diff --git a/raw/candidates/ct-mxfp4/evidence/candidate/capture/hidden_0002.safetensors b/raw/candidates/ct-mxfp4/evidence/candidate/capture/hidden_0002.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..2221c5ea46b9247c689612b826795db72096b203 --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/candidate/capture/hidden_0002.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f0a719e3c2aa47a15bea2c00572b37fe09a9877384a4b388c1ace9666496e4db +size 8337 diff --git a/raw/candidates/ct-mxfp4/evidence/candidate/capture/hidden_0003.safetensors b/raw/candidates/ct-mxfp4/evidence/candidate/capture/hidden_0003.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..5b6d369fcee50dc1d7ce74124171cb30086c9814 --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/candidate/capture/hidden_0003.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fb02c95788a64ef2cc00523c399efb7b62586bd286e74af0df9b9c8426536149 +size 8337 diff --git a/raw/candidates/ct-mxfp4/evidence/candidate/capture/manifest.json b/raw/candidates/ct-mxfp4/evidence/candidate/capture/manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..ed669d6eca98a31e94b32485b4bbbe3f7ad852cf --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/candidate/capture/manifest.json @@ -0,0 +1,159 @@ +{ + "capture_content_digest": "95413ca78defc45614f623378c6cbebd919f1c429546e0c92997030a812f2876", + "context_length": 64, + "coverage": { + "complete": true, + "declared_records": 4, + "index_range": [ + 0, + 3 + ], + "missing_indices_sample": [], + "present_records": 4, + "shard_of": null, + "subset_detail": null + }, + "created_utc": "2026-09-07T16:52:52Z", + "dtype": "BF16", + "dtype_lossless": true, + "form": "hidden", + "format_version": 1, + "hidden_width": 64, + "receipt_sha256": "d7ade9a3dec0af4823385c1146a6196d4fa4fc53496780601c74407ff8ca3c5a", + "records": [ + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 0, + "document_id": "embedded-synthetic/garden.txt", + "domain": "garden", + "dtype": "BF16", + "elapsed_seconds": 0.038, + "file": "hidden_0000.safetensors", + "index": 0, + "key": "hidden_states", + "payload_sha256": "a8eb741d7fd134901c2dc959779109fc4c8abbf00bfba61fcb0ca1d66ae93dee", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "0d1f5e1f4c7b7306fe5734fc8327b15888b0783aba848e04ae760404c5037960", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "a8eb741d7fd134901c2dc959779109fc4c8abbf00bfba61fcb0ca1d66ae93dee", + "token_ids_json_sha256": "08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315", + "token_ids_sha256_legacy": "9d5378f0316be57e37f80d2bae7895ba4a1140c302c87ff8cce2fbd9afc83b77", + "window_id": "final-0000", + "window_index": 0 + }, + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 1, + "document_id": "embedded-synthetic/arithmetic.txt", + "domain": "arithmetic", + "dtype": "BF16", + "elapsed_seconds": 0.031, + "file": "hidden_0001.safetensors", + "index": 1, + "key": "hidden_states", + "payload_sha256": "8e3dfc446f7a189a020abc054ac5f400281a6995ee4020eacbc735ca9960faff", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "a5749a836a7ed4349e649e7c9a0a641f990f1aee64b762540dd3af6977aa56ee", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "8e3dfc446f7a189a020abc054ac5f400281a6995ee4020eacbc735ca9960faff", + "token_ids_json_sha256": "5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46", + "token_ids_sha256_legacy": "e0f95114b71a46cb489539dc38909fb67fb378f25fafbb513e32690cc7f11b37", + "window_id": "final-0001", + "window_index": 1 + }, + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 2, + "document_id": "embedded-synthetic/code.txt", + "domain": "code", + "dtype": "BF16", + "elapsed_seconds": 0.03, + "file": "hidden_0002.safetensors", + "index": 2, + "key": "hidden_states", + "payload_sha256": "039ee5458e561911aa87d5f9848afbf0cbe81f7a30055e63c4dbc9bd4bb93508", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "f0a719e3c2aa47a15bea2c00572b37fe09a9877384a4b388c1ace9666496e4db", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "039ee5458e561911aa87d5f9848afbf0cbe81f7a30055e63c4dbc9bd4bb93508", + "token_ids_json_sha256": "51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07", + "token_ids_sha256_legacy": "482b890c7b0e2f7400257c43680093b7f2b90d6df5361c6de3ae97ddfdd2504e", + "window_id": "final-0002", + "window_index": 2 + }, + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 3, + "document_id": "embedded-synthetic/instructions.txt", + "domain": "instructions", + "dtype": "BF16", + "elapsed_seconds": 0.031, + "file": "hidden_0003.safetensors", + "index": 3, + "key": "hidden_states", + "payload_sha256": "bc3708dc8fcdd573a450ff6deac4a699b7c03c18a3c5f807a10da328c0704450", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "fb02c95788a64ef2cc00523c399efb7b62586bd286e74af0df9b9c8426536149", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "bc3708dc8fcdd573a450ff6deac4a699b7c03c18a3c5f807a10da328c0704450", + "token_ids_json_sha256": "8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d", + "token_ids_sha256_legacy": "12e01edd3900ff2ca82621feb5504f24b003a53c0afe98a9ee0b490eb93141d4", + "window_id": "final-0003", + "window_index": 3 + } + ], + "run_name": "hf-capture", + "runtime_manifest": "../runtime/capture-runtime.json", + "runtime_manifest_sha256": "6838263dda3c253365372dece3f23a449687b4cf1a2175b54d9f264da3e16748", + "schema": "malaiwah.fidelity-capture-manifest.v1", + "scored_rows_per_context": 63, + "semantic_point": "after_final_rmsnorm_before_lm_head", + "tensor_key": "hidden_states", + "total_scored_rows": 252, + "total_size_bytes": 33348, + "vocab_size": 260 +} diff --git a/raw/candidates/ct-mxfp4/evidence/candidate/checksums.txt b/raw/candidates/ct-mxfp4/evidence/candidate/checksums.txt new file mode 100644 index 0000000000000000000000000000000000000000..deb3e53238d801b0f5392ddb524c4c09bc5c2c44 --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/candidate/checksums.txt @@ -0,0 +1,20 @@ +9456750e9e6193900df9bd4361ce92e6f7539b62255a120bbe9e3afdbc4880e9 README.md +0d1f5e1f4c7b7306fe5734fc8327b15888b0783aba848e04ae760404c5037960 capture/hidden_0000.safetensors +a5749a836a7ed4349e649e7c9a0a641f990f1aee64b762540dd3af6977aa56ee capture/hidden_0001.safetensors +f0a719e3c2aa47a15bea2c00572b37fe09a9877384a4b388c1ace9666496e4db capture/hidden_0002.safetensors +fb02c95788a64ef2cc00523c399efb7b62586bd286e74af0df9b9c8426536149 capture/hidden_0003.safetensors +78ea9d1cadee7df930e55fa9dbac6a6cd8fa457cffcaa7d1ac7aab166d72ff1f capture/manifest.json +777b038f747bed25d1f5db8adbfd2a78c7762fb5c870ff8c3c785a984d48a168 head/head.json +07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913 head/weight.safetensors +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0000.npy +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0001.npy +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0002.npy +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0003.npy +b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263 panel/panel-receipt.json +68efa258ea3c5d4ba759c3c15aadd6e8c984711831bea3f335903109345cdcef panel/panel.json +08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315 panel/tokens/context-0000.json +5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46 panel/tokens/context-0001.json +51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07 panel/tokens/context-0002.json +8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d panel/tokens/context-0003.json +6838263dda3c253365372dece3f23a449687b4cf1a2175b54d9f264da3e16748 runtime/capture-runtime.json +d3024ee8845d123018358b9c98a844bcdc3c985fbbc92d9e1b8565b121fe8a45 validation/structural-validation.json diff --git a/raw/candidates/ct-mxfp4/evidence/candidate/fidelity-dataset.json b/raw/candidates/ct-mxfp4/evidence/candidate/fidelity-dataset.json new file mode 100644 index 0000000000000000000000000000000000000000..5655b513a6458dfe458c9ed64a9776902aa792e7 --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/candidate/fidelity-dataset.json @@ -0,0 +1,422 @@ +{ + "capture": { + "capture_content_digest": "95413ca78defc45614f623378c6cbebd919f1c429546e0c92997030a812f2876", + "dtype": "BF16", + "dtype_lossless": true, + "form": "hidden", + "head_not_separable_reason": null, + "head_separable": true, + "hidden_width": 64, + "lossy_codec": null, + "manifest_file": "capture/manifest.json", + "manifest_file_sha256": "78ea9d1cadee7df930e55fa9dbac6a6cd8fa457cffcaa7d1ac7aab166d72ff1f", + "records_count": 4, + "scored_rows_total": 252, + "semantic_point": "after_final_rmsnorm_before_lm_head", + "tensor_key": "hidden_states", + "total_size_bytes": 33348, + "vocab_size": 260 + }, + "coverage": { + "complete": true, + "declared_records": 4, + "index_range": [ + 0, + 3 + ], + "missing_indices_sample": [], + "present_records": 4, + "shard_of": null, + "subset_detail": null + }, + "created_utc": "2026-09-07T16:52:52Z", + "dataset": { + "author": { + "handle": null, + "is_registry_maintainer": false, + "name": "malaiwah", + "role": "capture-author", + "url": null + }, + "base_capture": null, + "id": "fidelity--quant-integration.candidate", + "license": "mit", + "name": "Local quant integration candidate", + "qualification": null, + "repository": null, + "revision": null, + "role": "quant", + "structural_status": "sealed" + }, + "dataset_sha256": "7bbd1d3e4f4d78f1a154187e48b138acfbb557c5e9d740e686036101501dc761", + "determinism": { + "cold_start_per_run": true, + "distinct_evidence_hash_count": 1, + "evidence_hashes": [ + "95413ca78defc45614f623378c6cbebd919f1c429546e0c92997030a812f2876" + ], + "evidence_kind": "hidden_state_tensor_sha256", + "identical_across_runs": null, + "note": "a single cold capture; cross-run determinism is NOT asserted here. Capture a second cold run and run `fidelity-dataset compare --self-compare` -- an exactly 0.0 result is the SC-1 reproduction confirmation.", + "repeat_noise": null, + "repeats": [], + "run_count": 1 + }, + "disclosures": [ + { + "affects_comparability": false, + "code": "rtn_format_fixture", + "detail": "Local RTN-format fixture; optimizer-not-run; no model-quality or serving-kernel equivalence claim.", + "severity": "info" + }, + { + "affects_comparability": false, + "code": "reduced_run_count", + "detail": "this dataset is ONE cold capture (run_count 1, the DET-D4 floor is 5). Cross-run determinism is not asserted by the dataset; it is established by a second cold capture plus `fidelity-dataset compare --self-compare`, whose exactly-0.0 result is the SC-1 reproduction confirmation.", + "severity": "caveat" + } + ], + "format_version": 1, + "generation_sanity_probe": { + "degenerate": false, + "enforced": false, + "entropy_nats": 5.548143460498403, + "expect": null, + "logit_spread": 0.984375, + "note": "one extra window through the same schedule; its hidden state is discarded and never enters the dataset.", + "prompt": "The capital of France is", + "schema": "malaiwah.generation-sanity-probe.v1", + "status": "recorded", + "top1_id": 113, + "top1_probability": 0.00677271665330186, + "top1_text": "�", + "top_k": [ + { + "id": 113, + "probability": 0.00677271665330186, + "text": "�" + }, + { + "id": 237, + "probability": 0.006263738959055852, + "text": "�" + }, + { + "id": 193, + "probability": 0.005895742083529586, + "text": "\u0001" + }, + { + "id": 236, + "probability": 0.0057143491692576796, + "text": "�" + }, + { + "id": 240, + "probability": 0.005399680497105314, + "text": "�" + } + ], + "uniform_entropy_nats": 5.560681631015528, + "vocab_size": 260 + }, + "head": { + "applied_in_capture": false, + "bias": null, + "bits": 16, + "compat_tensor_key": "weight", + "dtype": "BF16", + "equality_receipt": null, + "file": "head/weight.safetensors", + "file_sha256": "07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913", + "final_norm": { + "applied_at_replay": false, + "applied_in_capture": true, + "dtype": null, + "file": null, + "file_sha256": null, + "shape": null, + "tensor_content_sha256": null, + "tensor_key": null + }, + "head_json": "head/head.json", + "present": true, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "shape": [ + 260, + 64 + ], + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "tensor_key": "lm_head.weight" + }, + "interop": { + "adapted_from": null, + "compatible_with": [ + "kimi-k3-distribution-fidelity/1" + ], + "divergences": [ + { + "field": "head", + "id": "D-1", + "reason": "every capture declares its OWN head identity by tensor content digest; the comparator refuses a hidden-form comparison across differing heads." + }, + { + "field": "runtime.lane", + "id": "D-2", + "reason": "lane is required and gated at compare time so registry BIAS-006 is checked before a number exists, not at submission." + }, + { + "field": "panel.scoring_window", + "id": "D-3", + "reason": "scoring_window is part of panel identity, not a comparator flag: a score_from=1024 number is a different panel, not a variant." + }, + { + "field": "comparison_kind", + "id": "D-4", + "reason": "self-compare is a first-class mode asserting exactly 0.0." + }, + { + "field": "estimator.accumulation_dtype", + "id": "D-5", + "reason": "required, fp64 default; an fp32 estimator lands in a different comparability class on the same data and that must be visible." + }, + { + "field": "coverage", + "id": "D-6", + "reason": "declared vs present record counts with shard_of; fixes our own manifest that claimed 5,120 captures in a 512-file repository." + }, + { + "field": "panel", + "id": "D-7", + "reason": "the panel is a separately referenceable object, which is what makes a candidate capture publishable standalone." + }, + { + "field": "capture.lossy_codec", + "id": "D-8", + "reason": "lets a llama.cpp .kld be ingested without laundering a lossy capture as exact." + }, + { + "field": "capture.records[].attention_mask_sha256", + "id": "D-9", + "reason": "our packed and streaming lanes vary mask construction; a single-request capture path makes it invariant and has no equivalent field." + }, + { + "field": "capture.head_separable", + "id": "D-10", + "reason": "hidden form is the default; logit form must declare head_separable:false with a reason." + } + ], + "k3_compat_emitted": false, + "note": null + }, + "panel": { + "contamination": { + "checked": false, + "hits": null, + "method": "not established", + "receipt": null + }, + "context_length": 64, + "contexts": 4, + "panel_file": "panel/panel.json", + "panel_file_sha256": "68efa258ea3c5d4ba759c3c15aadd6e8c984711831bea3f335903109345cdcef", + "panel_id": "panel--panel", + "panel_receipt_file": "panel/panel-receipt.json", + "panel_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "panel_token_sha256_legacy": "3c9467c85be43d238926f6d18bf825c2e4748814c95b8b0e8b8f1420546c3089", + "remap_file": null, + "repository": null, + "revision": null, + "scored_positions_total": 252, + "scoring_window": { + "dropped_positions_total": 0, + "min_left_context_tokens": 1, + "policy": "every causal prediction position of every window is scored; nothing is dropped", + "score_from": 0, + "windowed": false + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } + }, + "runtime": { + "backend_identity_sha256": null, + "file": "runtime/capture-runtime.json", + "file_sha256": "6838263dda3c253365372dece3f23a449687b4cf1a2175b54d9f264da3e16748", + "lane": "other", + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "lane_inferred": false, + "runtime_reader_sha256": null, + "source": "native", + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd" + }, + "schema": "malaiwah.fidelity-dataset.v1", + "scope": { + "assignments": [ + { + "bits_per_weight": 4, + "format": "ct-mxfp4", + "layer_range": "all", + "note": "4 tensors: model.layers.N.self_attn.o_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "attn.o", + "treatment": "quantized" + }, + { + "bits_per_weight": null, + "format": "mixed", + "layer_range": "0-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 12 x native:bf16@16 (model.layers.N.self_attn.indexer.k_norm.bias, model.layers.N.self_attn.indexer.k_norm.weight, model.layers.N.self_attn.kv_a_layernorm.weight); 6 x quantized:ct-mxfp4@4 (model.layers.N.self_attn.indexer.weights_proj.weight, model.layers.N.self_attn.indexer.wk.weight, model.layers.N.self_attn.indexer.wq_b.weight). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "attn.other", + "treatment": "quantized" + }, + { + "bits_per_weight": null, + "format": "mixed", + "layer_range": "0-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 4 x native:bf16@16 (model.layers.N.self_attn.kv_b_proj.weight); 12 x quantized:ct-mxfp4@4 (model.layers.N.self_attn.kv_a_proj_with_mqa.weight, model.layers.N.self_attn.q_a_proj.weight, model.layers.N.self_attn.q_b_proj.weight). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "attn.qkv", + "treatment": "quantized" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": "all", + "note": "1 tensors: model.embed_tokens.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "embed_tokens", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": "all", + "note": "1 tensors: lm_head.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "lm_head", + "treatment": "native" + }, + { + "bits_per_weight": 4, + "format": "ct-mxfp4", + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.down_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "mlp.down", + "treatment": "quantized" + }, + { + "bits_per_weight": 4, + "format": "ct-mxfp4", + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.gate_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "mlp.gate", + "treatment": "quantized" + }, + { + "bits_per_weight": 4, + "format": "ct-mxfp4", + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "mlp.up", + "treatment": "quantized" + }, + { + "bits_per_weight": 4, + "format": "ct-mxfp4", + "layer_range": "all", + "note": "72 tensors: model.layers.N.mlp.experts.E.down_proj.weight, model.layers.N.mlp.experts.E.gate_proj.weight, model.layers.N.mlp.experts.E.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "moe.experts", + "treatment": "quantized" + }, + { + "bits_per_weight": null, + "format": "mixed", + "layer_range": "1-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 3 x native:bf16@16 (model.layers.N.mlp.gate.weight); 3 x native:fp32@32 (model.layers.N.mlp.gate.e_score_correction_bias). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "moe.router", + "treatment": "native" + }, + { + "bits_per_weight": 4, + "format": "ct-mxfp4", + "layer_range": "all", + "note": "9 tensors: model.layers.N.mlp.shared_experts.down_proj.weight, model.layers.N.mlp.shared_experts.gate_proj.weight, model.layers.N.mlp.shared_experts.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "moe.shared_expert", + "treatment": "quantized" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": "all", + "note": "9 tensors: model.layers.N.input_layernorm.weight, model.layers.N.post_attention_layernorm.weight, model.norm.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "norm", + "treatment": "native" + } + ], + "head_policy": "native", + "kv_cache_dtype": "bf16", + "policy": "mixed", + "scope_digest": "attn.o=quantized:ct-mxfp4@4|attn.other=quantized:mixed|attn.qkv=quantized:mixed|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=quantized:ct-mxfp4@4|mlp.gate=quantized:ct-mxfp4@4|mlp.up=quantized:ct-mxfp4@4|moe.experts=quantized:ct-mxfp4@4|moe.router=native:mixed|moe.shared_expert=quantized:ct-mxfp4@4|norm=native:bf16@16|head=native|kv=bf16" + }, + "seal": { + "checksums_file": "checksums.txt", + "checksums_format": "sha256sum", + "checksums_sha256": "838cf94a88ea50cab58a834076243558521828afa3df5f46fc20ef18c9d3c5e9", + "covers": [ + "every published file except checksums.txt and fidelity-dataset.json, via checksums.txt", + "fidelity-dataset.json itself, via the self-blanked seal", + "every capture tensor a second time by CONTENT, via capture.capture_content_digest" + ], + "excludes": [ + "checksums.txt", + "fidelity-dataset.json" + ], + "external_anchor": null, + "method": "self_blanked_canonical_json_sha256", + "seal_field": "dataset_sha256" + }, + "upstream_receipts": [], + "weights": { + "artifact_ref": null, + "checkpoint_identity_sha256": "aa51ae526ba79294a678ada6189d0418fa78f1d5e51091e5d10696c56d3470ed", + "codec": "mxfp4", + "config_sha256": "c6cc76ca973555cae99d0c42da0a9385bf1ac67c67f4748cac0b4c0778ff5d90", + "declared_bits": 4.0, + "declared_head_bits": 16, + "index_sha256": null, + "model_ref": null, + "model_revision": null, + "quantized": true, + "repository": "/tmp/qfs-quant-microfloat-release/stage-main/ct-mxfp4", + "revision": null + } +} diff --git a/raw/candidates/ct-mxfp4/evidence/candidate/head/head.json b/raw/candidates/ct-mxfp4/evidence/candidate/head/head.json new file mode 100644 index 0000000000000000000000000000000000000000..cfb1d748d203487673352f1ad645cb98a49c4002 --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/candidate/head/head.json @@ -0,0 +1,34 @@ +{ + "applied_in_capture": false, + "bias": null, + "bits": 16, + "compat_tensor_key": "weight", + "dtype": "BF16", + "equality_receipt": null, + "file": "head/weight.safetensors", + "file_sha256": "07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913", + "final_norm": { + "applied_at_replay": false, + "applied_in_capture": true, + "dtype": null, + "file": null, + "file_sha256": null, + "shape": null, + "tensor_content_sha256": null, + "tensor_key": null + }, + "format_version": 1, + "note": "the head is shipped verbatim from the checkpoint so a third party can replay logits = hidden @ head^T without the weights", + "present": true, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "receipt_sha256": "2da3cfbfc607296b3bb32eb6fec1f122e4ce30fe9ea96653e5bb1b4ebab6514f", + "schema": "malaiwah.fidelity-head-identity.v1", + "shape": [ + 260, + 64 + ], + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "tensor_key": "lm_head.weight" +} diff --git a/raw/candidates/ct-mxfp4/evidence/candidate/head/weight.safetensors b/raw/candidates/ct-mxfp4/evidence/candidate/head/weight.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..abe6e7c215a73bc88e85042067923bf943118086 --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/candidate/head/weight.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913 +size 33365 diff --git a/raw/candidates/ct-mxfp4/evidence/candidate/panel/masks/context-0000.npy b/raw/candidates/ct-mxfp4/evidence/candidate/panel/masks/context-0000.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/candidate/panel/masks/context-0000.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/ct-mxfp4/evidence/candidate/panel/masks/context-0001.npy b/raw/candidates/ct-mxfp4/evidence/candidate/panel/masks/context-0001.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/candidate/panel/masks/context-0001.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/ct-mxfp4/evidence/candidate/panel/masks/context-0002.npy b/raw/candidates/ct-mxfp4/evidence/candidate/panel/masks/context-0002.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/candidate/panel/masks/context-0002.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/ct-mxfp4/evidence/candidate/panel/masks/context-0003.npy b/raw/candidates/ct-mxfp4/evidence/candidate/panel/masks/context-0003.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/candidate/panel/masks/context-0003.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/ct-mxfp4/evidence/candidate/panel/panel-receipt.json b/raw/candidates/ct-mxfp4/evidence/candidate/panel/panel-receipt.json new file mode 100644 index 0000000000000000000000000000000000000000..fbc2ce3e8e9602a492d83ae681817e0fa02e4173 --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/candidate/panel/panel-receipt.json @@ -0,0 +1,376 @@ +{ + "corpus": { + "documents_considered": 4, + "documents_selected": 4, + "path_prefix": "embedded-synthetic/", + "repository": null, + "revision": null, + "source": "Synthetic texts embedded verbatim in this sealed receipt and builder." + }, + "created_utc": "2026-09-07T00:00:00Z", + "created_utc_policy": "Fixed artifact epoch for deterministic bytes; not an execution timestamp.", + "documents": [ + { + "bytes": 135, + "document": "garden.txt", + "document_sha256": "2aca14290cd4753c3b15d8a20aaa7a6963d2cb48d78e8538a4ce34d4665dcb94", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "garden", + "text_utf8": "The small garden has red flowers, green leaves, and a stone path. A gentle breeze moves the branches while a robin sings near the gate.", + "tokens_total": 137, + "window_id": "final-0000" + }, + { + "bytes": 144, + "document": "arithmetic.txt", + "document_sha256": "b867a2e8cbe81cc8d5781bfe6718a43e171fb5c7c138b9ed6ac86bebc24bca83", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "arithmetic", + "text_utf8": "A shelf holds three blue boxes and five red boxes. There are eight boxes in total. Move two boxes to the desk and count the six boxes remaining.", + "tokens_total": 146, + "window_id": "final-0001" + }, + { + "bytes": 162, + "document": "code.txt", + "document_sha256": "08c8f75f45899cbc9656a7a3fcdbf3092abfa7bc97fe353957b08d7e9660240b", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "code", + "text_utf8": "def add_values(left, right):\n return left + right\n\nresult = add_values(7, 9)\nprint(result)\n# This readable snippet is synthetic input, not a coding benchmark.\n", + "tokens_total": 164, + "window_id": "final-0002" + }, + { + "bytes": 140, + "document": "instructions.txt", + "document_sha256": "1dba5052b28929f94f322ad9e8c0b238bcbd653d6fae54ebaea8e5e3f6073378", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "instructions", + "text_utf8": "First place a clean cup on the table. Next pour cool water into the cup. Finally put the bottle away and write a short note about the steps.", + "tokens_total": 142, + "window_id": "final-0003" + } + ], + "environment": { + "numpy": "2.5.3", + "tokenizers": "0.23.2", + "transformers": "5.16.1" + }, + "format_builder": "engines/tools/build_token_panel.py", + "format_builder_sha256": "30eb4d4d7e465aaa8d9ef2d947a0ac7fd42ec45388f20c8b6db242c88dc2d851", + "format_version": 1, + "panel_id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "panel_name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "parameters": { + "context_length": 64, + "generation_seed": null, + "generation_seed_policy": "No RNG is used.", + "prediction_positions_per_window": 63, + "scored_positions_total": 252, + "strata": [ + "garden", + "arithmetic", + "code", + "instructions" + ], + "windows_per_stratum": 1, + "windows_total": 4 + }, + "receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "resolver_sha256": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "schema": "malaiwah.token-panel-build-receipt.v1", + "selection_rule": "Four embedded readable synthetic documents in declared order; native tokenizer with add_special_tokens=True, truncation=True, max_length=64, padding=False; each encoded window must be exactly 64 tokens; no chat template; all 63 shifted next-token positions scored; no RNG.", + "separation": { + "checked": false, + "method": "No contamination scan or benchmark selection.", + "note": "Authored synthetic CPU smoke inputs for a random-init model; not a benchmark, held-out quality claim, or registry-row submission." + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "add_special_tokens": true, + "chat_template_applied": false, + "class": "TokenizersBackend", + "files_sha256": { + "config.json": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "generation_config.json": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "tokenizer.json": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "tokenizer_config.json": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + }, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "local_files_only": true, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "trust_remote_code": false, + "vocab_size": 260 + }, + "tool": "build_panel.py", + "tool_sha256": "f17b17262816676d6ededcc969756ac07ff991eab73117040ec41005f6ff63f3" +} diff --git a/raw/candidates/ct-mxfp4/evidence/candidate/panel/panel.json b/raw/candidates/ct-mxfp4/evidence/candidate/panel/panel.json new file mode 100644 index 0000000000000000000000000000000000000000..cedb9d5e3c635860791c55451fde6dc9e37cddb9 --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/candidate/panel/panel.json @@ -0,0 +1,298 @@ +{ + "contamination": { + "checked": false, + "hits": null, + "method": "not established", + "receipt": null + }, + "context_length": 64, + "contexts": 4, + "format_version": 1, + "name": "token panel panel--panel", + "panel_id": "panel--panel", + "panel_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "panel_token_sha256_legacy": "3c9467c85be43d238926f6d18bf825c2e4748814c95b8b0e8b8f1420546c3089", + "positions_per_context": 63, + "receipt_sha256": "8a4e27a74ca6ce39569b78c3d972077ab7966f6da118110b3b08adca1e284c6f", + "records": [ + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0000.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 0, + "document_id": "embedded-synthetic/garden.txt", + "domain": "garden", + "index": 0, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0000.json", + "token_ids_first16": [ + 1, + 55, + 75, + 72, + 224, + 86, + 80, + 68, + 79, + 79, + 224, + 74, + 68, + 85, + 71, + 72 + ], + "token_ids_json_sha256": "08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315", + "token_ids_last16": [ + 224, + 68, + 81, + 71, + 224, + 68, + 224, + 86, + 87, + 82, + 81, + 72, + 224, + 83, + 68, + 2 + ], + "token_ids_sha256_legacy": "9d5378f0316be57e37f80d2bae7895ba4a1140c302c87ff8cce2fbd9afc83b77", + "window_id": "final-0000", + "window_index": 0 + }, + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0001.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 1, + "document_id": "embedded-synthetic/arithmetic.txt", + "domain": "arithmetic", + "index": 1, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0001.json", + "token_ids_first16": [ + 1, + 36, + 224, + 86, + 75, + 72, + 79, + 73, + 224, + 75, + 82, + 79, + 71, + 86, + 224, + 87 + ], + "token_ids_json_sha256": "5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46", + "token_ids_last16": [ + 72, + 86, + 17, + 224, + 55, + 75, + 72, + 85, + 72, + 224, + 68, + 85, + 72, + 224, + 72, + 2 + ], + "token_ids_sha256_legacy": "e0f95114b71a46cb489539dc38909fb67fb378f25fafbb513e32690cc7f11b37", + "window_id": "final-0001", + "window_index": 1 + }, + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0002.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 2, + "document_id": "embedded-synthetic/code.txt", + "domain": "code", + "index": 2, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0002.json", + "token_ids_first16": [ + 1, + 71, + 72, + 73, + 224, + 68, + 71, + 71, + 66, + 89, + 68, + 79, + 88, + 72, + 86, + 11 + ], + "token_ids_json_sha256": "51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07", + "token_ids_last16": [ + 85, + 76, + 74, + 75, + 87, + 202, + 202, + 85, + 72, + 86, + 88, + 79, + 87, + 224, + 32, + 2 + ], + "token_ids_sha256_legacy": "482b890c7b0e2f7400257c43680093b7f2b90d6df5361c6de3ae97ddfdd2504e", + "window_id": "final-0002", + "window_index": 2 + }, + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0003.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 3, + "document_id": "embedded-synthetic/instructions.txt", + "domain": "instructions", + "index": 3, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0003.json", + "token_ids_first16": [ + 1, + 41, + 76, + 85, + 86, + 87, + 224, + 83, + 79, + 68, + 70, + 72, + 224, + 68, + 224, + 70 + ], + "token_ids_json_sha256": "8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d", + "token_ids_last16": [ + 224, + 70, + 82, + 82, + 79, + 224, + 90, + 68, + 87, + 72, + 85, + 224, + 76, + 81, + 87, + 2 + ], + "token_ids_sha256_legacy": "12e01edd3900ff2ca82621feb5504f24b003a53c0afe98a9ee0b490eb93141d4", + "window_id": "final-0003", + "window_index": 3 + } + ], + "repository": null, + "revision": null, + "schema": "malaiwah.fidelity-panel-binding.v1", + "scored_positions_total": 252, + "scoring_window": { + "dropped_positions_total": 0, + "min_left_context_tokens": 1, + "policy": "every causal prediction position of every window is scored; nothing is dropped", + "score_from": 0, + "windowed": false + }, + "strata": {}, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "token_digest_algorithm": { + "aggregate": "sha256('\\n'.join(per_record_hex).encode('ascii'))", + "legacy_aggregate": "sha256(''.join(per_record_hex).encode('utf-8'))", + "legacy_per_record": "sha256(json.dumps(ids).encode('utf-8'))", + "per_record": "sha256(json.dumps(ids, separators=(',',':')).encode('utf-8'))" + }, + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } +} diff --git a/raw/candidates/ct-mxfp4/evidence/candidate/panel/tokens/context-0000.json b/raw/candidates/ct-mxfp4/evidence/candidate/panel/tokens/context-0000.json new file mode 100644 index 0000000000000000000000000000000000000000..c55b788f77dcb26a8c56fe6a7593353d57abb70f --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/candidate/panel/tokens/context-0000.json @@ -0,0 +1 @@ +[1,55,75,72,224,86,80,68,79,79,224,74,68,85,71,72,81,224,75,68,86,224,85,72,71,224,73,79,82,90,72,85,86,15,224,74,85,72,72,81,224,79,72,68,89,72,86,15,224,68,81,71,224,68,224,86,87,82,81,72,224,83,68,2] \ No newline at end of file diff --git a/raw/candidates/ct-mxfp4/evidence/candidate/panel/tokens/context-0001.json b/raw/candidates/ct-mxfp4/evidence/candidate/panel/tokens/context-0001.json new file mode 100644 index 0000000000000000000000000000000000000000..8304be93e5387811e155f869e175c0bfca57ca76 --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/candidate/panel/tokens/context-0001.json @@ -0,0 +1 @@ +[1,36,224,86,75,72,79,73,224,75,82,79,71,86,224,87,75,85,72,72,224,69,79,88,72,224,69,82,91,72,86,224,68,81,71,224,73,76,89,72,224,85,72,71,224,69,82,91,72,86,17,224,55,75,72,85,72,224,68,85,72,224,72,2] \ No newline at end of file diff --git a/raw/candidates/ct-mxfp4/evidence/candidate/panel/tokens/context-0002.json b/raw/candidates/ct-mxfp4/evidence/candidate/panel/tokens/context-0002.json new file mode 100644 index 0000000000000000000000000000000000000000..2a1413e634823a039c4ede6b463b549207c4c8fb --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/candidate/panel/tokens/context-0002.json @@ -0,0 +1 @@ +[1,71,72,73,224,68,71,71,66,89,68,79,88,72,86,11,79,72,73,87,15,224,85,76,74,75,87,12,29,202,224,224,224,224,85,72,87,88,85,81,224,79,72,73,87,224,14,224,85,76,74,75,87,202,202,85,72,86,88,79,87,224,32,2] \ No newline at end of file diff --git a/raw/candidates/ct-mxfp4/evidence/candidate/panel/tokens/context-0003.json b/raw/candidates/ct-mxfp4/evidence/candidate/panel/tokens/context-0003.json new file mode 100644 index 0000000000000000000000000000000000000000..7978732d7bf3bfc5fed35c837bc69d9d66371c4f --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/candidate/panel/tokens/context-0003.json @@ -0,0 +1 @@ +[1,41,76,85,86,87,224,83,79,68,70,72,224,68,224,70,79,72,68,81,224,70,88,83,224,82,81,224,87,75,72,224,87,68,69,79,72,17,224,49,72,91,87,224,83,82,88,85,224,70,82,82,79,224,90,68,87,72,85,224,76,81,87,2] \ No newline at end of file diff --git a/raw/candidates/ct-mxfp4/evidence/candidate/runtime/capture-runtime.json b/raw/candidates/ct-mxfp4/evidence/candidate/runtime/capture-runtime.json new file mode 100644 index 0000000000000000000000000000000000000000..3be8686c2858493edaaa7cf0a5d5c7a564b50ce1 --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/candidate/runtime/capture-runtime.json @@ -0,0 +1,407 @@ +{ + "capture_tool": { + "expert_fill": { + "bytes_filled": 294912, + "declined": {}, + "decoded_slices": 72, + "identity": "a byte copy into the fused parameter's slice; bin/selftest_layer_outer.py L4/L6 assert equality with from_pretrained and with the converter path", + "layers_filled": 3, + "mode": "direct", + "reference": "transformers.core_model_loading.MergeModulelist(dim=0) + Concatenate(dim=1)", + "slices_filled": 72, + "staged_slices": 0, + "staging": "pageable", + "targets_filled": 6 + }, + "file": "engines/tools/hf_capture.py", + "head_module_path": "lm_head", + "head_resolution": "lm_head", + "layer_residency": "stream", + "mechanism": "transformers forward pass, layer-outer/window-inner schedule: for each decoder layer the model's own forward is run once per window with the layers below replaying their memoised output and the layers above suspending, so each layer's weights are materialised once for the whole panel. Windows are pushed through sequentially, never batched. Forward pre-hook on model.get_output_embeddings(), fired by the model's own epilogue after the last layer", + "model_view": null, + "parallel_plan_dropped": false, + "resolved_classes": { + "config": "transformers.models.glm_moe_dsa.configuration_glm_moe_dsa.GlmMoeDsaConfig", + "model": "transformers.models.glm_moe_dsa.modeling_glm_moe_dsa.GlmMoeDsaForCausalLM" + }, + "resolved_panel_binding": { + "binding": { + "content": { + "archive": { + "algorithm": "sha256(ustar: sorted regular files; mode=0644; uid=gid=mtime=0)", + "bytes": 20480, + "compression": "none", + "format": "ustar", + "sha256": "389706dfa3335a75ec70a40d079995af1a60c05512334125dbd336790f12702f" + }, + "manifest": [ + { + "bytes": 192, + "path": "arrays/causal-mask-64.npy", + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02" + }, + { + "bytes": 384, + "path": "arrays/final-0000.tokens.npy", + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af" + }, + { + "bytes": 384, + "path": "arrays/final-0001.tokens.npy", + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea" + }, + { + "bytes": 384, + "path": "arrays/final-0002.tokens.npy", + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c" + }, + { + "bytes": 384, + "path": "arrays/final-0003.tokens.npy", + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a" + }, + { + "bytes": 4195, + "path": "panel.json", + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6" + }, + { + "bytes": 7808, + "path": "panel.receipt.json", + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263" + } + ], + "manifest_sha256": "e5f2d6410a6290da1197016c5b57ae522a3570665215ddc23e2a0bd45f912181" + }, + "panel": { + "bytes": 4195, + "context_length": 64, + "contexts": 4, + "file": "panel.json", + "id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "positions_per_context": 63, + "role": "final", + "scored_positions_total": 252, + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6", + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36" + }, + "receipt": { + "bytes": 7808, + "declared_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "file": "panel.receipt.json", + "receipt_file_sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "receipt_seal_mode": "self-blank" + }, + "schema": "malaiwah.resolved-panel.v1", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } + }, + "binding_file": "panel-binding.json", + "binding_file_sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "tokenizer_equivalences": [] + }, + "schedule": "layer-outer", + "sha256": "44afcdac9f7c9cb26a35a2b7d9c1aed562344b76c8045a753651d2f2dbae99d0", + "unexpected_tensor_allowlist": null, + "verified_code": null, + "version": "hf_capture/1", + "weights_decode": { + "activation_quantization": null, + "checkpoint_bytes_read": 125392, + "comparison_class": "advisory", + "components_consumed": 212, + "components_not_consumed": [], + "components_planned": 212, + "formats_decoded": { + "mxfp4-pack-quantized": 106 + }, + "method": "microfloat-weight-reconstruction", + "modules_decoded": 106, + "modules_not_decoded": [], + "modules_planned": 106, + "output_dtype": "bfloat16", + "quantization_config": { + "config_groups": { + "group_0": { + "format": "mxfp4-pack-quantized", + "input_activations": null, + "output_activations": null, + "targets": [ + "model.layers.0.mlp.down_proj", + "model.layers.0.mlp.gate_proj", + "model.layers.0.mlp.up_proj", + "model.layers.0.self_attn.indexer.weights_proj", + "model.layers.0.self_attn.indexer.wk", + "model.layers.0.self_attn.indexer.wq_b", + "model.layers.0.self_attn.kv_a_proj_with_mqa", + "model.layers.0.self_attn.o_proj", + "model.layers.0.self_attn.q_a_proj", + "model.layers.0.self_attn.q_b_proj", + "model.layers.1.mlp.experts.0.down_proj", + "model.layers.1.mlp.experts.0.gate_proj", + "model.layers.1.mlp.experts.0.up_proj", + "model.layers.1.mlp.experts.1.down_proj", + "model.layers.1.mlp.experts.1.gate_proj", + "model.layers.1.mlp.experts.1.up_proj", + "model.layers.1.mlp.experts.2.down_proj", + "model.layers.1.mlp.experts.2.gate_proj", + "model.layers.1.mlp.experts.2.up_proj", + "model.layers.1.mlp.experts.3.down_proj", + "model.layers.1.mlp.experts.3.gate_proj", + "model.layers.1.mlp.experts.3.up_proj", + "model.layers.1.mlp.experts.4.down_proj", + "model.layers.1.mlp.experts.4.gate_proj", + "model.layers.1.mlp.experts.4.up_proj", + "model.layers.1.mlp.experts.5.down_proj", + "model.layers.1.mlp.experts.5.gate_proj", + "model.layers.1.mlp.experts.5.up_proj", + "model.layers.1.mlp.experts.6.down_proj", + "model.layers.1.mlp.experts.6.gate_proj", + "model.layers.1.mlp.experts.6.up_proj", + "model.layers.1.mlp.experts.7.down_proj", + "model.layers.1.mlp.experts.7.gate_proj", + "model.layers.1.mlp.experts.7.up_proj", + "model.layers.1.mlp.shared_experts.down_proj", + "model.layers.1.mlp.shared_experts.gate_proj", + "model.layers.1.mlp.shared_experts.up_proj", + "model.layers.1.self_attn.kv_a_proj_with_mqa", + "model.layers.1.self_attn.o_proj", + "model.layers.1.self_attn.q_a_proj", + "model.layers.1.self_attn.q_b_proj", + "model.layers.2.mlp.experts.0.down_proj", + "model.layers.2.mlp.experts.0.gate_proj", + "model.layers.2.mlp.experts.0.up_proj", + "model.layers.2.mlp.experts.1.down_proj", + "model.layers.2.mlp.experts.1.gate_proj", + "model.layers.2.mlp.experts.1.up_proj", + "model.layers.2.mlp.experts.2.down_proj", + "model.layers.2.mlp.experts.2.gate_proj", + "model.layers.2.mlp.experts.2.up_proj", + "model.layers.2.mlp.experts.3.down_proj", + "model.layers.2.mlp.experts.3.gate_proj", + "model.layers.2.mlp.experts.3.up_proj", + "model.layers.2.mlp.experts.4.down_proj", + "model.layers.2.mlp.experts.4.gate_proj", + "model.layers.2.mlp.experts.4.up_proj", + "model.layers.2.mlp.experts.5.down_proj", + "model.layers.2.mlp.experts.5.gate_proj", + "model.layers.2.mlp.experts.5.up_proj", + "model.layers.2.mlp.experts.6.down_proj", + "model.layers.2.mlp.experts.6.gate_proj", + "model.layers.2.mlp.experts.6.up_proj", + "model.layers.2.mlp.experts.7.down_proj", + "model.layers.2.mlp.experts.7.gate_proj", + "model.layers.2.mlp.experts.7.up_proj", + "model.layers.2.mlp.shared_experts.down_proj", + "model.layers.2.mlp.shared_experts.gate_proj", + "model.layers.2.mlp.shared_experts.up_proj", + "model.layers.2.self_attn.indexer.weights_proj", + "model.layers.2.self_attn.indexer.wk", + "model.layers.2.self_attn.indexer.wq_b", + "model.layers.2.self_attn.kv_a_proj_with_mqa", + "model.layers.2.self_attn.o_proj", + "model.layers.2.self_attn.q_a_proj", + "model.layers.2.self_attn.q_b_proj", + "model.layers.3.mlp.experts.0.down_proj", + "model.layers.3.mlp.experts.0.gate_proj", + "model.layers.3.mlp.experts.0.up_proj", + "model.layers.3.mlp.experts.1.down_proj", + "model.layers.3.mlp.experts.1.gate_proj", + "model.layers.3.mlp.experts.1.up_proj", + "model.layers.3.mlp.experts.2.down_proj", + "model.layers.3.mlp.experts.2.gate_proj", + "model.layers.3.mlp.experts.2.up_proj", + "model.layers.3.mlp.experts.3.down_proj", + "model.layers.3.mlp.experts.3.gate_proj", + "model.layers.3.mlp.experts.3.up_proj", + "model.layers.3.mlp.experts.4.down_proj", + "model.layers.3.mlp.experts.4.gate_proj", + "model.layers.3.mlp.experts.4.up_proj", + "model.layers.3.mlp.experts.5.down_proj", + "model.layers.3.mlp.experts.5.gate_proj", + "model.layers.3.mlp.experts.5.up_proj", + "model.layers.3.mlp.experts.6.down_proj", + "model.layers.3.mlp.experts.6.gate_proj", + "model.layers.3.mlp.experts.6.up_proj", + "model.layers.3.mlp.experts.7.down_proj", + "model.layers.3.mlp.experts.7.gate_proj", + "model.layers.3.mlp.experts.7.up_proj", + "model.layers.3.mlp.shared_experts.down_proj", + "model.layers.3.mlp.shared_experts.gate_proj", + "model.layers.3.mlp.shared_experts.up_proj", + "model.layers.3.self_attn.kv_a_proj_with_mqa", + "model.layers.3.self_attn.o_proj", + "model.layers.3.self_attn.q_a_proj", + "model.layers.3.self_attn.q_b_proj" + ], + "weights": { + "dynamic": false, + "group_size": 32, + "num_bits": 4, + "scale_dtype": "torch.uint8", + "strategy": "group", + "symmetric": true, + "type": "float" + } + } + }, + "format": "mxfp4-pack-quantized", + "ignore": [], + "quant_method": "compressed-tensors", + "quantization_status": "compressed" + }, + "reader_evidence": { + "decode_plan_sha256": "2bb2eef8f5dea9e0662e3fce6fbb6ecf22842b18c7192484e78ea5a8850ce9fa", + "gate_header_barrier": false, + "source_files": { + "engines/tools/affine_surface.py": "37e7074797d53ae836e0af12fdbd2dc36c88778098aa44c72c1cd936d2b4c053", + "engines/tools/microscale_surface.py": "588923f0a4700436221923c794a8c112971d9f08e75c746742b0f0ede7921682", + "engines/tools/nvfp4_surface.py": "044b6fd2ee22d58512476e96060f7fa09030212a33736da1393c0103eb73e0c8", + "engines/tools/quant_stream.py": "7c6cc4cbe399d066eaff80ccf1e3d3190185f194644f738a404d3c537ad8e1ab" + } + }, + "reference": "compressed-tensors@0.18.0; DeepSeek-V4-Flash@60d8d70770c6776ff598c94bb586a859a38244f1/inference/kernel.py; nvidia/Qwen3.8-Flash-Next-NVFP4@fc694b54fb0174e0913e6adf86691ef85a4ead47/config.json+headers", + "scientific_disclosure": "Stored-weight reconstruction only; no native quantized GEMM, activation arithmetic, or quantizer optimization quality claim.", + "scope": "weights_reconstructed" + }, + "weights_license": null, + "wraps": [] + }, + "container": { + "image_digest": null, + "image_reference": null, + "image_repository_digest": null + }, + "format_version": 1, + "lane": "other", + "lane_identity_inputs": [ + "torch_version", + "cuda_runtime_version", + "device_name", + "grouped_mm_kernel", + "numeric_policy", + "attention_backend", + "experts_implementation", + "parallelism", + "ep_emulate", + "reduce_order" + ], + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "lane_inferred": false, + "receipt_sha256": "58787c21c5e9a502b5a667beb8860eab3fdc68a3cc8c1325298a432359940c96", + "resources": { + "bytes": { + "checkpoint_read": 209072, + "hidden_d2h": 36616, + "weights_h2d": null + }, + "checkpoint_bytes": 244397, + "checkpoint_files": 2, + "device_name": null, + "forward_timing": "wall-clock", + "note": "provenance, not identity: peaks and stage seconds this run measured; forward_sum is device time under cuda-events, wall time otherwise; seal covers head serialisation up to this block's assembly", + "peak_cuda_allocated_bytes": null, + "peak_cuda_reserved_bytes": null, + "peak_resident_weight_bytes": 208032, + "peak_rss_bytes": 368132096, + "rss_units_source": "Linux ru_maxrss", + "seconds": { + "decode_sum": 0.071, + "elapsed": 4.636, + "fill_sum": 0.0, + "forward_sum": 0.152, + "identity": 0.003, + "layer_load_max": 0.031, + "layer_load_sum": 0.114, + "layer_loads": 4, + "resident_load": 3.702, + "seal": 0.01 + } + }, + "runtime_environment": { + "cold_run": "20260907T165247Z-2063858", + "numeric_policy_observed": { + "NVIDIA_TF32_OVERRIDE": null, + "allow_tf32_cudnn": true, + "allow_tf32_matmul": false, + "deviates_from_default": false, + "float32_matmul_precision": "highest", + "observed_at": "seal time, after the forward" + }, + "python": "3.12.14" + }, + "schema": "malaiwah.fidelity-capture-runtime.v1", + "source_files": { + "bin/fidelity/codepin.py": "ce2a2c04d64adf7a268978a7ffe163c7d4cb5b675d5dc8e156f8a26a3b7bb5fd", + "bin/fidelity/panel.py": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "engines/tools/affine_surface.py": "37e7074797d53ae836e0af12fdbd2dc36c88778098aa44c72c1cd936d2b4c053", + "engines/tools/hf_capture.py": "44afcdac9f7c9cb26a35a2b7d9c1aed562344b76c8045a753651d2f2dbae99d0", + "engines/tools/layer_outer.py": "e3ea5715112663b1b60cf596eeffc2140e49b399809ece89a174bce41a969274", + "engines/tools/microscale_surface.py": "588923f0a4700436221923c794a8c112971d9f08e75c746742b0f0ede7921682", + "engines/tools/nvfp4_surface.py": "044b6fd2ee22d58512476e96060f7fa09030212a33736da1393c0103eb73e0c8", + "engines/tools/quant_stream.py": "7c6cc4cbe399d066eaff80ccf1e3d3190185f194644f738a404d3c537ad8e1ab" + }, + "stack_fingerprint": { + "attention_backend": "model default", + "cuda_runtime_version": null, + "device": "cpu", + "device_name": null, + "engine": "transformers-eager", + "numeric_policy": "default torch matmul precision; no TF32 override applied", + "schema": "malaiwah.stack-fingerprint.v1", + "torch_version": "2.11.0+cpu", + "transformers_version": "5.16.1" + }, + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd", + "upstream_receipts": [], + "weights": { + "checkpoint_files": [ + { + "name": "config.json", + "sha256": "c6cc76ca973555cae99d0c42da0a9385bf1ac67c67f4748cac0b4c0778ff5d90", + "size": 7517 + }, + { + "name": "model.safetensors", + "sha256": "9222707b17727c48479eb37416d96289344b48d70eee2d919b282063ccee3b3d", + "size": 236880 + } + ], + "checkpoint_identity_algorithm": "sha256 over the canonical JSON {\"algorithm\": , \"files\": [{\"name\", \"size\", \"sha256\"}, ...]} of every *.safetensors shard plus config.json in the checkpoint directory, sorted by name; for a llama.cpp GGUF tree the shards are every *.gguf of the one build directory (name = /) and config.json is the official release's copy beside it", + "checkpoint_identity_sha256": "aa51ae526ba79294a678ada6189d0418fa78f1d5e51091e5d10696c56d3470ed", + "model_revision": null, + "repository": "/tmp/qfs-quant-microfloat-release/stage-main/ct-mxfp4", + "revision": null + } +} diff --git a/raw/candidates/ct-mxfp4/evidence/candidate/validation/structural-validation.json b/raw/candidates/ct-mxfp4/evidence/candidate/validation/structural-validation.json new file mode 100644 index 0000000000000000000000000000000000000000..5ee8ffba0107cb5416cba5d6184f9ed9b330943d --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/candidate/validation/structural-validation.json @@ -0,0 +1,14 @@ +{ + "checks_run": [ + "pre-seal" + ], + "error_count": 0, + "errors": [], + "format_version": 1, + "receipt_sha256": "df49786fa6ab7b99b4ccb964492beb1dfda015c837b9483c9f730bf69e82513c", + "schema": "malaiwah.fidelity-structural-validation.v1", + "structural_status": "sealed", + "subject": "dataset:fidelity--quant-integration.candidate", + "warning_count": 0, + "warnings": [] +} diff --git a/raw/candidates/ct-mxfp4/evidence/capture-candidate.stderr.log b/raw/candidates/ct-mxfp4/evidence/capture-candidate.stderr.log new file mode 100644 index 0000000000000000000000000000000000000000..b0b55c7f7a9bfdf5f129433c0b4b63f6792f3a8e --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/capture-candidate.stderr.log @@ -0,0 +1,15 @@ + +Loading weights: 0%| | 0/6 [00:00 same_stack", + "overridden_by": null, + "passed": true + } + }, + "high_kld_contexts": [ + { + "allocation_stratum": null, + "domain": "code", + "index": 2, + "max": 0.005562118890622922, + "mean": 0.0009589654666779309, + "scored_rows": 63, + "window_id": "final-0002" + }, + { + "allocation_stratum": null, + "domain": "arithmetic", + "index": 1, + "max": 0.005044614761353234, + "mean": 0.0008948578801078056, + "scored_rows": 63, + "window_id": "final-0001" + }, + { + "allocation_stratum": null, + "domain": "instructions", + "index": 3, + "max": 0.002863526238924269, + "mean": 0.0008777956272695692, + "scored_rows": 63, + "window_id": "final-0003" + }, + { + "allocation_stratum": null, + "domain": "garden", + "index": 0, + "max": 0.0019943248685364476, + "mean": 0.0007337451610329949, + "scored_rows": 63, + "window_id": "final-0000" + } + ], + "kl": { + "max": 0.005562118890622922, + "mean": 0.000866341033772075, + "median": 0.0006639956888964968, + "p95": 0.0021510926922378047, + "p99": 0.0038031541906571086, + "p99_9": 0.005432225354176228 + }, + "kl_macro_stratum_mean": null, + "kl_micro_token_mean": 0.000866341033772075, + "measurement_scope": { + "contexts": 4, + "covers_full_panel": true, + "position_filter": "all", + "positions_per_context": 63, + "scored_positions": 252, + "subset_detail": null + }, + "metric": { + "direction": "reference_to_candidate", + "direction_label": "KL(reference || candidate)", + "higher_is_better": false, + "name": "mean_tokenwise_kld", + "units": "nats", + "value": 0.000866341033772075 + }, + "panel": { + "context_length": 64, + "contexts": 4, + "panel_id": "panel--panel", + "panel_token_sha256_legacy": "3c9467c85be43d238926f6d18bf825c2e4748814c95b8b0e8b8f1420546c3089", + "scored_positions": 252, + "scoring_window": { + "dropped_positions_total": 0, + "min_left_context_tokens": 1, + "policy": "every causal prediction position of every window is scored; nothing is dropped", + "score_from": 0, + "windowed": false + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + }, + "tokenizer_candidate": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + }, + "tokenizer_identity_equal": true, + "tokenizer_reference": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } + }, + "per_context": [ + { + "allocation_stratum": null, + "domain": "garden", + "index": 0, + "max": 0.0019943248685364476, + "mean": 0.0007337451610329949, + "scored_rows": 63, + "window_id": "final-0000" + }, + { + "allocation_stratum": null, + "domain": "arithmetic", + "index": 1, + "max": 0.005044614761353234, + "mean": 0.0008948578801078056, + "scored_rows": 63, + "window_id": "final-0001" + }, + { + "allocation_stratum": null, + "domain": "code", + "index": 2, + "max": 0.005562118890622922, + "mean": 0.0009589654666779309, + "scored_rows": 63, + "window_id": "final-0002" + }, + { + "allocation_stratum": null, + "domain": "instructions", + "index": 3, + "max": 0.002863526238924269, + "mean": 0.0008777956272695692, + "scored_rows": 63, + "window_id": "final-0003" + } + ], + "per_domain": { + "arithmetic": 0.0008948578801078056, + "code": 0.0009589654666779309, + "garden": 0.0007337451610329949, + "instructions": 0.0008777956272695692 + }, + "per_stratum": null, + "receipt_sha256": "1fd8c1201c728b1d06df903e30262834541f8d7f85ce6c612ee4184b703ff254", + "reference": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "dataset_id": "fidelity--quant-integration.root", + "dataset_sha256": "4cdf53f91210943b5c87bcddcfbee61034ed056af87d1b174cec28d7a2405ae0", + "form": "hidden", + "head": { + "bits": 16, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510" + }, + "label": "reference", + "lane": "other", + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "repository": null, + "revision": null, + "role": "root", + "scope_digest": "attn.o=native:bf16@16|attn.qkv=native:bf16@16|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=native:bf16@16|mlp.gate=native:bf16@16|mlp.up=native:bf16@16|moe.experts=native:bf16@16|norm=native:bf16@16|head=native|kv=bf16", + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd", + "weights": { + "artifact_ref": null, + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "codec": null, + "config_sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "declared_bits": null, + "declared_head_bits": 16, + "index_sha256": null, + "model_ref": null, + "model_revision": null, + "quantized": false, + "repository": "/tmp/qfs-complete-tiny-fixture/model", + "revision": null + } + }, + "schema": "malaiwah.fidelity-comparison-receipt.v1", + "self_compare": null, + "submission": { + "emitted": false, + "path": null, + "receipt_sha256": null, + "refusal": null, + "submission_schema": null + }, + "tokenwise": { + "bytes": 2144, + "path": "tokenwise-kld.npy", + "sha256": "9970e64072dd76ae08651c684214da51b94e81fedfc6177c878326d03e55181b" + }, + "top1_agreement": 0.5873015873015873, + "top1_discordant_contexts": [], + "uncertainty": { + "ci95_high": null, + "ci95_low": null, + "cluster_unit": null, + "clusters": null, + "method": "none", + "samples": null, + "seed": null + } +} diff --git a/raw/candidates/ct-mxfp4/evidence/comparison/tokenwise-kld.npy b/raw/candidates/ct-mxfp4/evidence/comparison/tokenwise-kld.npy new file mode 100644 index 0000000000000000000000000000000000000000..512f6fddc734e7b0479d324fbc2d61209fffea4c --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/comparison/tokenwise-kld.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9970e64072dd76ae08651c684214da51b94e81fedfc6177c878326d03e55181b +size 2144 diff --git a/raw/candidates/ct-mxfp4/evidence/panel-binding.json b/raw/candidates/ct-mxfp4/evidence/panel-binding.json new file mode 100644 index 0000000000000000000000000000000000000000..573cea0b332c636bdda89b150f95cda307b89194 --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/panel-binding.json @@ -0,0 +1,102 @@ +{ + "content": { + "archive": { + "algorithm": "sha256(ustar: sorted regular files; mode=0644; uid=gid=mtime=0)", + "bytes": 20480, + "compression": "none", + "format": "ustar", + "sha256": "389706dfa3335a75ec70a40d079995af1a60c05512334125dbd336790f12702f" + }, + "manifest": [ + { + "bytes": 192, + "path": "arrays/causal-mask-64.npy", + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02" + }, + { + "bytes": 384, + "path": "arrays/final-0000.tokens.npy", + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af" + }, + { + "bytes": 384, + "path": "arrays/final-0001.tokens.npy", + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea" + }, + { + "bytes": 384, + "path": "arrays/final-0002.tokens.npy", + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c" + }, + { + "bytes": 384, + "path": "arrays/final-0003.tokens.npy", + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a" + }, + { + "bytes": 4195, + "path": "panel.json", + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6" + }, + { + "bytes": 7808, + "path": "panel.receipt.json", + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263" + } + ], + "manifest_sha256": "e5f2d6410a6290da1197016c5b57ae522a3570665215ddc23e2a0bd45f912181" + }, + "panel": { + "bytes": 4195, + "context_length": 64, + "contexts": 4, + "file": "panel.json", + "id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "positions_per_context": 63, + "role": "final", + "scored_positions_total": 252, + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6", + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36" + }, + "receipt": { + "bytes": 7808, + "declared_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "file": "panel.receipt.json", + "receipt_file_sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "receipt_seal_mode": "self-blank" + }, + "schema": "malaiwah.resolved-panel.v1", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } +} diff --git a/raw/candidates/ct-mxfp4/evidence/root/README.md b/raw/candidates/ct-mxfp4/evidence/root/README.md new file mode 100644 index 0000000000000000000000000000000000000000..710dc82d0a53fe4dd29dbf797a459cab544ac9ed --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/root/README.md @@ -0,0 +1,95 @@ +--- +license: mit +tags: +- fidelity +- kl-divergence +- fidelity-provenance +- fidelity-dataset +- fidelity-root +x_fidelity: + spec: https://github.com/malaiwah/quant-fidelity-suite/blob/main/docs/FIDELITY-DATASET-SPEC.md + spec_version: fidelity-provenance/v1 + role: fidelity-dataset + captured_model: + repository: /tmp/qfs-complete-tiny-fixture/model + revision: null + role: root + form: hidden + lane: other + panel: + panel_id: panel--panel + suite_token_hash_sha256: 525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36 + contexts: 4 + scored_positions: 252 + repository: null + revision: null + head: + policy: native + quantized: false + bits: 16 + lm_head_tensor_content_sha256: 2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510 + lm_head_file_sha256: 07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913 + final_norm_tensor_content_sha256: null + final_norm_file_sha256: null + equality_receipt: null + replay_permitted: true + scope_digest: attn.o=native:bf16@16|attn.qkv=native:bf16@16|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=native:bf16@16|mlp.gate=native:bf16@16|mlp.up=native:bf16@16|moe.experts=native:bf16@16|norm=native:bf16@16|head=native|kv=bf16 + seal: + manifest: fidelity-dataset.json + dataset_sha256: null + checksums: checksums.txt + checksums_sha256: '0000000000000000000000000000000000000000000000000000000000000000' + note: 'written before the seal: dataset_sha256 and checksums_sha256 are digests of the tree this file + is inside, so they cannot appear in it. Read them from fidelity-dataset.json.' + interop: + compatible_with: + - kimi-k3-distribution-fidelity/1 + k3_compat_emitted: false + registry: + dataset: malaiwah/quant-fidelity-registry + schema_version: quant-fidelity-registry/v1 + artifact_id: null + measurement_ids: [] + snapshot: null + fidelity_dataset: + repository: null + revision: null + dataset_sha256: null + capture_content_digest: d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39 + form: hidden + role: root + measurements: [] +--- +# Local quant integration root + +A **root** fidelity dataset in **hidden form**, produced by `engines/tools/hf_capture.py` from `/tmp/qfs-complete-tiny-fixture/model`. + +## The cut + +the final hidden state handed to lm_head -- after the text model's final norm and immediately before the head matmul -- captured as the head module's input via torch.nn.Module.register_forward_pre_hook; replay applies the head ONLY (no final norm at replay time: the capture already sits after it). Same cut as engines/tools/hidden_replay.py and as Festr's kimi-k3 hidden-replay qualification. + +## What is here + +| | | +|---|---| +| records | 4 | +| scored positions | 252 | +| context length | 64 | +| hidden width | 64 | +| vocab size | 260 | +| capture bytes (hidden form) | 33348 | +| the same capture in logit form would be | 262080 bytes (8x) | +| scope policy | native | +| lane | other | + +## Does the model still generate sensibly + +`The capital of France is` -> `�` (p=0.0067, entropy 5.548 of a possible 5.561 nats). Recorded, not enforced. One extra window through the same schedule; its hidden state was discarded and is not part of this dataset. + +## How to check it + +``` +bin/fidelity-dataset verify +``` + +Full specification: diff --git a/raw/candidates/ct-mxfp4/evidence/root/capture/hidden_0000.safetensors b/raw/candidates/ct-mxfp4/evidence/root/capture/hidden_0000.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..ab0033bdb8ab129ee7a67a305a2a518ba10e63d0 --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/root/capture/hidden_0000.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a7d5a505a8bdb71b45df052427ee2f917c390c4eb751dc586bfc213192c273e5 +size 8337 diff --git a/raw/candidates/ct-mxfp4/evidence/root/capture/hidden_0001.safetensors b/raw/candidates/ct-mxfp4/evidence/root/capture/hidden_0001.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..52bed20630b0e59e28a275a0ffb2e0a83deda95b --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/root/capture/hidden_0001.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9fbd2c627ad45d2c1c39520ab9ba17f5d8aa1d1e73952682a488b732764574a6 +size 8337 diff --git a/raw/candidates/ct-mxfp4/evidence/root/capture/hidden_0002.safetensors b/raw/candidates/ct-mxfp4/evidence/root/capture/hidden_0002.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..df220c73fbe38a913ae0f6fd9f32ec215af082f3 --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/root/capture/hidden_0002.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eaf7e5903afff4ebeff8ba42353c3ebd58cc120c009d5038ea9393242bf82e4d +size 8337 diff --git a/raw/candidates/ct-mxfp4/evidence/root/capture/hidden_0003.safetensors b/raw/candidates/ct-mxfp4/evidence/root/capture/hidden_0003.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..99f3a11b608ca1b0be070240839ae434506510bd --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/root/capture/hidden_0003.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9b7729fe05d7c7ef4b80be6eb94f511e262765e417037cceb7d98ce80c17685d +size 8337 diff --git a/raw/candidates/ct-mxfp4/evidence/root/capture/manifest.json b/raw/candidates/ct-mxfp4/evidence/root/capture/manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..21c5bc1c4889e8ac39dbe37170e031544c120665 --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/root/capture/manifest.json @@ -0,0 +1,159 @@ +{ + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "context_length": 64, + "coverage": { + "complete": true, + "declared_records": 4, + "index_range": [ + 0, + 3 + ], + "missing_indices_sample": [], + "present_records": 4, + "shard_of": null, + "subset_detail": null + }, + "created_utc": "2026-09-07T16:52:44Z", + "dtype": "BF16", + "dtype_lossless": true, + "form": "hidden", + "format_version": 1, + "hidden_width": 64, + "receipt_sha256": "be259be5d93938a69a87b8f141ccd8f5afe4f90dfb1089586d6a49ae7225d5a0", + "records": [ + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 0, + "document_id": "embedded-synthetic/garden.txt", + "domain": "garden", + "dtype": "BF16", + "elapsed_seconds": 0.034, + "file": "hidden_0000.safetensors", + "index": 0, + "key": "hidden_states", + "payload_sha256": "80897a67cfdc22f410255f2463193e7d765de5500d62da2c13aacbd3b9507083", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "a7d5a505a8bdb71b45df052427ee2f917c390c4eb751dc586bfc213192c273e5", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "80897a67cfdc22f410255f2463193e7d765de5500d62da2c13aacbd3b9507083", + "token_ids_json_sha256": "08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315", + "token_ids_sha256_legacy": "9d5378f0316be57e37f80d2bae7895ba4a1140c302c87ff8cce2fbd9afc83b77", + "window_id": "final-0000", + "window_index": 0 + }, + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 1, + "document_id": "embedded-synthetic/arithmetic.txt", + "domain": "arithmetic", + "dtype": "BF16", + "elapsed_seconds": 0.027, + "file": "hidden_0001.safetensors", + "index": 1, + "key": "hidden_states", + "payload_sha256": "1fc13aaf069c53d5592198daeacfc5f652abf5b9ba552213859596c32e7c4046", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "9fbd2c627ad45d2c1c39520ab9ba17f5d8aa1d1e73952682a488b732764574a6", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "1fc13aaf069c53d5592198daeacfc5f652abf5b9ba552213859596c32e7c4046", + "token_ids_json_sha256": "5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46", + "token_ids_sha256_legacy": "e0f95114b71a46cb489539dc38909fb67fb378f25fafbb513e32690cc7f11b37", + "window_id": "final-0001", + "window_index": 1 + }, + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 2, + "document_id": "embedded-synthetic/code.txt", + "domain": "code", + "dtype": "BF16", + "elapsed_seconds": 0.028, + "file": "hidden_0002.safetensors", + "index": 2, + "key": "hidden_states", + "payload_sha256": "98b8d9e1ccb196898fda27cb5f625f348aa0046121c39484a4af7cb042e1be92", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "eaf7e5903afff4ebeff8ba42353c3ebd58cc120c009d5038ea9393242bf82e4d", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "98b8d9e1ccb196898fda27cb5f625f348aa0046121c39484a4af7cb042e1be92", + "token_ids_json_sha256": "51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07", + "token_ids_sha256_legacy": "482b890c7b0e2f7400257c43680093b7f2b90d6df5361c6de3ae97ddfdd2504e", + "window_id": "final-0002", + "window_index": 2 + }, + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 3, + "document_id": "embedded-synthetic/instructions.txt", + "domain": "instructions", + "dtype": "BF16", + "elapsed_seconds": 0.027, + "file": "hidden_0003.safetensors", + "index": 3, + "key": "hidden_states", + "payload_sha256": "01646a47a79cc47760fc0645c30bc9e37a930c26ac84cd3d1a1d5077a2f48df8", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "9b7729fe05d7c7ef4b80be6eb94f511e262765e417037cceb7d98ce80c17685d", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "01646a47a79cc47760fc0645c30bc9e37a930c26ac84cd3d1a1d5077a2f48df8", + "token_ids_json_sha256": "8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d", + "token_ids_sha256_legacy": "12e01edd3900ff2ca82621feb5504f24b003a53c0afe98a9ee0b490eb93141d4", + "window_id": "final-0003", + "window_index": 3 + } + ], + "run_name": "hf-capture", + "runtime_manifest": "../runtime/capture-runtime.json", + "runtime_manifest_sha256": "60510dc79ef1eb967e64492e56911dec31e885c167c9b0d2ffa7d083e27a941b", + "schema": "malaiwah.fidelity-capture-manifest.v1", + "scored_rows_per_context": 63, + "semantic_point": "after_final_rmsnorm_before_lm_head", + "tensor_key": "hidden_states", + "total_scored_rows": 252, + "total_size_bytes": 33348, + "vocab_size": 260 +} diff --git a/raw/candidates/ct-mxfp4/evidence/root/checksums.txt b/raw/candidates/ct-mxfp4/evidence/root/checksums.txt new file mode 100644 index 0000000000000000000000000000000000000000..c616f1dc26004569cc7a6c332fd2c9e73a701f79 --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/root/checksums.txt @@ -0,0 +1,20 @@ +df28a18b7e9c0d39ac079235136da25818038cc09314a890063058e94bf1c226 README.md +a7d5a505a8bdb71b45df052427ee2f917c390c4eb751dc586bfc213192c273e5 capture/hidden_0000.safetensors +9fbd2c627ad45d2c1c39520ab9ba17f5d8aa1d1e73952682a488b732764574a6 capture/hidden_0001.safetensors +eaf7e5903afff4ebeff8ba42353c3ebd58cc120c009d5038ea9393242bf82e4d capture/hidden_0002.safetensors +9b7729fe05d7c7ef4b80be6eb94f511e262765e417037cceb7d98ce80c17685d capture/hidden_0003.safetensors +3880f9a0ee35848dcae0ce89149c9b720d066f788b6d724c0710e69aa3251b40 capture/manifest.json +777b038f747bed25d1f5db8adbfd2a78c7762fb5c870ff8c3c785a984d48a168 head/head.json +07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913 head/weight.safetensors +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0000.npy +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0001.npy +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0002.npy +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0003.npy +b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263 panel/panel-receipt.json +68efa258ea3c5d4ba759c3c15aadd6e8c984711831bea3f335903109345cdcef panel/panel.json +08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315 panel/tokens/context-0000.json +5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46 panel/tokens/context-0001.json +51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07 panel/tokens/context-0002.json +8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d panel/tokens/context-0003.json +60510dc79ef1eb967e64492e56911dec31e885c167c9b0d2ffa7d083e27a941b runtime/capture-runtime.json +769c103cf430360bf1b79a4d027f5bd073ce3f61204d9da77adf3ad494c27e73 validation/structural-validation.json diff --git a/raw/candidates/ct-mxfp4/evidence/root/fidelity-dataset.json b/raw/candidates/ct-mxfp4/evidence/root/fidelity-dataset.json new file mode 100644 index 0000000000000000000000000000000000000000..d8396c941e928689127e09de5ad83b02c0d70122 --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/root/fidelity-dataset.json @@ -0,0 +1,389 @@ +{ + "capture": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "dtype": "BF16", + "dtype_lossless": true, + "form": "hidden", + "head_not_separable_reason": null, + "head_separable": true, + "hidden_width": 64, + "lossy_codec": null, + "manifest_file": "capture/manifest.json", + "manifest_file_sha256": "3880f9a0ee35848dcae0ce89149c9b720d066f788b6d724c0710e69aa3251b40", + "records_count": 4, + "scored_rows_total": 252, + "semantic_point": "after_final_rmsnorm_before_lm_head", + "tensor_key": "hidden_states", + "total_size_bytes": 33348, + "vocab_size": 260 + }, + "coverage": { + "complete": true, + "declared_records": 4, + "index_range": [ + 0, + 3 + ], + "missing_indices_sample": [], + "present_records": 4, + "shard_of": null, + "subset_detail": null + }, + "created_utc": "2026-09-07T16:52:44Z", + "dataset": { + "author": { + "handle": null, + "is_registry_maintainer": false, + "name": "malaiwah", + "role": "capture-author", + "url": null + }, + "base_capture": null, + "id": "fidelity--quant-integration.root", + "license": "mit", + "name": "Local quant integration root", + "qualification": null, + "repository": null, + "revision": null, + "role": "root", + "structural_status": "sealed" + }, + "dataset_sha256": "4cdf53f91210943b5c87bcddcfbee61034ed056af87d1b174cec28d7a2405ae0", + "determinism": { + "cold_start_per_run": true, + "distinct_evidence_hash_count": 1, + "evidence_hashes": [ + "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39" + ], + "evidence_kind": "hidden_state_tensor_sha256", + "identical_across_runs": null, + "note": "a single cold capture; cross-run determinism is NOT asserted here. Capture a second cold run and run `fidelity-dataset compare --self-compare` -- an exactly 0.0 result is the SC-1 reproduction confirmation.", + "repeat_noise": null, + "repeats": [], + "run_count": 1 + }, + "disclosures": [ + { + "affects_comparability": false, + "code": "rtn_format_fixture", + "detail": "Local RTN-format fixture; optimizer-not-run; no model-quality or serving-kernel equivalence claim.", + "severity": "info" + }, + { + "affects_comparability": false, + "code": "reduced_run_count", + "detail": "this dataset is ONE cold capture (run_count 1, the DET-D4 floor is 5). Cross-run determinism is not asserted by the dataset; it is established by a second cold capture plus `fidelity-dataset compare --self-compare`, whose exactly-0.0 result is the SC-1 reproduction confirmation.", + "severity": "caveat" + } + ], + "format_version": 1, + "generation_sanity_probe": { + "degenerate": false, + "enforced": false, + "entropy_nats": 5.548019647470335, + "expect": null, + "logit_spread": 0.986328125, + "note": "one extra window through the same schedule; its hidden state is discarded and never enters the dataset.", + "prompt": "The capital of France is", + "schema": "malaiwah.generation-sanity-probe.v1", + "status": "recorded", + "top1_id": 113, + "top1_probability": 0.006720104384265371, + "top1_text": "�", + "top_k": [ + { + "id": 113, + "probability": 0.006720104384265371, + "text": "�" + }, + { + "id": 237, + "probability": 0.006412368399474785, + "text": "�" + }, + { + "id": 193, + "probability": 0.006035639491843906, + "text": "\u0001" + }, + { + "id": 236, + "probability": 0.0055386141320063614, + "text": "�" + }, + { + "id": 44, + "probability": 0.0054740873228682424, + "text": "I" + } + ], + "uniform_entropy_nats": 5.560681631015528, + "vocab_size": 260 + }, + "head": { + "applied_in_capture": false, + "bias": null, + "bits": 16, + "compat_tensor_key": "weight", + "dtype": "BF16", + "equality_receipt": null, + "file": "head/weight.safetensors", + "file_sha256": "07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913", + "final_norm": { + "applied_at_replay": false, + "applied_in_capture": true, + "dtype": null, + "file": null, + "file_sha256": null, + "shape": null, + "tensor_content_sha256": null, + "tensor_key": null + }, + "head_json": "head/head.json", + "present": true, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "shape": [ + 260, + 64 + ], + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "tensor_key": "lm_head.weight" + }, + "interop": { + "adapted_from": null, + "compatible_with": [ + "kimi-k3-distribution-fidelity/1" + ], + "divergences": [ + { + "field": "head", + "id": "D-1", + "reason": "every capture declares its OWN head identity by tensor content digest; the comparator refuses a hidden-form comparison across differing heads." + }, + { + "field": "runtime.lane", + "id": "D-2", + "reason": "lane is required and gated at compare time so registry BIAS-006 is checked before a number exists, not at submission." + }, + { + "field": "panel.scoring_window", + "id": "D-3", + "reason": "scoring_window is part of panel identity, not a comparator flag: a score_from=1024 number is a different panel, not a variant." + }, + { + "field": "comparison_kind", + "id": "D-4", + "reason": "self-compare is a first-class mode asserting exactly 0.0." + }, + { + "field": "estimator.accumulation_dtype", + "id": "D-5", + "reason": "required, fp64 default; an fp32 estimator lands in a different comparability class on the same data and that must be visible." + }, + { + "field": "coverage", + "id": "D-6", + "reason": "declared vs present record counts with shard_of; fixes our own manifest that claimed 5,120 captures in a 512-file repository." + }, + { + "field": "panel", + "id": "D-7", + "reason": "the panel is a separately referenceable object, which is what makes a candidate capture publishable standalone." + }, + { + "field": "capture.lossy_codec", + "id": "D-8", + "reason": "lets a llama.cpp .kld be ingested without laundering a lossy capture as exact." + }, + { + "field": "capture.records[].attention_mask_sha256", + "id": "D-9", + "reason": "our packed and streaming lanes vary mask construction; a single-request capture path makes it invariant and has no equivalent field." + }, + { + "field": "capture.head_separable", + "id": "D-10", + "reason": "hidden form is the default; logit form must declare head_separable:false with a reason." + } + ], + "k3_compat_emitted": false, + "note": null + }, + "panel": { + "contamination": { + "checked": false, + "hits": null, + "method": "not established", + "receipt": null + }, + "context_length": 64, + "contexts": 4, + "panel_file": "panel/panel.json", + "panel_file_sha256": "68efa258ea3c5d4ba759c3c15aadd6e8c984711831bea3f335903109345cdcef", + "panel_id": "panel--panel", + "panel_receipt_file": "panel/panel-receipt.json", + "panel_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "panel_token_sha256_legacy": "3c9467c85be43d238926f6d18bf825c2e4748814c95b8b0e8b8f1420546c3089", + "remap_file": null, + "repository": null, + "revision": null, + "scored_positions_total": 252, + "scoring_window": { + "dropped_positions_total": 0, + "min_left_context_tokens": 1, + "policy": "every causal prediction position of every window is scored; nothing is dropped", + "score_from": 0, + "windowed": false + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } + }, + "runtime": { + "backend_identity_sha256": null, + "file": "runtime/capture-runtime.json", + "file_sha256": "60510dc79ef1eb967e64492e56911dec31e885c167c9b0d2ffa7d083e27a941b", + "lane": "other", + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "lane_inferred": false, + "runtime_reader_sha256": null, + "source": "native", + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd" + }, + "schema": "malaiwah.fidelity-dataset.v1", + "scope": { + "assignments": [ + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "embed_tokens", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "attn.qkv", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "attn.o", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "mlp.gate", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "mlp.up", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "mlp.down", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "moe.experts", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "norm", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "lm_head", + "treatment": "native" + } + ], + "head_policy": "native", + "kv_cache_dtype": "bf16", + "policy": "native", + "scope_digest": "attn.o=native:bf16@16|attn.qkv=native:bf16@16|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=native:bf16@16|mlp.gate=native:bf16@16|mlp.up=native:bf16@16|moe.experts=native:bf16@16|norm=native:bf16@16|head=native|kv=bf16" + }, + "seal": { + "checksums_file": "checksums.txt", + "checksums_format": "sha256sum", + "checksums_sha256": "654ea33f52cbbdf4643fb7abdfc11ebd3e5dc73bd9d448556d5cc1a46a13ae06", + "covers": [ + "every published file except checksums.txt and fidelity-dataset.json, via checksums.txt", + "fidelity-dataset.json itself, via the self-blanked seal", + "every capture tensor a second time by CONTENT, via capture.capture_content_digest" + ], + "excludes": [ + "checksums.txt", + "fidelity-dataset.json" + ], + "external_anchor": null, + "method": "self_blanked_canonical_json_sha256", + "seal_field": "dataset_sha256" + }, + "upstream_receipts": [], + "weights": { + "artifact_ref": null, + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "codec": null, + "config_sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "declared_bits": null, + "declared_head_bits": 16, + "index_sha256": null, + "model_ref": null, + "model_revision": null, + "quantized": false, + "repository": "/tmp/qfs-complete-tiny-fixture/model", + "revision": null + } +} diff --git a/raw/candidates/ct-mxfp4/evidence/root/head/head.json b/raw/candidates/ct-mxfp4/evidence/root/head/head.json new file mode 100644 index 0000000000000000000000000000000000000000..cfb1d748d203487673352f1ad645cb98a49c4002 --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/root/head/head.json @@ -0,0 +1,34 @@ +{ + "applied_in_capture": false, + "bias": null, + "bits": 16, + "compat_tensor_key": "weight", + "dtype": "BF16", + "equality_receipt": null, + "file": "head/weight.safetensors", + "file_sha256": "07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913", + "final_norm": { + "applied_at_replay": false, + "applied_in_capture": true, + "dtype": null, + "file": null, + "file_sha256": null, + "shape": null, + "tensor_content_sha256": null, + "tensor_key": null + }, + "format_version": 1, + "note": "the head is shipped verbatim from the checkpoint so a third party can replay logits = hidden @ head^T without the weights", + "present": true, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "receipt_sha256": "2da3cfbfc607296b3bb32eb6fec1f122e4ce30fe9ea96653e5bb1b4ebab6514f", + "schema": "malaiwah.fidelity-head-identity.v1", + "shape": [ + 260, + 64 + ], + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "tensor_key": "lm_head.weight" +} diff --git a/raw/candidates/ct-mxfp4/evidence/root/head/weight.safetensors b/raw/candidates/ct-mxfp4/evidence/root/head/weight.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..abe6e7c215a73bc88e85042067923bf943118086 --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/root/head/weight.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913 +size 33365 diff --git a/raw/candidates/ct-mxfp4/evidence/root/panel/masks/context-0000.npy b/raw/candidates/ct-mxfp4/evidence/root/panel/masks/context-0000.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/root/panel/masks/context-0000.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/ct-mxfp4/evidence/root/panel/masks/context-0001.npy b/raw/candidates/ct-mxfp4/evidence/root/panel/masks/context-0001.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/root/panel/masks/context-0001.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/ct-mxfp4/evidence/root/panel/masks/context-0002.npy b/raw/candidates/ct-mxfp4/evidence/root/panel/masks/context-0002.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/root/panel/masks/context-0002.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/ct-mxfp4/evidence/root/panel/masks/context-0003.npy b/raw/candidates/ct-mxfp4/evidence/root/panel/masks/context-0003.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/root/panel/masks/context-0003.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/ct-mxfp4/evidence/root/panel/panel-receipt.json b/raw/candidates/ct-mxfp4/evidence/root/panel/panel-receipt.json new file mode 100644 index 0000000000000000000000000000000000000000..fbc2ce3e8e9602a492d83ae681817e0fa02e4173 --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/root/panel/panel-receipt.json @@ -0,0 +1,376 @@ +{ + "corpus": { + "documents_considered": 4, + "documents_selected": 4, + "path_prefix": "embedded-synthetic/", + "repository": null, + "revision": null, + "source": "Synthetic texts embedded verbatim in this sealed receipt and builder." + }, + "created_utc": "2026-09-07T00:00:00Z", + "created_utc_policy": "Fixed artifact epoch for deterministic bytes; not an execution timestamp.", + "documents": [ + { + "bytes": 135, + "document": "garden.txt", + "document_sha256": "2aca14290cd4753c3b15d8a20aaa7a6963d2cb48d78e8538a4ce34d4665dcb94", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "garden", + "text_utf8": "The small garden has red flowers, green leaves, and a stone path. A gentle breeze moves the branches while a robin sings near the gate.", + "tokens_total": 137, + "window_id": "final-0000" + }, + { + "bytes": 144, + "document": "arithmetic.txt", + "document_sha256": "b867a2e8cbe81cc8d5781bfe6718a43e171fb5c7c138b9ed6ac86bebc24bca83", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "arithmetic", + "text_utf8": "A shelf holds three blue boxes and five red boxes. There are eight boxes in total. Move two boxes to the desk and count the six boxes remaining.", + "tokens_total": 146, + "window_id": "final-0001" + }, + { + "bytes": 162, + "document": "code.txt", + "document_sha256": "08c8f75f45899cbc9656a7a3fcdbf3092abfa7bc97fe353957b08d7e9660240b", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "code", + "text_utf8": "def add_values(left, right):\n return left + right\n\nresult = add_values(7, 9)\nprint(result)\n# This readable snippet is synthetic input, not a coding benchmark.\n", + "tokens_total": 164, + "window_id": "final-0002" + }, + { + "bytes": 140, + "document": "instructions.txt", + "document_sha256": "1dba5052b28929f94f322ad9e8c0b238bcbd653d6fae54ebaea8e5e3f6073378", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "instructions", + "text_utf8": "First place a clean cup on the table. Next pour cool water into the cup. Finally put the bottle away and write a short note about the steps.", + "tokens_total": 142, + "window_id": "final-0003" + } + ], + "environment": { + "numpy": "2.5.3", + "tokenizers": "0.23.2", + "transformers": "5.16.1" + }, + "format_builder": "engines/tools/build_token_panel.py", + "format_builder_sha256": "30eb4d4d7e465aaa8d9ef2d947a0ac7fd42ec45388f20c8b6db242c88dc2d851", + "format_version": 1, + "panel_id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "panel_name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "parameters": { + "context_length": 64, + "generation_seed": null, + "generation_seed_policy": "No RNG is used.", + "prediction_positions_per_window": 63, + "scored_positions_total": 252, + "strata": [ + "garden", + "arithmetic", + "code", + "instructions" + ], + "windows_per_stratum": 1, + "windows_total": 4 + }, + "receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "resolver_sha256": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "schema": "malaiwah.token-panel-build-receipt.v1", + "selection_rule": "Four embedded readable synthetic documents in declared order; native tokenizer with add_special_tokens=True, truncation=True, max_length=64, padding=False; each encoded window must be exactly 64 tokens; no chat template; all 63 shifted next-token positions scored; no RNG.", + "separation": { + "checked": false, + "method": "No contamination scan or benchmark selection.", + "note": "Authored synthetic CPU smoke inputs for a random-init model; not a benchmark, held-out quality claim, or registry-row submission." + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "add_special_tokens": true, + "chat_template_applied": false, + "class": "TokenizersBackend", + "files_sha256": { + "config.json": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "generation_config.json": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "tokenizer.json": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "tokenizer_config.json": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + }, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "local_files_only": true, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "trust_remote_code": false, + "vocab_size": 260 + }, + "tool": "build_panel.py", + "tool_sha256": "f17b17262816676d6ededcc969756ac07ff991eab73117040ec41005f6ff63f3" +} diff --git a/raw/candidates/ct-mxfp4/evidence/root/panel/panel.json b/raw/candidates/ct-mxfp4/evidence/root/panel/panel.json new file mode 100644 index 0000000000000000000000000000000000000000..cedb9d5e3c635860791c55451fde6dc9e37cddb9 --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/root/panel/panel.json @@ -0,0 +1,298 @@ +{ + "contamination": { + "checked": false, + "hits": null, + "method": "not established", + "receipt": null + }, + "context_length": 64, + "contexts": 4, + "format_version": 1, + "name": "token panel panel--panel", + "panel_id": "panel--panel", + "panel_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "panel_token_sha256_legacy": "3c9467c85be43d238926f6d18bf825c2e4748814c95b8b0e8b8f1420546c3089", + "positions_per_context": 63, + "receipt_sha256": "8a4e27a74ca6ce39569b78c3d972077ab7966f6da118110b3b08adca1e284c6f", + "records": [ + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0000.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 0, + "document_id": "embedded-synthetic/garden.txt", + "domain": "garden", + "index": 0, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0000.json", + "token_ids_first16": [ + 1, + 55, + 75, + 72, + 224, + 86, + 80, + 68, + 79, + 79, + 224, + 74, + 68, + 85, + 71, + 72 + ], + "token_ids_json_sha256": "08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315", + "token_ids_last16": [ + 224, + 68, + 81, + 71, + 224, + 68, + 224, + 86, + 87, + 82, + 81, + 72, + 224, + 83, + 68, + 2 + ], + "token_ids_sha256_legacy": "9d5378f0316be57e37f80d2bae7895ba4a1140c302c87ff8cce2fbd9afc83b77", + "window_id": "final-0000", + "window_index": 0 + }, + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0001.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 1, + "document_id": "embedded-synthetic/arithmetic.txt", + "domain": "arithmetic", + "index": 1, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0001.json", + "token_ids_first16": [ + 1, + 36, + 224, + 86, + 75, + 72, + 79, + 73, + 224, + 75, + 82, + 79, + 71, + 86, + 224, + 87 + ], + "token_ids_json_sha256": "5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46", + "token_ids_last16": [ + 72, + 86, + 17, + 224, + 55, + 75, + 72, + 85, + 72, + 224, + 68, + 85, + 72, + 224, + 72, + 2 + ], + "token_ids_sha256_legacy": "e0f95114b71a46cb489539dc38909fb67fb378f25fafbb513e32690cc7f11b37", + "window_id": "final-0001", + "window_index": 1 + }, + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0002.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 2, + "document_id": "embedded-synthetic/code.txt", + "domain": "code", + "index": 2, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0002.json", + "token_ids_first16": [ + 1, + 71, + 72, + 73, + 224, + 68, + 71, + 71, + 66, + 89, + 68, + 79, + 88, + 72, + 86, + 11 + ], + "token_ids_json_sha256": "51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07", + "token_ids_last16": [ + 85, + 76, + 74, + 75, + 87, + 202, + 202, + 85, + 72, + 86, + 88, + 79, + 87, + 224, + 32, + 2 + ], + "token_ids_sha256_legacy": "482b890c7b0e2f7400257c43680093b7f2b90d6df5361c6de3ae97ddfdd2504e", + "window_id": "final-0002", + "window_index": 2 + }, + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0003.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 3, + "document_id": "embedded-synthetic/instructions.txt", + "domain": "instructions", + "index": 3, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0003.json", + "token_ids_first16": [ + 1, + 41, + 76, + 85, + 86, + 87, + 224, + 83, + 79, + 68, + 70, + 72, + 224, + 68, + 224, + 70 + ], + "token_ids_json_sha256": "8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d", + "token_ids_last16": [ + 224, + 70, + 82, + 82, + 79, + 224, + 90, + 68, + 87, + 72, + 85, + 224, + 76, + 81, + 87, + 2 + ], + "token_ids_sha256_legacy": "12e01edd3900ff2ca82621feb5504f24b003a53c0afe98a9ee0b490eb93141d4", + "window_id": "final-0003", + "window_index": 3 + } + ], + "repository": null, + "revision": null, + "schema": "malaiwah.fidelity-panel-binding.v1", + "scored_positions_total": 252, + "scoring_window": { + "dropped_positions_total": 0, + "min_left_context_tokens": 1, + "policy": "every causal prediction position of every window is scored; nothing is dropped", + "score_from": 0, + "windowed": false + }, + "strata": {}, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "token_digest_algorithm": { + "aggregate": "sha256('\\n'.join(per_record_hex).encode('ascii'))", + "legacy_aggregate": "sha256(''.join(per_record_hex).encode('utf-8'))", + "legacy_per_record": "sha256(json.dumps(ids).encode('utf-8'))", + "per_record": "sha256(json.dumps(ids, separators=(',',':')).encode('utf-8'))" + }, + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } +} diff --git a/raw/candidates/ct-mxfp4/evidence/root/panel/tokens/context-0000.json b/raw/candidates/ct-mxfp4/evidence/root/panel/tokens/context-0000.json new file mode 100644 index 0000000000000000000000000000000000000000..c55b788f77dcb26a8c56fe6a7593353d57abb70f --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/root/panel/tokens/context-0000.json @@ -0,0 +1 @@ +[1,55,75,72,224,86,80,68,79,79,224,74,68,85,71,72,81,224,75,68,86,224,85,72,71,224,73,79,82,90,72,85,86,15,224,74,85,72,72,81,224,79,72,68,89,72,86,15,224,68,81,71,224,68,224,86,87,82,81,72,224,83,68,2] \ No newline at end of file diff --git a/raw/candidates/ct-mxfp4/evidence/root/panel/tokens/context-0001.json b/raw/candidates/ct-mxfp4/evidence/root/panel/tokens/context-0001.json new file mode 100644 index 0000000000000000000000000000000000000000..8304be93e5387811e155f869e175c0bfca57ca76 --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/root/panel/tokens/context-0001.json @@ -0,0 +1 @@ +[1,36,224,86,75,72,79,73,224,75,82,79,71,86,224,87,75,85,72,72,224,69,79,88,72,224,69,82,91,72,86,224,68,81,71,224,73,76,89,72,224,85,72,71,224,69,82,91,72,86,17,224,55,75,72,85,72,224,68,85,72,224,72,2] \ No newline at end of file diff --git a/raw/candidates/ct-mxfp4/evidence/root/panel/tokens/context-0002.json b/raw/candidates/ct-mxfp4/evidence/root/panel/tokens/context-0002.json new file mode 100644 index 0000000000000000000000000000000000000000..2a1413e634823a039c4ede6b463b549207c4c8fb --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/root/panel/tokens/context-0002.json @@ -0,0 +1 @@ +[1,71,72,73,224,68,71,71,66,89,68,79,88,72,86,11,79,72,73,87,15,224,85,76,74,75,87,12,29,202,224,224,224,224,85,72,87,88,85,81,224,79,72,73,87,224,14,224,85,76,74,75,87,202,202,85,72,86,88,79,87,224,32,2] \ No newline at end of file diff --git a/raw/candidates/ct-mxfp4/evidence/root/panel/tokens/context-0003.json b/raw/candidates/ct-mxfp4/evidence/root/panel/tokens/context-0003.json new file mode 100644 index 0000000000000000000000000000000000000000..7978732d7bf3bfc5fed35c837bc69d9d66371c4f --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/root/panel/tokens/context-0003.json @@ -0,0 +1 @@ +[1,41,76,85,86,87,224,83,79,68,70,72,224,68,224,70,79,72,68,81,224,70,88,83,224,82,81,224,87,75,72,224,87,68,69,79,72,17,224,49,72,91,87,224,83,82,88,85,224,70,82,82,79,224,90,68,87,72,85,224,76,81,87,2] \ No newline at end of file diff --git a/raw/candidates/ct-mxfp4/evidence/root/runtime/capture-runtime.json b/raw/candidates/ct-mxfp4/evidence/root/runtime/capture-runtime.json new file mode 100644 index 0000000000000000000000000000000000000000..77496d7c74859be0cf37ce8efcaa54e997ebc6df --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/root/runtime/capture-runtime.json @@ -0,0 +1,245 @@ +{ + "capture_tool": { + "expert_fill": { + "bytes_filled": 294912, + "declined": {}, + "decoded_slices": 0, + "identity": "a byte copy into the fused parameter's slice; bin/selftest_layer_outer.py L4/L6 assert equality with from_pretrained and with the converter path", + "layers_filled": 3, + "mode": "direct", + "reference": "transformers.core_model_loading.MergeModulelist(dim=0) + Concatenate(dim=1)", + "slices_filled": 72, + "staged_slices": 72, + "staging": "pageable", + "targets_filled": 6 + }, + "file": "engines/tools/hf_capture.py", + "head_module_path": "lm_head", + "head_resolution": "lm_head", + "layer_residency": "stream", + "mechanism": "transformers forward pass, layer-outer/window-inner schedule: for each decoder layer the model's own forward is run once per window with the layers below replaying their memoised output and the layers above suspending, so each layer's weights are materialised once for the whole panel. Windows are pushed through sequentially, never batched. Forward pre-hook on model.get_output_embeddings(), fired by the model's own epilogue after the last layer", + "model_view": null, + "parallel_plan_dropped": false, + "resolved_classes": { + "config": "transformers.models.glm_moe_dsa.configuration_glm_moe_dsa.GlmMoeDsaConfig", + "model": "transformers.models.glm_moe_dsa.modeling_glm_moe_dsa.GlmMoeDsaForCausalLM" + }, + "resolved_panel_binding": { + "binding": { + "content": { + "archive": { + "algorithm": "sha256(ustar: sorted regular files; mode=0644; uid=gid=mtime=0)", + "bytes": 20480, + "compression": "none", + "format": "ustar", + "sha256": "389706dfa3335a75ec70a40d079995af1a60c05512334125dbd336790f12702f" + }, + "manifest": [ + { + "bytes": 192, + "path": "arrays/causal-mask-64.npy", + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02" + }, + { + "bytes": 384, + "path": "arrays/final-0000.tokens.npy", + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af" + }, + { + "bytes": 384, + "path": "arrays/final-0001.tokens.npy", + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea" + }, + { + "bytes": 384, + "path": "arrays/final-0002.tokens.npy", + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c" + }, + { + "bytes": 384, + "path": "arrays/final-0003.tokens.npy", + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a" + }, + { + "bytes": 4195, + "path": "panel.json", + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6" + }, + { + "bytes": 7808, + "path": "panel.receipt.json", + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263" + } + ], + "manifest_sha256": "e5f2d6410a6290da1197016c5b57ae522a3570665215ddc23e2a0bd45f912181" + }, + "panel": { + "bytes": 4195, + "context_length": 64, + "contexts": 4, + "file": "panel.json", + "id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "positions_per_context": 63, + "role": "final", + "scored_positions_total": 252, + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6", + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36" + }, + "receipt": { + "bytes": 7808, + "declared_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "file": "panel.receipt.json", + "receipt_file_sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "receipt_seal_mode": "self-blank" + }, + "schema": "malaiwah.resolved-panel.v1", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } + }, + "binding_file": "panel-binding.json", + "binding_file_sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "tokenizer_equivalences": [] + }, + "schedule": "layer-outer", + "sha256": "44afcdac9f7c9cb26a35a2b7d9c1aed562344b76c8045a753651d2f2dbae99d0", + "unexpected_tensor_allowlist": null, + "verified_code": null, + "version": "hf_capture/1", + "weights_decode": null, + "weights_license": null, + "wraps": [] + }, + "container": { + "image_digest": null, + "image_reference": null, + "image_repository_digest": null + }, + "format_version": 1, + "lane": "other", + "lane_identity_inputs": [ + "torch_version", + "cuda_runtime_version", + "device_name", + "grouped_mm_kernel", + "numeric_policy", + "attention_backend", + "experts_implementation", + "parallelism", + "ep_emulate", + "reduce_order" + ], + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "lane_inferred": false, + "receipt_sha256": "037c941399a523b0c489a9aa72eef66303775a50832391deb01c4a1a6318b0e6", + "resources": { + "bytes": { + "checkpoint_read": 555744, + "hidden_d2h": 36616, + "weights_h2d": null + }, + "checkpoint_bytes": 572479, + "checkpoint_files": 2, + "device_name": null, + "forward_timing": "wall-clock", + "note": "provenance, not identity: peaks and stage seconds this run measured; forward_sum is device time under cuda-events, wall time otherwise; seal covers head serialisation up to this block's assembly", + "peak_cuda_allocated_bytes": null, + "peak_cuda_reserved_bytes": null, + "peak_resident_weight_bytes": 208032, + "peak_rss_bytes": 367259648, + "rss_units_source": "Linux ru_maxrss", + "seconds": { + "decode_sum": null, + "elapsed": 4.416, + "fill_sum": 0.008, + "forward_sum": 0.133, + "identity": 0.005, + "layer_load_max": 0.017, + "layer_load_sum": 0.058, + "layer_loads": 4, + "resident_load": 3.583, + "seal": 0.007 + } + }, + "runtime_environment": { + "cold_run": "20260907T165239Z-2062813", + "numeric_policy_observed": { + "NVIDIA_TF32_OVERRIDE": null, + "allow_tf32_cudnn": true, + "allow_tf32_matmul": false, + "deviates_from_default": false, + "float32_matmul_precision": "highest", + "observed_at": "seal time, after the forward" + }, + "python": "3.12.14" + }, + "schema": "malaiwah.fidelity-capture-runtime.v1", + "source_files": { + "bin/fidelity/codepin.py": "ce2a2c04d64adf7a268978a7ffe163c7d4cb5b675d5dc8e156f8a26a3b7bb5fd", + "bin/fidelity/panel.py": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "engines/tools/hf_capture.py": "44afcdac9f7c9cb26a35a2b7d9c1aed562344b76c8045a753651d2f2dbae99d0", + "engines/tools/layer_outer.py": "e3ea5715112663b1b60cf596eeffc2140e49b399809ece89a174bce41a969274" + }, + "stack_fingerprint": { + "attention_backend": "model default", + "cuda_runtime_version": null, + "device": "cpu", + "device_name": null, + "engine": "transformers-eager", + "numeric_policy": "default torch matmul precision; no TF32 override applied", + "schema": "malaiwah.stack-fingerprint.v1", + "torch_version": "2.11.0+cpu", + "transformers_version": "5.16.1" + }, + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd", + "upstream_receipts": [], + "weights": { + "checkpoint_files": [ + { + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "size": 1479 + }, + { + "name": "model.safetensors", + "sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1", + "size": 571000 + } + ], + "checkpoint_identity_algorithm": "sha256 over the canonical JSON {\"algorithm\": , \"files\": [{\"name\", \"size\", \"sha256\"}, ...]} of every *.safetensors shard plus config.json in the checkpoint directory, sorted by name; for a llama.cpp GGUF tree the shards are every *.gguf of the one build directory (name = /) and config.json is the official release's copy beside it", + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "model_revision": null, + "repository": "/tmp/qfs-complete-tiny-fixture/model", + "revision": null + } +} diff --git a/raw/candidates/ct-mxfp4/evidence/root/validation/structural-validation.json b/raw/candidates/ct-mxfp4/evidence/root/validation/structural-validation.json new file mode 100644 index 0000000000000000000000000000000000000000..fc9e935fa9555c9e78a2d9c830d09603008aea2a --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/root/validation/structural-validation.json @@ -0,0 +1,14 @@ +{ + "checks_run": [ + "pre-seal" + ], + "error_count": 0, + "errors": [], + "format_version": 1, + "receipt_sha256": "e119c65652612ff67b867992ad3c228bc641ef07313779c4f7fb572e2d4603f4", + "schema": "malaiwah.fidelity-structural-validation.v1", + "structural_status": "sealed", + "subject": "dataset:fidelity--quant-integration.root", + "warning_count": 0, + "warnings": [] +} diff --git a/raw/candidates/ct-mxfp4/evidence/smoke-evidence.json b/raw/candidates/ct-mxfp4/evidence/smoke-evidence.json new file mode 100644 index 0000000000000000000000000000000000000000..0b16dc0f1ee9b720146c258b2d83b0ba2b59faa3 --- /dev/null +++ b/raw/candidates/ct-mxfp4/evidence/smoke-evidence.json @@ -0,0 +1,163 @@ +{ + "kld_nats": 0.000866341033772075, + "decode": { + "activation_quantization": null, + "checkpoint_bytes_read": 125392, + "comparison_class": "advisory", + "components_consumed": 212, + "components_not_consumed": [], + "components_planned": 212, + "formats_decoded": { + "mxfp4-pack-quantized": 106 + }, + "method": "microfloat-weight-reconstruction", + "modules_decoded": 106, + "modules_not_decoded": [], + "modules_planned": 106, + "output_dtype": "bfloat16", + "quantization_config": { + "config_groups": { + "group_0": { + "format": "mxfp4-pack-quantized", + "input_activations": null, + "output_activations": null, + "targets": [ + "model.layers.0.mlp.down_proj", + "model.layers.0.mlp.gate_proj", + "model.layers.0.mlp.up_proj", + "model.layers.0.self_attn.indexer.weights_proj", + "model.layers.0.self_attn.indexer.wk", + "model.layers.0.self_attn.indexer.wq_b", + "model.layers.0.self_attn.kv_a_proj_with_mqa", + "model.layers.0.self_attn.o_proj", + "model.layers.0.self_attn.q_a_proj", + "model.layers.0.self_attn.q_b_proj", + "model.layers.1.mlp.experts.0.down_proj", + "model.layers.1.mlp.experts.0.gate_proj", + "model.layers.1.mlp.experts.0.up_proj", + "model.layers.1.mlp.experts.1.down_proj", + "model.layers.1.mlp.experts.1.gate_proj", + "model.layers.1.mlp.experts.1.up_proj", + "model.layers.1.mlp.experts.2.down_proj", + "model.layers.1.mlp.experts.2.gate_proj", + "model.layers.1.mlp.experts.2.up_proj", + "model.layers.1.mlp.experts.3.down_proj", + "model.layers.1.mlp.experts.3.gate_proj", + "model.layers.1.mlp.experts.3.up_proj", + "model.layers.1.mlp.experts.4.down_proj", + "model.layers.1.mlp.experts.4.gate_proj", + "model.layers.1.mlp.experts.4.up_proj", + "model.layers.1.mlp.experts.5.down_proj", + "model.layers.1.mlp.experts.5.gate_proj", + "model.layers.1.mlp.experts.5.up_proj", + "model.layers.1.mlp.experts.6.down_proj", + "model.layers.1.mlp.experts.6.gate_proj", + "model.layers.1.mlp.experts.6.up_proj", + "model.layers.1.mlp.experts.7.down_proj", + "model.layers.1.mlp.experts.7.gate_proj", + "model.layers.1.mlp.experts.7.up_proj", + "model.layers.1.mlp.shared_experts.down_proj", + "model.layers.1.mlp.shared_experts.gate_proj", + "model.layers.1.mlp.shared_experts.up_proj", + "model.layers.1.self_attn.kv_a_proj_with_mqa", + "model.layers.1.self_attn.o_proj", + "model.layers.1.self_attn.q_a_proj", + "model.layers.1.self_attn.q_b_proj", + "model.layers.2.mlp.experts.0.down_proj", + "model.layers.2.mlp.experts.0.gate_proj", + "model.layers.2.mlp.experts.0.up_proj", + "model.layers.2.mlp.experts.1.down_proj", + "model.layers.2.mlp.experts.1.gate_proj", + "model.layers.2.mlp.experts.1.up_proj", + "model.layers.2.mlp.experts.2.down_proj", + "model.layers.2.mlp.experts.2.gate_proj", + "model.layers.2.mlp.experts.2.up_proj", + "model.layers.2.mlp.experts.3.down_proj", + "model.layers.2.mlp.experts.3.gate_proj", + "model.layers.2.mlp.experts.3.up_proj", + "model.layers.2.mlp.experts.4.down_proj", + "model.layers.2.mlp.experts.4.gate_proj", + "model.layers.2.mlp.experts.4.up_proj", + "model.layers.2.mlp.experts.5.down_proj", + "model.layers.2.mlp.experts.5.gate_proj", + "model.layers.2.mlp.experts.5.up_proj", + "model.layers.2.mlp.experts.6.down_proj", + "model.layers.2.mlp.experts.6.gate_proj", + "model.layers.2.mlp.experts.6.up_proj", + "model.layers.2.mlp.experts.7.down_proj", + "model.layers.2.mlp.experts.7.gate_proj", + "model.layers.2.mlp.experts.7.up_proj", + "model.layers.2.mlp.shared_experts.down_proj", + "model.layers.2.mlp.shared_experts.gate_proj", + "model.layers.2.mlp.shared_experts.up_proj", + "model.layers.2.self_attn.indexer.weights_proj", + "model.layers.2.self_attn.indexer.wk", + "model.layers.2.self_attn.indexer.wq_b", + "model.layers.2.self_attn.kv_a_proj_with_mqa", + "model.layers.2.self_attn.o_proj", + "model.layers.2.self_attn.q_a_proj", + "model.layers.2.self_attn.q_b_proj", + "model.layers.3.mlp.experts.0.down_proj", + "model.layers.3.mlp.experts.0.gate_proj", + "model.layers.3.mlp.experts.0.up_proj", + "model.layers.3.mlp.experts.1.down_proj", + "model.layers.3.mlp.experts.1.gate_proj", + "model.layers.3.mlp.experts.1.up_proj", + "model.layers.3.mlp.experts.2.down_proj", + "model.layers.3.mlp.experts.2.gate_proj", + "model.layers.3.mlp.experts.2.up_proj", + "model.layers.3.mlp.experts.3.down_proj", + "model.layers.3.mlp.experts.3.gate_proj", + "model.layers.3.mlp.experts.3.up_proj", + "model.layers.3.mlp.experts.4.down_proj", + "model.layers.3.mlp.experts.4.gate_proj", + "model.layers.3.mlp.experts.4.up_proj", + "model.layers.3.mlp.experts.5.down_proj", + "model.layers.3.mlp.experts.5.gate_proj", + "model.layers.3.mlp.experts.5.up_proj", + "model.layers.3.mlp.experts.6.down_proj", + "model.layers.3.mlp.experts.6.gate_proj", + "model.layers.3.mlp.experts.6.up_proj", + "model.layers.3.mlp.experts.7.down_proj", + "model.layers.3.mlp.experts.7.gate_proj", + "model.layers.3.mlp.experts.7.up_proj", + "model.layers.3.mlp.shared_experts.down_proj", + "model.layers.3.mlp.shared_experts.gate_proj", + "model.layers.3.mlp.shared_experts.up_proj", + "model.layers.3.self_attn.kv_a_proj_with_mqa", + "model.layers.3.self_attn.o_proj", + "model.layers.3.self_attn.q_a_proj", + "model.layers.3.self_attn.q_b_proj" + ], + "weights": { + "dynamic": false, + "group_size": 32, + "num_bits": 4, + "scale_dtype": "torch.uint8", + "strategy": "group", + "symmetric": true, + "type": "float" + } + } + }, + "format": "mxfp4-pack-quantized", + "ignore": [], + "quant_method": "compressed-tensors", + "quantization_status": "compressed" + }, + "reader_evidence": { + "decode_plan_sha256": "2bb2eef8f5dea9e0662e3fce6fbb6ecf22842b18c7192484e78ea5a8850ce9fa", + "gate_header_barrier": false, + "source_files": { + "engines/tools/affine_surface.py": "37e7074797d53ae836e0af12fdbd2dc36c88778098aa44c72c1cd936d2b4c053", + "engines/tools/microscale_surface.py": "588923f0a4700436221923c794a8c112971d9f08e75c746742b0f0ede7921682", + "engines/tools/nvfp4_surface.py": "044b6fd2ee22d58512476e96060f7fa09030212a33736da1393c0103eb73e0c8", + "engines/tools/quant_stream.py": "7c6cc4cbe399d066eaff80ccf1e3d3190185f194644f738a404d3c537ad8e1ab" + } + }, + "reference": "compressed-tensors@0.18.0; DeepSeek-V4-Flash@60d8d70770c6776ff598c94bb586a859a38244f1/inference/kernel.py; nvidia/Qwen3.8-Flash-Next-NVFP4@fc694b54fb0174e0913e6adf86691ef85a4ead47/config.json+headers", + "scientific_disclosure": "Stored-weight reconstruction only; no native quantized GEMM, activation arithmetic, or quantizer optimization quality claim.", + "scope": "weights_reconstructed" + }, + "comparison_class": "advisory" +} diff --git a/raw/candidates/ct-mxfp4/model/LICENSE b/raw/candidates/ct-mxfp4/model/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..71f32fb2284323cef90b3e784a7655747c8ae683 --- /dev/null +++ b/raw/candidates/ct-mxfp4/model/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Michel Belleau + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/raw/candidates/ct-mxfp4/model/build-manifest.json b/raw/candidates/ct-mxfp4/model/build-manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..539ac3c8e8430caad8e5c81ca4d23dce391cac14 --- /dev/null +++ b/raw/candidates/ct-mxfp4/model/build-manifest.json @@ -0,0 +1,1561 @@ +{ + "architecture_inspiration": "GLM-5.2-SIQ-Fruit-bf16 geometry and dense/MoE plus full/shared DSA schedules; no Fruit or GLM model weights reused.", + "files": { + "config.json": { + "bytes": 1479, + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + "generation_config.json": { + "bytes": 216, + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + "model.safetensors": { + "bytes": 571000, + "sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1" + }, + "tokenizer.json": { + "bytes": 6763, + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + "tokenizer_config.json": { + "bytes": 236, + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + }, + "generation": "Native GlmMoeDsaForCausalLM random initialization in FP32, rounded to the published BF16 artifact; native router correction buffers retained FP32.", + "generator_sha256": "19c3489f1bc7e8e9323cb26afbead562816a6918d6823af252eb6d04dff8e81e", + "limitations": [ + "Random initialization; not trained or distilled.", + "Not a quantization or behavioral approximation of a released GLM model.", + "MTP intentionally absent (zero next-n-prediction layers); no unmatched MTP tensors.", + "This build manifest describes generated bytes, not proof of clean loading or capture; see separately measured verification evidence." + ], + "parameter_count": 277824, + "schema": "malaiwah.glm-moe-dsa-tiny-build.v1", + "seed": 20260907, + "stored_elements": 277848, + "tensor_count": 139, + "tensors": [ + { + "bytes": 33280, + "dtype": "torch.bfloat16", + "elements": 16640, + "name": "lm_head.weight", + "sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "shape": [ + 260, + 64 + ] + }, + { + "bytes": 33280, + "dtype": "torch.bfloat16", + "elements": 16640, + "name": "model.embed_tokens.weight", + "sha256": "18df1b3a5f263a31f5bd4225c3c4629573b75e47b7e28b6e73501586bb47d6f1", + "shape": [ + 260, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.0.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 16384, + "dtype": "torch.bfloat16", + "elements": 8192, + "name": "model.layers.0.mlp.down_proj.weight", + "sha256": "101a9db78e4e21058dcb6f5240e751bcaf3bd662b98696a63a719f86ecabf787", + "shape": [ + 64, + 128 + ] + }, + { + "bytes": 16384, + "dtype": "torch.bfloat16", + "elements": 8192, + "name": "model.layers.0.mlp.gate_proj.weight", + "sha256": "ef5262b354f74dce3a9dc4c3134e4db8cbf63f03ed8a1cd78ebb3e9a05af97cc", + "shape": [ + 128, + 64 + ] + }, + { + "bytes": 16384, + "dtype": "torch.bfloat16", + "elements": 8192, + "name": "model.layers.0.mlp.up_proj.weight", + "sha256": "359b4dac1da3e3956583050af84147aef2f41b8680a85b32083ffd0e1847d997", + "shape": [ + 128, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.0.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.0.self_attn.indexer.k_norm.bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 16 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.0.self_attn.indexer.k_norm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 512, + "dtype": "torch.bfloat16", + "elements": 256, + "name": "model.layers.0.self_attn.indexer.weights_proj.weight", + "sha256": "50ca7a10fe9a0556d8c3ad38bd3f715ee6c6e13084b4cb6b51b2ef78f57c53b2", + "shape": [ + 4, + 64 + ] + }, + { + "bytes": 2048, + "dtype": "torch.bfloat16", + "elements": 1024, + "name": "model.layers.0.self_attn.indexer.wk.weight", + "sha256": "f724d0b2c09ba9ae41cfc3fbe4e458bd7f644e5f0fb8c1446e19b3cf8c650274", + "shape": [ + 16, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.0.self_attn.indexer.wq_b.weight", + "sha256": "048349f93320b7625130fa5abc86dbcc89715b9f02d6853284563e765eb7bc11", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.0.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.0.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "5ad58e7c4515d8c4e84ecf10ecfa7aacb3c39ee1d6a3219307036bd8b59f529d", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.0.self_attn.kv_b_proj.weight", + "sha256": "9a8cfdd6e51c3868d27f147509d24549480e70f278758a8c16adf1ea5c197938", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.0.self_attn.o_proj.weight", + "sha256": "734b1edea5c19958ab29dfba4314ab5a5a25280be3db3de20b82b2e7c78c35ff", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.0.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.0.self_attn.q_a_proj.weight", + "sha256": "6d6e018ec4d4251755a002469f0778accef3b7628062f82a5d292d4130fd4c85", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.0.self_attn.q_b_proj.weight", + "sha256": "28ef2f379f06054843ff97f99d63f515a2f583059dd49fd894a53d04733f0650", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.1.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.0.down_proj.weight", + "sha256": "a0378aa3bb69ed49af25a51d57476ef63ccf5dc98bc4d3008d28660e16f82492", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.0.gate_proj.weight", + "sha256": "e6c7b0ce29c7e6ea16adfd8423cd9a8a27f1be217a2061a635468c9e5603439c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.0.up_proj.weight", + "sha256": "528f777edc3fc406c76dc1e150a648c23009c701134a3a86dcbdeb15f8ddc4bb", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.1.down_proj.weight", + "sha256": "c966c5eed64d8bb32ff5cf25587fc4eb714b7536b6f670725efb136acc6ca26c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.1.gate_proj.weight", + "sha256": "e55ceb89e6891b34fb67fe5c99b529a1cab9729bea2f6ef08be6af7eefcf6c2e", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.1.up_proj.weight", + "sha256": "46b43c2f3a025bab46be05795bb60916e592bb58d4fdf2a18d2e88d37a7a4fb8", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.2.down_proj.weight", + "sha256": "a649be4fd07f95d770fbe14e87561a13f62f155d2053b8a35fa6962b5d5e8c8d", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.2.gate_proj.weight", + "sha256": "5560e590344e57ff54425f4aa6c07edaaade8c73343e32c27199f1c0dc61fe51", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.2.up_proj.weight", + "sha256": "35a639103a8a914203b4dde3f87d197515879ae6ca72557cde8ea9dea6e6e0d2", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.3.down_proj.weight", + "sha256": "0969db499dfe821348b3c06873d36635f7216f1f595968ad43ae984b57565205", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.3.gate_proj.weight", + "sha256": "75c5c77c39a77a4a6dbe7b601a88814bca9cae6fcde0069ff2ca86352e6c13e7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.3.up_proj.weight", + "sha256": "241533cb545cfed7685091b023213c9d530cb54431a712eba7bf3aaebdae3b53", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.4.down_proj.weight", + "sha256": "ca1273d291e431a10b8d8c2170031b29440c2bec8bc1d7f46353990c7fe1a03f", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.4.gate_proj.weight", + "sha256": "69dc9149cbfd65fb10bd6c11f99357d279d471e5874cf19dbef7cfd8ee4d796c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.4.up_proj.weight", + "sha256": "81cb04732e3cc53acb1152c7fc06a6399af18a5f282762cb72abb56b1e6b7c6f", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.5.down_proj.weight", + "sha256": "ebd8e01f9c2daf657e915575afb3ff5ba261a2a83c25c9c50818319dd587a2f2", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.5.gate_proj.weight", + "sha256": "bc70a7d1a5263ca17d00766bb2dc48e1debb815344150741e55dea48af4d75c0", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.5.up_proj.weight", + "sha256": "f84a95d64728067676d4f7b61ac4a589fa11e45226a8996a4719d65f0b018dbf", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.6.down_proj.weight", + "sha256": "00535633e5d98b7a527cc1198d572a9104405e2aff7ee303ae60195654fb24c2", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.6.gate_proj.weight", + "sha256": "2bb299a5e306108c7af11aa5c6114abeb4d06bde9001e6f7644e0d9dca184dc5", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.6.up_proj.weight", + "sha256": "72df8a498b866a242abc9383b16c5b4428feadab02c7f274afa28653e8586107", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.7.down_proj.weight", + "sha256": "90331ab3da1e867c32d3db1aac94c69c86349dbb539400ed9e0c19c148bf5e43", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.7.gate_proj.weight", + "sha256": "576a9df3d1d72f7323e8a8490118821d826f50c9403ca7ecbe196277e62c7730", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.7.up_proj.weight", + "sha256": "3869533066e5bca84402355c6b80b177424f2d79d2b97cbb9cff30eee748135f", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.float32", + "elements": 8, + "name": "model.layers.1.mlp.gate.e_score_correction_bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 8 + ] + }, + { + "bytes": 1024, + "dtype": "torch.bfloat16", + "elements": 512, + "name": "model.layers.1.mlp.gate.weight", + "sha256": "7d1dbc5cc90900cdc1f9d4a241c8b62d0ad50de09231f9f036cce33982cfdfe7", + "shape": [ + 8, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.shared_experts.down_proj.weight", + "sha256": "eb5297f619dfdfb40419b3330406e8ff43cb0fe35797911f2de6ebff4b95690a", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.shared_experts.gate_proj.weight", + "sha256": "eeeff2280eef91eac1215b28717f2b7fdee09fdbfd484ff44855e7e7cdd11718", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.shared_experts.up_proj.weight", + "sha256": "dab5aeab83d842104e1c5557b9b6d6cb5fe519284b909e8c0c975c752dc92d41", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.1.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.1.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.1.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "bff5998ab14190d56392c70e92927904d84a2b9d04ee222967d774a5bb5eecc4", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.1.self_attn.kv_b_proj.weight", + "sha256": "876302ef3f8bba74a997f973913ca4b802aa488d27b46747c470062c9a7ebee5", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.1.self_attn.o_proj.weight", + "sha256": "ecda88672dc8fbc3bac348fa6118010e51b170d8fe3596a811bc9aa95f71915c", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.1.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.self_attn.q_a_proj.weight", + "sha256": "29fc979642704e621b0b6b59a24c13d6900782bfa9655ea9a3311c1d4c69770a", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.self_attn.q_b_proj.weight", + "sha256": "01bae246d61c4d08e751e42e6a03315b55266ae46bd15b34bd343f606a538349", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.2.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.0.down_proj.weight", + "sha256": "8c1c19d08541dc9251736b480f53cfefd21bfbcb0b4e9f725dc66e6c52d7705c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.0.gate_proj.weight", + "sha256": "8c326913b2ef159b507b584c1ae018619573a09b6f41ab687df629d3685884c4", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.0.up_proj.weight", + "sha256": "8611bc004f735fbc1c14a9c9c23f4150c7e754127e44926a44efd0b767a653ed", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.1.down_proj.weight", + "sha256": "1d4d668c4c8183e5991eefe780a138eda70578a4740c07df5b386f233cb4e5c3", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.1.gate_proj.weight", + "sha256": "21224f6173f4785ff6252dd0c1f7a6937b36bbd5bc1c20d25feecc85d6d25f3e", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.1.up_proj.weight", + "sha256": "05542672d0174f9ddfee4bd385b56455c004532da88bf34363b1e543948bf899", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.2.down_proj.weight", + "sha256": "7330dee9a6a416e9922f61d10ee0507584e007cbdd349131471b43a745b6fed8", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.2.gate_proj.weight", + "sha256": "eca5904e6634e97ca89e7dfb1f12774f78adb33b78256136e7e8ee522af92d96", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.2.up_proj.weight", + "sha256": "5a90748752e46844a0cf0efd84c16ec2db25315ffa7a13b9c4bff2697d00bbf6", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.3.down_proj.weight", + "sha256": "a42569462225d60158dfaf24406463f135b632fe258e66ae2e521efed502a37c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.3.gate_proj.weight", + "sha256": "8cf448df350984fe0429a1ca3b2081315b594e50ce85fbc2e9f63eafb8a896b7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.3.up_proj.weight", + "sha256": "54a1269ba638d42c7d6d3926826b04d52310c82804fddcd73c253680a4270032", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.4.down_proj.weight", + "sha256": "5a236edfdc8fc79f687cec866d13724515b8f26465dca2ffde051d0870d5d0ac", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.4.gate_proj.weight", + "sha256": "6c18140a11c9986f99b7c269da01a8f69f1b5215c41be1801d6900eb511bdc76", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.4.up_proj.weight", + "sha256": "7b964f5c207a6bbeaa589a6c07f9665967aca4e7c57148190ed6a6f12e0ca572", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.5.down_proj.weight", + "sha256": "74c2633e7d3b0bf844d3e3812533774fc09b6552435e778e68b442ad161c0985", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.5.gate_proj.weight", + "sha256": "6177166c1bc51e03fde63b60d85347f5a5412446df5b4dd893817d18fcf0d56c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.5.up_proj.weight", + "sha256": "7bb8e1f65a918589a1593926dc93bf3fa1329f5d31f16266c3ad6fe0fd390d47", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.6.down_proj.weight", + "sha256": "af74e303b86b1aec96fd69b64d39848d7d08f255822739cf7d5f4456de67f010", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.6.gate_proj.weight", + "sha256": "c4fc94863e17270bf8cb5a18d3a125bea82d04bfb38457fd27896a00ddeea056", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.6.up_proj.weight", + "sha256": "4e92bebe11c518a225d75d4d7de7b85f9a82baad7a961ac090dd7343a612b577", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.7.down_proj.weight", + "sha256": "8971d6a869ba59445fe28163bd73c74c8338e0b8b675f008277b5a8973967bb2", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.7.gate_proj.weight", + "sha256": "3f90ff90c18d50349a50d11c472d48c6b297496ba5bedfe4ff0da257e1e2fdef", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.7.up_proj.weight", + "sha256": "5a2fcecdbb84a9138b4dd32da15793393aeaee1d00da95ed3d55803b1f45cc86", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.float32", + "elements": 8, + "name": "model.layers.2.mlp.gate.e_score_correction_bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 8 + ] + }, + { + "bytes": 1024, + "dtype": "torch.bfloat16", + "elements": 512, + "name": "model.layers.2.mlp.gate.weight", + "sha256": "aa35eb60ee6dd8e32728c95210b15016120675b111542f36ee1b1cca64668f9d", + "shape": [ + 8, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.shared_experts.down_proj.weight", + "sha256": "e8a1e6e8db3b1996aad9cd457ae20aa5aaac876d400fd6e8d764f543ff7833b9", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.shared_experts.gate_proj.weight", + "sha256": "c5b456aab9a02d3828987060b24d24c07e7b611d3036f0d5c28662c922d1238d", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.shared_experts.up_proj.weight", + "sha256": "6a84e814bd21fcc17878151b94508853dd70099787ef5303cdc06f90b6cd7092", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.2.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.2.self_attn.indexer.k_norm.bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 16 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.2.self_attn.indexer.k_norm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 512, + "dtype": "torch.bfloat16", + "elements": 256, + "name": "model.layers.2.self_attn.indexer.weights_proj.weight", + "sha256": "d65c6e5c3f34fcad47b7137c46dd3bcd6d5cf24ce508df7fad9d20788d3a18b8", + "shape": [ + 4, + 64 + ] + }, + { + "bytes": 2048, + "dtype": "torch.bfloat16", + "elements": 1024, + "name": "model.layers.2.self_attn.indexer.wk.weight", + "sha256": "917ff454cb253fa0e5d3d68bf15e716401bb928fbd7cd260a348afec25b1b2c8", + "shape": [ + 16, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.self_attn.indexer.wq_b.weight", + "sha256": "3fe5b407fe2d74a0dda78b6cb7ae3f65066a781fd5f81971b83be600fc911d14", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.2.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.2.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "26cecf47e8fb14a837f760549a9b9dd8589c37dc76870f8b115d4ab634b853ab", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.2.self_attn.kv_b_proj.weight", + "sha256": "23447f5f72c55b0cd7acd571ff1317c16c8097e9f0de4cc9b66101b51f7988c1", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.2.self_attn.o_proj.weight", + "sha256": "a1a0c84b3214c9b7b00c438754280833964cdc719aadeff64358b3d09b2063d8", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.2.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.self_attn.q_a_proj.weight", + "sha256": "3eda4fc6a047b282d63ad2884d870ee8150a99f3c71d21031ea71e749cf39815", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.self_attn.q_b_proj.weight", + "sha256": "58ecb919757c3c93d6a43b9344236d9abd32870e68907f37cb8db779d2c93fff", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.3.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.0.down_proj.weight", + "sha256": "e8c77c987baa36019ce1adf05e02e2a31395286e584428b2049e06331848c216", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.0.gate_proj.weight", + "sha256": "69871151865d8a23e2cc39b9fe5da60eb4f41cb6c053520f29d7c7b58e6fa5e0", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.0.up_proj.weight", + "sha256": "12df1ea42b96e959785c09427c3ca3bcdc53aa7942d15187c7b1e19bdd66d08a", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.1.down_proj.weight", + "sha256": "5feaa5de7da59348b465458b8aff5373b11dae8b5150f8e7bb8015acc172e3ff", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.1.gate_proj.weight", + "sha256": "e907e6e36b7266d56e190c1e56551e0a40d64741ce668328d898c17b488ec6c9", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.1.up_proj.weight", + "sha256": "c0062ef6004073cbabf3098703b5f565f0e973e094d90c3eba36c7be471f947e", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.2.down_proj.weight", + "sha256": "efec1e8a6a5e12a6db226699e10a6d346fa95c453009f148fe304d378567f5fe", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.2.gate_proj.weight", + "sha256": "7722cc87a7696f53e7f1e0d741230a7db18d2c324f7faec742a9621c75189cb7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.2.up_proj.weight", + "sha256": "5917df5932d0ce4854458ce357a8a2c3384bc463531996875d1c68c6ea17734c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.3.down_proj.weight", + "sha256": "fd331dc77911f8d80ddfdee938993a08b3715d06767901879c5a55700dbb8961", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.3.gate_proj.weight", + "sha256": "1e8aa3749cdc3d21baf7108c47bb69ad4a532c1f41c0556ca8d68ca2c226a7a8", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.3.up_proj.weight", + "sha256": "858e72360951a5073d117a75b2cd759bc3503c6c270388b30fe73d7554f54dae", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.4.down_proj.weight", + "sha256": "b80cf998a1db7569ca4600388bbe4c6d20bd7fe7209c4e37b5de015041d01423", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.4.gate_proj.weight", + "sha256": "b39a0f5b9cd6f9175e7fa29b342772476caf8a76dad1c34d88075988c1894853", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.4.up_proj.weight", + "sha256": "cef4d7b5fb77e750e91c17cae1622a6362ba204b1b30bf5ed7b65f9e6ed15ff1", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.5.down_proj.weight", + "sha256": "65a04840ec88842630cc6f120899a3bfa6151990d7411bfe44839727648e4d03", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.5.gate_proj.weight", + "sha256": "101836900c549af917f8392a6b1428e2f14e4e1f1ef0fdd9b04e79b98c1c3d02", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.5.up_proj.weight", + "sha256": "4fc8edda4b1a92a43be268a8b249274dd5f4370fd6ea6a3134b8c2c4cf730d95", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.6.down_proj.weight", + "sha256": "fd3a10e1464c20bf5e575c105f39882bcbddcab892ef36f24e5a852d597ee7ef", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.6.gate_proj.weight", + "sha256": "8211aaeed6f1ea2711aa1865309d2d36742c0b41021eea1e00fcac45dc353b4b", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.6.up_proj.weight", + "sha256": "ec4f5d1acc5d045de6ae4106bc8f52d17d64ac355c910f12fac8b1b0b573296d", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.7.down_proj.weight", + "sha256": "03c257936ec78df3f941fe0ca4ce5aad636654cf2a351b64515ac07ad8871cae", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.7.gate_proj.weight", + "sha256": "67c1e28fd0a028104b9c76279a3c473f50452633c8a4feabda637e5f5b71f797", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.7.up_proj.weight", + "sha256": "1b18f8b452b71ca57fec09892a48df2ee2108067f97f62b76a3817c9bea91708", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.float32", + "elements": 8, + "name": "model.layers.3.mlp.gate.e_score_correction_bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 8 + ] + }, + { + "bytes": 1024, + "dtype": "torch.bfloat16", + "elements": 512, + "name": "model.layers.3.mlp.gate.weight", + "sha256": "7e86bda3f7704f19dc2a3f6a0ca22b0df554723adf0cf3add837a1e497ad4d3a", + "shape": [ + 8, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.shared_experts.down_proj.weight", + "sha256": "110ad4d8dd59a5ec2b0d4c2e0a79d022bcdba240a4998ff84ad2590dd32fce2c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.shared_experts.gate_proj.weight", + "sha256": "cca5d02ac9eccab3ee8be47f55ef4d59750dd311800e25c22cc3f22b437ffd8b", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.shared_experts.up_proj.weight", + "sha256": "c8fe3987299d1526946a87facc4d3f99300fafbac552471ed826454c41ed31e5", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.3.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.3.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.3.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "5c230cafd4add95096f53702bab8ef1673993cca9433de8c874638958a61995a", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.3.self_attn.kv_b_proj.weight", + "sha256": "ff432280fe1fbbc2a5b7fee7fb18f6de59d675d2d7d0eec0d769a5fd012699a9", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.3.self_attn.o_proj.weight", + "sha256": "59e2e2ee8f9cba29e9cf3e6098539ddca5811d35d3df3c860488f348d6be9584", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.3.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.self_attn.q_a_proj.weight", + "sha256": "172aae8ff1a79376bf65182f5e92c06da2f9b307c15f214a20597491729aa0d7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.self_attn.q_b_proj.weight", + "sha256": "5d917d8c510906982c609808f1eb0d16da467976550e3a063637f1fde013cbdb", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.norm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + } + ], + "tokenizer": { + "kind": "byte-level BPE without merges", + "special_token_ids": { + "": 1, + "": 2, + "": 0, + "": 3 + }, + "vocab_size": 260 + }, + "versions": { + "safetensors": "0.8.0", + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "transformers": "5.16.1" + } +} diff --git a/raw/candidates/ct-mxfp4/model/config.json b/raw/candidates/ct-mxfp4/model/config.json new file mode 100644 index 0000000000000000000000000000000000000000..a415a6a4cd37779634604c6d13b16997a856a254 --- /dev/null +++ b/raw/candidates/ct-mxfp4/model/config.json @@ -0,0 +1,198 @@ +{ + "architectures": [ + "GlmMoeDsaForCausalLM" + ], + "attention_bias": false, + "attention_dropout": 0.0, + "bos_token_id": 1, + "dtype": "bfloat16", + "eos_token_id": 2, + "first_k_dense_replace": 1, + "head_dim": 8, + "hidden_act": "silu", + "hidden_size": 64, + "index_head_dim": 16, + "index_n_heads": 4, + "index_topk": 8, + "indexer_types": [ + "full", + "shared", + "full", + "shared" + ], + "initializer_range": 0.02, + "intermediate_size": 128, + "kv_lora_rank": 16, + "layer_types": [ + "deepseek_sparse_attention", + "deepseek_sparse_attention", + "deepseek_sparse_attention", + "deepseek_sparse_attention" + ], + "max_position_embeddings": 256, + "mlp_bias": false, + "mlp_layer_types": [ + "dense", + "sparse", + "sparse", + "sparse" + ], + "model_type": "glm_moe_dsa", + "moe_intermediate_size": 32, + "n_group": 1, + "n_routed_experts": 8, + "n_shared_experts": 1, + "norm_topk_prob": true, + "num_attention_heads": 4, + "num_experts_per_tok": 2, + "num_hidden_layers": 4, + "num_key_value_heads": 4, + "num_nextn_predict_layers": 0, + "pad_token_id": 0, + "q_lora_rank": 32, + "qk_head_dim": 16, + "qk_nope_head_dim": 8, + "qk_rope_head_dim": 8, + "rms_norm_eps": 1e-05, + "rope_parameters": { + "rope_theta": 10000.0, + "rope_type": "default" + }, + "routed_scaling_factor": 2.5, + "tie_word_embeddings": false, + "topk_group": 1, + "transformers_version": "5.16.1", + "use_cache": true, + "v_head_dim": 16, + "vocab_size": 260, + "quantization_config": { + "quant_method": "compressed-tensors", + "format": "mxfp4-pack-quantized", + "quantization_status": "compressed", + "ignore": [], + "config_groups": { + "group_0": { + "format": "mxfp4-pack-quantized", + "targets": [ + "model.layers.0.mlp.down_proj", + "model.layers.0.mlp.gate_proj", + "model.layers.0.mlp.up_proj", + "model.layers.0.self_attn.indexer.weights_proj", + "model.layers.0.self_attn.indexer.wk", + "model.layers.0.self_attn.indexer.wq_b", + "model.layers.0.self_attn.kv_a_proj_with_mqa", + "model.layers.0.self_attn.o_proj", + "model.layers.0.self_attn.q_a_proj", + "model.layers.0.self_attn.q_b_proj", + "model.layers.1.mlp.experts.0.down_proj", + "model.layers.1.mlp.experts.0.gate_proj", + "model.layers.1.mlp.experts.0.up_proj", + "model.layers.1.mlp.experts.1.down_proj", + "model.layers.1.mlp.experts.1.gate_proj", + "model.layers.1.mlp.experts.1.up_proj", + "model.layers.1.mlp.experts.2.down_proj", + "model.layers.1.mlp.experts.2.gate_proj", + "model.layers.1.mlp.experts.2.up_proj", + "model.layers.1.mlp.experts.3.down_proj", + "model.layers.1.mlp.experts.3.gate_proj", + "model.layers.1.mlp.experts.3.up_proj", + "model.layers.1.mlp.experts.4.down_proj", + "model.layers.1.mlp.experts.4.gate_proj", + "model.layers.1.mlp.experts.4.up_proj", + "model.layers.1.mlp.experts.5.down_proj", + "model.layers.1.mlp.experts.5.gate_proj", + "model.layers.1.mlp.experts.5.up_proj", + "model.layers.1.mlp.experts.6.down_proj", + "model.layers.1.mlp.experts.6.gate_proj", + "model.layers.1.mlp.experts.6.up_proj", + "model.layers.1.mlp.experts.7.down_proj", + "model.layers.1.mlp.experts.7.gate_proj", + "model.layers.1.mlp.experts.7.up_proj", + "model.layers.1.mlp.shared_experts.down_proj", + "model.layers.1.mlp.shared_experts.gate_proj", + "model.layers.1.mlp.shared_experts.up_proj", + "model.layers.1.self_attn.kv_a_proj_with_mqa", + "model.layers.1.self_attn.o_proj", + "model.layers.1.self_attn.q_a_proj", + "model.layers.1.self_attn.q_b_proj", + "model.layers.2.mlp.experts.0.down_proj", + "model.layers.2.mlp.experts.0.gate_proj", + "model.layers.2.mlp.experts.0.up_proj", + "model.layers.2.mlp.experts.1.down_proj", + "model.layers.2.mlp.experts.1.gate_proj", + "model.layers.2.mlp.experts.1.up_proj", + "model.layers.2.mlp.experts.2.down_proj", + "model.layers.2.mlp.experts.2.gate_proj", + "model.layers.2.mlp.experts.2.up_proj", + "model.layers.2.mlp.experts.3.down_proj", + "model.layers.2.mlp.experts.3.gate_proj", + "model.layers.2.mlp.experts.3.up_proj", + "model.layers.2.mlp.experts.4.down_proj", + "model.layers.2.mlp.experts.4.gate_proj", + "model.layers.2.mlp.experts.4.up_proj", + "model.layers.2.mlp.experts.5.down_proj", + "model.layers.2.mlp.experts.5.gate_proj", + "model.layers.2.mlp.experts.5.up_proj", + "model.layers.2.mlp.experts.6.down_proj", + "model.layers.2.mlp.experts.6.gate_proj", + "model.layers.2.mlp.experts.6.up_proj", + "model.layers.2.mlp.experts.7.down_proj", + "model.layers.2.mlp.experts.7.gate_proj", + "model.layers.2.mlp.experts.7.up_proj", + "model.layers.2.mlp.shared_experts.down_proj", + "model.layers.2.mlp.shared_experts.gate_proj", + "model.layers.2.mlp.shared_experts.up_proj", + "model.layers.2.self_attn.indexer.weights_proj", + "model.layers.2.self_attn.indexer.wk", + "model.layers.2.self_attn.indexer.wq_b", + "model.layers.2.self_attn.kv_a_proj_with_mqa", + "model.layers.2.self_attn.o_proj", + "model.layers.2.self_attn.q_a_proj", + "model.layers.2.self_attn.q_b_proj", + "model.layers.3.mlp.experts.0.down_proj", + "model.layers.3.mlp.experts.0.gate_proj", + "model.layers.3.mlp.experts.0.up_proj", + "model.layers.3.mlp.experts.1.down_proj", + "model.layers.3.mlp.experts.1.gate_proj", + "model.layers.3.mlp.experts.1.up_proj", + "model.layers.3.mlp.experts.2.down_proj", + "model.layers.3.mlp.experts.2.gate_proj", + "model.layers.3.mlp.experts.2.up_proj", + "model.layers.3.mlp.experts.3.down_proj", + "model.layers.3.mlp.experts.3.gate_proj", + "model.layers.3.mlp.experts.3.up_proj", + "model.layers.3.mlp.experts.4.down_proj", + "model.layers.3.mlp.experts.4.gate_proj", + "model.layers.3.mlp.experts.4.up_proj", + "model.layers.3.mlp.experts.5.down_proj", + "model.layers.3.mlp.experts.5.gate_proj", + "model.layers.3.mlp.experts.5.up_proj", + "model.layers.3.mlp.experts.6.down_proj", + "model.layers.3.mlp.experts.6.gate_proj", + "model.layers.3.mlp.experts.6.up_proj", + "model.layers.3.mlp.experts.7.down_proj", + "model.layers.3.mlp.experts.7.gate_proj", + "model.layers.3.mlp.experts.7.up_proj", + "model.layers.3.mlp.shared_experts.down_proj", + "model.layers.3.mlp.shared_experts.gate_proj", + "model.layers.3.mlp.shared_experts.up_proj", + "model.layers.3.self_attn.kv_a_proj_with_mqa", + "model.layers.3.self_attn.o_proj", + "model.layers.3.self_attn.q_a_proj", + "model.layers.3.self_attn.q_b_proj" + ], + "input_activations": null, + "output_activations": null, + "weights": { + "num_bits": 4, + "type": "float", + "group_size": 32, + "strategy": "group", + "symmetric": true, + "dynamic": false, + "scale_dtype": "torch.uint8" + } + } + } + } +} diff --git a/raw/candidates/ct-mxfp4/model/cpu-comparison-receipt.json b/raw/candidates/ct-mxfp4/model/cpu-comparison-receipt.json new file mode 100644 index 0000000000000000000000000000000000000000..f0585d9ad8ac65ceca940a79603f522a1f534f5c --- /dev/null +++ b/raw/candidates/ct-mxfp4/model/cpu-comparison-receipt.json @@ -0,0 +1,458 @@ +{ + "candidate": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "dataset_id": "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "dataset_sha256": "c3ff6c32dc57502825d3ca3ac2133ed6a4c31e7bc7602191d595ee044ebe9048", + "form": "hidden", + "head": { + "bits": 16, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510" + }, + "label": "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d", + "lane": "other", + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "repository": "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "revision": null, + "role": "root", + "scope_digest": "attn.o=native:bf16@16|attn.qkv=native:bf16@16|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=native:bf16@16|mlp.gate=native:bf16@16|mlp.up=native:bf16@16|moe.experts=native:bf16@16|norm=native:bf16@16|head=native|kv=bf16", + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd", + "weights": { + "artifact_ref": null, + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "codec": null, + "config_sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "declared_bits": null, + "declared_head_bits": 16, + "index_sha256": null, + "model_ref": null, + "model_revision": "45563636ef723acfb826755493447dc40c7a0c37", + "quantized": false, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37" + } + }, + "comparability": { + "bias": null, + "class": "strict", + "key": null, + "key_inputs": null, + "same_lane": true, + "usable_as_floor": true + }, + "comparator": { + "accumulation_dtype": "float64", + "bf16_reduced_precision_reduction": false, + "cublas_workspace_config": null, + "deterministic_algorithms": true, + "device": "cpu", + "estimator_backend": "torch:k6_kld_report._token_kld", + "head_applied_candidate_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "head_applied_reference_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "head_applied_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "logprob_dtype": "float64", + "position_block": 128, + "replay_backend": "numpy:cpu:float32", + "replay_env": { + "blas_configuration": "OpenBLAS 0.3.34.106.0 USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell MAX_THREADS=64", + "blas_name": "scipy-openblas", + "blas_threads": 2, + "blas_threads_source": "ctypes:scipy_openblas_get_num_threads64_", + "blas_version": "0.3.34.106.0", + "cpu_model": "Intel(R) Xeon(R) CPU X5570 @ 2.93GHz", + "library": "numpy", + "numpy_version": "2.5.3", + "replay_dtype": "float32" + }, + "replay_peak_device_bytes": null, + "short_circuited": true, + "source_file_hashes_verified": true, + "tensor_content_digests_verified": true, + "tf32": false, + "tool": { + "entrypoint": "bin/fidelity-dataset compare", + "note": "the fp64 estimator is k6_kld_report._token_kld, imported not copied, whenever torch is importable; estimator_backend records which path ran." + }, + "two_pass": true, + "vocab_chunk": 8192 + }, + "comparison_kind": "reproduction_confirmation", + "context_depth_buckets": null, + "created_utc": "2026-09-07T12:39:47Z", + "determinism": { + "cold_start_per_run": null, + "distinct_evidence_hash_count": 1, + "evidence_hashes": [ + "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39" + ], + "evidence_kind": "hidden_state_tensor_sha256", + "identical_across_runs": null, + "max_run_mean": 0.0, + "min_run_mean": 0.0, + "note": "one comparison of two sealed captures. identical_across_runs is null, not true: that claim needs two independently produced captures of the SAME weights (SC-2), which is a different receipt.", + "population_stddev_of_run_means": 0.0, + "run_count": 1, + "run_means": [ + 0.0 + ] + }, + "disclosures": [ + { + "affects_comparability": false, + "code": "shared_reference_head", + "detail": "HEAD-1a: both captures declare the same lm_head tensor content digest (2364995d4009); one head applied to both sides is a shared APPLICATION of identical WEIGHTS.", + "severity": "info" + } + ], + "estimator": { + "accumulation_dtype": "float64", + "head_policy": "shared_reference_head", + "hidden_dtype": "bf16", + "logits_dtype": "float32", + "softmax_note": "full vocabulary, torch.log_softmax in float64; no truncation, no top-k, no clamp. A non-finite intermediate is a hard refusal.", + "stack_relation": "same_stack", + "two_pass": true, + "vocab_chunk": 8192, + "zero_handling": "exact zero asserted, not rounded" + }, + "format_version": 1, + "gates": { + "coverage": { + "detail": "4 of 4/4 declared records shared", + "overridden_by": null, + "passed": true + }, + "decode": { + "detail": "self-compare: both sides are the same artifact; the weights-decode caveats apply to a measurement against a reference, not to SC-1", + "overridden_by": null, + "passed": true + }, + "form": { + "detail": "hidden vs hidden", + "overridden_by": null, + "passed": true + }, + "geometry": { + "detail": "vocab_size 260 equal; hidden_width 64", + "overridden_by": null, + "passed": true + }, + "head": { + "detail": "HEAD-1a: identical head content digest on both sides", + "overridden_by": null, + "passed": true + }, + "lane": { + "detail": "lane=other vs other", + "overridden_by": null, + "passed": true + }, + "lossy": { + "detail": "lossy_codec null on both sides", + "overridden_by": null, + "passed": true + }, + "panel": { + "detail": "suite_token_hash_sha256 equal; 4 shared records; per-record token and mask digests equal; scoring_window equal", + "overridden_by": null, + "passed": true + }, + "seal": { + "detail": "both manifests self-seal and checksums.txt verified; every tensor_content_sha256 recomputed", + "overridden_by": null, + "passed": true + }, + "stack": { + "detail": "lane_identity equal / stack_fingerprint equal -> same_stack", + "overridden_by": null, + "passed": true + } + }, + "high_kld_contexts": [ + { + "allocation_stratum": null, + "domain": "garden", + "index": 0, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0000" + }, + { + "allocation_stratum": null, + "domain": "arithmetic", + "index": 1, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0001" + }, + { + "allocation_stratum": null, + "domain": "code", + "index": 2, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0002" + }, + { + "allocation_stratum": null, + "domain": "instructions", + "index": 3, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0003" + } + ], + "kl": { + "max": 0.0, + "mean": 0.0, + "median": 0.0, + "p95": 0.0, + "p99": 0.0, + "p99_9": 0.0 + }, + "kl_macro_stratum_mean": null, + "kl_micro_token_mean": 0.0, + "measurement_scope": { + "contexts": 4, + "covers_full_panel": true, + "position_filter": "all", + "positions_per_context": 63, + "scored_positions": 252, + "subset_detail": null + }, + "metric": { + "direction": "reference_to_candidate", + "direction_label": "KL(reference || candidate)", + "higher_is_better": false, + "name": "mean_tokenwise_kld", + "units": "nats", + "value": 0.0 + }, + "panel": { + "context_length": 64, + "contexts": 4, + "panel_id": "panel--panel", + "panel_token_sha256_legacy": "3c9467c85be43d238926f6d18bf825c2e4748814c95b8b0e8b8f1420546c3089", + "scored_positions": 252, + "scoring_window": { + "dropped_positions_total": 0, + "min_left_context_tokens": 1, + "policy": "every causal prediction position of every window is scored; nothing is dropped", + "score_from": 0, + "windowed": false + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + }, + "tokenizer_candidate": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + }, + "tokenizer_identity_equal": true, + "tokenizer_reference": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } + }, + "per_context": [ + { + "allocation_stratum": null, + "domain": "garden", + "index": 0, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0000" + }, + { + "allocation_stratum": null, + "domain": "arithmetic", + "index": 1, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0001" + }, + { + "allocation_stratum": null, + "domain": "code", + "index": 2, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0002" + }, + { + "allocation_stratum": null, + "domain": "instructions", + "index": 3, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0003" + } + ], + "per_domain": null, + "per_stratum": null, + "receipt_sha256": "4910833e5cc175ea351055e567c5d896475b4020598359291aedc958d8ada382", + "reference": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "dataset_id": "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "dataset_sha256": "56588f20f9cf055301f83a828fa75fa94c1e26593e64a07c5c6c4e38e9454563", + "form": "hidden", + "head": { + "bits": 16, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510" + }, + "label": "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "lane": "other", + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "repository": "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "revision": null, + "role": "root", + "scope_digest": "attn.o=native:bf16@16|attn.qkv=native:bf16@16|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=native:bf16@16|mlp.gate=native:bf16@16|mlp.up=native:bf16@16|moe.experts=native:bf16@16|norm=native:bf16@16|head=native|kv=bf16", + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd", + "weights": { + "artifact_ref": null, + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "codec": null, + "config_sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "declared_bits": null, + "declared_head_bits": 16, + "index_sha256": null, + "model_ref": null, + "model_revision": "45563636ef723acfb826755493447dc40c7a0c37", + "quantized": false, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37" + } + }, + "schema": "malaiwah.fidelity-comparison-receipt.v1", + "self_compare": { + "asserted_exact_zero": true, + "capture_content_digest_equal": true, + "expected_tokenwise_bytes": 2144, + "expected_tokenwise_sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d", + "force_compute_agreed": true, + "head_digest_equal": true, + "weights_identity_equal": true + }, + "submission": { + "emitted": false, + "path": null, + "receipt_sha256": null, + "refusal": "comparison_kind is reproduction_confirmation, not measurement; bin/fidelity/receipt.py::_scan_for_unsubmittable is the second, independent refusal axis.", + "submission_schema": null + }, + "tokenwise": { + "bytes": 2144, + "path": "tokenwise-kld.npy", + "sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d" + }, + "top1_agreement": 1.0, + "top1_discordant_contexts": [], + "uncertainty": { + "ci95_high": null, + "ci95_low": null, + "cluster_unit": null, + "clusters": null, + "method": "none", + "samples": null, + "seed": null + } +} diff --git a/raw/candidates/ct-mxfp4/model/cpu-reproduction-summary.json b/raw/candidates/ct-mxfp4/model/cpu-reproduction-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..7fe4e433fbfabcad4ab3781b796fbd3439d5db17 --- /dev/null +++ b/raw/candidates/ct-mxfp4/model/cpu-reproduction-summary.json @@ -0,0 +1,851 @@ +{ + "captures": { + "first": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "cold_run": "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "dataset_sha256": "56588f20f9cf055301f83a828fa75fa94c1e26593e64a07c5c6c4e38e9454563", + "generation_sanity_probe": { + "degenerate": false, + "enforced": false, + "entropy_nats": 5.548019647470335, + "expect": null, + "logit_spread": 0.986328125, + "note": "one extra window through the same schedule; its hidden state is discarded and never enters the dataset.", + "prompt": "The capital of France is", + "schema": "malaiwah.generation-sanity-probe.v1", + "status": "recorded", + "top1_id": 113, + "top1_probability": 0.006720104384265371, + "top1_text": "�", + "top_k": [ + { + "id": 113, + "probability": 0.006720104384265371, + "text": "�" + }, + { + "id": 237, + "probability": 0.006412368399474785, + "text": "�" + }, + { + "id": 193, + "probability": 0.006035639491843906, + "text": "\u0001" + }, + { + "id": 236, + "probability": 0.0055386141320063614, + "text": "�" + }, + { + "id": 44, + "probability": 0.0054740873228682424, + "text": "I" + } + ], + "uniform_entropy_nats": 5.560681631015528, + "vocab_size": 260 + }, + "head_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "memory_report": { + "context_length": 64, + "decoder_layers": null, + "device": "cpu", + "hidden_size": 64, + "layer_residency": null, + "model": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "peak_resident_weight_bytes": 555776, + "peak_resident_weight_detail": { + "buffers": 128, + "parameters": 555648, + "total": 555776 + }, + "peak_resident_weight_gb": 0.001, + "peak_rss_bytes": 367374336, + "peak_rss_gb": 0.367, + "resident_weight_note": "the maximum, over the run, of the materialised parameter+buffer bytes. On the CPU path peak_rss_bytes ALSO counts the safetensors mmap page cache, which is evictable and is not held by the schedule; this figure is not confounded by it. On CUDA, peak_cuda_allocated_bytes is the authoritative number because it includes activations and workspace and has no page cache.", + "rss_units_source": "Linux ru_maxrss", + "schedule": "window-outer", + "vocab_size": 260, + "windows": 4 + }, + "path": "first", + "pid": 406991, + "resources": { + "bytes": { + "checkpoint_read": 572479, + "hidden_d2h": 36616, + "weights_h2d": null + }, + "checkpoint_bytes": 572479, + "checkpoint_files": 2, + "device_name": null, + "forward_timing": "wall-clock", + "note": "provenance, not identity: peaks and stage seconds this run measured; forward_sum is device time under cuda-events, wall time otherwise; seal covers head serialisation up to this block's assembly", + "peak_cuda_allocated_bytes": null, + "peak_cuda_reserved_bytes": null, + "peak_resident_weight_bytes": 555776, + "peak_rss_bytes": 367374336, + "rss_units_source": "Linux ru_maxrss", + "seconds": { + "decode_sum": null, + "elapsed": 2.448, + "fill_sum": null, + "forward_sum": 0.126, + "identity": 0.005, + "layer_load_max": null, + "layer_load_sum": null, + "layer_loads": null, + "resident_load": 2.283, + "seal": 0.007 + } + }, + "runtime_versions": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 406991, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd" + }, + "repeat": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "cold_run": "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d", + "dataset_sha256": "c3ff6c32dc57502825d3ca3ac2133ed6a4c31e7bc7602191d595ee044ebe9048", + "generation_sanity_probe": { + "degenerate": false, + "enforced": false, + "entropy_nats": 5.548019647470335, + "expect": null, + "logit_spread": 0.986328125, + "note": "one extra window through the same schedule; its hidden state is discarded and never enters the dataset.", + "prompt": "The capital of France is", + "schema": "malaiwah.generation-sanity-probe.v1", + "status": "recorded", + "top1_id": 113, + "top1_probability": 0.006720104384265371, + "top1_text": "�", + "top_k": [ + { + "id": 113, + "probability": 0.006720104384265371, + "text": "�" + }, + { + "id": 237, + "probability": 0.006412368399474785, + "text": "�" + }, + { + "id": 193, + "probability": 0.006035639491843906, + "text": "\u0001" + }, + { + "id": 236, + "probability": 0.0055386141320063614, + "text": "�" + }, + { + "id": 44, + "probability": 0.0054740873228682424, + "text": "I" + } + ], + "uniform_entropy_nats": 5.560681631015528, + "vocab_size": 260 + }, + "head_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "memory_report": { + "context_length": 64, + "decoder_layers": null, + "device": "cpu", + "hidden_size": 64, + "layer_residency": null, + "model": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "peak_resident_weight_bytes": 555776, + "peak_resident_weight_detail": { + "buffers": 128, + "parameters": 555648, + "total": 555776 + }, + "peak_resident_weight_gb": 0.001, + "peak_rss_bytes": 367198208, + "peak_rss_gb": 0.367, + "resident_weight_note": "the maximum, over the run, of the materialised parameter+buffer bytes. On the CPU path peak_rss_bytes ALSO counts the safetensors mmap page cache, which is evictable and is not held by the schedule; this figure is not confounded by it. On CUDA, peak_cuda_allocated_bytes is the authoritative number because it includes activations and workspace and has no page cache.", + "rss_units_source": "Linux ru_maxrss", + "schedule": "window-outer", + "vocab_size": 260, + "windows": 4 + }, + "path": "repeat", + "pid": 409089, + "resources": { + "bytes": { + "checkpoint_read": 572479, + "hidden_d2h": 36616, + "weights_h2d": null + }, + "checkpoint_bytes": 572479, + "checkpoint_files": 2, + "device_name": null, + "forward_timing": "wall-clock", + "note": "provenance, not identity: peaks and stage seconds this run measured; forward_sum is device time under cuda-events, wall time otherwise; seal covers head serialisation up to this block's assembly", + "peak_cuda_allocated_bytes": null, + "peak_cuda_reserved_bytes": null, + "peak_resident_weight_bytes": 555776, + "peak_rss_bytes": 367198208, + "rss_units_source": "Linux ru_maxrss", + "seconds": { + "decode_sum": null, + "elapsed": 2.619, + "fill_sum": null, + "forward_sum": 0.128, + "identity": 0.004, + "layer_load_max": null, + "layer_load_sum": null, + "layer_loads": null, + "resident_load": 2.453, + "seal": 0.005 + } + }, + "runtime_versions": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 409089, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd" + } + }, + "commands": [ + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--model", + "/tmp/qfs-complete-tiny-fixture/model", + "--weights-repository", + "malaiwah/glm-moe-dsa-tiny-random-bf16", + "--model-revision", + "45563636ef723acfb826755493447dc40c7a0c37", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-complete-tiny-fixture/reproduction/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--role", + "root", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--schedule", + "window-outer", + "--dataset-id", + "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "--dataset-name", + "GLM MoE DSA tiny random CPU root", + "--repository", + "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "--author", + "malaiwah", + "--disclosures", + "[{\"code\":\"random_init_cpu_fixture\",\"severity\":\"info\",\"affects_comparability\":false,\"detail\":\"Complete randomly initialized tiny glm_moe_dsa checkpoint; CPU smoke fixture only, not trained quality evidence or a registry measurement. Lane other denotes CPU, not local-cuda-budget.\"}]", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--run-name", + "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "--cold-run", + "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "--memory-report", + "/tmp/qfs-complete-tiny-fixture/reproduction/first.memory.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 6.485651439987123, + "name": "capture-first", + "pid": 406991, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 406991, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "capture-first.stderr.log", + "stdout": "capture-first.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "verify", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/first.verify.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.575829998124391, + "name": "verify-first", + "pid": 408026, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 408026, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "verify-first.stderr.log", + "stdout": "verify-first.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "validate", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--strict", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/first.strict.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.8252810118719935, + "name": "strict-first", + "pid": 408494, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 408494, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "strict-first.stderr.log", + "stdout": "strict-first.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--model", + "/tmp/qfs-complete-tiny-fixture/model", + "--weights-repository", + "malaiwah/glm-moe-dsa-tiny-random-bf16", + "--model-revision", + "45563636ef723acfb826755493447dc40c7a0c37", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-complete-tiny-fixture/reproduction/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--role", + "root", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--schedule", + "window-outer", + "--dataset-id", + "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "--dataset-name", + "GLM MoE DSA tiny random CPU root", + "--repository", + "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "--author", + "malaiwah", + "--disclosures", + "[{\"code\":\"random_init_cpu_fixture\",\"severity\":\"info\",\"affects_comparability\":false,\"detail\":\"Complete randomly initialized tiny glm_moe_dsa checkpoint; CPU smoke fixture only, not trained quality evidence or a registry measurement. Lane other denotes CPU, not local-cuda-budget.\"}]", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--run-name", + "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d", + "--cold-run", + "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d", + "--memory-report", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat.memory.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 6.431767418049276, + "name": "capture-repeat", + "pid": 409089, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 409089, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "capture-repeat.stderr.log", + "stdout": "capture-repeat.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "verify", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat.verify.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.7754629959817976, + "name": "verify-repeat", + "pid": 409951, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 409951, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "verify-repeat.stderr.log", + "stdout": "verify-repeat.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "validate", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--strict", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat.strict.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.423026765929535, + "name": "strict-repeat", + "pid": 410549, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 410549, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "strict-repeat.stderr.log", + "stdout": "strict-repeat.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "compare", + "--reference", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--candidate", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction/comparison", + "--self-compare", + "--force-compute", + "--device", + "cpu", + "--replay-device", + "numpy", + "--replay-dtype", + "float32", + "--vocab-chunk", + "8192", + "--chunk-positions", + "128", + "--verify-tensors", + "--reference-label", + "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "--candidate-label", + "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.7282893639057875, + "name": "compare", + "pid": 411043, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 411043, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "compare.stderr.log", + "stdout": "compare.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "validate", + "--receipt", + "/tmp/qfs-complete-tiny-fixture/reproduction/comparison/comparison-receipt.json", + "--strict", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/comparison.validate.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.424050308065489, + "name": "validate-comparison", + "pid": 411487, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 411487, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "validate-comparison.stderr.log", + "stdout": "validate-comparison.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + } + ], + "comparison": { + "comparator": { + "accumulation_dtype": "float64", + "bf16_reduced_precision_reduction": false, + "cublas_workspace_config": null, + "deterministic_algorithms": true, + "device": "cpu", + "estimator_backend": "torch:k6_kld_report._token_kld", + "head_applied_candidate_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "head_applied_reference_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "head_applied_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "logprob_dtype": "float64", + "position_block": 128, + "replay_backend": "numpy:cpu:float32", + "replay_env": { + "blas_configuration": "OpenBLAS 0.3.34.106.0 USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell MAX_THREADS=64", + "blas_name": "scipy-openblas", + "blas_threads": 2, + "blas_threads_source": "ctypes:scipy_openblas_get_num_threads64_", + "blas_version": "0.3.34.106.0", + "cpu_model": "Intel(R) Xeon(R) CPU X5570 @ 2.93GHz", + "library": "numpy", + "numpy_version": "2.5.3", + "replay_dtype": "float32" + }, + "replay_peak_device_bytes": null, + "short_circuited": true, + "source_file_hashes_verified": true, + "tensor_content_digests_verified": true, + "tf32": false, + "tool": { + "entrypoint": "bin/fidelity-dataset compare", + "note": "the fp64 estimator is k6_kld_report._token_kld, imported not copied, whenever torch is importable; estimator_backend records which path ran." + }, + "two_pass": true, + "vocab_chunk": 8192 + }, + "comparison_kind": "reproduction_confirmation", + "kl": { + "max": 0.0, + "mean": 0.0, + "median": 0.0, + "p95": 0.0, + "p99": 0.0, + "p99_9": 0.0 + }, + "measurement_scope": { + "contexts": 4, + "covers_full_panel": true, + "position_filter": "all", + "positions_per_context": 63, + "scored_positions": 252, + "subset_detail": null + }, + "metric": { + "direction": "reference_to_candidate", + "direction_label": "KL(reference || candidate)", + "higher_is_better": false, + "name": "mean_tokenwise_kld", + "units": "nats", + "value": 0.0 + }, + "note": "QFS retains its hash-proof result and top-1 value for reproduction confirmations; --force-compute independently runs the estimator and requires its tokenwise KL array to agree exactly. short_circuited=true therefore does not mean replay was skipped.", + "receipt": "comparison/comparison-receipt.json", + "receipt_sha256": "4910833e5cc175ea351055e567c5d896475b4020598359291aedc958d8ada382", + "self_compare": { + "asserted_exact_zero": true, + "capture_content_digest_equal": true, + "expected_tokenwise_bytes": 2144, + "expected_tokenwise_sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d", + "force_compute_agreed": true, + "head_digest_equal": true, + "weights_identity_equal": true + }, + "tokenwise": { + "bytes": 2144, + "path": "tokenwise-kld.npy", + "sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d" + }, + "top1_agreement": 1.0 + }, + "cpu_threads": 2, + "dataset_id": "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "dataset_repository": "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "device": "cpu", + "driver_argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "/tmp/qfs-complete-tiny-fixture/verify_cpu.py", + "--model-dir", + "/tmp/qfs-complete-tiny-fixture/model", + "--model-repository", + "malaiwah/glm-moe-dsa-tiny-random-bf16", + "--model-revision", + "45563636ef723acfb826755493447dc40c7a0c37", + "--panel-dir", + "/tmp/qfs-complete-tiny-fixture/panel", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction", + "--qfs-root", + "/tmp/qfs-explorer-development" + ], + "driver_sha256": "2e507993f0085a72d5236527942a7143fd036d56b82223b26e90889de5cd9f98", + "dtype": "bfloat16", + "elapsed_seconds": 34.85638747992925, + "lane": "other", + "lane_description": "local CPU random-init fixture", + "model_repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "model_revision": "45563636ef723acfb826755493447dc40c7a0c37", + "panel_binding": "panel-binding.json", + "panel_binding_sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "provenance_note": "Local QFS source bytes are hashed; no source commit is asserted. The caller supplies an immutable model pin; QFS hashes the local checkpoint. This script does not independently prove Hub-to-local weight equality.", + "qfs_source_files": { + "bin/fidelity/dscompare.py": "4a53f735e1e3fb8bd739854451b57f34e8369bffa9fd4f7b7fd935fb2e7d52df", + "bin/fidelity/dsvalidate.py": "a9d6cd57e801e3ef044a37635e24518c83dbc6d1ec8a4c0b4b5d1b24483ca8d1", + "bin/fidelity/panel.py": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "bin/fidelity_dataset.py": "ac62b63bbfde67e4d5cacecf9cd417193c50f417a6749cc15ee6f1610c153a4e", + "engines/tools/hf_capture.py": "200ba12ca74fb97531307965cbbaa5c10553a5c26e008e524ea2d8aecb005b95" + }, + "schema": "malaiwah.glm-moe-dsa-tiny-cpu-reproduction.v1", + "scope": "Random-init CPU reproduction only; no quality claim or registry submission.", + "status": "passed" +} diff --git a/raw/candidates/ct-mxfp4/model/generation_config.json b/raw/candidates/ct-mxfp4/model/generation_config.json new file mode 100644 index 0000000000000000000000000000000000000000..59bd0680606c94f6570a92e60fa4acd2e2170f70 --- /dev/null +++ b/raw/candidates/ct-mxfp4/model/generation_config.json @@ -0,0 +1,10 @@ +{ + "_from_model_config": true, + "bos_token_id": 1, + "eos_token_id": 2, + "output_attentions": false, + "output_hidden_states": false, + "pad_token_id": 0, + "transformers_version": "5.16.1", + "use_cache": true +} diff --git a/raw/candidates/ct-mxfp4/model/hub-checkpoint-verification.json b/raw/candidates/ct-mxfp4/model/hub-checkpoint-verification.json new file mode 100644 index 0000000000000000000000000000000000000000..b9648c8ae18de0fb86ce18398175c6686afbd7b2 --- /dev/null +++ b/raw/candidates/ct-mxfp4/model/hub-checkpoint-verification.json @@ -0,0 +1,32 @@ +{ + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "downloaded_from_hub": true, + "files": { + "config.json": { + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "bytes": 1479, + "matches_build": true + }, + "generation_config.json": { + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "bytes": 216, + "matches_build": true + }, + "model.safetensors": { + "sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1", + "bytes": 571000, + "matches_build": true + }, + "tokenizer.json": { + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "bytes": 6763, + "matches_build": true + }, + "tokenizer_config.json": { + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63", + "bytes": 236, + "matches_build": true + } + } +} diff --git a/raw/candidates/ct-mxfp4/model/loader-verification.json b/raw/candidates/ct-mxfp4/model/loader-verification.json new file mode 100644 index 0000000000000000000000000000000000000000..871fc889a9d3a025569770a96e83ff5f0a2fb420 --- /dev/null +++ b/raw/candidates/ct-mxfp4/model/loader-verification.json @@ -0,0 +1,60 @@ +{ + "schema": "malaiwah.tiny-fixture-loader-check.v1", + "checkpoint_sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1", + "runtime": { + "torch": "2.11.0+cpu", + "transformers": "5.16.1", + "device": "cpu", + "threads": 2 + }, + "qfs_load_report": { + "observed": true, + "conversion_errors_visible": true, + "missing_keys": [], + "unexpected_keys": [], + "mismatched_keys": [], + "error_msgs": [], + "conversion_errors": {} + }, + "native_save_reload_tensor_equality": true, + "independent_build_files_byte_equal": true, + "tokenizer_roundtrip_examples": [ + "The CPU fixture carries a complete output head and real sparse attention.", + "Small deterministic tensors make a repeatable pipeline experiment.", + "Unicode roundtrip: caf\u00e9, snow \u96ea, punctuation!", + "The same bytes must survive saving and loading without repair." + ], + "forward_shape": [ + 4, + 64, + 260 + ], + "forward_all_finite": true, + "forward_logit_std": 0.16186420619487762, + "load_seconds": 2.1670503590721637, + "batch_forward_seconds": 0.05775680090300739, + "greedy_generation_seconds": 0.04374621692113578, + "generated_token_ids": [ + 1, + 55, + 75, + 72, + 224, + 38, + 51, + 56, + 224, + 73, + 76, + 91, + 87, + 88, + 85, + 72, + 171, + 105, + 156, + 236 + ], + "peak_process_rss_mib": 351.9296875 +} diff --git a/raw/candidates/ct-mxfp4/model/model.safetensors b/raw/candidates/ct-mxfp4/model/model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..81c09e1677a4db5d29f06bedeaf3e41955bb4175 --- /dev/null +++ b/raw/candidates/ct-mxfp4/model/model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9222707b17727c48479eb37416d96289344b48d70eee2d919b282063ccee3b3d +size 236880 diff --git a/raw/candidates/ct-mxfp4/model/model.safetensors.index.json b/raw/candidates/ct-mxfp4/model/model.safetensors.index.json new file mode 100644 index 0000000000000000000000000000000000000000..23b244f4b2f2c28f6602b53507e80fc9018713b7 --- /dev/null +++ b/raw/candidates/ct-mxfp4/model/model.safetensors.index.json @@ -0,0 +1,252 @@ +{ + "metadata": { + "total_size": 209072 + }, + "weight_map": { + "model.layers.1.mlp.gate.e_score_correction_bias": "model.safetensors", + "model.layers.2.mlp.gate.e_score_correction_bias": "model.safetensors", + "model.layers.3.mlp.gate.e_score_correction_bias": "model.safetensors", + "lm_head.weight": "model.safetensors", + "model.embed_tokens.weight": "model.safetensors", + "model.layers.0.input_layernorm.weight": "model.safetensors", + "model.layers.0.mlp.down_proj.weight_packed": "model.safetensors", + "model.layers.0.mlp.down_proj.weight_scale": "model.safetensors", + "model.layers.0.mlp.gate_proj.weight_packed": "model.safetensors", + "model.layers.0.mlp.gate_proj.weight_scale": "model.safetensors", + "model.layers.0.mlp.up_proj.weight_packed": "model.safetensors", + "model.layers.0.mlp.up_proj.weight_scale": "model.safetensors", + "model.layers.0.post_attention_layernorm.weight": "model.safetensors", + "model.layers.0.self_attn.indexer.k_norm.bias": "model.safetensors", + "model.layers.0.self_attn.indexer.k_norm.weight": "model.safetensors", + "model.layers.0.self_attn.indexer.weights_proj.weight_packed": "model.safetensors", + "model.layers.0.self_attn.indexer.weights_proj.weight_scale": "model.safetensors", + "model.layers.0.self_attn.indexer.wk.weight_packed": "model.safetensors", + "model.layers.0.self_attn.indexer.wk.weight_scale": "model.safetensors", + "model.layers.0.self_attn.indexer.wq_b.weight_packed": "model.safetensors", + "model.layers.0.self_attn.indexer.wq_b.weight_scale": "model.safetensors", + "model.layers.0.self_attn.kv_a_layernorm.weight": "model.safetensors", + "model.layers.0.self_attn.kv_a_proj_with_mqa.weight_packed": "model.safetensors", + "model.layers.0.self_attn.kv_a_proj_with_mqa.weight_scale": "model.safetensors", + "model.layers.0.self_attn.kv_b_proj.weight": "model.safetensors", + "model.layers.0.self_attn.o_proj.weight_packed": "model.safetensors", + "model.layers.0.self_attn.o_proj.weight_scale": "model.safetensors", + "model.layers.0.self_attn.q_a_layernorm.weight": "model.safetensors", + "model.layers.0.self_attn.q_a_proj.weight_packed": "model.safetensors", + "model.layers.0.self_attn.q_a_proj.weight_scale": "model.safetensors", + "model.layers.0.self_attn.q_b_proj.weight_packed": "model.safetensors", + "model.layers.0.self_attn.q_b_proj.weight_scale": "model.safetensors", + "model.layers.1.input_layernorm.weight": "model.safetensors", + "model.layers.1.mlp.experts.0.down_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.0.down_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.0.gate_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.0.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.0.up_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.0.up_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.1.down_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.1.down_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.1.gate_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.1.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.1.up_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.1.up_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.2.down_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.2.down_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.2.gate_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.2.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.2.up_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.2.up_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.3.down_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.3.down_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.3.gate_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.3.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.3.up_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.3.up_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.4.down_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.4.down_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.4.gate_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.4.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.4.up_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.4.up_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.5.down_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.5.down_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.5.gate_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.5.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.5.up_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.5.up_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.6.down_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.6.down_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.6.gate_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.6.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.6.up_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.6.up_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.7.down_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.7.down_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.7.gate_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.7.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.7.up_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.7.up_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.gate.weight": "model.safetensors", + "model.layers.1.mlp.shared_experts.down_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.shared_experts.down_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.shared_experts.gate_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.shared_experts.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.shared_experts.up_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.shared_experts.up_proj.weight_scale": "model.safetensors", + "model.layers.1.post_attention_layernorm.weight": "model.safetensors", + "model.layers.1.self_attn.kv_a_layernorm.weight": "model.safetensors", + "model.layers.1.self_attn.kv_a_proj_with_mqa.weight_packed": "model.safetensors", + "model.layers.1.self_attn.kv_a_proj_with_mqa.weight_scale": "model.safetensors", + "model.layers.1.self_attn.kv_b_proj.weight": "model.safetensors", + "model.layers.1.self_attn.o_proj.weight_packed": "model.safetensors", + "model.layers.1.self_attn.o_proj.weight_scale": "model.safetensors", + "model.layers.1.self_attn.q_a_layernorm.weight": "model.safetensors", + "model.layers.1.self_attn.q_a_proj.weight_packed": "model.safetensors", + "model.layers.1.self_attn.q_a_proj.weight_scale": "model.safetensors", + "model.layers.1.self_attn.q_b_proj.weight_packed": "model.safetensors", + "model.layers.1.self_attn.q_b_proj.weight_scale": "model.safetensors", + "model.layers.2.input_layernorm.weight": "model.safetensors", + "model.layers.2.mlp.experts.0.down_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.0.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.0.gate_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.0.gate_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.0.up_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.0.up_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.1.down_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.1.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.1.gate_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.1.gate_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.1.up_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.1.up_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.2.down_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.2.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.2.gate_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.2.gate_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.2.up_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.2.up_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.3.down_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.3.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.3.gate_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.3.gate_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.3.up_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.3.up_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.4.down_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.4.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.4.gate_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.4.gate_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.4.up_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.4.up_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.5.down_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.5.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.5.gate_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.5.gate_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.5.up_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.5.up_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.6.down_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.6.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.6.gate_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.6.gate_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.6.up_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.6.up_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.7.down_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.7.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.7.gate_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.7.gate_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.7.up_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.7.up_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.gate.weight": "model.safetensors", + "model.layers.2.mlp.shared_experts.down_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.shared_experts.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.shared_experts.gate_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.shared_experts.gate_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.shared_experts.up_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.shared_experts.up_proj.weight_scale": "model.safetensors", + "model.layers.2.post_attention_layernorm.weight": "model.safetensors", + "model.layers.2.self_attn.indexer.k_norm.bias": "model.safetensors", + "model.layers.2.self_attn.indexer.k_norm.weight": "model.safetensors", + "model.layers.2.self_attn.indexer.weights_proj.weight_packed": "model.safetensors", + "model.layers.2.self_attn.indexer.weights_proj.weight_scale": "model.safetensors", + "model.layers.2.self_attn.indexer.wk.weight_packed": "model.safetensors", + "model.layers.2.self_attn.indexer.wk.weight_scale": "model.safetensors", + "model.layers.2.self_attn.indexer.wq_b.weight_packed": "model.safetensors", + "model.layers.2.self_attn.indexer.wq_b.weight_scale": "model.safetensors", + "model.layers.2.self_attn.kv_a_layernorm.weight": "model.safetensors", + "model.layers.2.self_attn.kv_a_proj_with_mqa.weight_packed": "model.safetensors", + "model.layers.2.self_attn.kv_a_proj_with_mqa.weight_scale": "model.safetensors", + "model.layers.2.self_attn.kv_b_proj.weight": "model.safetensors", + "model.layers.2.self_attn.o_proj.weight_packed": "model.safetensors", + "model.layers.2.self_attn.o_proj.weight_scale": "model.safetensors", + "model.layers.2.self_attn.q_a_layernorm.weight": "model.safetensors", + "model.layers.2.self_attn.q_a_proj.weight_packed": "model.safetensors", + "model.layers.2.self_attn.q_a_proj.weight_scale": "model.safetensors", + "model.layers.2.self_attn.q_b_proj.weight_packed": "model.safetensors", + "model.layers.2.self_attn.q_b_proj.weight_scale": "model.safetensors", + "model.layers.3.input_layernorm.weight": "model.safetensors", + "model.layers.3.mlp.experts.0.down_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.0.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.0.gate_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.0.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.0.up_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.0.up_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.1.down_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.1.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.1.gate_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.1.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.1.up_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.1.up_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.2.down_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.2.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.2.gate_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.2.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.2.up_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.2.up_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.3.down_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.3.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.3.gate_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.3.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.3.up_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.3.up_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.4.down_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.4.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.4.gate_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.4.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.4.up_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.4.up_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.5.down_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.5.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.5.gate_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.5.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.5.up_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.5.up_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.6.down_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.6.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.6.gate_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.6.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.6.up_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.6.up_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.7.down_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.7.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.7.gate_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.7.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.7.up_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.7.up_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.gate.weight": "model.safetensors", + "model.layers.3.mlp.shared_experts.down_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.shared_experts.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.shared_experts.gate_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.shared_experts.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.shared_experts.up_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.shared_experts.up_proj.weight_scale": "model.safetensors", + "model.layers.3.post_attention_layernorm.weight": "model.safetensors", + "model.layers.3.self_attn.kv_a_layernorm.weight": "model.safetensors", + "model.layers.3.self_attn.kv_a_proj_with_mqa.weight_packed": "model.safetensors", + "model.layers.3.self_attn.kv_a_proj_with_mqa.weight_scale": "model.safetensors", + "model.layers.3.self_attn.kv_b_proj.weight": "model.safetensors", + "model.layers.3.self_attn.o_proj.weight_packed": "model.safetensors", + "model.layers.3.self_attn.o_proj.weight_scale": "model.safetensors", + "model.layers.3.self_attn.q_a_layernorm.weight": "model.safetensors", + "model.layers.3.self_attn.q_a_proj.weight_packed": "model.safetensors", + "model.layers.3.self_attn.q_a_proj.weight_scale": "model.safetensors", + "model.layers.3.self_attn.q_b_proj.weight_packed": "model.safetensors", + "model.layers.3.self_attn.q_b_proj.weight_scale": "model.safetensors", + "model.norm.weight": "model.safetensors" + } +} diff --git a/raw/candidates/ct-mxfp4/model/panel.binding.json b/raw/candidates/ct-mxfp4/model/panel.binding.json new file mode 100644 index 0000000000000000000000000000000000000000..573cea0b332c636bdda89b150f95cda307b89194 --- /dev/null +++ b/raw/candidates/ct-mxfp4/model/panel.binding.json @@ -0,0 +1,102 @@ +{ + "content": { + "archive": { + "algorithm": "sha256(ustar: sorted regular files; mode=0644; uid=gid=mtime=0)", + "bytes": 20480, + "compression": "none", + "format": "ustar", + "sha256": "389706dfa3335a75ec70a40d079995af1a60c05512334125dbd336790f12702f" + }, + "manifest": [ + { + "bytes": 192, + "path": "arrays/causal-mask-64.npy", + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02" + }, + { + "bytes": 384, + "path": "arrays/final-0000.tokens.npy", + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af" + }, + { + "bytes": 384, + "path": "arrays/final-0001.tokens.npy", + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea" + }, + { + "bytes": 384, + "path": "arrays/final-0002.tokens.npy", + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c" + }, + { + "bytes": 384, + "path": "arrays/final-0003.tokens.npy", + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a" + }, + { + "bytes": 4195, + "path": "panel.json", + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6" + }, + { + "bytes": 7808, + "path": "panel.receipt.json", + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263" + } + ], + "manifest_sha256": "e5f2d6410a6290da1197016c5b57ae522a3570665215ddc23e2a0bd45f912181" + }, + "panel": { + "bytes": 4195, + "context_length": 64, + "contexts": 4, + "file": "panel.json", + "id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "positions_per_context": 63, + "role": "final", + "scored_positions_total": 252, + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6", + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36" + }, + "receipt": { + "bytes": 7808, + "declared_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "file": "panel.receipt.json", + "receipt_file_sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "receipt_seal_mode": "self-blank" + }, + "schema": "malaiwah.resolved-panel.v1", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } +} diff --git a/raw/candidates/ct-mxfp4/model/panel.sha256.json b/raw/candidates/ct-mxfp4/model/panel.sha256.json new file mode 100644 index 0000000000000000000000000000000000000000..30e122a1cc6d1937fecc0d31e38e468bceefc9de --- /dev/null +++ b/raw/candidates/ct-mxfp4/model/panel.sha256.json @@ -0,0 +1,83 @@ +{ + "binding_file": "panel.binding.json", + "binding_sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "context_length": 64, + "contexts": 4, + "model_repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "model_revision": "45563636ef723acfb826755493447dc40c7a0c37", + "panel_archive": { + "algorithm": "sha256(ustar: sorted regular files; mode=0644; uid=gid=mtime=0)", + "bytes": 20480, + "compression": "none", + "format": "ustar", + "sha256": "389706dfa3335a75ec70a40d079995af1a60c05512334125dbd336790f12702f" + }, + "panel_directory": "panel", + "panel_files": [ + { + "bytes": 192, + "path": "arrays/causal-mask-64.npy", + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02" + }, + { + "bytes": 384, + "path": "arrays/final-0000.tokens.npy", + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af" + }, + { + "bytes": 384, + "path": "arrays/final-0001.tokens.npy", + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea" + }, + { + "bytes": 384, + "path": "arrays/final-0002.tokens.npy", + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c" + }, + { + "bytes": 384, + "path": "arrays/final-0003.tokens.npy", + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a" + }, + { + "bytes": 4195, + "path": "panel.json", + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6" + }, + { + "bytes": 7808, + "path": "panel.receipt.json", + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263" + } + ], + "panel_id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "panel_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "purpose": "Synthetic CPU smoke only, not a quality benchmark.", + "revision_verification": "Caller-supplied published commit; local files byte-verified offline.", + "scored_positions_total": 252, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer_files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "tokenizer_files_verified": true, + "tokenizer_identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1" +} diff --git a/raw/candidates/ct-mxfp4/model/provenance.json b/raw/candidates/ct-mxfp4/model/provenance.json new file mode 100644 index 0000000000000000000000000000000000000000..39cf98fbdab7134a1f811e91c6fc7d274f47c974 --- /dev/null +++ b/raw/candidates/ct-mxfp4/model/provenance.json @@ -0,0 +1,263 @@ +{ + "source": { + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "a1a973330e4e912678adbd8ea41e8b86b1c9dccb" + }, + "format": "ct-mxfp4", + "algorithm": "Build tiny FORMAT fixtures, optionally capture via integrated QFS layer-outer.\n\nNo optimizer-quality claim: deterministic CPU minmax/conservative-scale RTN.\nMXFP4 uses ceil(log2(group_max/6)); this is NOT CT's MX observer or Kimi QAT.\nNVFP4 uses a tensor maximum global, rounded E4M3 group scales, then E2M1\nnearest-even RTN. FP8 uses ceil(log2(block_max/448)) UE8M0 + E4M3 RTN.\nNo calibration, activation quantization, kernel parity, training or model code.\n", + "claim": "FORMAT fixture, not Kimi QAT/ModelOpt calibration/CT observer quality", + "reconstruction_scope": { + "scope": "weights-reconstructed/advisory; activation-not-captured", + "applied_to_weights": false, + "declared": { + "group_0": { + "input_activations": null, + "output_activations": null + } + }, + "kv_cache_scheme": null, + "stored_components": [] + }, + "encoded_tensors": { + "model.layers.0.mlp.down_proj.weight": 0.0146484375, + "model.layers.0.mlp.gate_proj.weight": 0.01025390625, + "model.layers.0.mlp.up_proj.weight": 0.0126953125, + "model.layers.0.self_attn.indexer.weights_proj.weight": 0.007568359375, + "model.layers.0.self_attn.indexer.wk.weight": 0.0078125, + "model.layers.0.self_attn.indexer.wq_b.weight": 0.01318359375, + "model.layers.0.self_attn.kv_a_proj_with_mqa.weight": 0.01513671875, + "model.layers.0.self_attn.o_proj.weight": 0.0078125, + "model.layers.0.self_attn.q_a_proj.weight": 0.0078125, + "model.layers.0.self_attn.q_b_proj.weight": 0.01123046875, + "model.layers.1.mlp.experts.0.down_proj.weight": 0.01171875, + "model.layers.1.mlp.experts.0.gate_proj.weight": 0.0126953125, + "model.layers.1.mlp.experts.0.up_proj.weight": 0.0078125, + "model.layers.1.mlp.experts.1.down_proj.weight": 0.0078125, + "model.layers.1.mlp.experts.1.gate_proj.weight": 0.009765625, + "model.layers.1.mlp.experts.1.up_proj.weight": 0.01318359375, + "model.layers.1.mlp.experts.2.down_proj.weight": 0.0078125, + "model.layers.1.mlp.experts.2.gate_proj.weight": 0.0087890625, + "model.layers.1.mlp.experts.2.up_proj.weight": 0.0107421875, + "model.layers.1.mlp.experts.3.down_proj.weight": 0.0078125, + "model.layers.1.mlp.experts.3.gate_proj.weight": 0.0078125, + "model.layers.1.mlp.experts.3.up_proj.weight": 0.0078125, + "model.layers.1.mlp.experts.4.down_proj.weight": 0.0078125, + "model.layers.1.mlp.experts.4.gate_proj.weight": 0.0146484375, + "model.layers.1.mlp.experts.4.up_proj.weight": 0.009765625, + "model.layers.1.mlp.experts.5.down_proj.weight": 0.013671875, + "model.layers.1.mlp.experts.5.gate_proj.weight": 0.00927734375, + "model.layers.1.mlp.experts.5.up_proj.weight": 0.0078125, + "model.layers.1.mlp.experts.6.down_proj.weight": 0.01513671875, + "model.layers.1.mlp.experts.6.gate_proj.weight": 0.0078125, + "model.layers.1.mlp.experts.6.up_proj.weight": 0.0078125, + "model.layers.1.mlp.experts.7.down_proj.weight": 0.0078125, + "model.layers.1.mlp.experts.7.gate_proj.weight": 0.00830078125, + "model.layers.1.mlp.experts.7.up_proj.weight": 0.0078125, + "model.layers.1.mlp.shared_experts.down_proj.weight": 0.01416015625, + "model.layers.1.mlp.shared_experts.gate_proj.weight": 0.0078125, + "model.layers.1.mlp.shared_experts.up_proj.weight": 0.013671875, + "model.layers.1.self_attn.kv_a_proj_with_mqa.weight": 0.0078125, + "model.layers.1.self_attn.o_proj.weight": 0.0087890625, + "model.layers.1.self_attn.q_a_proj.weight": 0.0107421875, + "model.layers.1.self_attn.q_b_proj.weight": 0.0078125, + "model.layers.2.mlp.experts.0.down_proj.weight": 0.0078125, + "model.layers.2.mlp.experts.0.gate_proj.weight": 0.0078125, + "model.layers.2.mlp.experts.0.up_proj.weight": 0.0078125, + "model.layers.2.mlp.experts.1.down_proj.weight": 0.00927734375, + "model.layers.2.mlp.experts.1.gate_proj.weight": 0.01025390625, + "model.layers.2.mlp.experts.1.up_proj.weight": 0.0078125, + "model.layers.2.mlp.experts.2.down_proj.weight": 0.0078125, + "model.layers.2.mlp.experts.2.gate_proj.weight": 0.0078125, + "model.layers.2.mlp.experts.2.up_proj.weight": 0.0078125, + "model.layers.2.mlp.experts.3.down_proj.weight": 0.01416015625, + "model.layers.2.mlp.experts.3.gate_proj.weight": 0.013671875, + "model.layers.2.mlp.experts.3.up_proj.weight": 0.01025390625, + "model.layers.2.mlp.experts.4.down_proj.weight": 0.0078125, + "model.layers.2.mlp.experts.4.gate_proj.weight": 0.00830078125, + "model.layers.2.mlp.experts.4.up_proj.weight": 0.0078125, + "model.layers.2.mlp.experts.5.down_proj.weight": 0.00927734375, + "model.layers.2.mlp.experts.5.gate_proj.weight": 0.01220703125, + "model.layers.2.mlp.experts.5.up_proj.weight": 0.015625, + "model.layers.2.mlp.experts.6.down_proj.weight": 0.01123046875, + "model.layers.2.mlp.experts.6.gate_proj.weight": 0.0078125, + "model.layers.2.mlp.experts.6.up_proj.weight": 0.0078125, + "model.layers.2.mlp.experts.7.down_proj.weight": 0.0126953125, + "model.layers.2.mlp.experts.7.gate_proj.weight": 0.01513671875, + "model.layers.2.mlp.experts.7.up_proj.weight": 0.0078125, + "model.layers.2.mlp.shared_experts.down_proj.weight": 0.009765625, + "model.layers.2.mlp.shared_experts.gate_proj.weight": 0.0078125, + "model.layers.2.mlp.shared_experts.up_proj.weight": 0.00830078125, + "model.layers.2.self_attn.indexer.weights_proj.weight": 0.0068359375, + "model.layers.2.self_attn.indexer.wk.weight": 0.0078125, + "model.layers.2.self_attn.indexer.wq_b.weight": 0.009765625, + "model.layers.2.self_attn.kv_a_proj_with_mqa.weight": 0.0078125, + "model.layers.2.self_attn.o_proj.weight": 0.01318359375, + "model.layers.2.self_attn.q_a_proj.weight": 0.0078125, + "model.layers.2.self_attn.q_b_proj.weight": 0.0078125, + "model.layers.3.mlp.experts.0.down_proj.weight": 0.00927734375, + "model.layers.3.mlp.experts.0.gate_proj.weight": 0.0078125, + "model.layers.3.mlp.experts.0.up_proj.weight": 0.0078125, + "model.layers.3.mlp.experts.1.down_proj.weight": 0.0078125, + "model.layers.3.mlp.experts.1.gate_proj.weight": 0.01513671875, + "model.layers.3.mlp.experts.1.up_proj.weight": 0.0146484375, + "model.layers.3.mlp.experts.2.down_proj.weight": 0.01318359375, + "model.layers.3.mlp.experts.2.gate_proj.weight": 0.0078125, + "model.layers.3.mlp.experts.2.up_proj.weight": 0.01123046875, + "model.layers.3.mlp.experts.3.down_proj.weight": 0.00830078125, + "model.layers.3.mlp.experts.3.gate_proj.weight": 0.0078125, + "model.layers.3.mlp.experts.3.up_proj.weight": 0.0087890625, + "model.layers.3.mlp.experts.4.down_proj.weight": 0.0078125, + "model.layers.3.mlp.experts.4.gate_proj.weight": 0.01318359375, + "model.layers.3.mlp.experts.4.up_proj.weight": 0.0078125, + "model.layers.3.mlp.experts.5.down_proj.weight": 0.0078125, + "model.layers.3.mlp.experts.5.gate_proj.weight": 0.0078125, + "model.layers.3.mlp.experts.5.up_proj.weight": 0.009765625, + "model.layers.3.mlp.experts.6.down_proj.weight": 0.01513671875, + "model.layers.3.mlp.experts.6.gate_proj.weight": 0.0087890625, + "model.layers.3.mlp.experts.6.up_proj.weight": 0.015625, + "model.layers.3.mlp.experts.7.down_proj.weight": 0.009765625, + "model.layers.3.mlp.experts.7.gate_proj.weight": 0.01318359375, + "model.layers.3.mlp.experts.7.up_proj.weight": 0.0078125, + "model.layers.3.mlp.shared_experts.down_proj.weight": 0.0078125, + "model.layers.3.mlp.shared_experts.gate_proj.weight": 0.01123046875, + "model.layers.3.mlp.shared_experts.up_proj.weight": 0.01318359375, + "model.layers.3.self_attn.kv_a_proj_with_mqa.weight": 0.01318359375, + "model.layers.3.self_attn.o_proj.weight": 0.0146484375, + "model.layers.3.self_attn.q_a_proj.weight": 0.015625, + "model.layers.3.self_attn.q_b_proj.weight": 0.0078125 + }, + "encoded_formats": { + "model.layers.0.mlp.down_proj.weight": "ct-mxfp4", + "model.layers.0.mlp.gate_proj.weight": "ct-mxfp4", + "model.layers.0.mlp.up_proj.weight": "ct-mxfp4", + "model.layers.0.self_attn.indexer.weights_proj.weight": "ct-mxfp4", + "model.layers.0.self_attn.indexer.wk.weight": "ct-mxfp4", + "model.layers.0.self_attn.indexer.wq_b.weight": "ct-mxfp4", + "model.layers.0.self_attn.kv_a_proj_with_mqa.weight": "ct-mxfp4", + "model.layers.0.self_attn.o_proj.weight": "ct-mxfp4", + "model.layers.0.self_attn.q_a_proj.weight": "ct-mxfp4", + "model.layers.0.self_attn.q_b_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.0.down_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.0.gate_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.0.up_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.1.down_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.1.gate_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.1.up_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.2.down_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.2.gate_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.2.up_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.3.down_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.3.gate_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.3.up_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.4.down_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.4.gate_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.4.up_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.5.down_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.5.gate_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.5.up_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.6.down_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.6.gate_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.6.up_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.7.down_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.7.gate_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.7.up_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.shared_experts.down_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.shared_experts.gate_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.shared_experts.up_proj.weight": "ct-mxfp4", + "model.layers.1.self_attn.kv_a_proj_with_mqa.weight": "ct-mxfp4", + "model.layers.1.self_attn.o_proj.weight": "ct-mxfp4", + "model.layers.1.self_attn.q_a_proj.weight": "ct-mxfp4", + "model.layers.1.self_attn.q_b_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.0.down_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.0.gate_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.0.up_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.1.down_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.1.gate_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.1.up_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.2.down_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.2.gate_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.2.up_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.3.down_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.3.gate_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.3.up_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.4.down_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.4.gate_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.4.up_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.5.down_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.5.gate_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.5.up_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.6.down_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.6.gate_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.6.up_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.7.down_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.7.gate_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.7.up_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.shared_experts.down_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.shared_experts.gate_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.shared_experts.up_proj.weight": "ct-mxfp4", + "model.layers.2.self_attn.indexer.weights_proj.weight": "ct-mxfp4", + "model.layers.2.self_attn.indexer.wk.weight": "ct-mxfp4", + "model.layers.2.self_attn.indexer.wq_b.weight": "ct-mxfp4", + "model.layers.2.self_attn.kv_a_proj_with_mqa.weight": "ct-mxfp4", + "model.layers.2.self_attn.o_proj.weight": "ct-mxfp4", + "model.layers.2.self_attn.q_a_proj.weight": "ct-mxfp4", + "model.layers.2.self_attn.q_b_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.0.down_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.0.gate_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.0.up_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.1.down_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.1.gate_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.1.up_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.2.down_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.2.gate_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.2.up_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.3.down_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.3.gate_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.3.up_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.4.down_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.4.gate_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.4.up_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.5.down_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.5.gate_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.5.up_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.6.down_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.6.gate_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.6.up_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.7.down_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.7.gate_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.7.up_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.shared_experts.down_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.shared_experts.gate_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.shared_experts.up_proj.weight": "ct-mxfp4", + "model.layers.3.self_attn.kv_a_proj_with_mqa.weight": "ct-mxfp4", + "model.layers.3.self_attn.o_proj.weight": "ct-mxfp4", + "model.layers.3.self_attn.q_a_proj.weight": "ct-mxfp4", + "model.layers.3.self_attn.q_b_proj.weight": "ct-mxfp4" + }, + "source_sha256": { + "config.json": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "model.safetensors": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1" + }, + "output_sha256": { + "scope.json": "579ce3986da88093fe335f8bf2880eca4a336d9222c43e3bde70dc24587b9a52", + "model.safetensors.index.json": "50c90adf1fd00d4ca5d63488c6355fab3d4f08115c84b53b9ff23b174fc60148", + "model.safetensors": "9222707b17727c48479eb37416d96289344b48d70eee2d919b282063ccee3b3d", + "config.json": "c6cc76ca973555cae99d0c42da0a9385bf1ac67c67f4748cac0b4c0778ff5d90", + "panel.binding.json": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "qfs-source.json": "624fc5b9568aa8bf12b1fc5cb3d54aef94d5e5ad72d73a55bd761dd6ca659cae", + "loader-verification.json": "086b7c5481cfbae5ee958b3bdeb85264128c59142fb005611bd837533fbdf7b0", + "tokenizer.json": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "cpu-reproduction-summary.json": "41f8263ddacbac1379c67637f83fdef2ed843ca4973179817531855939866a55", + "hub-checkpoint-verification.json": "3a4681f9c2876da6ae303592ede176ab17c6abdface107683fa2fe8386de7d36", + "tokenizer_config.json": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63", + "panel.sha256.json": "7fbfbaa8a3b1d7533177e1c2e774f5686e6a3f6b9564be7f2a99d0f66bff92fd", + "build-manifest.json": "57d74b2e6dcc8a789f51f86d251e51b2ec73c6772c329ad56f6132e08626eced", + "generation_config.json": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "cpu-comparison-receipt.json": "fcfcee1383dc0d50b42bbd97c9f2fc5ebe127c97cab791eeac01bf530d06f178", + "LICENSE": "6456969dd395bff476628945088b4cbd9d9c761b01a64e281c07b09daf9f94c3" + }, + "tool_sha256": "9fae546b8cb91df32468bcc7019c0bfbf10e41569526c7f55384f27afafe8699", + "reader_sha256": "588923f0a4700436221923c794a8c112971d9f08e75c746742b0f0ede7921682", + "reference": "compressed-tensors@0.18.0; DeepSeek-V4-Flash@60d8d70770c6776ff598c94bb586a859a38244f1/inference/kernel.py; nvidia/Qwen3.8-Flash-Next-NVFP4@fc694b54fb0174e0913e6adf86691ef85a4ead47/config.json+headers", + "verification": "independent CPU FP32 encoder reconstruction per encoded weight; no GPU parity" +} diff --git a/raw/candidates/ct-mxfp4/model/qfs-source.json b/raw/candidates/ct-mxfp4/model/qfs-source.json new file mode 100644 index 0000000000000000000000000000000000000000..3c71d8671dcbe3678b71a2efe59e0ca341bebdc0 --- /dev/null +++ b/raw/candidates/ct-mxfp4/model/qfs-source.json @@ -0,0 +1,11 @@ +{ + "repository": "https://github.com/malaiwah/quant-fidelity-suite", + "revision": "a903cddb078c2eda8c65d6e6c875a09ac932df49", + "source_files": { + "bin/fidelity/dscompare.py": "4a53f735e1e3fb8bd739854451b57f34e8369bffa9fd4f7b7fd935fb2e7d52df", + "bin/fidelity/dsvalidate.py": "a9d6cd57e801e3ef044a37635e24518c83dbc6d1ec8a4c0b4b5d1b24483ca8d1", + "bin/fidelity/panel.py": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "bin/fidelity_dataset.py": "ac62b63bbfde67e4d5cacecf9cd417193c50f417a6749cc15ee6f1610c153a4e", + "engines/tools/hf_capture.py": "200ba12ca74fb97531307965cbbaa5c10553a5c26e008e524ea2d8aecb005b95" + } +} diff --git a/raw/candidates/ct-mxfp4/model/scope.json b/raw/candidates/ct-mxfp4/model/scope.json new file mode 100644 index 0000000000000000000000000000000000000000..2e8444722096c265d7f633b9497b13c3f8ad812c --- /dev/null +++ b/raw/candidates/ct-mxfp4/model/scope.json @@ -0,0 +1,105 @@ +{ + "policy": "mixed", + "head_policy": "native", + "kv_cache_dtype": "bf16", + "mtp_included": false, + "activation_quantization": null, + "assignments": [ + { + "tensor_class": "attn.o", + "treatment": "quantized", + "format": "ct-mxfp4", + "bits_per_weight": 4, + "layer_range": "all", + "note": "4 tensors: model.layers.N.self_attn.o_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "attn.other", + "treatment": "quantized", + "format": "mixed", + "bits_per_weight": null, + "layer_range": "0-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 12 x native:bf16@16 (model.layers.N.self_attn.indexer.k_norm.bias, model.layers.N.self_attn.indexer.k_norm.weight, model.layers.N.self_attn.kv_a_layernorm.weight); 6 x quantized:ct-mxfp4@4 (model.layers.N.self_attn.indexer.weights_proj.weight, model.layers.N.self_attn.indexer.wk.weight, model.layers.N.self_attn.indexer.wq_b.weight). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "attn.qkv", + "treatment": "quantized", + "format": "mixed", + "bits_per_weight": null, + "layer_range": "0-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 4 x native:bf16@16 (model.layers.N.self_attn.kv_b_proj.weight); 12 x quantized:ct-mxfp4@4 (model.layers.N.self_attn.kv_a_proj_with_mqa.weight, model.layers.N.self_attn.q_a_proj.weight, model.layers.N.self_attn.q_b_proj.weight). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "embed_tokens", + "treatment": "native", + "format": "bf16", + "bits_per_weight": 16, + "layer_range": "all", + "note": "1 tensors: model.embed_tokens.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "lm_head", + "treatment": "native", + "format": "bf16", + "bits_per_weight": 16, + "layer_range": "all", + "note": "1 tensors: lm_head.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "mlp.down", + "treatment": "quantized", + "format": "ct-mxfp4", + "bits_per_weight": 4, + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.down_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "mlp.gate", + "treatment": "quantized", + "format": "ct-mxfp4", + "bits_per_weight": 4, + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.gate_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "mlp.up", + "treatment": "quantized", + "format": "ct-mxfp4", + "bits_per_weight": 4, + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "moe.experts", + "treatment": "quantized", + "format": "ct-mxfp4", + "bits_per_weight": 4, + "layer_range": "all", + "note": "72 tensors: model.layers.N.mlp.experts.E.down_proj.weight, model.layers.N.mlp.experts.E.gate_proj.weight, model.layers.N.mlp.experts.E.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "moe.router", + "treatment": "native", + "format": "mixed", + "bits_per_weight": null, + "layer_range": "1-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 3 x native:bf16@16 (model.layers.N.mlp.gate.weight); 3 x native:fp32@32 (model.layers.N.mlp.gate.e_score_correction_bias). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "moe.shared_expert", + "treatment": "quantized", + "format": "ct-mxfp4", + "bits_per_weight": 4, + "layer_range": "all", + "note": "9 tensors: model.layers.N.mlp.shared_experts.down_proj.weight, model.layers.N.mlp.shared_experts.gate_proj.weight, model.layers.N.mlp.shared_experts.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "norm", + "treatment": "native", + "format": "bf16", + "bits_per_weight": 16, + "layer_range": "all", + "note": "9 tensors: model.layers.N.input_layernorm.weight, model.layers.N.post_attention_layernorm.weight, model.norm.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + } + ] +} diff --git a/raw/candidates/ct-mxfp4/model/tokenizer.json b/raw/candidates/ct-mxfp4/model/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..5ad9cccfc9ab5ed66f1c38db328de07cbe4939a9 --- /dev/null +++ b/raw/candidates/ct-mxfp4/model/tokenizer.json @@ -0,0 +1,404 @@ +{ + "version": "1.0", + "truncation": null, + "padding": null, + "added_tokens": [ + { + "id": 0, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 1, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 2, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 3, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + } + ], + "normalizer": null, + "pre_tokenizer": { + "type": "ByteLevel", + "add_prefix_space": false, + "trim_offsets": true, + "use_regex": false + }, + "post_processor": { + "type": "TemplateProcessing", + "single": [ + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + }, + { + "Sequence": { + "id": "A", + "type_id": 0 + } + }, + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + } + ], + "pair": [ + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + }, + { + "Sequence": { + "id": "A", + "type_id": 0 + } + }, + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + }, + { + "Sequence": { + "id": "B", + "type_id": 1 + } + }, + { + "SpecialToken": { + "id": "", + "type_id": 1 + } + } + ], + "special_tokens": { + "": { + "id": "", + "ids": [ + 1 + ], + "tokens": [ + "" + ] + }, + "": { + "id": "", + "ids": [ + 2 + ], + "tokens": [ + "" + ] + } + } + }, + "decoder": { + "type": "ByteLevel", + "add_prefix_space": true, + "trim_offsets": true, + "use_regex": true + }, + "model": { + "type": "BPE", + "dropout": null, + "unk_token": "", + "continuing_subword_prefix": null, + "end_of_word_suffix": null, + "fuse_unk": false, + "byte_fallback": false, + "ignore_merges": false, + "vocab": { + "": 0, + "": 1, + "": 2, + "": 3, + "!": 4, + "\"": 5, + "#": 6, + "$": 7, + "%": 8, + "&": 9, + "'": 10, + "(": 11, + ")": 12, + "*": 13, + "+": 14, + ",": 15, + "-": 16, + ".": 17, + "/": 18, + "0": 19, + "1": 20, + "2": 21, + "3": 22, + "4": 23, + "5": 24, + "6": 25, + "7": 26, + "8": 27, + "9": 28, + ":": 29, + ";": 30, + "<": 31, + "=": 32, + ">": 33, + "?": 34, + "@": 35, + "A": 36, + "B": 37, + "C": 38, + "D": 39, + "E": 40, + "F": 41, + "G": 42, + "H": 43, + "I": 44, + "J": 45, + "K": 46, + "L": 47, + "M": 48, + "N": 49, + "O": 50, + "P": 51, + "Q": 52, + "R": 53, + "S": 54, + "T": 55, + "U": 56, + "V": 57, + "W": 58, + "X": 59, + "Y": 60, + "Z": 61, + "[": 62, + "\\": 63, + "]": 64, + "^": 65, + "_": 66, + "`": 67, + "a": 68, + "b": 69, + "c": 70, + "d": 71, + "e": 72, + "f": 73, + "g": 74, + "h": 75, + "i": 76, + "j": 77, + "k": 78, + "l": 79, + "m": 80, + "n": 81, + "o": 82, + "p": 83, + "q": 84, + "r": 85, + "s": 86, + "t": 87, + "u": 88, + "v": 89, + "w": 90, + "x": 91, + "y": 92, + "z": 93, + "{": 94, + "|": 95, + "}": 96, + "~": 97, + "¡": 98, + "¢": 99, + "£": 100, + "¤": 101, + "¥": 102, + "¦": 103, + "§": 104, + "¨": 105, + "©": 106, + "ª": 107, + "«": 108, + "¬": 109, + "®": 110, + "¯": 111, + "°": 112, + "±": 113, + "²": 114, + "³": 115, + "´": 116, + "µ": 117, + "¶": 118, + "·": 119, + "¸": 120, + "¹": 121, + "º": 122, + "»": 123, + "¼": 124, + "½": 125, + "¾": 126, + "¿": 127, + "À": 128, + "Á": 129, + "Â": 130, + "Ã": 131, + "Ä": 132, + "Å": 133, + "Æ": 134, + "Ç": 135, + "È": 136, + "É": 137, + "Ê": 138, + "Ë": 139, + "Ì": 140, + "Í": 141, + "Î": 142, + "Ï": 143, + "Ð": 144, + "Ñ": 145, + "Ò": 146, + "Ó": 147, + "Ô": 148, + "Õ": 149, + "Ö": 150, + "×": 151, + "Ø": 152, + "Ù": 153, + "Ú": 154, + "Û": 155, + "Ü": 156, + "Ý": 157, + "Þ": 158, + "ß": 159, + "à": 160, + "á": 161, + "â": 162, + "ã": 163, + "ä": 164, + "å": 165, + "æ": 166, + "ç": 167, + "è": 168, + "é": 169, + "ê": 170, + "ë": 171, + "ì": 172, + "í": 173, + "î": 174, + "ï": 175, + "ð": 176, + "ñ": 177, + "ò": 178, + "ó": 179, + "ô": 180, + "õ": 181, + "ö": 182, + "÷": 183, + "ø": 184, + "ù": 185, + "ú": 186, + "û": 187, + "ü": 188, + "ý": 189, + "þ": 190, + "ÿ": 191, + "Ā": 192, + "ā": 193, + "Ă": 194, + "ă": 195, + "Ą": 196, + "ą": 197, + "Ć": 198, + "ć": 199, + "Ĉ": 200, + "ĉ": 201, + "Ċ": 202, + "ċ": 203, + "Č": 204, + "č": 205, + "Ď": 206, + "ď": 207, + "Đ": 208, + "đ": 209, + "Ē": 210, + "ē": 211, + "Ĕ": 212, + "ĕ": 213, + "Ė": 214, + "ė": 215, + "Ę": 216, + "ę": 217, + "Ě": 218, + "ě": 219, + "Ĝ": 220, + "ĝ": 221, + "Ğ": 222, + "ğ": 223, + "Ġ": 224, + "ġ": 225, + "Ģ": 226, + "ģ": 227, + "Ĥ": 228, + "ĥ": 229, + "Ħ": 230, + "ħ": 231, + "Ĩ": 232, + "ĩ": 233, + "Ī": 234, + "ī": 235, + "Ĭ": 236, + "ĭ": 237, + "Į": 238, + "į": 239, + "İ": 240, + "ı": 241, + "IJ": 242, + "ij": 243, + "Ĵ": 244, + "ĵ": 245, + "Ķ": 246, + "ķ": 247, + "ĸ": 248, + "Ĺ": 249, + "ĺ": 250, + "Ļ": 251, + "ļ": 252, + "Ľ": 253, + "ľ": 254, + "Ŀ": 255, + "ŀ": 256, + "Ł": 257, + "ł": 258, + "Ń": 259 + }, + "merges": [] + } +} \ No newline at end of file diff --git a/raw/candidates/ct-mxfp4/model/tokenizer_config.json b/raw/candidates/ct-mxfp4/model/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..df4d789a0874511220f5e2676081000298ad025d --- /dev/null +++ b/raw/candidates/ct-mxfp4/model/tokenizer_config.json @@ -0,0 +1,10 @@ +{ + "backend": "tokenizers", + "bos_token": "", + "clean_up_tokenization_spaces": false, + "eos_token": "", + "model_max_length": 256, + "pad_token": "", + "tokenizer_class": "TokenizersBackend", + "unk_token": "" +} diff --git a/raw/candidates/ct-mxfp4/source-pin-evidence.json b/raw/candidates/ct-mxfp4/source-pin-evidence.json new file mode 100644 index 0000000000000000000000000000000000000000..39cf98fbdab7134a1f811e91c6fc7d274f47c974 --- /dev/null +++ b/raw/candidates/ct-mxfp4/source-pin-evidence.json @@ -0,0 +1,263 @@ +{ + "source": { + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "a1a973330e4e912678adbd8ea41e8b86b1c9dccb" + }, + "format": "ct-mxfp4", + "algorithm": "Build tiny FORMAT fixtures, optionally capture via integrated QFS layer-outer.\n\nNo optimizer-quality claim: deterministic CPU minmax/conservative-scale RTN.\nMXFP4 uses ceil(log2(group_max/6)); this is NOT CT's MX observer or Kimi QAT.\nNVFP4 uses a tensor maximum global, rounded E4M3 group scales, then E2M1\nnearest-even RTN. FP8 uses ceil(log2(block_max/448)) UE8M0 + E4M3 RTN.\nNo calibration, activation quantization, kernel parity, training or model code.\n", + "claim": "FORMAT fixture, not Kimi QAT/ModelOpt calibration/CT observer quality", + "reconstruction_scope": { + "scope": "weights-reconstructed/advisory; activation-not-captured", + "applied_to_weights": false, + "declared": { + "group_0": { + "input_activations": null, + "output_activations": null + } + }, + "kv_cache_scheme": null, + "stored_components": [] + }, + "encoded_tensors": { + "model.layers.0.mlp.down_proj.weight": 0.0146484375, + "model.layers.0.mlp.gate_proj.weight": 0.01025390625, + "model.layers.0.mlp.up_proj.weight": 0.0126953125, + "model.layers.0.self_attn.indexer.weights_proj.weight": 0.007568359375, + "model.layers.0.self_attn.indexer.wk.weight": 0.0078125, + "model.layers.0.self_attn.indexer.wq_b.weight": 0.01318359375, + "model.layers.0.self_attn.kv_a_proj_with_mqa.weight": 0.01513671875, + "model.layers.0.self_attn.o_proj.weight": 0.0078125, + "model.layers.0.self_attn.q_a_proj.weight": 0.0078125, + "model.layers.0.self_attn.q_b_proj.weight": 0.01123046875, + "model.layers.1.mlp.experts.0.down_proj.weight": 0.01171875, + "model.layers.1.mlp.experts.0.gate_proj.weight": 0.0126953125, + "model.layers.1.mlp.experts.0.up_proj.weight": 0.0078125, + "model.layers.1.mlp.experts.1.down_proj.weight": 0.0078125, + "model.layers.1.mlp.experts.1.gate_proj.weight": 0.009765625, + "model.layers.1.mlp.experts.1.up_proj.weight": 0.01318359375, + "model.layers.1.mlp.experts.2.down_proj.weight": 0.0078125, + "model.layers.1.mlp.experts.2.gate_proj.weight": 0.0087890625, + "model.layers.1.mlp.experts.2.up_proj.weight": 0.0107421875, + "model.layers.1.mlp.experts.3.down_proj.weight": 0.0078125, + "model.layers.1.mlp.experts.3.gate_proj.weight": 0.0078125, + "model.layers.1.mlp.experts.3.up_proj.weight": 0.0078125, + "model.layers.1.mlp.experts.4.down_proj.weight": 0.0078125, + "model.layers.1.mlp.experts.4.gate_proj.weight": 0.0146484375, + "model.layers.1.mlp.experts.4.up_proj.weight": 0.009765625, + "model.layers.1.mlp.experts.5.down_proj.weight": 0.013671875, + "model.layers.1.mlp.experts.5.gate_proj.weight": 0.00927734375, + "model.layers.1.mlp.experts.5.up_proj.weight": 0.0078125, + "model.layers.1.mlp.experts.6.down_proj.weight": 0.01513671875, + "model.layers.1.mlp.experts.6.gate_proj.weight": 0.0078125, + "model.layers.1.mlp.experts.6.up_proj.weight": 0.0078125, + "model.layers.1.mlp.experts.7.down_proj.weight": 0.0078125, + "model.layers.1.mlp.experts.7.gate_proj.weight": 0.00830078125, + "model.layers.1.mlp.experts.7.up_proj.weight": 0.0078125, + "model.layers.1.mlp.shared_experts.down_proj.weight": 0.01416015625, + "model.layers.1.mlp.shared_experts.gate_proj.weight": 0.0078125, + "model.layers.1.mlp.shared_experts.up_proj.weight": 0.013671875, + "model.layers.1.self_attn.kv_a_proj_with_mqa.weight": 0.0078125, + "model.layers.1.self_attn.o_proj.weight": 0.0087890625, + "model.layers.1.self_attn.q_a_proj.weight": 0.0107421875, + "model.layers.1.self_attn.q_b_proj.weight": 0.0078125, + "model.layers.2.mlp.experts.0.down_proj.weight": 0.0078125, + "model.layers.2.mlp.experts.0.gate_proj.weight": 0.0078125, + "model.layers.2.mlp.experts.0.up_proj.weight": 0.0078125, + "model.layers.2.mlp.experts.1.down_proj.weight": 0.00927734375, + "model.layers.2.mlp.experts.1.gate_proj.weight": 0.01025390625, + "model.layers.2.mlp.experts.1.up_proj.weight": 0.0078125, + "model.layers.2.mlp.experts.2.down_proj.weight": 0.0078125, + "model.layers.2.mlp.experts.2.gate_proj.weight": 0.0078125, + "model.layers.2.mlp.experts.2.up_proj.weight": 0.0078125, + "model.layers.2.mlp.experts.3.down_proj.weight": 0.01416015625, + "model.layers.2.mlp.experts.3.gate_proj.weight": 0.013671875, + "model.layers.2.mlp.experts.3.up_proj.weight": 0.01025390625, + "model.layers.2.mlp.experts.4.down_proj.weight": 0.0078125, + "model.layers.2.mlp.experts.4.gate_proj.weight": 0.00830078125, + "model.layers.2.mlp.experts.4.up_proj.weight": 0.0078125, + "model.layers.2.mlp.experts.5.down_proj.weight": 0.00927734375, + "model.layers.2.mlp.experts.5.gate_proj.weight": 0.01220703125, + "model.layers.2.mlp.experts.5.up_proj.weight": 0.015625, + "model.layers.2.mlp.experts.6.down_proj.weight": 0.01123046875, + "model.layers.2.mlp.experts.6.gate_proj.weight": 0.0078125, + "model.layers.2.mlp.experts.6.up_proj.weight": 0.0078125, + "model.layers.2.mlp.experts.7.down_proj.weight": 0.0126953125, + "model.layers.2.mlp.experts.7.gate_proj.weight": 0.01513671875, + "model.layers.2.mlp.experts.7.up_proj.weight": 0.0078125, + "model.layers.2.mlp.shared_experts.down_proj.weight": 0.009765625, + "model.layers.2.mlp.shared_experts.gate_proj.weight": 0.0078125, + "model.layers.2.mlp.shared_experts.up_proj.weight": 0.00830078125, + "model.layers.2.self_attn.indexer.weights_proj.weight": 0.0068359375, + "model.layers.2.self_attn.indexer.wk.weight": 0.0078125, + "model.layers.2.self_attn.indexer.wq_b.weight": 0.009765625, + "model.layers.2.self_attn.kv_a_proj_with_mqa.weight": 0.0078125, + "model.layers.2.self_attn.o_proj.weight": 0.01318359375, + "model.layers.2.self_attn.q_a_proj.weight": 0.0078125, + "model.layers.2.self_attn.q_b_proj.weight": 0.0078125, + "model.layers.3.mlp.experts.0.down_proj.weight": 0.00927734375, + "model.layers.3.mlp.experts.0.gate_proj.weight": 0.0078125, + "model.layers.3.mlp.experts.0.up_proj.weight": 0.0078125, + "model.layers.3.mlp.experts.1.down_proj.weight": 0.0078125, + "model.layers.3.mlp.experts.1.gate_proj.weight": 0.01513671875, + "model.layers.3.mlp.experts.1.up_proj.weight": 0.0146484375, + "model.layers.3.mlp.experts.2.down_proj.weight": 0.01318359375, + "model.layers.3.mlp.experts.2.gate_proj.weight": 0.0078125, + "model.layers.3.mlp.experts.2.up_proj.weight": 0.01123046875, + "model.layers.3.mlp.experts.3.down_proj.weight": 0.00830078125, + "model.layers.3.mlp.experts.3.gate_proj.weight": 0.0078125, + "model.layers.3.mlp.experts.3.up_proj.weight": 0.0087890625, + "model.layers.3.mlp.experts.4.down_proj.weight": 0.0078125, + "model.layers.3.mlp.experts.4.gate_proj.weight": 0.01318359375, + "model.layers.3.mlp.experts.4.up_proj.weight": 0.0078125, + "model.layers.3.mlp.experts.5.down_proj.weight": 0.0078125, + "model.layers.3.mlp.experts.5.gate_proj.weight": 0.0078125, + "model.layers.3.mlp.experts.5.up_proj.weight": 0.009765625, + "model.layers.3.mlp.experts.6.down_proj.weight": 0.01513671875, + "model.layers.3.mlp.experts.6.gate_proj.weight": 0.0087890625, + "model.layers.3.mlp.experts.6.up_proj.weight": 0.015625, + "model.layers.3.mlp.experts.7.down_proj.weight": 0.009765625, + "model.layers.3.mlp.experts.7.gate_proj.weight": 0.01318359375, + "model.layers.3.mlp.experts.7.up_proj.weight": 0.0078125, + "model.layers.3.mlp.shared_experts.down_proj.weight": 0.0078125, + "model.layers.3.mlp.shared_experts.gate_proj.weight": 0.01123046875, + "model.layers.3.mlp.shared_experts.up_proj.weight": 0.01318359375, + "model.layers.3.self_attn.kv_a_proj_with_mqa.weight": 0.01318359375, + "model.layers.3.self_attn.o_proj.weight": 0.0146484375, + "model.layers.3.self_attn.q_a_proj.weight": 0.015625, + "model.layers.3.self_attn.q_b_proj.weight": 0.0078125 + }, + "encoded_formats": { + "model.layers.0.mlp.down_proj.weight": "ct-mxfp4", + "model.layers.0.mlp.gate_proj.weight": "ct-mxfp4", + "model.layers.0.mlp.up_proj.weight": "ct-mxfp4", + "model.layers.0.self_attn.indexer.weights_proj.weight": "ct-mxfp4", + "model.layers.0.self_attn.indexer.wk.weight": "ct-mxfp4", + "model.layers.0.self_attn.indexer.wq_b.weight": "ct-mxfp4", + "model.layers.0.self_attn.kv_a_proj_with_mqa.weight": "ct-mxfp4", + "model.layers.0.self_attn.o_proj.weight": "ct-mxfp4", + "model.layers.0.self_attn.q_a_proj.weight": "ct-mxfp4", + "model.layers.0.self_attn.q_b_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.0.down_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.0.gate_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.0.up_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.1.down_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.1.gate_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.1.up_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.2.down_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.2.gate_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.2.up_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.3.down_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.3.gate_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.3.up_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.4.down_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.4.gate_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.4.up_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.5.down_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.5.gate_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.5.up_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.6.down_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.6.gate_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.6.up_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.7.down_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.7.gate_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.experts.7.up_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.shared_experts.down_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.shared_experts.gate_proj.weight": "ct-mxfp4", + "model.layers.1.mlp.shared_experts.up_proj.weight": "ct-mxfp4", + "model.layers.1.self_attn.kv_a_proj_with_mqa.weight": "ct-mxfp4", + "model.layers.1.self_attn.o_proj.weight": "ct-mxfp4", + "model.layers.1.self_attn.q_a_proj.weight": "ct-mxfp4", + "model.layers.1.self_attn.q_b_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.0.down_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.0.gate_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.0.up_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.1.down_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.1.gate_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.1.up_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.2.down_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.2.gate_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.2.up_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.3.down_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.3.gate_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.3.up_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.4.down_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.4.gate_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.4.up_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.5.down_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.5.gate_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.5.up_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.6.down_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.6.gate_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.6.up_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.7.down_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.7.gate_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.experts.7.up_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.shared_experts.down_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.shared_experts.gate_proj.weight": "ct-mxfp4", + "model.layers.2.mlp.shared_experts.up_proj.weight": "ct-mxfp4", + "model.layers.2.self_attn.indexer.weights_proj.weight": "ct-mxfp4", + "model.layers.2.self_attn.indexer.wk.weight": "ct-mxfp4", + "model.layers.2.self_attn.indexer.wq_b.weight": "ct-mxfp4", + "model.layers.2.self_attn.kv_a_proj_with_mqa.weight": "ct-mxfp4", + "model.layers.2.self_attn.o_proj.weight": "ct-mxfp4", + "model.layers.2.self_attn.q_a_proj.weight": "ct-mxfp4", + "model.layers.2.self_attn.q_b_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.0.down_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.0.gate_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.0.up_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.1.down_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.1.gate_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.1.up_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.2.down_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.2.gate_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.2.up_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.3.down_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.3.gate_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.3.up_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.4.down_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.4.gate_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.4.up_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.5.down_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.5.gate_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.5.up_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.6.down_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.6.gate_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.6.up_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.7.down_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.7.gate_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.experts.7.up_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.shared_experts.down_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.shared_experts.gate_proj.weight": "ct-mxfp4", + "model.layers.3.mlp.shared_experts.up_proj.weight": "ct-mxfp4", + "model.layers.3.self_attn.kv_a_proj_with_mqa.weight": "ct-mxfp4", + "model.layers.3.self_attn.o_proj.weight": "ct-mxfp4", + "model.layers.3.self_attn.q_a_proj.weight": "ct-mxfp4", + "model.layers.3.self_attn.q_b_proj.weight": "ct-mxfp4" + }, + "source_sha256": { + "config.json": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "model.safetensors": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1" + }, + "output_sha256": { + "scope.json": "579ce3986da88093fe335f8bf2880eca4a336d9222c43e3bde70dc24587b9a52", + "model.safetensors.index.json": "50c90adf1fd00d4ca5d63488c6355fab3d4f08115c84b53b9ff23b174fc60148", + "model.safetensors": "9222707b17727c48479eb37416d96289344b48d70eee2d919b282063ccee3b3d", + "config.json": "c6cc76ca973555cae99d0c42da0a9385bf1ac67c67f4748cac0b4c0778ff5d90", + "panel.binding.json": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "qfs-source.json": "624fc5b9568aa8bf12b1fc5cb3d54aef94d5e5ad72d73a55bd761dd6ca659cae", + "loader-verification.json": "086b7c5481cfbae5ee958b3bdeb85264128c59142fb005611bd837533fbdf7b0", + "tokenizer.json": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "cpu-reproduction-summary.json": "41f8263ddacbac1379c67637f83fdef2ed843ca4973179817531855939866a55", + "hub-checkpoint-verification.json": "3a4681f9c2876da6ae303592ede176ab17c6abdface107683fa2fe8386de7d36", + "tokenizer_config.json": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63", + "panel.sha256.json": "7fbfbaa8a3b1d7533177e1c2e774f5686e6a3f6b9564be7f2a99d0f66bff92fd", + "build-manifest.json": "57d74b2e6dcc8a789f51f86d251e51b2ec73c6772c329ad56f6132e08626eced", + "generation_config.json": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "cpu-comparison-receipt.json": "fcfcee1383dc0d50b42bbd97c9f2fc5ebe127c97cab791eeac01bf530d06f178", + "LICENSE": "6456969dd395bff476628945088b4cbd9d9c761b01a64e281c07b09daf9f94c3" + }, + "tool_sha256": "9fae546b8cb91df32468bcc7019c0bfbf10e41569526c7f55384f27afafe8699", + "reader_sha256": "588923f0a4700436221923c794a8c112971d9f08e75c746742b0f0ede7921682", + "reference": "compressed-tensors@0.18.0; DeepSeek-V4-Flash@60d8d70770c6776ff598c94bb586a859a38244f1/inference/kernel.py; nvidia/Qwen3.8-Flash-Next-NVFP4@fc694b54fb0174e0913e6adf86691ef85a4ead47/config.json+headers", + "verification": "independent CPU FP32 encoder reconstruction per encoded weight; no GPU parity" +} diff --git a/raw/candidates/ct-mxfp4/source/LICENSE b/raw/candidates/ct-mxfp4/source/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..71f32fb2284323cef90b3e784a7655747c8ae683 --- /dev/null +++ b/raw/candidates/ct-mxfp4/source/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Michel Belleau + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/raw/candidates/ct-mxfp4/source/README.md b/raw/candidates/ct-mxfp4/source/README.md new file mode 100644 index 0000000000000000000000000000000000000000..84524ad288d3abdc9da67201d2e6389b3968319b --- /dev/null +++ b/raw/candidates/ct-mxfp4/source/README.md @@ -0,0 +1,202 @@ +--- +license: mit +library_name: transformers +pipeline_tag: text-generation +tags: + - glm_moe_dsa + - fixture + - testing + - random-initialization + - cpu + - bfloat16 + - reproducibility +datasets: + - malaiwah/glm-moe-dsa-tiny-cpu-repro-v1 +--- + +# Complete tiny GLM MoE DSA fixture — CPU, BF16, reproducible + +**A runnable random-init architecture fixture, not a language model quality claim.** +It is not trained, distilled, or a quantization of GLM/Fruit. Generated text is meaningless. + +This checkpoint is constructed and saved by the native Transformers +`GlmMoeDsaForCausalLM` implementation. It includes the complete MLA attention path, +DSA indexers, dense/MoE weights, router buffers, independent `lm_head`, and a working +byte-level tokenizer. There is no `trust_remote_code` requirement and no missing-weight +or mismatched-size override. + +Inspired by [GLM-5.2-SIQ-Fruit-bf16](https://huggingface.co/malaiwah/GLM-5.2-SIQ-Fruit-bf16)'s +architecture and dense/MoE plus full/shared-indexer schedules. **No Fruit or other GLM +weights were reused.** Fruit is about 10.1 GB; this checkpoint is **571,000 bytes**. + +## Geometry + +| Property | Value | +|---|---:| +| Trainable parameters | 277,824 | +| Additional stored router-buffer elements | 24, FP32 | +| Stored tensors | 139 (native saving expands fused experts into per-expert keys) | +| Decoder layers / hidden width | 4 / 64 | +| Dense/MoE schedule | dense, sparse, sparse, sparse | +| Routed experts / active experts / shared experts | 8 / 2 / 1 | +| Attention heads / key-value heads | 4 / 4 | +| Query LoRA rank / KV LoRA rank | 32 / 16 | +| QK non-RoPE / RoPE / value head dimensions | 8 / 8 / 16 | +| DSA indexer heads / head dimension / token top-k | 4 / 16 / 8 | +| DSA indexer schedule | full, shared, full, shared | +| Vocabulary | 260: 256 byte symbols + pad/BOS/EOS/unknown | +| Maximum context | 256 tokens | +| Output head | Complete, untied, 260 x 64 BF16 | +| Weight dtype | BF16; native router correction buffers retained FP32 | +| MTP | Intentionally absent: zero next-n-prediction layers, no orphan MTP tensors | + +The shared DSA layers correctly reuse the preceding full indexer's selection. +The published artifact is deliberately BF16, matching QFS's lossless BF16 hidden-capture +contract. Initialization starts in FP32 and is rounded during **artifact construction**, +not silently inside a capture labelled lossless. + +## What was actually verified + +Tested on Linux x86-64, Intel Xeon X5570, Python 3.12.14, **two CPU threads**, no CUDA, +with PyTorch **2.11.0+cpu** and Transformers **5.16.1**. The exact package environment is +in [requirements-cpu.txt](requirements-cpu.txt). + +- Native save/reload preserved every in-memory state tensor's value and dtype. +- QFS loading report: **zero missing, unexpected, mismatched, or conversion-error weights**. +- Two independent generator processes produced byte-identical checkpoint/config/tokenizer files. +- Tokenizer roundtrips include ASCII, accented text, and non-Latin UTF-8 text. +- A real four-by-64-token CPU forward produced finite, nonconstant logits of shape `[4,64,260]`. +- Greedy cached generation executed successfully on CPU. +- **Two fresh QFS capture processes** covered four 64-token windows, **252 scored positions**. +- Both complete captures passed QFS tensor verification and strict dataset validation. +- Their checkpoint, head, stack and capture-content digests agree. +- `fidelity-dataset compare --self-compare --force-compute` returned **exactly 0.0 nats**; + the saved tokenwise array contains **252 literal positive float64 zeros**. +- The comparison receipt passed strict validation. Its reported top-1 agreement is **1.0**. + +QFS retains its reproduction hash-proof result (`short_circuited: true`) even when +forced arithmetic runs. **`self_compare.force_compute_agreed: true` proves that the +independently executed numerical KL replay agreed with those zeros.** The receipt's +top-1 value comes from the identity proof, not a separate top-1 benchmark. + +This is a reproduction confirmation, **not registry admission, a qualified production +reference, or evidence of quantization quality**. The comparison receipt's generic +`determinism.run_count` is one comparison and its `identical_across_runs` field remains +null; the separate evidence summary records the two actual fresh capture processes +and equal tensor digests. No registry row was submitted. + +### Measured resource use + +| Operation | Measured result | +|---|---:| +| First fresh QFS capture, including process startup | 6.49 s | +| Second fresh QFS capture, including process startup | 6.43 s | +| Forced comparison command, including process startup | 3.73 s | +| Full two-capture + verification + comparison driver | 34.86 s | +| Peak capture process RSS | 367,374,336 bytes (about 350 MiB) | +| Materialized model parameters + runtime buffers | 555,776 bytes | + +These are local two-thread CPU observations, **not a benchmark of HF CPU Basic** or a +latency guarantee for another machine. They make this fixture a practical candidate +for a bounded CPU-only demo without downloading large GLM weights. + +## Immutable identities and evidence + +Checkpoint/config/tokenizer revision used for the captures: + +```text +45563636ef723acfb826755493447dc40c7a0c37 +``` + +Checkpoint file SHA-256: + +```text +9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1 +``` + +Both independent captures' content digest: + +```text +d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39 +``` + +- [Build manifest and all tensor hashes](build-manifest.json) +- [Clean loader, tokenizer, forward and generation evidence](loader-verification.json) +- [Fresh Hub-download byte verification](hub-checkpoint-verification.json) +- [CPU reproduction summary](cpu-reproduction-summary.json) +- [Forced zero-KL comparison receipt](cpu-comparison-receipt.json) +- [Full capture/replay evidence bundle](https://huggingface.co/datasets/malaiwah/glm-moe-dsa-tiny-cpu-repro-v1) +- [Pinned QFS source identity](qfs-source.json) + +The evidence dataset is a **bundle**: `first/` and `repeat/` are separate conformant +fidelity dataset trees, while `comparison/` contains the computed comparison. Download +the bundle and use these local subdirectories; its repository root is not itself a +single root-format fidelity dataset. Original sealed capture files are not rewritten. + +## Load and run on CPU + +Use a Python 3.12 Linux environment with the recorded CPU packages. At minimum: + +```bash +pip install 'torch==2.11.0+cpu' --index-url https://download.pytorch.org/whl/cpu +pip install 'transformers==5.16.1' 'tokenizers==0.23.2' 'safetensors==0.8.0' +``` + +```python +import torch +from transformers import AutoModelForCausalLM, AutoTokenizer + +repo = "malaiwah/glm-moe-dsa-tiny-random-bf16" +revision = "45563636ef723acfb826755493447dc40c7a0c37" +torch.set_num_threads(2) +tokenizer = AutoTokenizer.from_pretrained(repo, revision=revision, trust_remote_code=False) +model = AutoModelForCausalLM.from_pretrained( + repo, revision=revision, dtype=torch.bfloat16, trust_remote_code=False +).to("cpu").eval() +inputs = tokenizer("A tiny, complete CPU fixture.", return_tensors="pt", + return_token_type_ids=False) +with torch.inference_mode(): + logits = model(**inputs, use_cache=False).logits +print(logits.shape, torch.isfinite(logits).all().item()) +``` + +## Reproduce the full QFS zero-KL check + +In a fresh Python 3.12 Linux environment, install the HF CLI if needed, then: + +```bash +pip install 'huggingface_hub==1.30.0' +hf download malaiwah/glm-moe-dsa-tiny-random-bf16 \ + --revision 45563636ef723acfb826755493447dc40c7a0c37 --local-dir tiny +pip install -r tiny/requirements-cpu.txt + +git clone https://github.com/malaiwah/quant-fidelity-suite.git qfs +git -C qfs checkout a903cddb078c2eda8c65d6e6c875a09ac932df49 + +python tiny/build_panel.py --model-dir tiny \ + --model-repository malaiwah/glm-moe-dsa-tiny-random-bf16 \ + --model-revision 45563636ef723acfb826755493447dc40c7a0c37 \ + --out tiny-panel --qfs-root qfs + +python tiny/verify_cpu.py --model-dir tiny \ + --model-repository malaiwah/glm-moe-dsa-tiny-random-bf16 \ + --model-revision 45563636ef723acfb826755493447dc40c7a0c37 \ + --panel-dir tiny-panel --out cpu-proof --qfs-root qfs +``` + +Both tools refuse existing output directories. No GPU, cloud API, registry changes, +missing-weight exception, or disabled sanity probe is used. The lane is the schema's +`other`, explicitly disclosed as CPU; it is never mislabelled `local-cuda-budget`. +The synthetic panel is independent of the large-vocabulary GLM benchmark panels and +cannot be used to rank real GLM quantizations. + +To regenerate the native checkpoint itself with the recorded build versions: + +```bash +python tiny/build_fixture.py --out regenerated-tiny +``` + +The fixed seed is **20260907**. The generator checks native save/reload equality; +[build-manifest.json](build-manifest.json) provides the expected file/tensor hashes. +Byte-identical generation was measured in this pinned CPU environment, not asserted +across arbitrary future PyTorch releases or hardware architectures. diff --git a/raw/candidates/ct-mxfp4/source/build-manifest.json b/raw/candidates/ct-mxfp4/source/build-manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..539ac3c8e8430caad8e5c81ca4d23dce391cac14 --- /dev/null +++ b/raw/candidates/ct-mxfp4/source/build-manifest.json @@ -0,0 +1,1561 @@ +{ + "architecture_inspiration": "GLM-5.2-SIQ-Fruit-bf16 geometry and dense/MoE plus full/shared DSA schedules; no Fruit or GLM model weights reused.", + "files": { + "config.json": { + "bytes": 1479, + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + "generation_config.json": { + "bytes": 216, + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + "model.safetensors": { + "bytes": 571000, + "sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1" + }, + "tokenizer.json": { + "bytes": 6763, + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + "tokenizer_config.json": { + "bytes": 236, + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + }, + "generation": "Native GlmMoeDsaForCausalLM random initialization in FP32, rounded to the published BF16 artifact; native router correction buffers retained FP32.", + "generator_sha256": "19c3489f1bc7e8e9323cb26afbead562816a6918d6823af252eb6d04dff8e81e", + "limitations": [ + "Random initialization; not trained or distilled.", + "Not a quantization or behavioral approximation of a released GLM model.", + "MTP intentionally absent (zero next-n-prediction layers); no unmatched MTP tensors.", + "This build manifest describes generated bytes, not proof of clean loading or capture; see separately measured verification evidence." + ], + "parameter_count": 277824, + "schema": "malaiwah.glm-moe-dsa-tiny-build.v1", + "seed": 20260907, + "stored_elements": 277848, + "tensor_count": 139, + "tensors": [ + { + "bytes": 33280, + "dtype": "torch.bfloat16", + "elements": 16640, + "name": "lm_head.weight", + "sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "shape": [ + 260, + 64 + ] + }, + { + "bytes": 33280, + "dtype": "torch.bfloat16", + "elements": 16640, + "name": "model.embed_tokens.weight", + "sha256": "18df1b3a5f263a31f5bd4225c3c4629573b75e47b7e28b6e73501586bb47d6f1", + "shape": [ + 260, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.0.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 16384, + "dtype": "torch.bfloat16", + "elements": 8192, + "name": "model.layers.0.mlp.down_proj.weight", + "sha256": "101a9db78e4e21058dcb6f5240e751bcaf3bd662b98696a63a719f86ecabf787", + "shape": [ + 64, + 128 + ] + }, + { + "bytes": 16384, + "dtype": "torch.bfloat16", + "elements": 8192, + "name": "model.layers.0.mlp.gate_proj.weight", + "sha256": "ef5262b354f74dce3a9dc4c3134e4db8cbf63f03ed8a1cd78ebb3e9a05af97cc", + "shape": [ + 128, + 64 + ] + }, + { + "bytes": 16384, + "dtype": "torch.bfloat16", + "elements": 8192, + "name": "model.layers.0.mlp.up_proj.weight", + "sha256": "359b4dac1da3e3956583050af84147aef2f41b8680a85b32083ffd0e1847d997", + "shape": [ + 128, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.0.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.0.self_attn.indexer.k_norm.bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 16 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.0.self_attn.indexer.k_norm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 512, + "dtype": "torch.bfloat16", + "elements": 256, + "name": "model.layers.0.self_attn.indexer.weights_proj.weight", + "sha256": "50ca7a10fe9a0556d8c3ad38bd3f715ee6c6e13084b4cb6b51b2ef78f57c53b2", + "shape": [ + 4, + 64 + ] + }, + { + "bytes": 2048, + "dtype": "torch.bfloat16", + "elements": 1024, + "name": "model.layers.0.self_attn.indexer.wk.weight", + "sha256": "f724d0b2c09ba9ae41cfc3fbe4e458bd7f644e5f0fb8c1446e19b3cf8c650274", + "shape": [ + 16, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.0.self_attn.indexer.wq_b.weight", + "sha256": "048349f93320b7625130fa5abc86dbcc89715b9f02d6853284563e765eb7bc11", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.0.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.0.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "5ad58e7c4515d8c4e84ecf10ecfa7aacb3c39ee1d6a3219307036bd8b59f529d", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.0.self_attn.kv_b_proj.weight", + "sha256": "9a8cfdd6e51c3868d27f147509d24549480e70f278758a8c16adf1ea5c197938", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.0.self_attn.o_proj.weight", + "sha256": "734b1edea5c19958ab29dfba4314ab5a5a25280be3db3de20b82b2e7c78c35ff", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.0.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.0.self_attn.q_a_proj.weight", + "sha256": "6d6e018ec4d4251755a002469f0778accef3b7628062f82a5d292d4130fd4c85", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.0.self_attn.q_b_proj.weight", + "sha256": "28ef2f379f06054843ff97f99d63f515a2f583059dd49fd894a53d04733f0650", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.1.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.0.down_proj.weight", + "sha256": "a0378aa3bb69ed49af25a51d57476ef63ccf5dc98bc4d3008d28660e16f82492", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.0.gate_proj.weight", + "sha256": "e6c7b0ce29c7e6ea16adfd8423cd9a8a27f1be217a2061a635468c9e5603439c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.0.up_proj.weight", + "sha256": "528f777edc3fc406c76dc1e150a648c23009c701134a3a86dcbdeb15f8ddc4bb", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.1.down_proj.weight", + "sha256": "c966c5eed64d8bb32ff5cf25587fc4eb714b7536b6f670725efb136acc6ca26c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.1.gate_proj.weight", + "sha256": "e55ceb89e6891b34fb67fe5c99b529a1cab9729bea2f6ef08be6af7eefcf6c2e", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.1.up_proj.weight", + "sha256": "46b43c2f3a025bab46be05795bb60916e592bb58d4fdf2a18d2e88d37a7a4fb8", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.2.down_proj.weight", + "sha256": "a649be4fd07f95d770fbe14e87561a13f62f155d2053b8a35fa6962b5d5e8c8d", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.2.gate_proj.weight", + "sha256": "5560e590344e57ff54425f4aa6c07edaaade8c73343e32c27199f1c0dc61fe51", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.2.up_proj.weight", + "sha256": "35a639103a8a914203b4dde3f87d197515879ae6ca72557cde8ea9dea6e6e0d2", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.3.down_proj.weight", + "sha256": "0969db499dfe821348b3c06873d36635f7216f1f595968ad43ae984b57565205", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.3.gate_proj.weight", + "sha256": "75c5c77c39a77a4a6dbe7b601a88814bca9cae6fcde0069ff2ca86352e6c13e7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.3.up_proj.weight", + "sha256": "241533cb545cfed7685091b023213c9d530cb54431a712eba7bf3aaebdae3b53", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.4.down_proj.weight", + "sha256": "ca1273d291e431a10b8d8c2170031b29440c2bec8bc1d7f46353990c7fe1a03f", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.4.gate_proj.weight", + "sha256": "69dc9149cbfd65fb10bd6c11f99357d279d471e5874cf19dbef7cfd8ee4d796c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.4.up_proj.weight", + "sha256": "81cb04732e3cc53acb1152c7fc06a6399af18a5f282762cb72abb56b1e6b7c6f", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.5.down_proj.weight", + "sha256": "ebd8e01f9c2daf657e915575afb3ff5ba261a2a83c25c9c50818319dd587a2f2", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.5.gate_proj.weight", + "sha256": "bc70a7d1a5263ca17d00766bb2dc48e1debb815344150741e55dea48af4d75c0", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.5.up_proj.weight", + "sha256": "f84a95d64728067676d4f7b61ac4a589fa11e45226a8996a4719d65f0b018dbf", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.6.down_proj.weight", + "sha256": "00535633e5d98b7a527cc1198d572a9104405e2aff7ee303ae60195654fb24c2", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.6.gate_proj.weight", + "sha256": "2bb299a5e306108c7af11aa5c6114abeb4d06bde9001e6f7644e0d9dca184dc5", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.6.up_proj.weight", + "sha256": "72df8a498b866a242abc9383b16c5b4428feadab02c7f274afa28653e8586107", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.7.down_proj.weight", + "sha256": "90331ab3da1e867c32d3db1aac94c69c86349dbb539400ed9e0c19c148bf5e43", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.7.gate_proj.weight", + "sha256": "576a9df3d1d72f7323e8a8490118821d826f50c9403ca7ecbe196277e62c7730", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.7.up_proj.weight", + "sha256": "3869533066e5bca84402355c6b80b177424f2d79d2b97cbb9cff30eee748135f", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.float32", + "elements": 8, + "name": "model.layers.1.mlp.gate.e_score_correction_bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 8 + ] + }, + { + "bytes": 1024, + "dtype": "torch.bfloat16", + "elements": 512, + "name": "model.layers.1.mlp.gate.weight", + "sha256": "7d1dbc5cc90900cdc1f9d4a241c8b62d0ad50de09231f9f036cce33982cfdfe7", + "shape": [ + 8, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.shared_experts.down_proj.weight", + "sha256": "eb5297f619dfdfb40419b3330406e8ff43cb0fe35797911f2de6ebff4b95690a", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.shared_experts.gate_proj.weight", + "sha256": "eeeff2280eef91eac1215b28717f2b7fdee09fdbfd484ff44855e7e7cdd11718", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.shared_experts.up_proj.weight", + "sha256": "dab5aeab83d842104e1c5557b9b6d6cb5fe519284b909e8c0c975c752dc92d41", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.1.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.1.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.1.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "bff5998ab14190d56392c70e92927904d84a2b9d04ee222967d774a5bb5eecc4", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.1.self_attn.kv_b_proj.weight", + "sha256": "876302ef3f8bba74a997f973913ca4b802aa488d27b46747c470062c9a7ebee5", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.1.self_attn.o_proj.weight", + "sha256": "ecda88672dc8fbc3bac348fa6118010e51b170d8fe3596a811bc9aa95f71915c", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.1.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.self_attn.q_a_proj.weight", + "sha256": "29fc979642704e621b0b6b59a24c13d6900782bfa9655ea9a3311c1d4c69770a", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.self_attn.q_b_proj.weight", + "sha256": "01bae246d61c4d08e751e42e6a03315b55266ae46bd15b34bd343f606a538349", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.2.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.0.down_proj.weight", + "sha256": "8c1c19d08541dc9251736b480f53cfefd21bfbcb0b4e9f725dc66e6c52d7705c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.0.gate_proj.weight", + "sha256": "8c326913b2ef159b507b584c1ae018619573a09b6f41ab687df629d3685884c4", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.0.up_proj.weight", + "sha256": "8611bc004f735fbc1c14a9c9c23f4150c7e754127e44926a44efd0b767a653ed", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.1.down_proj.weight", + "sha256": "1d4d668c4c8183e5991eefe780a138eda70578a4740c07df5b386f233cb4e5c3", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.1.gate_proj.weight", + "sha256": "21224f6173f4785ff6252dd0c1f7a6937b36bbd5bc1c20d25feecc85d6d25f3e", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.1.up_proj.weight", + "sha256": "05542672d0174f9ddfee4bd385b56455c004532da88bf34363b1e543948bf899", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.2.down_proj.weight", + "sha256": "7330dee9a6a416e9922f61d10ee0507584e007cbdd349131471b43a745b6fed8", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.2.gate_proj.weight", + "sha256": "eca5904e6634e97ca89e7dfb1f12774f78adb33b78256136e7e8ee522af92d96", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.2.up_proj.weight", + "sha256": "5a90748752e46844a0cf0efd84c16ec2db25315ffa7a13b9c4bff2697d00bbf6", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.3.down_proj.weight", + "sha256": "a42569462225d60158dfaf24406463f135b632fe258e66ae2e521efed502a37c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.3.gate_proj.weight", + "sha256": "8cf448df350984fe0429a1ca3b2081315b594e50ce85fbc2e9f63eafb8a896b7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.3.up_proj.weight", + "sha256": "54a1269ba638d42c7d6d3926826b04d52310c82804fddcd73c253680a4270032", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.4.down_proj.weight", + "sha256": "5a236edfdc8fc79f687cec866d13724515b8f26465dca2ffde051d0870d5d0ac", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.4.gate_proj.weight", + "sha256": "6c18140a11c9986f99b7c269da01a8f69f1b5215c41be1801d6900eb511bdc76", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.4.up_proj.weight", + "sha256": "7b964f5c207a6bbeaa589a6c07f9665967aca4e7c57148190ed6a6f12e0ca572", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.5.down_proj.weight", + "sha256": "74c2633e7d3b0bf844d3e3812533774fc09b6552435e778e68b442ad161c0985", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.5.gate_proj.weight", + "sha256": "6177166c1bc51e03fde63b60d85347f5a5412446df5b4dd893817d18fcf0d56c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.5.up_proj.weight", + "sha256": "7bb8e1f65a918589a1593926dc93bf3fa1329f5d31f16266c3ad6fe0fd390d47", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.6.down_proj.weight", + "sha256": "af74e303b86b1aec96fd69b64d39848d7d08f255822739cf7d5f4456de67f010", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.6.gate_proj.weight", + "sha256": "c4fc94863e17270bf8cb5a18d3a125bea82d04bfb38457fd27896a00ddeea056", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.6.up_proj.weight", + "sha256": "4e92bebe11c518a225d75d4d7de7b85f9a82baad7a961ac090dd7343a612b577", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.7.down_proj.weight", + "sha256": "8971d6a869ba59445fe28163bd73c74c8338e0b8b675f008277b5a8973967bb2", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.7.gate_proj.weight", + "sha256": "3f90ff90c18d50349a50d11c472d48c6b297496ba5bedfe4ff0da257e1e2fdef", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.7.up_proj.weight", + "sha256": "5a2fcecdbb84a9138b4dd32da15793393aeaee1d00da95ed3d55803b1f45cc86", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.float32", + "elements": 8, + "name": "model.layers.2.mlp.gate.e_score_correction_bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 8 + ] + }, + { + "bytes": 1024, + "dtype": "torch.bfloat16", + "elements": 512, + "name": "model.layers.2.mlp.gate.weight", + "sha256": "aa35eb60ee6dd8e32728c95210b15016120675b111542f36ee1b1cca64668f9d", + "shape": [ + 8, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.shared_experts.down_proj.weight", + "sha256": "e8a1e6e8db3b1996aad9cd457ae20aa5aaac876d400fd6e8d764f543ff7833b9", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.shared_experts.gate_proj.weight", + "sha256": "c5b456aab9a02d3828987060b24d24c07e7b611d3036f0d5c28662c922d1238d", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.shared_experts.up_proj.weight", + "sha256": "6a84e814bd21fcc17878151b94508853dd70099787ef5303cdc06f90b6cd7092", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.2.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.2.self_attn.indexer.k_norm.bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 16 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.2.self_attn.indexer.k_norm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 512, + "dtype": "torch.bfloat16", + "elements": 256, + "name": "model.layers.2.self_attn.indexer.weights_proj.weight", + "sha256": "d65c6e5c3f34fcad47b7137c46dd3bcd6d5cf24ce508df7fad9d20788d3a18b8", + "shape": [ + 4, + 64 + ] + }, + { + "bytes": 2048, + "dtype": "torch.bfloat16", + "elements": 1024, + "name": "model.layers.2.self_attn.indexer.wk.weight", + "sha256": "917ff454cb253fa0e5d3d68bf15e716401bb928fbd7cd260a348afec25b1b2c8", + "shape": [ + 16, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.self_attn.indexer.wq_b.weight", + "sha256": "3fe5b407fe2d74a0dda78b6cb7ae3f65066a781fd5f81971b83be600fc911d14", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.2.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.2.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "26cecf47e8fb14a837f760549a9b9dd8589c37dc76870f8b115d4ab634b853ab", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.2.self_attn.kv_b_proj.weight", + "sha256": "23447f5f72c55b0cd7acd571ff1317c16c8097e9f0de4cc9b66101b51f7988c1", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.2.self_attn.o_proj.weight", + "sha256": "a1a0c84b3214c9b7b00c438754280833964cdc719aadeff64358b3d09b2063d8", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.2.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.self_attn.q_a_proj.weight", + "sha256": "3eda4fc6a047b282d63ad2884d870ee8150a99f3c71d21031ea71e749cf39815", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.self_attn.q_b_proj.weight", + "sha256": "58ecb919757c3c93d6a43b9344236d9abd32870e68907f37cb8db779d2c93fff", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.3.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.0.down_proj.weight", + "sha256": "e8c77c987baa36019ce1adf05e02e2a31395286e584428b2049e06331848c216", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.0.gate_proj.weight", + "sha256": "69871151865d8a23e2cc39b9fe5da60eb4f41cb6c053520f29d7c7b58e6fa5e0", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.0.up_proj.weight", + "sha256": "12df1ea42b96e959785c09427c3ca3bcdc53aa7942d15187c7b1e19bdd66d08a", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.1.down_proj.weight", + "sha256": "5feaa5de7da59348b465458b8aff5373b11dae8b5150f8e7bb8015acc172e3ff", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.1.gate_proj.weight", + "sha256": "e907e6e36b7266d56e190c1e56551e0a40d64741ce668328d898c17b488ec6c9", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.1.up_proj.weight", + "sha256": "c0062ef6004073cbabf3098703b5f565f0e973e094d90c3eba36c7be471f947e", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.2.down_proj.weight", + "sha256": "efec1e8a6a5e12a6db226699e10a6d346fa95c453009f148fe304d378567f5fe", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.2.gate_proj.weight", + "sha256": "7722cc87a7696f53e7f1e0d741230a7db18d2c324f7faec742a9621c75189cb7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.2.up_proj.weight", + "sha256": "5917df5932d0ce4854458ce357a8a2c3384bc463531996875d1c68c6ea17734c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.3.down_proj.weight", + "sha256": "fd331dc77911f8d80ddfdee938993a08b3715d06767901879c5a55700dbb8961", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.3.gate_proj.weight", + "sha256": "1e8aa3749cdc3d21baf7108c47bb69ad4a532c1f41c0556ca8d68ca2c226a7a8", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.3.up_proj.weight", + "sha256": "858e72360951a5073d117a75b2cd759bc3503c6c270388b30fe73d7554f54dae", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.4.down_proj.weight", + "sha256": "b80cf998a1db7569ca4600388bbe4c6d20bd7fe7209c4e37b5de015041d01423", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.4.gate_proj.weight", + "sha256": "b39a0f5b9cd6f9175e7fa29b342772476caf8a76dad1c34d88075988c1894853", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.4.up_proj.weight", + "sha256": "cef4d7b5fb77e750e91c17cae1622a6362ba204b1b30bf5ed7b65f9e6ed15ff1", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.5.down_proj.weight", + "sha256": "65a04840ec88842630cc6f120899a3bfa6151990d7411bfe44839727648e4d03", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.5.gate_proj.weight", + "sha256": "101836900c549af917f8392a6b1428e2f14e4e1f1ef0fdd9b04e79b98c1c3d02", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.5.up_proj.weight", + "sha256": "4fc8edda4b1a92a43be268a8b249274dd5f4370fd6ea6a3134b8c2c4cf730d95", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.6.down_proj.weight", + "sha256": "fd3a10e1464c20bf5e575c105f39882bcbddcab892ef36f24e5a852d597ee7ef", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.6.gate_proj.weight", + "sha256": "8211aaeed6f1ea2711aa1865309d2d36742c0b41021eea1e00fcac45dc353b4b", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.6.up_proj.weight", + "sha256": "ec4f5d1acc5d045de6ae4106bc8f52d17d64ac355c910f12fac8b1b0b573296d", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.7.down_proj.weight", + "sha256": "03c257936ec78df3f941fe0ca4ce5aad636654cf2a351b64515ac07ad8871cae", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.7.gate_proj.weight", + "sha256": "67c1e28fd0a028104b9c76279a3c473f50452633c8a4feabda637e5f5b71f797", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.7.up_proj.weight", + "sha256": "1b18f8b452b71ca57fec09892a48df2ee2108067f97f62b76a3817c9bea91708", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.float32", + "elements": 8, + "name": "model.layers.3.mlp.gate.e_score_correction_bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 8 + ] + }, + { + "bytes": 1024, + "dtype": "torch.bfloat16", + "elements": 512, + "name": "model.layers.3.mlp.gate.weight", + "sha256": "7e86bda3f7704f19dc2a3f6a0ca22b0df554723adf0cf3add837a1e497ad4d3a", + "shape": [ + 8, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.shared_experts.down_proj.weight", + "sha256": "110ad4d8dd59a5ec2b0d4c2e0a79d022bcdba240a4998ff84ad2590dd32fce2c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.shared_experts.gate_proj.weight", + "sha256": "cca5d02ac9eccab3ee8be47f55ef4d59750dd311800e25c22cc3f22b437ffd8b", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.shared_experts.up_proj.weight", + "sha256": "c8fe3987299d1526946a87facc4d3f99300fafbac552471ed826454c41ed31e5", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.3.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.3.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.3.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "5c230cafd4add95096f53702bab8ef1673993cca9433de8c874638958a61995a", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.3.self_attn.kv_b_proj.weight", + "sha256": "ff432280fe1fbbc2a5b7fee7fb18f6de59d675d2d7d0eec0d769a5fd012699a9", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.3.self_attn.o_proj.weight", + "sha256": "59e2e2ee8f9cba29e9cf3e6098539ddca5811d35d3df3c860488f348d6be9584", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.3.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.self_attn.q_a_proj.weight", + "sha256": "172aae8ff1a79376bf65182f5e92c06da2f9b307c15f214a20597491729aa0d7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.self_attn.q_b_proj.weight", + "sha256": "5d917d8c510906982c609808f1eb0d16da467976550e3a063637f1fde013cbdb", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.norm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + } + ], + "tokenizer": { + "kind": "byte-level BPE without merges", + "special_token_ids": { + "": 1, + "": 2, + "": 0, + "": 3 + }, + "vocab_size": 260 + }, + "versions": { + "safetensors": "0.8.0", + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "transformers": "5.16.1" + } +} diff --git a/raw/candidates/ct-mxfp4/source/build_fixture.py b/raw/candidates/ct-mxfp4/source/build_fixture.py new file mode 100644 index 0000000000000000000000000000000000000000..c86f3466f6c2ac6df7f31bb4ac5ca8bbcaeebf2c --- /dev/null +++ b/raw/candidates/ct-mxfp4/source/build_fixture.py @@ -0,0 +1,145 @@ +#!/usr/bin/env python3 +"""Build a complete, untrained GLM MoE DSA checkpoint for CPU pipeline checks. + +No source model weights, remote Python code, training data or paid compute are used. +Reproducibility is asserted only for the recorded dependency versions on CPU. +""" +from __future__ import annotations + +import argparse +import hashlib +import json +from pathlib import Path +import shutil + +SEED = 20260907 +SPECIAL_TOKENS = ["", "", "", ""] +VERSIONS = {"torch": "2.11.0+cpu", "transformers": "5.16.1", "tokenizers": "0.23.2", "safetensors": "0.8.0"} + + +def write_json(path, value): + path.write_text(json.dumps(value, sort_keys=True, indent=2, ensure_ascii=False, allow_nan=False) + "\n", encoding="utf-8") + + +def build(destination): + import torch + import transformers + import tokenizers + import safetensors + from tokenizers import Tokenizer, decoders, models, pre_tokenizers, processors + from transformers import GlmMoeDsaConfig, GlmMoeDsaForCausalLM, PreTrainedTokenizerFast + + observed = {"torch": torch.__version__, "transformers": transformers.__version__, + "tokenizers": tokenizers.__version__, "safetensors": safetensors.__version__} + if observed != VERSIONS: + raise ValueError("Use the recorded CPU build environment: expected %s; observed %s" % (VERSIONS, observed)) + if destination.exists(): + raise ValueError("Refusing to overwrite an existing destination: %s" % destination) + destination.mkdir(parents=True) + torch.set_num_threads(2) + torch.set_num_interop_threads(1) + torch.manual_seed(SEED) + torch.use_deterministic_algorithms(True) + + alphabet = sorted(pre_tokenizers.ByteLevel.alphabet()) + if len(alphabet) != 256: + raise ValueError("The byte alphabet must contain exactly 256 symbols") + vocabulary = {token: index for index, token in enumerate(SPECIAL_TOKENS + alphabet)} + backend = Tokenizer(models.BPE(vocab=vocabulary, merges=[], unk_token="")) + backend.pre_tokenizer = pre_tokenizers.ByteLevel(add_prefix_space=False, use_regex=False) + backend.decoder = decoders.ByteLevel() + backend.post_processor = processors.TemplateProcessing( + single=" $A ", pair=" $A $B:1 :1", + special_tokens=[("", 1), ("", 2)]) + tokenizer = PreTrainedTokenizerFast( + tokenizer_object=backend, pad_token="", bos_token="", + eos_token="", unk_token="", model_max_length=256, + clean_up_tokenization_spaces=False) + tokenizer.save_pretrained(destination) + + config = GlmMoeDsaConfig( + vocab_size=len(tokenizer), hidden_size=64, intermediate_size=128, + moe_intermediate_size=32, num_hidden_layers=4, + num_attention_heads=4, num_key_value_heads=4, + n_shared_experts=1, n_routed_experts=8, num_experts_per_tok=2, + n_group=1, topk_group=1, norm_topk_prob=True, routed_scaling_factor=2.5, + q_lora_rank=32, kv_lora_rank=16, qk_nope_head_dim=8, + qk_rope_head_dim=8, v_head_dim=16, + index_n_heads=4, index_head_dim=16, index_topk=8, + indexer_types=["full", "shared", "full", "shared"], + first_k_dense_replace=1, mlp_layer_types=["dense", "sparse", "sparse", "sparse"], + num_nextn_predict_layers=0, max_position_embeddings=256, + rope_parameters={"rope_type": "default", "rope_theta": 10000.0}, + pad_token_id=0, bos_token_id=1, eos_token_id=2, tie_word_embeddings=False, + attention_bias=False, attention_dropout=0.0, mlp_bias=False, + initializer_range=0.02, rms_norm_eps=1e-5, dtype="bfloat16", + ) + # Construct the native class, never hand-author a subset of state_dict keys. + # Initialize in FP32, then deliberately define the published artifact in BF16. + model = GlmMoeDsaForCausalLM(config).to(device="cpu", dtype=torch.bfloat16).eval() + # The native BF16 loader strictly retains router correction buffers in FP32. + # Store that exception explicitly; the rest reloads without dtype changes. + for module in model.modules(): + if hasattr(module, "e_score_correction_bias"): + module.e_score_correction_bias = module.e_score_correction_bias.float() + if model.get_output_embeddings().weight.data_ptr() == model.get_input_embeddings().weight.data_ptr(): + raise ValueError("Fixture must contain a complete, independent output head") + for name, tensor in model.state_dict().items(): + if tensor.is_floating_point() and not torch.isfinite(tensor).all(): + raise ValueError("Non-finite initialized tensor: " + name) + model.save_pretrained(destination, safe_serialization=True, max_shard_size="10MB") + + from safetensors import safe_open + tensors = [] + with safe_open(destination / "model.safetensors", framework="pt", device="cpu") as saved: + for name in sorted(saved.keys()): + tensor = saved.get_tensor(name) + raw = tensor.contiguous().view(torch.uint8).numpy().tobytes() + tensors.append({"name": name, "shape": list(tensor.shape), "dtype": str(tensor.dtype), + "elements": tensor.numel(), "bytes": len(raw), + "sha256": hashlib.sha256(raw).hexdigest()}) + # Native saving expands fused expert tensors into canonical per-expert + # checkpoint keys. Verify their semantic roundtrip, not name equality between + # the storage representation and the in-memory fused representation. + reloaded = transformers.AutoModelForCausalLM.from_pretrained( + destination, dtype=torch.bfloat16, local_files_only=True, trust_remote_code=False) + expected_state, observed_state = model.state_dict(), reloaded.state_dict() + if expected_state.keys() != observed_state.keys(): + raise ValueError("Native state keys changed across save/reload") + for name, tensor in expected_state.items(): + if tensor.dtype != observed_state[name].dtype or not torch.equal(tensor, observed_state[name]): + raise ValueError("Tensor changed across native save/reload: " + name) + files = {} + for name in ("config.json", "generation_config.json", "model.safetensors", "tokenizer.json", "tokenizer_config.json"): + raw = (destination / name).read_bytes() + files[name] = {"bytes": len(raw), "sha256": hashlib.sha256(raw).hexdigest()} + manifest = { + "schema": "malaiwah.glm-moe-dsa-tiny-build.v1", + "seed": SEED, "versions": observed, + "generator_sha256": hashlib.sha256(Path(__file__).read_bytes()).hexdigest(), + "generation": "Native GlmMoeDsaForCausalLM random initialization in FP32, rounded to the published BF16 artifact; native router correction buffers retained FP32.", + "parameter_count": sum(p.numel() for p in model.parameters()), + "tensor_count": len(tensors), "stored_elements": sum(t["elements"] for t in tensors), + "files": files, "tensors": tensors, + "tokenizer": {"kind": "byte-level BPE without merges", "vocab_size": len(tokenizer), + "special_token_ids": {token: tokenizer.convert_tokens_to_ids(token) for token in SPECIAL_TOKENS}}, + "architecture_inspiration": "GLM-5.2-SIQ-Fruit-bf16 geometry and dense/MoE plus full/shared DSA schedules; no Fruit or GLM model weights reused.", + "limitations": ["Random initialization; not trained or distilled.", "Not a quantization or behavioral approximation of a released GLM model.", + "MTP intentionally absent (zero next-n-prediction layers); no unmatched MTP tensors.", + "This build manifest describes generated bytes, not proof of clean loading or capture; see separately measured verification evidence."], + } + write_json(destination / "build-manifest.json", manifest) + shutil.copyfile(__file__, destination / "build_fixture.py") + print(json.dumps({"destination": str(destination), "parameter_count": manifest["parameter_count"], + "tensor_count": len(tensors), "weight_file": files["model.safetensors"]}, indent=2)) + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--out", required=True, type=Path) + args = parser.parse_args() + build(args.out) + + +if __name__ == "__main__": + main() diff --git a/raw/candidates/ct-mxfp4/source/build_panel.py b/raw/candidates/ct-mxfp4/source/build_panel.py new file mode 100644 index 0000000000000000000000000000000000000000..258be1a623b3009940fb0b1417c5be9ea02904be --- /dev/null +++ b/raw/candidates/ct-mxfp4/source/build_panel.py @@ -0,0 +1,232 @@ +#!/usr/bin/env python3 +"""Build the tiny GLM-MoE-DSA synthetic CPU smoke panel, not a benchmark. + +The QFS panel directory has an exact sealed file closure. Its resolved binding +and SHA report are therefore written beside --out, never inside it. The caller +must supply the genuine published model commit; this offline builder verifies +local bytes, not their remote availability at that commit. +""" +from __future__ import annotations + +import argparse +import importlib.util +import json +from pathlib import Path +import re +import sys + + +PANEL_ID = "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1" +PANEL_NAME = "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)" +CONTEXT_LENGTH = 64 +VOCAB_SIZE = 260 +ARTIFACT_EPOCH = "2026-09-07T00:00:00Z" +# Authored synthetic inputs, embedded verbatim in the receipt for reconstruction. +TEXTS = ( + ("garden", "The small garden has red flowers, green leaves, and a stone path. " + "A gentle breeze moves the branches while a robin sings near the gate."), + ("arithmetic", "A shelf holds three blue boxes and five red boxes. There are eight " + "boxes in total. Move two boxes to the desk and count the six boxes remaining."), + ("code", "def add_values(left, right):\n return left + right\n\n" + "result = add_values(7, 9)\nprint(result)\n" + "# This readable snippet is synthetic input, not a coding benchmark.\n"), + ("instructions", "First place a clean cup on the table. Next pour cool water into " + "the cup. Finally put the bottle away and write a short note about the steps."), +) +TOKENIZER_FILES = ( + "config.json", "generation_config.json", "tokenizer.json", "tokenizer_config.json", + "special_tokens_map.json", "added_tokens.json", "vocab.json", "merges.txt", + "tokenizer.model", "spiece.model", "sentencepiece.bpe.model", "chat_template.jinja", +) + + +def write_json(path: Path, value: object) -> None: + with path.open("x", encoding="utf-8", newline="\n") as handle: + handle.write(json.dumps(value, indent=2, sort_keys=True, + ensure_ascii=False, allow_nan=False) + "\n") + + +def main(argv: list[str] | None = None) -> int: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--model-dir", required=True, type=Path) + parser.add_argument("--model-repository", required=True) + parser.add_argument("--model-revision", required=True, + help="genuine immutable published model commit (40 lowercase hex)") + parser.add_argument("--out", required=True, type=Path, + help="new sealed panel directory; binding/report are sibling files") + parser.add_argument("--qfs-root", required=True, type=Path, + help="QFS checkout containing bin/fidelity and engines/tools") + args = parser.parse_args(argv) + if re.fullmatch(r"[0-9a-f]{40}", args.model_revision) is None: + parser.error("--model-revision must be an immutable 40-character lowercase hex commit") + if re.fullmatch(r"[A-Za-z0-9][A-Za-z0-9._-]*/[A-Za-z0-9][A-Za-z0-9._-]*", + args.model_repository) is None: + parser.error("--model-repository must be a Hugging Face owner/repository ID") + model_dir = args.model_dir.resolve() + qfs_root = args.qfs_root.resolve() + out = args.out.resolve() + binding_path = out.with_name(out.name + ".binding.json") + report_path = out.with_name(out.name + ".sha256.json") + if not model_dir.is_dir(): + parser.error("--model-dir must already contain the saved model and native tokenizer") + for destination in (out, binding_path, report_path): + if destination.exists() or destination.is_symlink(): + parser.error("refusing to overwrite %s" % destination) + if destination.is_relative_to(model_dir) or destination.is_relative_to(qfs_root): + parser.error("output must be outside the model directory and QFS checkout") + builder_path = qfs_root / "engines/tools/build_token_panel.py" + resolver_path = qfs_root / "bin/fidelity/panel.py" + if not builder_path.is_file() or not resolver_path.is_file(): + parser.error("--qfs-root lacks the existing token-panel builder or resolver") + + # Reuse the existing format's seal and token preimages. Its CLI cannot meet + # this contract: it hardcodes add_special_tokens=False and not local-only. + spec = importlib.util.spec_from_file_location("qfs_token_panel_builder", builder_path) + if spec is None or spec.loader is None: + raise RuntimeError("cannot import the QFS token-panel builder") + builder = importlib.util.module_from_spec(spec) + spec.loader.exec_module(builder) + sys.path.insert(0, str(qfs_root / "bin")) + from fidelity import panel as panel_contract + import numpy as np + import tokenizers + import transformers + from transformers import AutoTokenizer + + for name in ("config.json", "tokenizer.json", "tokenizer_config.json"): + if not (model_dir / name).is_file(): + raise ValueError("required native tokenizer/model file missing: " + name) + config = json.loads((model_dir / "config.json").read_text(encoding="utf-8")) + if config.get("model_type") != "glm_moe_dsa" or config.get("vocab_size") != VOCAB_SIZE: + raise ValueError("expected glm_moe_dsa model with vocabulary size 260") + if config.get("max_position_embeddings", 0) < CONTEXT_LENGTH: + raise ValueError("model context limit cannot accommodate 64-token windows") + file_hashes = {name: builder.sha256_file(model_dir / name) + for name in sorted(TOKENIZER_FILES) if (model_dir / name).is_file()} + tokenizer = AutoTokenizer.from_pretrained( + model_dir, local_files_only=True, trust_remote_code=False) + if len(tokenizer) != VOCAB_SIZE or tokenizer.vocab_size != VOCAB_SIZE: + raise ValueError("expected exactly 260 native tokenizer entries, including special tokens") + if set(tokenizer.get_vocab().values()) != set(range(VOCAB_SIZE)): + raise ValueError("tokenizer IDs must cover the contiguous interval [0,260)") + expected_specials = {"pad_token_id": 0, "bos_token_id": 1, + "eos_token_id": 2, "unk_token_id": 3} + for name, expected in expected_specials.items(): + if getattr(tokenizer, name, None) != expected: + raise ValueError("unexpected tokenizer special ID for " + name) + + encoded_windows = [] + sources = [] + for index, (domain, text) in enumerate(TEXTS): + encoded = tokenizer(text, add_special_tokens=True, truncation=True, + max_length=CONTEXT_LENGTH, padding=False, + return_attention_mask=True, return_special_tokens_mask=True) + ids = encoded["input_ids"] + mask = encoded["attention_mask"] + special_mask = encoded["special_tokens_mask"] + if (len(ids) != CONTEXT_LENGTH or len(mask) != CONTEXT_LENGTH + or len(special_mask) != CONTEXT_LENGTH + or any(type(value) is not int or not 0 <= value < VOCAB_SIZE for value in ids) + or mask != [1] * CONTEXT_LENGTH): + raise ValueError("tokenizer produced invalid token IDs or 64-token/mask shape") + if (any(value not in (0, 1) for value in special_mask) + or not any(special_mask) + or not all(ids[pos] in tokenizer.all_special_ids + for pos, marked in enumerate(special_mask) if marked)): + raise ValueError("native tokenizer did not apply a valid special-token template") + window_id = "final-%04d" % index + encoded_windows.append((window_id, domain, ids)) + raw = text.encode("utf-8") + sources.append({"stratum": domain, "document": domain + ".txt", + "document_sha256": builder.sha256_bytes(raw), "bytes": len(raw), + "text_utf8": text, "selected": True, "window_id": window_id, + "tokens_total": len(tokenizer(text, add_special_tokens=True)["input_ids"]), + "num_tokens": len(ids), "special_tokens_mask": special_mask}) + + arrays = out / "arrays" + arrays.mkdir(parents=True, exist_ok=False) + mask_path = arrays / "causal-mask-64.npy" + np.save(mask_path, np.ones(CONTEXT_LENGTH, dtype=np.uint8), allow_pickle=False) + mask_sha = builder.sha256_file(mask_path) + windows = [] + for window_id, domain, ids in encoded_windows: + token_path = arrays / (window_id + ".tokens.npy") + np.save(token_path, np.asarray(ids, dtype=" same_stack", + "overridden_by": null, + "passed": true + } + }, + "high_kld_contexts": [ + { + "allocation_stratum": null, + "domain": "garden", + "index": 0, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0000" + }, + { + "allocation_stratum": null, + "domain": "arithmetic", + "index": 1, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0001" + }, + { + "allocation_stratum": null, + "domain": "code", + "index": 2, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0002" + }, + { + "allocation_stratum": null, + "domain": "instructions", + "index": 3, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0003" + } + ], + "kl": { + "max": 0.0, + "mean": 0.0, + "median": 0.0, + "p95": 0.0, + "p99": 0.0, + "p99_9": 0.0 + }, + "kl_macro_stratum_mean": null, + "kl_micro_token_mean": 0.0, + "measurement_scope": { + "contexts": 4, + "covers_full_panel": true, + "position_filter": "all", + "positions_per_context": 63, + "scored_positions": 252, + "subset_detail": null + }, + "metric": { + "direction": "reference_to_candidate", + "direction_label": "KL(reference || candidate)", + "higher_is_better": false, + "name": "mean_tokenwise_kld", + "units": "nats", + "value": 0.0 + }, + "panel": { + "context_length": 64, + "contexts": 4, + "panel_id": "panel--panel", + "panel_token_sha256_legacy": "3c9467c85be43d238926f6d18bf825c2e4748814c95b8b0e8b8f1420546c3089", + "scored_positions": 252, + "scoring_window": { + "dropped_positions_total": 0, + "min_left_context_tokens": 1, + "policy": "every causal prediction position of every window is scored; nothing is dropped", + "score_from": 0, + "windowed": false + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + }, + "tokenizer_candidate": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + }, + "tokenizer_identity_equal": true, + "tokenizer_reference": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } + }, + "per_context": [ + { + "allocation_stratum": null, + "domain": "garden", + "index": 0, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0000" + }, + { + "allocation_stratum": null, + "domain": "arithmetic", + "index": 1, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0001" + }, + { + "allocation_stratum": null, + "domain": "code", + "index": 2, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0002" + }, + { + "allocation_stratum": null, + "domain": "instructions", + "index": 3, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0003" + } + ], + "per_domain": null, + "per_stratum": null, + "receipt_sha256": "4910833e5cc175ea351055e567c5d896475b4020598359291aedc958d8ada382", + "reference": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "dataset_id": "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "dataset_sha256": "56588f20f9cf055301f83a828fa75fa94c1e26593e64a07c5c6c4e38e9454563", + "form": "hidden", + "head": { + "bits": 16, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510" + }, + "label": "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "lane": "other", + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "repository": "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "revision": null, + "role": "root", + "scope_digest": "attn.o=native:bf16@16|attn.qkv=native:bf16@16|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=native:bf16@16|mlp.gate=native:bf16@16|mlp.up=native:bf16@16|moe.experts=native:bf16@16|norm=native:bf16@16|head=native|kv=bf16", + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd", + "weights": { + "artifact_ref": null, + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "codec": null, + "config_sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "declared_bits": null, + "declared_head_bits": 16, + "index_sha256": null, + "model_ref": null, + "model_revision": "45563636ef723acfb826755493447dc40c7a0c37", + "quantized": false, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37" + } + }, + "schema": "malaiwah.fidelity-comparison-receipt.v1", + "self_compare": { + "asserted_exact_zero": true, + "capture_content_digest_equal": true, + "expected_tokenwise_bytes": 2144, + "expected_tokenwise_sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d", + "force_compute_agreed": true, + "head_digest_equal": true, + "weights_identity_equal": true + }, + "submission": { + "emitted": false, + "path": null, + "receipt_sha256": null, + "refusal": "comparison_kind is reproduction_confirmation, not measurement; bin/fidelity/receipt.py::_scan_for_unsubmittable is the second, independent refusal axis.", + "submission_schema": null + }, + "tokenwise": { + "bytes": 2144, + "path": "tokenwise-kld.npy", + "sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d" + }, + "top1_agreement": 1.0, + "top1_discordant_contexts": [], + "uncertainty": { + "ci95_high": null, + "ci95_low": null, + "cluster_unit": null, + "clusters": null, + "method": "none", + "samples": null, + "seed": null + } +} diff --git a/raw/candidates/ct-mxfp4/source/cpu-reproduction-summary.json b/raw/candidates/ct-mxfp4/source/cpu-reproduction-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..7fe4e433fbfabcad4ab3781b796fbd3439d5db17 --- /dev/null +++ b/raw/candidates/ct-mxfp4/source/cpu-reproduction-summary.json @@ -0,0 +1,851 @@ +{ + "captures": { + "first": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "cold_run": "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "dataset_sha256": "56588f20f9cf055301f83a828fa75fa94c1e26593e64a07c5c6c4e38e9454563", + "generation_sanity_probe": { + "degenerate": false, + "enforced": false, + "entropy_nats": 5.548019647470335, + "expect": null, + "logit_spread": 0.986328125, + "note": "one extra window through the same schedule; its hidden state is discarded and never enters the dataset.", + "prompt": "The capital of France is", + "schema": "malaiwah.generation-sanity-probe.v1", + "status": "recorded", + "top1_id": 113, + "top1_probability": 0.006720104384265371, + "top1_text": "�", + "top_k": [ + { + "id": 113, + "probability": 0.006720104384265371, + "text": "�" + }, + { + "id": 237, + "probability": 0.006412368399474785, + "text": "�" + }, + { + "id": 193, + "probability": 0.006035639491843906, + "text": "\u0001" + }, + { + "id": 236, + "probability": 0.0055386141320063614, + "text": "�" + }, + { + "id": 44, + "probability": 0.0054740873228682424, + "text": "I" + } + ], + "uniform_entropy_nats": 5.560681631015528, + "vocab_size": 260 + }, + "head_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "memory_report": { + "context_length": 64, + "decoder_layers": null, + "device": "cpu", + "hidden_size": 64, + "layer_residency": null, + "model": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "peak_resident_weight_bytes": 555776, + "peak_resident_weight_detail": { + "buffers": 128, + "parameters": 555648, + "total": 555776 + }, + "peak_resident_weight_gb": 0.001, + "peak_rss_bytes": 367374336, + "peak_rss_gb": 0.367, + "resident_weight_note": "the maximum, over the run, of the materialised parameter+buffer bytes. On the CPU path peak_rss_bytes ALSO counts the safetensors mmap page cache, which is evictable and is not held by the schedule; this figure is not confounded by it. On CUDA, peak_cuda_allocated_bytes is the authoritative number because it includes activations and workspace and has no page cache.", + "rss_units_source": "Linux ru_maxrss", + "schedule": "window-outer", + "vocab_size": 260, + "windows": 4 + }, + "path": "first", + "pid": 406991, + "resources": { + "bytes": { + "checkpoint_read": 572479, + "hidden_d2h": 36616, + "weights_h2d": null + }, + "checkpoint_bytes": 572479, + "checkpoint_files": 2, + "device_name": null, + "forward_timing": "wall-clock", + "note": "provenance, not identity: peaks and stage seconds this run measured; forward_sum is device time under cuda-events, wall time otherwise; seal covers head serialisation up to this block's assembly", + "peak_cuda_allocated_bytes": null, + "peak_cuda_reserved_bytes": null, + "peak_resident_weight_bytes": 555776, + "peak_rss_bytes": 367374336, + "rss_units_source": "Linux ru_maxrss", + "seconds": { + "decode_sum": null, + "elapsed": 2.448, + "fill_sum": null, + "forward_sum": 0.126, + "identity": 0.005, + "layer_load_max": null, + "layer_load_sum": null, + "layer_loads": null, + "resident_load": 2.283, + "seal": 0.007 + } + }, + "runtime_versions": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 406991, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd" + }, + "repeat": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "cold_run": "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d", + "dataset_sha256": "c3ff6c32dc57502825d3ca3ac2133ed6a4c31e7bc7602191d595ee044ebe9048", + "generation_sanity_probe": { + "degenerate": false, + "enforced": false, + "entropy_nats": 5.548019647470335, + "expect": null, + "logit_spread": 0.986328125, + "note": "one extra window through the same schedule; its hidden state is discarded and never enters the dataset.", + "prompt": "The capital of France is", + "schema": "malaiwah.generation-sanity-probe.v1", + "status": "recorded", + "top1_id": 113, + "top1_probability": 0.006720104384265371, + "top1_text": "�", + "top_k": [ + { + "id": 113, + "probability": 0.006720104384265371, + "text": "�" + }, + { + "id": 237, + "probability": 0.006412368399474785, + "text": "�" + }, + { + "id": 193, + "probability": 0.006035639491843906, + "text": "\u0001" + }, + { + "id": 236, + "probability": 0.0055386141320063614, + "text": "�" + }, + { + "id": 44, + "probability": 0.0054740873228682424, + "text": "I" + } + ], + "uniform_entropy_nats": 5.560681631015528, + "vocab_size": 260 + }, + "head_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "memory_report": { + "context_length": 64, + "decoder_layers": null, + "device": "cpu", + "hidden_size": 64, + "layer_residency": null, + "model": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "peak_resident_weight_bytes": 555776, + "peak_resident_weight_detail": { + "buffers": 128, + "parameters": 555648, + "total": 555776 + }, + "peak_resident_weight_gb": 0.001, + "peak_rss_bytes": 367198208, + "peak_rss_gb": 0.367, + "resident_weight_note": "the maximum, over the run, of the materialised parameter+buffer bytes. On the CPU path peak_rss_bytes ALSO counts the safetensors mmap page cache, which is evictable and is not held by the schedule; this figure is not confounded by it. On CUDA, peak_cuda_allocated_bytes is the authoritative number because it includes activations and workspace and has no page cache.", + "rss_units_source": "Linux ru_maxrss", + "schedule": "window-outer", + "vocab_size": 260, + "windows": 4 + }, + "path": "repeat", + "pid": 409089, + "resources": { + "bytes": { + "checkpoint_read": 572479, + "hidden_d2h": 36616, + "weights_h2d": null + }, + "checkpoint_bytes": 572479, + "checkpoint_files": 2, + "device_name": null, + "forward_timing": "wall-clock", + "note": "provenance, not identity: peaks and stage seconds this run measured; forward_sum is device time under cuda-events, wall time otherwise; seal covers head serialisation up to this block's assembly", + "peak_cuda_allocated_bytes": null, + "peak_cuda_reserved_bytes": null, + "peak_resident_weight_bytes": 555776, + "peak_rss_bytes": 367198208, + "rss_units_source": "Linux ru_maxrss", + "seconds": { + "decode_sum": null, + "elapsed": 2.619, + "fill_sum": null, + "forward_sum": 0.128, + "identity": 0.004, + "layer_load_max": null, + "layer_load_sum": null, + "layer_loads": null, + "resident_load": 2.453, + "seal": 0.005 + } + }, + "runtime_versions": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 409089, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd" + } + }, + "commands": [ + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--model", + "/tmp/qfs-complete-tiny-fixture/model", + "--weights-repository", + "malaiwah/glm-moe-dsa-tiny-random-bf16", + "--model-revision", + "45563636ef723acfb826755493447dc40c7a0c37", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-complete-tiny-fixture/reproduction/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--role", + "root", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--schedule", + "window-outer", + "--dataset-id", + "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "--dataset-name", + "GLM MoE DSA tiny random CPU root", + "--repository", + "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "--author", + "malaiwah", + "--disclosures", + "[{\"code\":\"random_init_cpu_fixture\",\"severity\":\"info\",\"affects_comparability\":false,\"detail\":\"Complete randomly initialized tiny glm_moe_dsa checkpoint; CPU smoke fixture only, not trained quality evidence or a registry measurement. Lane other denotes CPU, not local-cuda-budget.\"}]", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--run-name", + "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "--cold-run", + "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "--memory-report", + "/tmp/qfs-complete-tiny-fixture/reproduction/first.memory.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 6.485651439987123, + "name": "capture-first", + "pid": 406991, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 406991, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "capture-first.stderr.log", + "stdout": "capture-first.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "verify", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/first.verify.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.575829998124391, + "name": "verify-first", + "pid": 408026, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 408026, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "verify-first.stderr.log", + "stdout": "verify-first.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "validate", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--strict", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/first.strict.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.8252810118719935, + "name": "strict-first", + "pid": 408494, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 408494, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "strict-first.stderr.log", + "stdout": "strict-first.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--model", + "/tmp/qfs-complete-tiny-fixture/model", + "--weights-repository", + "malaiwah/glm-moe-dsa-tiny-random-bf16", + "--model-revision", + "45563636ef723acfb826755493447dc40c7a0c37", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-complete-tiny-fixture/reproduction/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--role", + "root", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--schedule", + "window-outer", + "--dataset-id", + "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "--dataset-name", + "GLM MoE DSA tiny random CPU root", + "--repository", + "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "--author", + "malaiwah", + "--disclosures", + "[{\"code\":\"random_init_cpu_fixture\",\"severity\":\"info\",\"affects_comparability\":false,\"detail\":\"Complete randomly initialized tiny glm_moe_dsa checkpoint; CPU smoke fixture only, not trained quality evidence or a registry measurement. Lane other denotes CPU, not local-cuda-budget.\"}]", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--run-name", + "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d", + "--cold-run", + "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d", + "--memory-report", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat.memory.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 6.431767418049276, + "name": "capture-repeat", + "pid": 409089, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 409089, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "capture-repeat.stderr.log", + "stdout": "capture-repeat.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "verify", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat.verify.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.7754629959817976, + "name": "verify-repeat", + "pid": 409951, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 409951, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "verify-repeat.stderr.log", + "stdout": "verify-repeat.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "validate", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--strict", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat.strict.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.423026765929535, + "name": "strict-repeat", + "pid": 410549, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 410549, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "strict-repeat.stderr.log", + "stdout": "strict-repeat.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "compare", + "--reference", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--candidate", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction/comparison", + "--self-compare", + "--force-compute", + "--device", + "cpu", + "--replay-device", + "numpy", + "--replay-dtype", + "float32", + "--vocab-chunk", + "8192", + "--chunk-positions", + "128", + "--verify-tensors", + "--reference-label", + "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "--candidate-label", + "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.7282893639057875, + "name": "compare", + "pid": 411043, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 411043, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "compare.stderr.log", + "stdout": "compare.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "validate", + "--receipt", + "/tmp/qfs-complete-tiny-fixture/reproduction/comparison/comparison-receipt.json", + "--strict", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/comparison.validate.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.424050308065489, + "name": "validate-comparison", + "pid": 411487, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 411487, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "validate-comparison.stderr.log", + "stdout": "validate-comparison.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + } + ], + "comparison": { + "comparator": { + "accumulation_dtype": "float64", + "bf16_reduced_precision_reduction": false, + "cublas_workspace_config": null, + "deterministic_algorithms": true, + "device": "cpu", + "estimator_backend": "torch:k6_kld_report._token_kld", + "head_applied_candidate_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "head_applied_reference_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "head_applied_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "logprob_dtype": "float64", + "position_block": 128, + "replay_backend": "numpy:cpu:float32", + "replay_env": { + "blas_configuration": "OpenBLAS 0.3.34.106.0 USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell MAX_THREADS=64", + "blas_name": "scipy-openblas", + "blas_threads": 2, + "blas_threads_source": "ctypes:scipy_openblas_get_num_threads64_", + "blas_version": "0.3.34.106.0", + "cpu_model": "Intel(R) Xeon(R) CPU X5570 @ 2.93GHz", + "library": "numpy", + "numpy_version": "2.5.3", + "replay_dtype": "float32" + }, + "replay_peak_device_bytes": null, + "short_circuited": true, + "source_file_hashes_verified": true, + "tensor_content_digests_verified": true, + "tf32": false, + "tool": { + "entrypoint": "bin/fidelity-dataset compare", + "note": "the fp64 estimator is k6_kld_report._token_kld, imported not copied, whenever torch is importable; estimator_backend records which path ran." + }, + "two_pass": true, + "vocab_chunk": 8192 + }, + "comparison_kind": "reproduction_confirmation", + "kl": { + "max": 0.0, + "mean": 0.0, + "median": 0.0, + "p95": 0.0, + "p99": 0.0, + "p99_9": 0.0 + }, + "measurement_scope": { + "contexts": 4, + "covers_full_panel": true, + "position_filter": "all", + "positions_per_context": 63, + "scored_positions": 252, + "subset_detail": null + }, + "metric": { + "direction": "reference_to_candidate", + "direction_label": "KL(reference || candidate)", + "higher_is_better": false, + "name": "mean_tokenwise_kld", + "units": "nats", + "value": 0.0 + }, + "note": "QFS retains its hash-proof result and top-1 value for reproduction confirmations; --force-compute independently runs the estimator and requires its tokenwise KL array to agree exactly. short_circuited=true therefore does not mean replay was skipped.", + "receipt": "comparison/comparison-receipt.json", + "receipt_sha256": "4910833e5cc175ea351055e567c5d896475b4020598359291aedc958d8ada382", + "self_compare": { + "asserted_exact_zero": true, + "capture_content_digest_equal": true, + "expected_tokenwise_bytes": 2144, + "expected_tokenwise_sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d", + "force_compute_agreed": true, + "head_digest_equal": true, + "weights_identity_equal": true + }, + "tokenwise": { + "bytes": 2144, + "path": "tokenwise-kld.npy", + "sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d" + }, + "top1_agreement": 1.0 + }, + "cpu_threads": 2, + "dataset_id": "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "dataset_repository": "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "device": "cpu", + "driver_argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "/tmp/qfs-complete-tiny-fixture/verify_cpu.py", + "--model-dir", + "/tmp/qfs-complete-tiny-fixture/model", + "--model-repository", + "malaiwah/glm-moe-dsa-tiny-random-bf16", + "--model-revision", + "45563636ef723acfb826755493447dc40c7a0c37", + "--panel-dir", + "/tmp/qfs-complete-tiny-fixture/panel", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction", + "--qfs-root", + "/tmp/qfs-explorer-development" + ], + "driver_sha256": "2e507993f0085a72d5236527942a7143fd036d56b82223b26e90889de5cd9f98", + "dtype": "bfloat16", + "elapsed_seconds": 34.85638747992925, + "lane": "other", + "lane_description": "local CPU random-init fixture", + "model_repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "model_revision": "45563636ef723acfb826755493447dc40c7a0c37", + "panel_binding": "panel-binding.json", + "panel_binding_sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "provenance_note": "Local QFS source bytes are hashed; no source commit is asserted. The caller supplies an immutable model pin; QFS hashes the local checkpoint. This script does not independently prove Hub-to-local weight equality.", + "qfs_source_files": { + "bin/fidelity/dscompare.py": "4a53f735e1e3fb8bd739854451b57f34e8369bffa9fd4f7b7fd935fb2e7d52df", + "bin/fidelity/dsvalidate.py": "a9d6cd57e801e3ef044a37635e24518c83dbc6d1ec8a4c0b4b5d1b24483ca8d1", + "bin/fidelity/panel.py": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "bin/fidelity_dataset.py": "ac62b63bbfde67e4d5cacecf9cd417193c50f417a6749cc15ee6f1610c153a4e", + "engines/tools/hf_capture.py": "200ba12ca74fb97531307965cbbaa5c10553a5c26e008e524ea2d8aecb005b95" + }, + "schema": "malaiwah.glm-moe-dsa-tiny-cpu-reproduction.v1", + "scope": "Random-init CPU reproduction only; no quality claim or registry submission.", + "status": "passed" +} diff --git a/raw/candidates/ct-mxfp4/source/generation_config.json b/raw/candidates/ct-mxfp4/source/generation_config.json new file mode 100644 index 0000000000000000000000000000000000000000..59bd0680606c94f6570a92e60fa4acd2e2170f70 --- /dev/null +++ b/raw/candidates/ct-mxfp4/source/generation_config.json @@ -0,0 +1,10 @@ +{ + "_from_model_config": true, + "bos_token_id": 1, + "eos_token_id": 2, + "output_attentions": false, + "output_hidden_states": false, + "pad_token_id": 0, + "transformers_version": "5.16.1", + "use_cache": true +} diff --git a/raw/candidates/ct-mxfp4/source/hub-checkpoint-verification.json b/raw/candidates/ct-mxfp4/source/hub-checkpoint-verification.json new file mode 100644 index 0000000000000000000000000000000000000000..b9648c8ae18de0fb86ce18398175c6686afbd7b2 --- /dev/null +++ b/raw/candidates/ct-mxfp4/source/hub-checkpoint-verification.json @@ -0,0 +1,32 @@ +{ + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "downloaded_from_hub": true, + "files": { + "config.json": { + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "bytes": 1479, + "matches_build": true + }, + "generation_config.json": { + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "bytes": 216, + "matches_build": true + }, + "model.safetensors": { + "sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1", + "bytes": 571000, + "matches_build": true + }, + "tokenizer.json": { + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "bytes": 6763, + "matches_build": true + }, + "tokenizer_config.json": { + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63", + "bytes": 236, + "matches_build": true + } + } +} diff --git a/raw/candidates/ct-mxfp4/source/loader-verification.json b/raw/candidates/ct-mxfp4/source/loader-verification.json new file mode 100644 index 0000000000000000000000000000000000000000..871fc889a9d3a025569770a96e83ff5f0a2fb420 --- /dev/null +++ b/raw/candidates/ct-mxfp4/source/loader-verification.json @@ -0,0 +1,60 @@ +{ + "schema": "malaiwah.tiny-fixture-loader-check.v1", + "checkpoint_sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1", + "runtime": { + "torch": "2.11.0+cpu", + "transformers": "5.16.1", + "device": "cpu", + "threads": 2 + }, + "qfs_load_report": { + "observed": true, + "conversion_errors_visible": true, + "missing_keys": [], + "unexpected_keys": [], + "mismatched_keys": [], + "error_msgs": [], + "conversion_errors": {} + }, + "native_save_reload_tensor_equality": true, + "independent_build_files_byte_equal": true, + "tokenizer_roundtrip_examples": [ + "The CPU fixture carries a complete output head and real sparse attention.", + "Small deterministic tensors make a repeatable pipeline experiment.", + "Unicode roundtrip: caf\u00e9, snow \u96ea, punctuation!", + "The same bytes must survive saving and loading without repair." + ], + "forward_shape": [ + 4, + 64, + 260 + ], + "forward_all_finite": true, + "forward_logit_std": 0.16186420619487762, + "load_seconds": 2.1670503590721637, + "batch_forward_seconds": 0.05775680090300739, + "greedy_generation_seconds": 0.04374621692113578, + "generated_token_ids": [ + 1, + 55, + 75, + 72, + 224, + 38, + 51, + 56, + 224, + 73, + 76, + 91, + 87, + 88, + 85, + 72, + 171, + 105, + 156, + 236 + ], + "peak_process_rss_mib": 351.9296875 +} diff --git a/raw/candidates/ct-mxfp4/source/model.safetensors b/raw/candidates/ct-mxfp4/source/model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..4fb280ef48135a3788c03440ffe9075628c12dfd --- /dev/null +++ b/raw/candidates/ct-mxfp4/source/model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1 +size 571000 diff --git a/raw/candidates/ct-mxfp4/source/panel.binding.json b/raw/candidates/ct-mxfp4/source/panel.binding.json new file mode 100644 index 0000000000000000000000000000000000000000..573cea0b332c636bdda89b150f95cda307b89194 --- /dev/null +++ b/raw/candidates/ct-mxfp4/source/panel.binding.json @@ -0,0 +1,102 @@ +{ + "content": { + "archive": { + "algorithm": "sha256(ustar: sorted regular files; mode=0644; uid=gid=mtime=0)", + "bytes": 20480, + "compression": "none", + "format": "ustar", + "sha256": "389706dfa3335a75ec70a40d079995af1a60c05512334125dbd336790f12702f" + }, + "manifest": [ + { + "bytes": 192, + "path": "arrays/causal-mask-64.npy", + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02" + }, + { + "bytes": 384, + "path": "arrays/final-0000.tokens.npy", + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af" + }, + { + "bytes": 384, + "path": "arrays/final-0001.tokens.npy", + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea" + }, + { + "bytes": 384, + "path": "arrays/final-0002.tokens.npy", + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c" + }, + { + "bytes": 384, + "path": "arrays/final-0003.tokens.npy", + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a" + }, + { + "bytes": 4195, + "path": "panel.json", + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6" + }, + { + "bytes": 7808, + "path": "panel.receipt.json", + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263" + } + ], + "manifest_sha256": "e5f2d6410a6290da1197016c5b57ae522a3570665215ddc23e2a0bd45f912181" + }, + "panel": { + "bytes": 4195, + "context_length": 64, + "contexts": 4, + "file": "panel.json", + "id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "positions_per_context": 63, + "role": "final", + "scored_positions_total": 252, + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6", + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36" + }, + "receipt": { + "bytes": 7808, + "declared_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "file": "panel.receipt.json", + "receipt_file_sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "receipt_seal_mode": "self-blank" + }, + "schema": "malaiwah.resolved-panel.v1", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } +} diff --git a/raw/candidates/ct-mxfp4/source/panel.sha256.json b/raw/candidates/ct-mxfp4/source/panel.sha256.json new file mode 100644 index 0000000000000000000000000000000000000000..30e122a1cc6d1937fecc0d31e38e468bceefc9de --- /dev/null +++ b/raw/candidates/ct-mxfp4/source/panel.sha256.json @@ -0,0 +1,83 @@ +{ + "binding_file": "panel.binding.json", + "binding_sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "context_length": 64, + "contexts": 4, + "model_repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "model_revision": "45563636ef723acfb826755493447dc40c7a0c37", + "panel_archive": { + "algorithm": "sha256(ustar: sorted regular files; mode=0644; uid=gid=mtime=0)", + "bytes": 20480, + "compression": "none", + "format": "ustar", + "sha256": "389706dfa3335a75ec70a40d079995af1a60c05512334125dbd336790f12702f" + }, + "panel_directory": "panel", + "panel_files": [ + { + "bytes": 192, + "path": "arrays/causal-mask-64.npy", + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02" + }, + { + "bytes": 384, + "path": "arrays/final-0000.tokens.npy", + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af" + }, + { + "bytes": 384, + "path": "arrays/final-0001.tokens.npy", + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea" + }, + { + "bytes": 384, + "path": "arrays/final-0002.tokens.npy", + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c" + }, + { + "bytes": 384, + "path": "arrays/final-0003.tokens.npy", + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a" + }, + { + "bytes": 4195, + "path": "panel.json", + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6" + }, + { + "bytes": 7808, + "path": "panel.receipt.json", + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263" + } + ], + "panel_id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "panel_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "purpose": "Synthetic CPU smoke only, not a quality benchmark.", + "revision_verification": "Caller-supplied published commit; local files byte-verified offline.", + "scored_positions_total": 252, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer_files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "tokenizer_files_verified": true, + "tokenizer_identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1" +} diff --git a/raw/candidates/ct-mxfp4/source/panel/arrays/causal-mask-64.npy b/raw/candidates/ct-mxfp4/source/panel/arrays/causal-mask-64.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/ct-mxfp4/source/panel/arrays/causal-mask-64.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/ct-mxfp4/source/panel/arrays/final-0000.tokens.npy b/raw/candidates/ct-mxfp4/source/panel/arrays/final-0000.tokens.npy new file mode 100644 index 0000000000000000000000000000000000000000..b53a3cc1093c0363db45470d868194d867ed93cf --- /dev/null +++ b/raw/candidates/ct-mxfp4/source/panel/arrays/final-0000.tokens.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af +size 384 diff --git a/raw/candidates/ct-mxfp4/source/panel/arrays/final-0001.tokens.npy b/raw/candidates/ct-mxfp4/source/panel/arrays/final-0001.tokens.npy new file mode 100644 index 0000000000000000000000000000000000000000..54551046d9609a29e60c1b1460b4927e45b9d785 --- /dev/null +++ b/raw/candidates/ct-mxfp4/source/panel/arrays/final-0001.tokens.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea +size 384 diff --git a/raw/candidates/ct-mxfp4/source/panel/arrays/final-0002.tokens.npy b/raw/candidates/ct-mxfp4/source/panel/arrays/final-0002.tokens.npy new file mode 100644 index 0000000000000000000000000000000000000000..557330708fb66b049bf4bb046038e98fafced952 --- /dev/null +++ b/raw/candidates/ct-mxfp4/source/panel/arrays/final-0002.tokens.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c +size 384 diff --git a/raw/candidates/ct-mxfp4/source/panel/arrays/final-0003.tokens.npy b/raw/candidates/ct-mxfp4/source/panel/arrays/final-0003.tokens.npy new file mode 100644 index 0000000000000000000000000000000000000000..88ac7b071317640a2ac3432c2cc17a46a2741688 --- /dev/null +++ b/raw/candidates/ct-mxfp4/source/panel/arrays/final-0003.tokens.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a +size 384 diff --git a/raw/candidates/ct-mxfp4/source/panel/panel.json b/raw/candidates/ct-mxfp4/source/panel/panel.json new file mode 100644 index 0000000000000000000000000000000000000000..bc0b51f795d2ba81d472c21c88dc52cad9910a41 --- /dev/null +++ b/raw/candidates/ct-mxfp4/source/panel/panel.json @@ -0,0 +1,197 @@ +{ + "name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "panel_id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "schema": "quant-pipeline.glm53-token-panel.v1", + "sealed_corpus_sha256": null, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "windows": [ + { + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "document_id": "embedded-synthetic/garden.txt", + "domain": "garden", + "num_tokens": 64, + "prediction_positions": 63, + "role": "final", + "token_ids_first16": [ + 1, + 55, + 75, + 72, + 224, + 86, + 80, + 68, + 79, + 79, + 224, + 74, + 68, + 85, + 71, + 72 + ], + "token_ids_json_sha256": "08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315", + "token_ids_last16": [ + 224, + 68, + 81, + 71, + 224, + 68, + 224, + 86, + 87, + 82, + 81, + 72, + 224, + 83, + 68, + 2 + ], + "token_ids_sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af", + "window_id": "final-0000" + }, + { + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "document_id": "embedded-synthetic/arithmetic.txt", + "domain": "arithmetic", + "num_tokens": 64, + "prediction_positions": 63, + "role": "final", + "token_ids_first16": [ + 1, + 36, + 224, + 86, + 75, + 72, + 79, + 73, + 224, + 75, + 82, + 79, + 71, + 86, + 224, + 87 + ], + "token_ids_json_sha256": "5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46", + "token_ids_last16": [ + 72, + 86, + 17, + 224, + 55, + 75, + 72, + 85, + 72, + 224, + 68, + 85, + 72, + 224, + 72, + 2 + ], + "token_ids_sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea", + "window_id": "final-0001" + }, + { + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "document_id": "embedded-synthetic/code.txt", + "domain": "code", + "num_tokens": 64, + "prediction_positions": 63, + "role": "final", + "token_ids_first16": [ + 1, + 71, + 72, + 73, + 224, + 68, + 71, + 71, + 66, + 89, + 68, + 79, + 88, + 72, + 86, + 11 + ], + "token_ids_json_sha256": "51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07", + "token_ids_last16": [ + 85, + 76, + 74, + 75, + 87, + 202, + 202, + 85, + 72, + 86, + 88, + 79, + 87, + 224, + 32, + 2 + ], + "token_ids_sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c", + "window_id": "final-0002" + }, + { + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "document_id": "embedded-synthetic/instructions.txt", + "domain": "instructions", + "num_tokens": 64, + "prediction_positions": 63, + "role": "final", + "token_ids_first16": [ + 1, + 41, + 76, + 85, + 86, + 87, + 224, + 83, + 79, + 68, + 70, + 72, + 224, + 68, + 224, + 70 + ], + "token_ids_json_sha256": "8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d", + "token_ids_last16": [ + 224, + 70, + 82, + 82, + 79, + 224, + 90, + 68, + 87, + 72, + 85, + 224, + 76, + 81, + 87, + 2 + ], + "token_ids_sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a", + "window_id": "final-0003" + } + ] +} diff --git a/raw/candidates/ct-mxfp4/source/panel/panel.receipt.json b/raw/candidates/ct-mxfp4/source/panel/panel.receipt.json new file mode 100644 index 0000000000000000000000000000000000000000..fbc2ce3e8e9602a492d83ae681817e0fa02e4173 --- /dev/null +++ b/raw/candidates/ct-mxfp4/source/panel/panel.receipt.json @@ -0,0 +1,376 @@ +{ + "corpus": { + "documents_considered": 4, + "documents_selected": 4, + "path_prefix": "embedded-synthetic/", + "repository": null, + "revision": null, + "source": "Synthetic texts embedded verbatim in this sealed receipt and builder." + }, + "created_utc": "2026-09-07T00:00:00Z", + "created_utc_policy": "Fixed artifact epoch for deterministic bytes; not an execution timestamp.", + "documents": [ + { + "bytes": 135, + "document": "garden.txt", + "document_sha256": "2aca14290cd4753c3b15d8a20aaa7a6963d2cb48d78e8538a4ce34d4665dcb94", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "garden", + "text_utf8": "The small garden has red flowers, green leaves, and a stone path. A gentle breeze moves the branches while a robin sings near the gate.", + "tokens_total": 137, + "window_id": "final-0000" + }, + { + "bytes": 144, + "document": "arithmetic.txt", + "document_sha256": "b867a2e8cbe81cc8d5781bfe6718a43e171fb5c7c138b9ed6ac86bebc24bca83", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "arithmetic", + "text_utf8": "A shelf holds three blue boxes and five red boxes. There are eight boxes in total. Move two boxes to the desk and count the six boxes remaining.", + "tokens_total": 146, + "window_id": "final-0001" + }, + { + "bytes": 162, + "document": "code.txt", + "document_sha256": "08c8f75f45899cbc9656a7a3fcdbf3092abfa7bc97fe353957b08d7e9660240b", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "code", + "text_utf8": "def add_values(left, right):\n return left + right\n\nresult = add_values(7, 9)\nprint(result)\n# This readable snippet is synthetic input, not a coding benchmark.\n", + "tokens_total": 164, + "window_id": "final-0002" + }, + { + "bytes": 140, + "document": "instructions.txt", + "document_sha256": "1dba5052b28929f94f322ad9e8c0b238bcbd653d6fae54ebaea8e5e3f6073378", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "instructions", + "text_utf8": "First place a clean cup on the table. Next pour cool water into the cup. Finally put the bottle away and write a short note about the steps.", + "tokens_total": 142, + "window_id": "final-0003" + } + ], + "environment": { + "numpy": "2.5.3", + "tokenizers": "0.23.2", + "transformers": "5.16.1" + }, + "format_builder": "engines/tools/build_token_panel.py", + "format_builder_sha256": "30eb4d4d7e465aaa8d9ef2d947a0ac7fd42ec45388f20c8b6db242c88dc2d851", + "format_version": 1, + "panel_id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "panel_name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "parameters": { + "context_length": 64, + "generation_seed": null, + "generation_seed_policy": "No RNG is used.", + "prediction_positions_per_window": 63, + "scored_positions_total": 252, + "strata": [ + "garden", + "arithmetic", + "code", + "instructions" + ], + "windows_per_stratum": 1, + "windows_total": 4 + }, + "receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "resolver_sha256": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "schema": "malaiwah.token-panel-build-receipt.v1", + "selection_rule": "Four embedded readable synthetic documents in declared order; native tokenizer with add_special_tokens=True, truncation=True, max_length=64, padding=False; each encoded window must be exactly 64 tokens; no chat template; all 63 shifted next-token positions scored; no RNG.", + "separation": { + "checked": false, + "method": "No contamination scan or benchmark selection.", + "note": "Authored synthetic CPU smoke inputs for a random-init model; not a benchmark, held-out quality claim, or registry-row submission." + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "add_special_tokens": true, + "chat_template_applied": false, + "class": "TokenizersBackend", + "files_sha256": { + "config.json": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "generation_config.json": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "tokenizer.json": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "tokenizer_config.json": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + }, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "local_files_only": true, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "trust_remote_code": false, + "vocab_size": 260 + }, + "tool": "build_panel.py", + "tool_sha256": "f17b17262816676d6ededcc969756ac07ff991eab73117040ec41005f6ff63f3" +} diff --git a/raw/candidates/ct-mxfp4/source/qfs-source.json b/raw/candidates/ct-mxfp4/source/qfs-source.json new file mode 100644 index 0000000000000000000000000000000000000000..3c71d8671dcbe3678b71a2efe59e0ca341bebdc0 --- /dev/null +++ b/raw/candidates/ct-mxfp4/source/qfs-source.json @@ -0,0 +1,11 @@ +{ + "repository": "https://github.com/malaiwah/quant-fidelity-suite", + "revision": "a903cddb078c2eda8c65d6e6c875a09ac932df49", + "source_files": { + "bin/fidelity/dscompare.py": "4a53f735e1e3fb8bd739854451b57f34e8369bffa9fd4f7b7fd935fb2e7d52df", + "bin/fidelity/dsvalidate.py": "a9d6cd57e801e3ef044a37635e24518c83dbc6d1ec8a4c0b4b5d1b24483ca8d1", + "bin/fidelity/panel.py": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "bin/fidelity_dataset.py": "ac62b63bbfde67e4d5cacecf9cd417193c50f417a6749cc15ee6f1610c153a4e", + "engines/tools/hf_capture.py": "200ba12ca74fb97531307965cbbaa5c10553a5c26e008e524ea2d8aecb005b95" + } +} diff --git a/raw/candidates/ct-mxfp4/source/requirements-cpu.txt b/raw/candidates/ct-mxfp4/source/requirements-cpu.txt new file mode 100644 index 0000000000000000000000000000000000000000..5d504ef63dffa9df18b1e01a3492065235acbe48 --- /dev/null +++ b/raw/candidates/ct-mxfp4/source/requirements-cpu.txt @@ -0,0 +1,38 @@ +# Tested Linux CPU environment, Python 3.12.14. +--extra-index-url https://download.pytorch.org/whl/cpu +accelerate==1.14.0 +annotated-doc==0.0.5 +anyio==4.15.1 +certifi==2026.7.22 +click==8.5.0 +filelock==3.32.5 +fsspec==2026.7.0 +h11==0.16.0 +hf-xet==1.6.0 +httpcore==1.0.9 +httpx==0.28.1 +huggingface-hub==1.30.0 +idna==3.19 +jinja2==3.1.6 +markdown-it-py==4.2.0 +markupsafe==3.0.3 +mdurl==0.1.2 +mpmath==1.3.0 +networkx==3.6.1 +numpy==2.5.3 +packaging==26.3 +psutil==7.2.2 +pygments==2.21.0 +pyyaml==6.0.3 +regex==2026.9.3 +rich==15.0.0 +safetensors==0.8.0 +setuptools==81.0.0 +shellingham==1.5.4 +sympy==1.14.0 +tokenizers==0.23.2 +torch==2.11.0+cpu +tqdm==4.70.0 +transformers==5.16.1 +typer==0.27.2 +typing-extensions==4.16.0 diff --git a/raw/candidates/ct-mxfp4/source/tokenizer.json b/raw/candidates/ct-mxfp4/source/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..5ad9cccfc9ab5ed66f1c38db328de07cbe4939a9 --- /dev/null +++ b/raw/candidates/ct-mxfp4/source/tokenizer.json @@ -0,0 +1,404 @@ +{ + "version": "1.0", + "truncation": null, + "padding": null, + "added_tokens": [ + { + "id": 0, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 1, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 2, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 3, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + } + ], + "normalizer": null, + "pre_tokenizer": { + "type": "ByteLevel", + "add_prefix_space": false, + "trim_offsets": true, + "use_regex": false + }, + "post_processor": { + "type": "TemplateProcessing", + "single": [ + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + }, + { + "Sequence": { + "id": "A", + "type_id": 0 + } + }, + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + } + ], + "pair": [ + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + }, + { + "Sequence": { + "id": "A", + "type_id": 0 + } + }, + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + }, + { + "Sequence": { + "id": "B", + "type_id": 1 + } + }, + { + "SpecialToken": { + "id": "", + "type_id": 1 + } + } + ], + "special_tokens": { + "": { + "id": "", + "ids": [ + 1 + ], + "tokens": [ + "" + ] + }, + "": { + "id": "", + "ids": [ + 2 + ], + "tokens": [ + "" + ] + } + } + }, + "decoder": { + "type": "ByteLevel", + "add_prefix_space": true, + "trim_offsets": true, + "use_regex": true + }, + "model": { + "type": "BPE", + "dropout": null, + "unk_token": "", + "continuing_subword_prefix": null, + "end_of_word_suffix": null, + "fuse_unk": false, + "byte_fallback": false, + "ignore_merges": false, + "vocab": { + "": 0, + "": 1, + "": 2, + "": 3, + "!": 4, + "\"": 5, + "#": 6, + "$": 7, + "%": 8, + "&": 9, + "'": 10, + "(": 11, + ")": 12, + "*": 13, + "+": 14, + ",": 15, + "-": 16, + ".": 17, + "/": 18, + "0": 19, + "1": 20, + "2": 21, + "3": 22, + "4": 23, + "5": 24, + "6": 25, + "7": 26, + "8": 27, + "9": 28, + ":": 29, + ";": 30, + "<": 31, + "=": 32, + ">": 33, + "?": 34, + "@": 35, + "A": 36, + "B": 37, + "C": 38, + "D": 39, + "E": 40, + "F": 41, + "G": 42, + "H": 43, + "I": 44, + "J": 45, + "K": 46, + "L": 47, + "M": 48, + "N": 49, + "O": 50, + "P": 51, + "Q": 52, + "R": 53, + "S": 54, + "T": 55, + "U": 56, + "V": 57, + "W": 58, + "X": 59, + "Y": 60, + "Z": 61, + "[": 62, + "\\": 63, + "]": 64, + "^": 65, + "_": 66, + "`": 67, + "a": 68, + "b": 69, + "c": 70, + "d": 71, + "e": 72, + "f": 73, + "g": 74, + "h": 75, + "i": 76, + "j": 77, + "k": 78, + "l": 79, + "m": 80, + "n": 81, + "o": 82, + "p": 83, + "q": 84, + "r": 85, + "s": 86, + "t": 87, + "u": 88, + "v": 89, + "w": 90, + "x": 91, + "y": 92, + "z": 93, + "{": 94, + "|": 95, + "}": 96, + "~": 97, + "¡": 98, + "¢": 99, + "£": 100, + "¤": 101, + "¥": 102, + "¦": 103, + "§": 104, + "¨": 105, + "©": 106, + "ª": 107, + "«": 108, + "¬": 109, + "®": 110, + "¯": 111, + "°": 112, + "±": 113, + "²": 114, + "³": 115, + "´": 116, + "µ": 117, + "¶": 118, + "·": 119, + "¸": 120, + "¹": 121, + "º": 122, + "»": 123, + "¼": 124, + "½": 125, + "¾": 126, + "¿": 127, + "À": 128, + "Á": 129, + "Â": 130, + "Ã": 131, + "Ä": 132, + "Å": 133, + "Æ": 134, + "Ç": 135, + "È": 136, + "É": 137, + "Ê": 138, + "Ë": 139, + "Ì": 140, + "Í": 141, + "Î": 142, + "Ï": 143, + "Ð": 144, + "Ñ": 145, + "Ò": 146, + "Ó": 147, + "Ô": 148, + "Õ": 149, + "Ö": 150, + "×": 151, + "Ø": 152, + "Ù": 153, + "Ú": 154, + "Û": 155, + "Ü": 156, + "Ý": 157, + "Þ": 158, + "ß": 159, + "à": 160, + "á": 161, + "â": 162, + "ã": 163, + "ä": 164, + "å": 165, + "æ": 166, + "ç": 167, + "è": 168, + "é": 169, + "ê": 170, + "ë": 171, + "ì": 172, + "í": 173, + "î": 174, + "ï": 175, + "ð": 176, + "ñ": 177, + "ò": 178, + "ó": 179, + "ô": 180, + "õ": 181, + "ö": 182, + "÷": 183, + "ø": 184, + "ù": 185, + "ú": 186, + "û": 187, + "ü": 188, + "ý": 189, + "þ": 190, + "ÿ": 191, + "Ā": 192, + "ā": 193, + "Ă": 194, + "ă": 195, + "Ą": 196, + "ą": 197, + "Ć": 198, + "ć": 199, + "Ĉ": 200, + "ĉ": 201, + "Ċ": 202, + "ċ": 203, + "Č": 204, + "č": 205, + "Ď": 206, + "ď": 207, + "Đ": 208, + "đ": 209, + "Ē": 210, + "ē": 211, + "Ĕ": 212, + "ĕ": 213, + "Ė": 214, + "ė": 215, + "Ę": 216, + "ę": 217, + "Ě": 218, + "ě": 219, + "Ĝ": 220, + "ĝ": 221, + "Ğ": 222, + "ğ": 223, + "Ġ": 224, + "ġ": 225, + "Ģ": 226, + "ģ": 227, + "Ĥ": 228, + "ĥ": 229, + "Ħ": 230, + "ħ": 231, + "Ĩ": 232, + "ĩ": 233, + "Ī": 234, + "ī": 235, + "Ĭ": 236, + "ĭ": 237, + "Į": 238, + "į": 239, + "İ": 240, + "ı": 241, + "IJ": 242, + "ij": 243, + "Ĵ": 244, + "ĵ": 245, + "Ķ": 246, + "ķ": 247, + "ĸ": 248, + "Ĺ": 249, + "ĺ": 250, + "Ļ": 251, + "ļ": 252, + "Ľ": 253, + "ľ": 254, + "Ŀ": 255, + "ŀ": 256, + "Ł": 257, + "ł": 258, + "Ń": 259 + }, + "merges": [] + } +} \ No newline at end of file diff --git a/raw/candidates/ct-mxfp4/source/tokenizer_config.json b/raw/candidates/ct-mxfp4/source/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..df4d789a0874511220f5e2676081000298ad025d --- /dev/null +++ b/raw/candidates/ct-mxfp4/source/tokenizer_config.json @@ -0,0 +1,10 @@ +{ + "backend": "tokenizers", + "bos_token": "", + "clean_up_tokenization_spaces": false, + "eos_token": "", + "model_max_length": 256, + "pad_token": "", + "tokenizer_class": "TokenizersBackend", + "unk_token": "" +} diff --git a/raw/candidates/ct-mxfp4/source/verify_cpu.py b/raw/candidates/ct-mxfp4/source/verify_cpu.py new file mode 100644 index 0000000000000000000000000000000000000000..9081677f6d92ed81eec78043634f56eec3e193f5 --- /dev/null +++ b/raw/candidates/ct-mxfp4/source/verify_cpu.py @@ -0,0 +1,320 @@ +#!/usr/bin/env python3 +"""Two cold QFS CPU captures, strict verification, and forced numerical replay.""" +from __future__ import annotations + +import argparse +import hashlib +import json +import math +import os +from pathlib import Path +import re +import signal +import subprocess +import sys +import time +import traceback +import uuid + +DATASET_ID = "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1" +DATASET_REPOSITORY = "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1" +PANEL_ID = "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1" +TIMEOUT_SECONDS = 300 + +# Execute the real entrypoint without changing its implementation. Set thread +# counts before any model work, and record the observed counts in every child. +CHILD_BOOTSTRAP = r''' +import json, os, platform, runpy, sys +import numpy, torch, transformers, safetensors, tokenizers +import huggingface_hub +torch.set_num_threads(2) +torch.set_num_interop_threads(2) +print(json.dumps({"stage": "fixture_child_runtime", "pid": os.getpid(), + "python": sys.version, "executable": sys.executable, + "platform": platform.platform(), "machine": platform.machine(), + "torch": torch.__version__, "transformers": transformers.__version__, + "numpy": numpy.__version__, "safetensors": safetensors.__version__, + "tokenizers": tokenizers.__version__, "huggingface_hub": huggingface_hub.__version__, + "torch_num_threads": torch.get_num_threads(), + "torch_num_interop_threads": torch.get_num_interop_threads(), + "cuda_runtime": torch.version.cuda, + "thread_environment": {k: os.environ.get(k) for k in + ("OMP_NUM_THREADS", "MKL_NUM_THREADS", "OPENBLAS_NUM_THREADS", + "NUMEXPR_NUM_THREADS", "VECLIB_MAXIMUM_THREADS")}}, sort_keys=True), flush=True) +sys.argv = sys.argv[1:] +runpy.run_path(sys.argv[0], run_name="__main__") +''' + + +def require(condition, message): + if not condition: + raise RuntimeError(message) + + +def read_json(path): + def reject_constant(value): + raise ValueError("Non-finite JSON constant: " + value) + return json.loads(Path(path).read_text(encoding="utf-8"), parse_constant=reject_constant) + + +def write_json(path, value): + Path(path).write_text(json.dumps(value, sort_keys=True, indent=2, + ensure_ascii=False, allow_nan=False) + "\n", + encoding="utf-8") + + +def sha256(path): + with Path(path).open("rb") as stream: + return hashlib.file_digest(stream, "sha256").hexdigest() + + +def positive_zero(value): + return type(value) is float and value == 0.0 and math.copysign(1.0, value) == 1.0 + + +def run_command(name, entrypoint, arguments, *, out, qfs_root, summary): + argv = [sys.executable, "-c", CHILD_BOOTSTRAP, str(entrypoint), *map(str, arguments)] + stdout_path, stderr_path = out / (name + ".stdout.log"), out / (name + ".stderr.log") + environment = os.environ.copy() + environment.update({key: "2" for key in ( + "OMP_NUM_THREADS", "MKL_NUM_THREADS", "OPENBLAS_NUM_THREADS", + "NUMEXPR_NUM_THREADS", "VECLIB_MAXIMUM_THREADS")}) + environment.update({"HF_HUB_OFFLINE": "1", "TRANSFORMERS_OFFLINE": "1", + "TOKENIZERS_PARALLELISM": "false", "PYTHONUNBUFFERED": "1"}) + record = {"name": name, "argv": argv, "cwd": str(qfs_root), + "stdout": stdout_path.name, "stderr": stderr_path.name, + "timeout_seconds": TIMEOUT_SECONDS, "returncode": None, + "timed_out": False} + summary["commands"].append(record) + started = time.monotonic() + try: + with stdout_path.open("xb") as stdout, stderr_path.open("xb") as stderr: + process = subprocess.Popen(argv, cwd=qfs_root, env=environment, + stdout=stdout, stderr=stderr, start_new_session=True) + record["pid"] = process.pid + try: + record["returncode"] = process.wait(timeout=TIMEOUT_SECONDS) + except subprocess.TimeoutExpired: + record["timed_out"] = True + os.killpg(process.pid, signal.SIGKILL) + record["returncode"] = process.wait() + finally: + record["elapsed_seconds"] = time.monotonic() - started + write_json(out / "evidence-summary.json", summary) + # Capture children produce JSONL mixed with human-readable engine output. + with stdout_path.open(encoding="utf-8", errors="replace") as stdout: + for line in stdout: + if not line.startswith("{"): + continue + try: + item = json.loads(line) + except ValueError: + continue + if isinstance(item, dict) and item.get("stage") == "fixture_child_runtime": + record["runtime"] = item + break + require(not record["timed_out"], f"{name} exceeded {TIMEOUT_SECONDS}s; logs preserved") + require(record["returncode"] == 0, + f"{name} exited {record['returncode']}; see {stderr_path.name} and {stdout_path.name}") + require(record.get("runtime", {}).get("torch_num_threads") == 2, + f"{name} did not report two observed CPU threads") + return record + + +def check_report(path): + report = read_json(path) + require(report["structural_status"] == "sealed" and report["error_count"] == 0 + and report["warning_count"] == 0, f"Strict QFS verification failed: {path}") + return report + + +def reproduce(args, out, summary): + qfs_root, model_dir, panel_dir = (Path(value).resolve(strict=True) + for value in (args.qfs_root, args.model_dir, args.panel_dir)) + require(all(path.is_dir() for path in (qfs_root, model_dir, panel_dir)), + "--qfs-root, --model-dir and --panel-dir must be directories") + capture_tool = qfs_root / "engines/tools/hf_capture.py" + dataset_tool = qfs_root / "bin/fidelity_dataset.py" + require(capture_tool.is_file() and dataset_tool.is_file(), "QFS entrypoints not found") + sys.path.insert(0, str(qfs_root / "bin")) + from fidelity import dsformat as F + from fidelity import panel + + binding = panel.resolve_panel(panel_dir, role="final", tokenizer_root=model_dir).to_dict() + tokenizer, dimensions = binding["tokenizer"], binding["panel"] + require(tokenizer["files_verified"] is True, "Panel tokenizer bytes were not verified") + require(tokenizer["repository"] == args.model_repository + and tokenizer["revision"] == args.model_revision, + "Panel tokenizer repository/revision differs from the explicit model pin") + require(tokenizer["vocab_size"] == 260, "Expected byte-level vocabulary of 260 tokens") + require(dimensions["id"] == PANEL_ID and dimensions["role"] == "final" + and dimensions["contexts"] == 4 and dimensions["context_length"] == 64 + and dimensions["positions_per_context"] == 63 + and dimensions["scored_positions_total"] == 252, + "Expected the complete four-window, 64-token, 252-position fixture panel") + require("other" in F.LANES, "QFS no longer permits the honest CPU lane 'other'") + binding_path = out / "panel-binding.json" + write_json(binding_path, binding) + binding_sha = sha256(binding_path) + summary.update({"panel_binding": binding_path.name, "panel_binding_sha256": binding_sha, + "model_repository": args.model_repository, "model_revision": args.model_revision, + "dataset_id": DATASET_ID, "dataset_repository": DATASET_REPOSITORY, + "lane": "other", "lane_description": "local CPU random-init fixture", + "device": "cpu", "dtype": "bfloat16", "cpu_threads": 2, + "qfs_source_files": {str(path.relative_to(qfs_root)): sha256(path) + for path in (capture_tool, dataset_tool, qfs_root / "bin/fidelity/panel.py", + qfs_root / "bin/fidelity/dscompare.py", + qfs_root / "bin/fidelity/dsvalidate.py")}, + "provenance_note": "Local QFS source bytes are hashed; no source commit is asserted. " + "The caller supplies an immutable model pin; QFS hashes the local checkpoint. " + "This script does not independently prove Hub-to-local weight equality.", + "captures": {}}) + disclosure = [{"code": "random_init_cpu_fixture", "severity": "info", + "affects_comparability": False, + "detail": "Complete randomly initialized tiny glm_moe_dsa checkpoint; CPU smoke " + "fixture only, not trained quality evidence or a registry measurement. " + "Lane other denotes CPU, not local-cuda-budget."}] + common = ["--model", model_dir, "--weights-repository", args.model_repository, + "--model-revision", args.model_revision, "--panel", panel_dir, + "--panel-role", "final", "--panel-binding", binding_path, + "--panel-binding-sha256", binding_sha, "--panel-tokenizer-root", model_dir, + "--role", "root", "--lane", "other", "--device", "cpu", + "--dtype", "bfloat16", "--schedule", "window-outer", + "--dataset-id", DATASET_ID, "--dataset-name", "GLM MoE DSA tiny random CPU root", + "--repository", DATASET_REPOSITORY, "--author", "malaiwah", + "--disclosures", json.dumps(disclosure, separators=(",", ":"))] + run = lambda name, tool, argv: run_command(name, tool, argv, out=out, + qfs_root=qfs_root, summary=summary) + cold_labels = {side: f"cpu-{side}-{uuid.uuid4().hex}" for side in ("first", "repeat")} + for side in ("first", "repeat"): + root = out / side + memory_path = out / (side + ".memory.json") + command = run("capture-" + side, capture_tool, + [*common, "--out", root, "--run-name", cold_labels[side], + "--cold-run", cold_labels[side], "--memory-report", memory_path]) + verify_path, strict_path = out / (side + ".verify.json"), out / (side + ".strict.json") + run("verify-" + side, dataset_tool, + ["verify", root, "--verify-tensors", "--json", verify_path]) + run("strict-" + side, dataset_tool, + ["validate", root, "--strict", "--verify-tensors", "--json", strict_path]) + check_report(verify_path) + check_report(strict_path) + manifest = F.load_manifest(str(root)) + runtime = read_json(root / manifest["runtime"]["file"]) + probe = manifest["generation_sanity_probe"] + require(probe["status"] == "recorded" and probe["degenerate"] is False + and probe["expect"] is None and probe["logit_spread"] > 0, + f"{side}: default nondegenerate generation sanity probe did not run") + require(runtime["runtime_environment"]["cold_run"] == cold_labels[side], + f"{side}: cold-run label not recorded") + require(runtime["stack_fingerprint"]["device"] == "cpu" + and manifest["runtime"]["lane"] == "other", f"{side}: not an honest CPU capture") + require(manifest["dataset"]["id"] == DATASET_ID and manifest["dataset"]["role"] == "root" + and manifest["weights"]["revision"] == args.model_revision + and manifest["weights"]["repository"] == args.model_repository, + f"{side}: model/dataset identity mismatch") + require(runtime["capture_tool"]["resolved_panel_binding"]["binding"] == binding, + f"{side}: captured panel binding differs") + require(manifest["capture"]["records_count"] == 4 + and manifest["capture"]["scored_rows_total"] == 252 + and manifest["capture"]["dtype"] == "BF16", f"{side}: incomplete BF16 capture") + summary["captures"][side] = { + "path": side, "cold_run": cold_labels[side], "pid": command["pid"], + "dataset_sha256": manifest[F.SEAL_FIELD], + "capture_content_digest": manifest["capture"]["capture_content_digest"], + "head_tensor_content_sha256": manifest["head"]["tensor_content_sha256"], + "checkpoint_identity_sha256": manifest["weights"]["checkpoint_identity_sha256"], + "stack_fingerprint_sha256": manifest["runtime"]["stack_fingerprint_sha256"], + "resources": runtime["resources"], "memory_report": read_json(memory_path), + "generation_sanity_probe": probe, "runtime_versions": command["runtime"]} + write_json(out / "evidence-summary.json", summary) + + first, repeat = (summary["captures"][side] for side in ("first", "repeat")) + for key in ("capture_content_digest", "head_tensor_content_sha256", + "checkpoint_identity_sha256", "stack_fingerprint_sha256"): + require(first[key] == repeat[key], f"Cold captures disagree: {key}") + comparison_dir = out / "comparison" + run("compare", dataset_tool, + ["compare", "--reference", out / "first", "--candidate", out / "repeat", + "--out", comparison_dir, "--self-compare", "--force-compute", "--device", "cpu", + "--replay-device", "numpy", "--replay-dtype", "float32", "--vocab-chunk", "8192", + "--chunk-positions", "128", "--verify-tensors", + "--reference-label", cold_labels["first"], "--candidate-label", cold_labels["repeat"]]) + receipt_path = comparison_dir / "comparison-receipt.json" + receipt_report = out / "comparison.validate.json" + run("validate-comparison", dataset_tool, + ["validate", "--receipt", receipt_path, "--strict", "--json", receipt_report]) + check_report(receipt_report) + receipt = read_json(receipt_path) + require(receipt["comparison_kind"] == "reproduction_confirmation" + and receipt["comparability"]["class"] == "strict", "Not a strict reproduction") + require(receipt["self_compare"]["force_compute_agreed"] is True + and receipt["self_compare"]["capture_content_digest_equal"] is True, + "Forced numerical replay did not agree with the content hash proof") + require(positive_zero(receipt["metric"]["value"]) + and all(positive_zero(value) for value in receipt["kl"].values()) + and type(receipt["top1_agreement"]) is float and receipt["top1_agreement"] == 1.0, + "Comparison did not report literal +0.0 KL and 1.0 top-1 agreement") + require(receipt["comparator"]["replay_backend"] == "numpy:cpu:float32" + and receipt["comparator"]["tensor_content_digests_verified"] is True + and receipt["measurement_scope"]["scored_positions"] == 252 + and receipt["measurement_scope"]["contexts"] == 4 + and receipt["measurement_scope"]["covers_full_panel"] is True, + "Replay backend, verification, or panel coverage differs") + import numpy as np + tokenwise_path = comparison_dir / receipt["tokenwise"]["path"] + require(sha256(tokenwise_path) == receipt["tokenwise"]["sha256"], "Tokenwise file hash differs") + values = np.load(tokenwise_path, allow_pickle=False) + require(values.dtype == np.dtype("float64") and values.shape == (252,) + and bool(np.all(values == 0.0)) and not bool(np.any(np.signbit(values))), + "Tokenwise artifact is not exactly 252 positive float64 zeros") + summary["comparison"] = { + "receipt": str(receipt_path.relative_to(out)), "receipt_sha256": receipt["receipt_sha256"], + "comparison_kind": receipt["comparison_kind"], "metric": receipt["metric"], + "kl": receipt["kl"], "top1_agreement": receipt["top1_agreement"], + "comparator": receipt["comparator"], "self_compare": receipt["self_compare"], + "tokenwise": receipt["tokenwise"], "measurement_scope": receipt["measurement_scope"], + "note": "QFS retains its hash-proof result and top-1 value for reproduction confirmations; " + "--force-compute independently runs the estimator and requires its tokenwise KL " + "array to agree exactly. short_circuited=true therefore does not mean replay was skipped."} + + +def main(argv=None): + parser = argparse.ArgumentParser(description=__doc__) + for flag in ("model-dir", "model-repository", "model-revision", "panel-dir", "out", "qfs-root"): + parser.add_argument("--" + flag, required=True) + args = parser.parse_args(argv) + if not re.fullmatch(r"[0-9a-f]{40}", args.model_revision): + parser.error("--model-revision must be an actual immutable lowercase 40-hex Hub commit") + if not re.fullmatch(r"[A-Za-z0-9][A-Za-z0-9._-]*/[A-Za-z0-9][A-Za-z0-9._-]*", args.model_repository): + parser.error("--model-repository must be an owner/repository Hub identity") + out = Path(args.out).absolute() + try: + out.mkdir(parents=True, exist_ok=False) + except OSError as exc: + parser.error(f"Refusing output directory {out}: {exc}") + started = time.monotonic() + summary = {"schema": "malaiwah.glm-moe-dsa-tiny-cpu-reproduction.v1", "status": "running", + "commands": [], "driver_argv": [sys.executable, str(Path(__file__).resolve()), + *(sys.argv[1:] if argv is None else argv)], + "driver_sha256": sha256(__file__), + "scope": "Random-init CPU reproduction only; no quality claim or registry submission."} + try: + reproduce(args, out, summary) + summary["status"] = "passed" + code = 0 + except Exception as exc: + summary.update({"status": "failed", "error": f"{type(exc).__name__}: {exc}"}) + (out / "failure.traceback.log").write_text(traceback.format_exc(), encoding="utf-8") + print(summary["error"], file=sys.stderr) + code = 1 + finally: + summary["elapsed_seconds"] = time.monotonic() - started + write_json(out / "evidence-summary.json", summary) + print(json.dumps({"status": summary["status"], "evidence": str(out / "evidence-summary.json")}, + sort_keys=True)) + return code + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/raw/candidates/ct-nvfp4/evidence/candidate/README.md b/raw/candidates/ct-nvfp4/evidence/candidate/README.md new file mode 100644 index 0000000000000000000000000000000000000000..2beb0a62b281ae991187c9409d13dbd7af672718 --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/candidate/README.md @@ -0,0 +1,95 @@ +--- +license: mit +tags: +- fidelity +- kl-divergence +- fidelity-provenance +- fidelity-dataset +- fidelity-quant +x_fidelity: + spec: https://github.com/malaiwah/quant-fidelity-suite/blob/main/docs/FIDELITY-DATASET-SPEC.md + spec_version: fidelity-provenance/v1 + role: fidelity-dataset + captured_model: + repository: /tmp/qfs-quant-microfloat-release/stage-main/ct-nvfp4 + revision: null + role: quant + form: hidden + lane: other + panel: + panel_id: panel--panel + suite_token_hash_sha256: 525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36 + contexts: 4 + scored_positions: 252 + repository: null + revision: null + head: + policy: native + quantized: false + bits: 16 + lm_head_tensor_content_sha256: 2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510 + lm_head_file_sha256: 07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913 + final_norm_tensor_content_sha256: null + final_norm_file_sha256: null + equality_receipt: null + replay_permitted: true + scope_digest: attn.o=quantized:ct-nvfp4@4|attn.other=quantized:mixed|attn.qkv=quantized:ct-nvfp4@4|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=quantized:ct-nvfp4@4|mlp.gate=quantized:ct-nvfp4@4|mlp.up=quantized:ct-nvfp4@4|moe.experts=quantized:ct-nvfp4@4|moe.router=native:mixed|moe.shared_expert=quantized:ct-nvfp4@4|norm=native:bf16@16|head=native|kv=bf16 + seal: + manifest: fidelity-dataset.json + dataset_sha256: null + checksums: checksums.txt + checksums_sha256: '0000000000000000000000000000000000000000000000000000000000000000' + note: 'written before the seal: dataset_sha256 and checksums_sha256 are digests of the tree this file + is inside, so they cannot appear in it. Read them from fidelity-dataset.json.' + interop: + compatible_with: + - kimi-k3-distribution-fidelity/1 + k3_compat_emitted: false + registry: + dataset: malaiwah/quant-fidelity-registry + schema_version: quant-fidelity-registry/v1 + artifact_id: null + measurement_ids: [] + snapshot: null + fidelity_dataset: + repository: null + revision: null + dataset_sha256: null + capture_content_digest: 6852bee45e00600cc50a9c9d6b5274d7121786461af8b2866aed514ff0bcb408 + form: hidden + role: quant + measurements: [] +--- +# Local quant integration candidate + +A **quant** fidelity dataset in **hidden form**, produced by `engines/tools/hf_capture.py` from `/tmp/qfs-quant-microfloat-release/stage-main/ct-nvfp4`. + +## The cut + +the final hidden state handed to lm_head -- after the text model's final norm and immediately before the head matmul -- captured as the head module's input via torch.nn.Module.register_forward_pre_hook; replay applies the head ONLY (no final norm at replay time: the capture already sits after it). Same cut as engines/tools/hidden_replay.py and as Festr's kimi-k3 hidden-replay qualification. + +## What is here + +| | | +|---|---| +| records | 4 | +| scored positions | 252 | +| context length | 64 | +| hidden width | 64 | +| vocab size | 260 | +| capture bytes (hidden form) | 33348 | +| the same capture in logit form would be | 262080 bytes (8x) | +| scope policy | mixed | +| lane | other | + +## Does the model still generate sensibly + +`The capital of France is` -> `�` (p=0.0068, entropy 5.548 of a possible 5.561 nats). Recorded, not enforced. One extra window through the same schedule; its hidden state was discarded and is not part of this dataset. + +## How to check it + +``` +bin/fidelity-dataset verify +``` + +Full specification: diff --git a/raw/candidates/ct-nvfp4/evidence/candidate/capture/hidden_0000.safetensors b/raw/candidates/ct-nvfp4/evidence/candidate/capture/hidden_0000.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..b685c29430b018a957ef32d1e3223b71a366b9a9 --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/candidate/capture/hidden_0000.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2331403bf611ca0ed33be7422842c29dbd0964641ac5485335449f6238ecf7c6 +size 8337 diff --git a/raw/candidates/ct-nvfp4/evidence/candidate/capture/hidden_0001.safetensors b/raw/candidates/ct-nvfp4/evidence/candidate/capture/hidden_0001.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..a66f4a929adcfa15ab2e6ed81ec1c22eb20c4f39 --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/candidate/capture/hidden_0001.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6d8abf57e92429d13c1aa816a89388a19dff167bedd0b82b55fe08732959a8cf +size 8337 diff --git a/raw/candidates/ct-nvfp4/evidence/candidate/capture/hidden_0002.safetensors b/raw/candidates/ct-nvfp4/evidence/candidate/capture/hidden_0002.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..8c1c9e3fd86d7c41e52c30b0b5b080c3a07fa966 --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/candidate/capture/hidden_0002.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:534417361864473b7230b795e4260529573d78eb7c09194093baa9070916c8b3 +size 8337 diff --git a/raw/candidates/ct-nvfp4/evidence/candidate/capture/hidden_0003.safetensors b/raw/candidates/ct-nvfp4/evidence/candidate/capture/hidden_0003.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..bda3ff5692443fd7ef897c7a6eb6ae106f36ee76 --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/candidate/capture/hidden_0003.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d897e1c57202f0105d7b1bee96ce37e338bf8acaa31930e6a4b5b0bac7123add +size 8337 diff --git a/raw/candidates/ct-nvfp4/evidence/candidate/capture/manifest.json b/raw/candidates/ct-nvfp4/evidence/candidate/capture/manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..aec6c0ea33b2b9a9dd9f071fcb5bfae9b9c4713e --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/candidate/capture/manifest.json @@ -0,0 +1,159 @@ +{ + "capture_content_digest": "6852bee45e00600cc50a9c9d6b5274d7121786461af8b2866aed514ff0bcb408", + "context_length": 64, + "coverage": { + "complete": true, + "declared_records": 4, + "index_range": [ + 0, + 3 + ], + "missing_indices_sample": [], + "present_records": 4, + "shard_of": null, + "subset_detail": null + }, + "created_utc": "2026-09-07T16:52:53Z", + "dtype": "BF16", + "dtype_lossless": true, + "form": "hidden", + "format_version": 1, + "hidden_width": 64, + "receipt_sha256": "1019abe023ca08dab236f7dc717020702896801d89eb248435846956cc47f3d2", + "records": [ + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 0, + "document_id": "embedded-synthetic/garden.txt", + "domain": "garden", + "dtype": "BF16", + "elapsed_seconds": 0.039, + "file": "hidden_0000.safetensors", + "index": 0, + "key": "hidden_states", + "payload_sha256": "ac1c2e984869fadd9dee8e66ae97c1efc980db26f75bee2519c45dc15070bbf7", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "2331403bf611ca0ed33be7422842c29dbd0964641ac5485335449f6238ecf7c6", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "ac1c2e984869fadd9dee8e66ae97c1efc980db26f75bee2519c45dc15070bbf7", + "token_ids_json_sha256": "08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315", + "token_ids_sha256_legacy": "9d5378f0316be57e37f80d2bae7895ba4a1140c302c87ff8cce2fbd9afc83b77", + "window_id": "final-0000", + "window_index": 0 + }, + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 1, + "document_id": "embedded-synthetic/arithmetic.txt", + "domain": "arithmetic", + "dtype": "BF16", + "elapsed_seconds": 0.038, + "file": "hidden_0001.safetensors", + "index": 1, + "key": "hidden_states", + "payload_sha256": "55f98bd2572cf8526d7e0f0e495c618c5fa059c0989187610ab9d23e1b563b03", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "6d8abf57e92429d13c1aa816a89388a19dff167bedd0b82b55fe08732959a8cf", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "55f98bd2572cf8526d7e0f0e495c618c5fa059c0989187610ab9d23e1b563b03", + "token_ids_json_sha256": "5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46", + "token_ids_sha256_legacy": "e0f95114b71a46cb489539dc38909fb67fb378f25fafbb513e32690cc7f11b37", + "window_id": "final-0001", + "window_index": 1 + }, + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 2, + "document_id": "embedded-synthetic/code.txt", + "domain": "code", + "dtype": "BF16", + "elapsed_seconds": 0.037, + "file": "hidden_0002.safetensors", + "index": 2, + "key": "hidden_states", + "payload_sha256": "3af655b4a6d86784b92c4f7b576013644301bd17d09b68fd5f7212e116133463", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "534417361864473b7230b795e4260529573d78eb7c09194093baa9070916c8b3", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "3af655b4a6d86784b92c4f7b576013644301bd17d09b68fd5f7212e116133463", + "token_ids_json_sha256": "51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07", + "token_ids_sha256_legacy": "482b890c7b0e2f7400257c43680093b7f2b90d6df5361c6de3ae97ddfdd2504e", + "window_id": "final-0002", + "window_index": 2 + }, + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 3, + "document_id": "embedded-synthetic/instructions.txt", + "domain": "instructions", + "dtype": "BF16", + "elapsed_seconds": 0.04, + "file": "hidden_0003.safetensors", + "index": 3, + "key": "hidden_states", + "payload_sha256": "ea86c7c45bcf70ad70c91c2797b04917041355b162f77104eebfb5ed5eb7db81", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "d897e1c57202f0105d7b1bee96ce37e338bf8acaa31930e6a4b5b0bac7123add", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "ea86c7c45bcf70ad70c91c2797b04917041355b162f77104eebfb5ed5eb7db81", + "token_ids_json_sha256": "8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d", + "token_ids_sha256_legacy": "12e01edd3900ff2ca82621feb5504f24b003a53c0afe98a9ee0b490eb93141d4", + "window_id": "final-0003", + "window_index": 3 + } + ], + "run_name": "hf-capture", + "runtime_manifest": "../runtime/capture-runtime.json", + "runtime_manifest_sha256": "a554d047e719159b1edc62240015e0607c7b2e8633d372a83dcb4e2e09b63a81", + "schema": "malaiwah.fidelity-capture-manifest.v1", + "scored_rows_per_context": 63, + "semantic_point": "after_final_rmsnorm_before_lm_head", + "tensor_key": "hidden_states", + "total_scored_rows": 252, + "total_size_bytes": 33348, + "vocab_size": 260 +} diff --git a/raw/candidates/ct-nvfp4/evidence/candidate/checksums.txt b/raw/candidates/ct-nvfp4/evidence/candidate/checksums.txt new file mode 100644 index 0000000000000000000000000000000000000000..ed40062ec0b365ad3c49e8005e097ae62601c5bd --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/candidate/checksums.txt @@ -0,0 +1,20 @@ +93ac6cc3211e9c3a9a48ddd6014dce7db05dbccda84bedef1b758d08f6957e15 README.md +2331403bf611ca0ed33be7422842c29dbd0964641ac5485335449f6238ecf7c6 capture/hidden_0000.safetensors +6d8abf57e92429d13c1aa816a89388a19dff167bedd0b82b55fe08732959a8cf capture/hidden_0001.safetensors +534417361864473b7230b795e4260529573d78eb7c09194093baa9070916c8b3 capture/hidden_0002.safetensors +d897e1c57202f0105d7b1bee96ce37e338bf8acaa31930e6a4b5b0bac7123add capture/hidden_0003.safetensors +f50fe2cba7808faebc1ad7814d7390cabe6dd7f6aa81a0771e23a5a7622c5858 capture/manifest.json +777b038f747bed25d1f5db8adbfd2a78c7762fb5c870ff8c3c785a984d48a168 head/head.json +07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913 head/weight.safetensors +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0000.npy +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0001.npy +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0002.npy +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0003.npy +b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263 panel/panel-receipt.json +68efa258ea3c5d4ba759c3c15aadd6e8c984711831bea3f335903109345cdcef panel/panel.json +08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315 panel/tokens/context-0000.json +5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46 panel/tokens/context-0001.json +51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07 panel/tokens/context-0002.json +8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d panel/tokens/context-0003.json +a554d047e719159b1edc62240015e0607c7b2e8633d372a83dcb4e2e09b63a81 runtime/capture-runtime.json +d3024ee8845d123018358b9c98a844bcdc3c985fbbc92d9e1b8565b121fe8a45 validation/structural-validation.json diff --git a/raw/candidates/ct-nvfp4/evidence/candidate/fidelity-dataset.json b/raw/candidates/ct-nvfp4/evidence/candidate/fidelity-dataset.json new file mode 100644 index 0000000000000000000000000000000000000000..e421993035073baf203ef8efee6c596e2e5b14fa --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/candidate/fidelity-dataset.json @@ -0,0 +1,422 @@ +{ + "capture": { + "capture_content_digest": "6852bee45e00600cc50a9c9d6b5274d7121786461af8b2866aed514ff0bcb408", + "dtype": "BF16", + "dtype_lossless": true, + "form": "hidden", + "head_not_separable_reason": null, + "head_separable": true, + "hidden_width": 64, + "lossy_codec": null, + "manifest_file": "capture/manifest.json", + "manifest_file_sha256": "f50fe2cba7808faebc1ad7814d7390cabe6dd7f6aa81a0771e23a5a7622c5858", + "records_count": 4, + "scored_rows_total": 252, + "semantic_point": "after_final_rmsnorm_before_lm_head", + "tensor_key": "hidden_states", + "total_size_bytes": 33348, + "vocab_size": 260 + }, + "coverage": { + "complete": true, + "declared_records": 4, + "index_range": [ + 0, + 3 + ], + "missing_indices_sample": [], + "present_records": 4, + "shard_of": null, + "subset_detail": null + }, + "created_utc": "2026-09-07T16:52:53Z", + "dataset": { + "author": { + "handle": null, + "is_registry_maintainer": false, + "name": "malaiwah", + "role": "capture-author", + "url": null + }, + "base_capture": null, + "id": "fidelity--quant-integration.candidate", + "license": "mit", + "name": "Local quant integration candidate", + "qualification": null, + "repository": null, + "revision": null, + "role": "quant", + "structural_status": "sealed" + }, + "dataset_sha256": "8ab431c961fb82b4ae73478772375c0e3fa970ccf00210038564544a81dcab65", + "determinism": { + "cold_start_per_run": true, + "distinct_evidence_hash_count": 1, + "evidence_hashes": [ + "6852bee45e00600cc50a9c9d6b5274d7121786461af8b2866aed514ff0bcb408" + ], + "evidence_kind": "hidden_state_tensor_sha256", + "identical_across_runs": null, + "note": "a single cold capture; cross-run determinism is NOT asserted here. Capture a second cold run and run `fidelity-dataset compare --self-compare` -- an exactly 0.0 result is the SC-1 reproduction confirmation.", + "repeat_noise": null, + "repeats": [], + "run_count": 1 + }, + "disclosures": [ + { + "affects_comparability": false, + "code": "rtn_format_fixture", + "detail": "Local RTN-format fixture; optimizer-not-run; no model-quality or serving-kernel equivalence claim.", + "severity": "info" + }, + { + "affects_comparability": false, + "code": "reduced_run_count", + "detail": "this dataset is ONE cold capture (run_count 1, the DET-D4 floor is 5). Cross-run determinism is not asserted by the dataset; it is established by a second cold capture plus `fidelity-dataset compare --self-compare`, whose exactly-0.0 result is the SC-1 reproduction confirmation.", + "severity": "caveat" + } + ], + "format_version": 1, + "generation_sanity_probe": { + "degenerate": false, + "enforced": false, + "entropy_nats": 5.548367777493732, + "expect": null, + "logit_spread": 1.015625, + "note": "one extra window through the same schedule; its hidden state is discarded and never enters the dataset.", + "prompt": "The capital of France is", + "schema": "malaiwah.generation-sanity-probe.v1", + "status": "recorded", + "top1_id": 113, + "top1_probability": 0.006768509365431778, + "top1_text": "�", + "top_k": [ + { + "id": 113, + "probability": 0.006768509365431778, + "text": "�" + }, + { + "id": 237, + "probability": 0.006333636959493238, + "text": "�" + }, + { + "id": 193, + "probability": 0.005834819786376534, + "text": "\u0001" + }, + { + "id": 236, + "probability": 0.0055785088267041845, + "text": "�" + }, + { + "id": 44, + "probability": 0.0054068761536613325, + "text": "I" + } + ], + "uniform_entropy_nats": 5.560681631015528, + "vocab_size": 260 + }, + "head": { + "applied_in_capture": false, + "bias": null, + "bits": 16, + "compat_tensor_key": "weight", + "dtype": "BF16", + "equality_receipt": null, + "file": "head/weight.safetensors", + "file_sha256": "07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913", + "final_norm": { + "applied_at_replay": false, + "applied_in_capture": true, + "dtype": null, + "file": null, + "file_sha256": null, + "shape": null, + "tensor_content_sha256": null, + "tensor_key": null + }, + "head_json": "head/head.json", + "present": true, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "shape": [ + 260, + 64 + ], + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "tensor_key": "lm_head.weight" + }, + "interop": { + "adapted_from": null, + "compatible_with": [ + "kimi-k3-distribution-fidelity/1" + ], + "divergences": [ + { + "field": "head", + "id": "D-1", + "reason": "every capture declares its OWN head identity by tensor content digest; the comparator refuses a hidden-form comparison across differing heads." + }, + { + "field": "runtime.lane", + "id": "D-2", + "reason": "lane is required and gated at compare time so registry BIAS-006 is checked before a number exists, not at submission." + }, + { + "field": "panel.scoring_window", + "id": "D-3", + "reason": "scoring_window is part of panel identity, not a comparator flag: a score_from=1024 number is a different panel, not a variant." + }, + { + "field": "comparison_kind", + "id": "D-4", + "reason": "self-compare is a first-class mode asserting exactly 0.0." + }, + { + "field": "estimator.accumulation_dtype", + "id": "D-5", + "reason": "required, fp64 default; an fp32 estimator lands in a different comparability class on the same data and that must be visible." + }, + { + "field": "coverage", + "id": "D-6", + "reason": "declared vs present record counts with shard_of; fixes our own manifest that claimed 5,120 captures in a 512-file repository." + }, + { + "field": "panel", + "id": "D-7", + "reason": "the panel is a separately referenceable object, which is what makes a candidate capture publishable standalone." + }, + { + "field": "capture.lossy_codec", + "id": "D-8", + "reason": "lets a llama.cpp .kld be ingested without laundering a lossy capture as exact." + }, + { + "field": "capture.records[].attention_mask_sha256", + "id": "D-9", + "reason": "our packed and streaming lanes vary mask construction; a single-request capture path makes it invariant and has no equivalent field." + }, + { + "field": "capture.head_separable", + "id": "D-10", + "reason": "hidden form is the default; logit form must declare head_separable:false with a reason." + } + ], + "k3_compat_emitted": false, + "note": null + }, + "panel": { + "contamination": { + "checked": false, + "hits": null, + "method": "not established", + "receipt": null + }, + "context_length": 64, + "contexts": 4, + "panel_file": "panel/panel.json", + "panel_file_sha256": "68efa258ea3c5d4ba759c3c15aadd6e8c984711831bea3f335903109345cdcef", + "panel_id": "panel--panel", + "panel_receipt_file": "panel/panel-receipt.json", + "panel_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "panel_token_sha256_legacy": "3c9467c85be43d238926f6d18bf825c2e4748814c95b8b0e8b8f1420546c3089", + "remap_file": null, + "repository": null, + "revision": null, + "scored_positions_total": 252, + "scoring_window": { + "dropped_positions_total": 0, + "min_left_context_tokens": 1, + "policy": "every causal prediction position of every window is scored; nothing is dropped", + "score_from": 0, + "windowed": false + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } + }, + "runtime": { + "backend_identity_sha256": null, + "file": "runtime/capture-runtime.json", + "file_sha256": "a554d047e719159b1edc62240015e0607c7b2e8633d372a83dcb4e2e09b63a81", + "lane": "other", + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "lane_inferred": false, + "runtime_reader_sha256": null, + "source": "native", + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd" + }, + "schema": "malaiwah.fidelity-dataset.v1", + "scope": { + "assignments": [ + { + "bits_per_weight": 4, + "format": "ct-nvfp4", + "layer_range": "all", + "note": "4 tensors: model.layers.N.self_attn.o_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "attn.o", + "treatment": "quantized" + }, + { + "bits_per_weight": null, + "format": "mixed", + "layer_range": "0-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 12 x native:bf16@16 (model.layers.N.self_attn.indexer.k_norm.bias, model.layers.N.self_attn.indexer.k_norm.weight, model.layers.N.self_attn.kv_a_layernorm.weight); 6 x quantized:ct-nvfp4@4 (model.layers.N.self_attn.indexer.weights_proj.weight, model.layers.N.self_attn.indexer.wk.weight, model.layers.N.self_attn.indexer.wq_b.weight). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "attn.other", + "treatment": "quantized" + }, + { + "bits_per_weight": 4, + "format": "ct-nvfp4", + "layer_range": "all", + "note": "16 tensors: model.layers.N.self_attn.kv_a_proj_with_mqa.weight, model.layers.N.self_attn.kv_b_proj.weight, model.layers.N.self_attn.q_a_proj.weight, model.layers.N.self_attn.q_b_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "attn.qkv", + "treatment": "quantized" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": "all", + "note": "1 tensors: model.embed_tokens.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "embed_tokens", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": "all", + "note": "1 tensors: lm_head.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "lm_head", + "treatment": "native" + }, + { + "bits_per_weight": 4, + "format": "ct-nvfp4", + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.down_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "mlp.down", + "treatment": "quantized" + }, + { + "bits_per_weight": 4, + "format": "ct-nvfp4", + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.gate_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "mlp.gate", + "treatment": "quantized" + }, + { + "bits_per_weight": 4, + "format": "ct-nvfp4", + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "mlp.up", + "treatment": "quantized" + }, + { + "bits_per_weight": 4, + "format": "ct-nvfp4", + "layer_range": "all", + "note": "72 tensors: model.layers.N.mlp.experts.E.down_proj.weight, model.layers.N.mlp.experts.E.gate_proj.weight, model.layers.N.mlp.experts.E.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "moe.experts", + "treatment": "quantized" + }, + { + "bits_per_weight": null, + "format": "mixed", + "layer_range": "1-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 3 x native:bf16@16 (model.layers.N.mlp.gate.weight); 3 x native:fp32@32 (model.layers.N.mlp.gate.e_score_correction_bias). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "moe.router", + "treatment": "native" + }, + { + "bits_per_weight": 4, + "format": "ct-nvfp4", + "layer_range": "all", + "note": "9 tensors: model.layers.N.mlp.shared_experts.down_proj.weight, model.layers.N.mlp.shared_experts.gate_proj.weight, model.layers.N.mlp.shared_experts.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "moe.shared_expert", + "treatment": "quantized" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": "all", + "note": "9 tensors: model.layers.N.input_layernorm.weight, model.layers.N.post_attention_layernorm.weight, model.norm.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "norm", + "treatment": "native" + } + ], + "head_policy": "native", + "kv_cache_dtype": "bf16", + "policy": "mixed", + "scope_digest": "attn.o=quantized:ct-nvfp4@4|attn.other=quantized:mixed|attn.qkv=quantized:ct-nvfp4@4|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=quantized:ct-nvfp4@4|mlp.gate=quantized:ct-nvfp4@4|mlp.up=quantized:ct-nvfp4@4|moe.experts=quantized:ct-nvfp4@4|moe.router=native:mixed|moe.shared_expert=quantized:ct-nvfp4@4|norm=native:bf16@16|head=native|kv=bf16" + }, + "seal": { + "checksums_file": "checksums.txt", + "checksums_format": "sha256sum", + "checksums_sha256": "9ae1ff35fde8681b9c271740a76981e96a63bcd092954ed8880c083ef77d38be", + "covers": [ + "every published file except checksums.txt and fidelity-dataset.json, via checksums.txt", + "fidelity-dataset.json itself, via the self-blanked seal", + "every capture tensor a second time by CONTENT, via capture.capture_content_digest" + ], + "excludes": [ + "checksums.txt", + "fidelity-dataset.json" + ], + "external_anchor": null, + "method": "self_blanked_canonical_json_sha256", + "seal_field": "dataset_sha256" + }, + "upstream_receipts": [], + "weights": { + "artifact_ref": null, + "checkpoint_identity_sha256": "8c943a9a4f3620b5a9014721f9f6565d25e868dd1e68407f28b618216a248317", + "codec": "nvfp4", + "config_sha256": "188450fd2bed8cf0c6e06d785410192143b3777bcbbff315151fcecb96cd267e", + "declared_bits": 4.0, + "declared_head_bits": 16, + "index_sha256": null, + "model_ref": null, + "model_revision": null, + "quantized": true, + "repository": "/tmp/qfs-quant-microfloat-release/stage-main/ct-nvfp4", + "revision": null + } +} diff --git a/raw/candidates/ct-nvfp4/evidence/candidate/head/head.json b/raw/candidates/ct-nvfp4/evidence/candidate/head/head.json new file mode 100644 index 0000000000000000000000000000000000000000..cfb1d748d203487673352f1ad645cb98a49c4002 --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/candidate/head/head.json @@ -0,0 +1,34 @@ +{ + "applied_in_capture": false, + "bias": null, + "bits": 16, + "compat_tensor_key": "weight", + "dtype": "BF16", + "equality_receipt": null, + "file": "head/weight.safetensors", + "file_sha256": "07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913", + "final_norm": { + "applied_at_replay": false, + "applied_in_capture": true, + "dtype": null, + "file": null, + "file_sha256": null, + "shape": null, + "tensor_content_sha256": null, + "tensor_key": null + }, + "format_version": 1, + "note": "the head is shipped verbatim from the checkpoint so a third party can replay logits = hidden @ head^T without the weights", + "present": true, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "receipt_sha256": "2da3cfbfc607296b3bb32eb6fec1f122e4ce30fe9ea96653e5bb1b4ebab6514f", + "schema": "malaiwah.fidelity-head-identity.v1", + "shape": [ + 260, + 64 + ], + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "tensor_key": "lm_head.weight" +} diff --git a/raw/candidates/ct-nvfp4/evidence/candidate/head/weight.safetensors b/raw/candidates/ct-nvfp4/evidence/candidate/head/weight.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..abe6e7c215a73bc88e85042067923bf943118086 --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/candidate/head/weight.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913 +size 33365 diff --git a/raw/candidates/ct-nvfp4/evidence/candidate/panel/masks/context-0000.npy b/raw/candidates/ct-nvfp4/evidence/candidate/panel/masks/context-0000.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/candidate/panel/masks/context-0000.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/ct-nvfp4/evidence/candidate/panel/masks/context-0001.npy b/raw/candidates/ct-nvfp4/evidence/candidate/panel/masks/context-0001.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/candidate/panel/masks/context-0001.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/ct-nvfp4/evidence/candidate/panel/masks/context-0002.npy b/raw/candidates/ct-nvfp4/evidence/candidate/panel/masks/context-0002.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/candidate/panel/masks/context-0002.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/ct-nvfp4/evidence/candidate/panel/masks/context-0003.npy b/raw/candidates/ct-nvfp4/evidence/candidate/panel/masks/context-0003.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/candidate/panel/masks/context-0003.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/ct-nvfp4/evidence/candidate/panel/panel-receipt.json b/raw/candidates/ct-nvfp4/evidence/candidate/panel/panel-receipt.json new file mode 100644 index 0000000000000000000000000000000000000000..fbc2ce3e8e9602a492d83ae681817e0fa02e4173 --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/candidate/panel/panel-receipt.json @@ -0,0 +1,376 @@ +{ + "corpus": { + "documents_considered": 4, + "documents_selected": 4, + "path_prefix": "embedded-synthetic/", + "repository": null, + "revision": null, + "source": "Synthetic texts embedded verbatim in this sealed receipt and builder." + }, + "created_utc": "2026-09-07T00:00:00Z", + "created_utc_policy": "Fixed artifact epoch for deterministic bytes; not an execution timestamp.", + "documents": [ + { + "bytes": 135, + "document": "garden.txt", + "document_sha256": "2aca14290cd4753c3b15d8a20aaa7a6963d2cb48d78e8538a4ce34d4665dcb94", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "garden", + "text_utf8": "The small garden has red flowers, green leaves, and a stone path. A gentle breeze moves the branches while a robin sings near the gate.", + "tokens_total": 137, + "window_id": "final-0000" + }, + { + "bytes": 144, + "document": "arithmetic.txt", + "document_sha256": "b867a2e8cbe81cc8d5781bfe6718a43e171fb5c7c138b9ed6ac86bebc24bca83", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "arithmetic", + "text_utf8": "A shelf holds three blue boxes and five red boxes. There are eight boxes in total. Move two boxes to the desk and count the six boxes remaining.", + "tokens_total": 146, + "window_id": "final-0001" + }, + { + "bytes": 162, + "document": "code.txt", + "document_sha256": "08c8f75f45899cbc9656a7a3fcdbf3092abfa7bc97fe353957b08d7e9660240b", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "code", + "text_utf8": "def add_values(left, right):\n return left + right\n\nresult = add_values(7, 9)\nprint(result)\n# This readable snippet is synthetic input, not a coding benchmark.\n", + "tokens_total": 164, + "window_id": "final-0002" + }, + { + "bytes": 140, + "document": "instructions.txt", + "document_sha256": "1dba5052b28929f94f322ad9e8c0b238bcbd653d6fae54ebaea8e5e3f6073378", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "instructions", + "text_utf8": "First place a clean cup on the table. Next pour cool water into the cup. Finally put the bottle away and write a short note about the steps.", + "tokens_total": 142, + "window_id": "final-0003" + } + ], + "environment": { + "numpy": "2.5.3", + "tokenizers": "0.23.2", + "transformers": "5.16.1" + }, + "format_builder": "engines/tools/build_token_panel.py", + "format_builder_sha256": "30eb4d4d7e465aaa8d9ef2d947a0ac7fd42ec45388f20c8b6db242c88dc2d851", + "format_version": 1, + "panel_id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "panel_name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "parameters": { + "context_length": 64, + "generation_seed": null, + "generation_seed_policy": "No RNG is used.", + "prediction_positions_per_window": 63, + "scored_positions_total": 252, + "strata": [ + "garden", + "arithmetic", + "code", + "instructions" + ], + "windows_per_stratum": 1, + "windows_total": 4 + }, + "receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "resolver_sha256": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "schema": "malaiwah.token-panel-build-receipt.v1", + "selection_rule": "Four embedded readable synthetic documents in declared order; native tokenizer with add_special_tokens=True, truncation=True, max_length=64, padding=False; each encoded window must be exactly 64 tokens; no chat template; all 63 shifted next-token positions scored; no RNG.", + "separation": { + "checked": false, + "method": "No contamination scan or benchmark selection.", + "note": "Authored synthetic CPU smoke inputs for a random-init model; not a benchmark, held-out quality claim, or registry-row submission." + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "add_special_tokens": true, + "chat_template_applied": false, + "class": "TokenizersBackend", + "files_sha256": { + "config.json": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "generation_config.json": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "tokenizer.json": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "tokenizer_config.json": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + }, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "local_files_only": true, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "trust_remote_code": false, + "vocab_size": 260 + }, + "tool": "build_panel.py", + "tool_sha256": "f17b17262816676d6ededcc969756ac07ff991eab73117040ec41005f6ff63f3" +} diff --git a/raw/candidates/ct-nvfp4/evidence/candidate/panel/panel.json b/raw/candidates/ct-nvfp4/evidence/candidate/panel/panel.json new file mode 100644 index 0000000000000000000000000000000000000000..cedb9d5e3c635860791c55451fde6dc9e37cddb9 --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/candidate/panel/panel.json @@ -0,0 +1,298 @@ +{ + "contamination": { + "checked": false, + "hits": null, + "method": "not established", + "receipt": null + }, + "context_length": 64, + "contexts": 4, + "format_version": 1, + "name": "token panel panel--panel", + "panel_id": "panel--panel", + "panel_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "panel_token_sha256_legacy": "3c9467c85be43d238926f6d18bf825c2e4748814c95b8b0e8b8f1420546c3089", + "positions_per_context": 63, + "receipt_sha256": "8a4e27a74ca6ce39569b78c3d972077ab7966f6da118110b3b08adca1e284c6f", + "records": [ + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0000.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 0, + "document_id": "embedded-synthetic/garden.txt", + "domain": "garden", + "index": 0, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0000.json", + "token_ids_first16": [ + 1, + 55, + 75, + 72, + 224, + 86, + 80, + 68, + 79, + 79, + 224, + 74, + 68, + 85, + 71, + 72 + ], + "token_ids_json_sha256": "08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315", + "token_ids_last16": [ + 224, + 68, + 81, + 71, + 224, + 68, + 224, + 86, + 87, + 82, + 81, + 72, + 224, + 83, + 68, + 2 + ], + "token_ids_sha256_legacy": "9d5378f0316be57e37f80d2bae7895ba4a1140c302c87ff8cce2fbd9afc83b77", + "window_id": "final-0000", + "window_index": 0 + }, + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0001.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 1, + "document_id": "embedded-synthetic/arithmetic.txt", + "domain": "arithmetic", + "index": 1, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0001.json", + "token_ids_first16": [ + 1, + 36, + 224, + 86, + 75, + 72, + 79, + 73, + 224, + 75, + 82, + 79, + 71, + 86, + 224, + 87 + ], + "token_ids_json_sha256": "5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46", + "token_ids_last16": [ + 72, + 86, + 17, + 224, + 55, + 75, + 72, + 85, + 72, + 224, + 68, + 85, + 72, + 224, + 72, + 2 + ], + "token_ids_sha256_legacy": "e0f95114b71a46cb489539dc38909fb67fb378f25fafbb513e32690cc7f11b37", + "window_id": "final-0001", + "window_index": 1 + }, + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0002.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 2, + "document_id": "embedded-synthetic/code.txt", + "domain": "code", + "index": 2, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0002.json", + "token_ids_first16": [ + 1, + 71, + 72, + 73, + 224, + 68, + 71, + 71, + 66, + 89, + 68, + 79, + 88, + 72, + 86, + 11 + ], + "token_ids_json_sha256": "51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07", + "token_ids_last16": [ + 85, + 76, + 74, + 75, + 87, + 202, + 202, + 85, + 72, + 86, + 88, + 79, + 87, + 224, + 32, + 2 + ], + "token_ids_sha256_legacy": "482b890c7b0e2f7400257c43680093b7f2b90d6df5361c6de3ae97ddfdd2504e", + "window_id": "final-0002", + "window_index": 2 + }, + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0003.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 3, + "document_id": "embedded-synthetic/instructions.txt", + "domain": "instructions", + "index": 3, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0003.json", + "token_ids_first16": [ + 1, + 41, + 76, + 85, + 86, + 87, + 224, + 83, + 79, + 68, + 70, + 72, + 224, + 68, + 224, + 70 + ], + "token_ids_json_sha256": "8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d", + "token_ids_last16": [ + 224, + 70, + 82, + 82, + 79, + 224, + 90, + 68, + 87, + 72, + 85, + 224, + 76, + 81, + 87, + 2 + ], + "token_ids_sha256_legacy": "12e01edd3900ff2ca82621feb5504f24b003a53c0afe98a9ee0b490eb93141d4", + "window_id": "final-0003", + "window_index": 3 + } + ], + "repository": null, + "revision": null, + "schema": "malaiwah.fidelity-panel-binding.v1", + "scored_positions_total": 252, + "scoring_window": { + "dropped_positions_total": 0, + "min_left_context_tokens": 1, + "policy": "every causal prediction position of every window is scored; nothing is dropped", + "score_from": 0, + "windowed": false + }, + "strata": {}, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "token_digest_algorithm": { + "aggregate": "sha256('\\n'.join(per_record_hex).encode('ascii'))", + "legacy_aggregate": "sha256(''.join(per_record_hex).encode('utf-8'))", + "legacy_per_record": "sha256(json.dumps(ids).encode('utf-8'))", + "per_record": "sha256(json.dumps(ids, separators=(',',':')).encode('utf-8'))" + }, + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } +} diff --git a/raw/candidates/ct-nvfp4/evidence/candidate/panel/tokens/context-0000.json b/raw/candidates/ct-nvfp4/evidence/candidate/panel/tokens/context-0000.json new file mode 100644 index 0000000000000000000000000000000000000000..c55b788f77dcb26a8c56fe6a7593353d57abb70f --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/candidate/panel/tokens/context-0000.json @@ -0,0 +1 @@ +[1,55,75,72,224,86,80,68,79,79,224,74,68,85,71,72,81,224,75,68,86,224,85,72,71,224,73,79,82,90,72,85,86,15,224,74,85,72,72,81,224,79,72,68,89,72,86,15,224,68,81,71,224,68,224,86,87,82,81,72,224,83,68,2] \ No newline at end of file diff --git a/raw/candidates/ct-nvfp4/evidence/candidate/panel/tokens/context-0001.json b/raw/candidates/ct-nvfp4/evidence/candidate/panel/tokens/context-0001.json new file mode 100644 index 0000000000000000000000000000000000000000..8304be93e5387811e155f869e175c0bfca57ca76 --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/candidate/panel/tokens/context-0001.json @@ -0,0 +1 @@ +[1,36,224,86,75,72,79,73,224,75,82,79,71,86,224,87,75,85,72,72,224,69,79,88,72,224,69,82,91,72,86,224,68,81,71,224,73,76,89,72,224,85,72,71,224,69,82,91,72,86,17,224,55,75,72,85,72,224,68,85,72,224,72,2] \ No newline at end of file diff --git a/raw/candidates/ct-nvfp4/evidence/candidate/panel/tokens/context-0002.json b/raw/candidates/ct-nvfp4/evidence/candidate/panel/tokens/context-0002.json new file mode 100644 index 0000000000000000000000000000000000000000..2a1413e634823a039c4ede6b463b549207c4c8fb --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/candidate/panel/tokens/context-0002.json @@ -0,0 +1 @@ +[1,71,72,73,224,68,71,71,66,89,68,79,88,72,86,11,79,72,73,87,15,224,85,76,74,75,87,12,29,202,224,224,224,224,85,72,87,88,85,81,224,79,72,73,87,224,14,224,85,76,74,75,87,202,202,85,72,86,88,79,87,224,32,2] \ No newline at end of file diff --git a/raw/candidates/ct-nvfp4/evidence/candidate/panel/tokens/context-0003.json b/raw/candidates/ct-nvfp4/evidence/candidate/panel/tokens/context-0003.json new file mode 100644 index 0000000000000000000000000000000000000000..7978732d7bf3bfc5fed35c837bc69d9d66371c4f --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/candidate/panel/tokens/context-0003.json @@ -0,0 +1 @@ +[1,41,76,85,86,87,224,83,79,68,70,72,224,68,224,70,79,72,68,81,224,70,88,83,224,82,81,224,87,75,72,224,87,68,69,79,72,17,224,49,72,91,87,224,83,82,88,85,224,70,82,82,79,224,90,68,87,72,85,224,76,81,87,2] \ No newline at end of file diff --git a/raw/candidates/ct-nvfp4/evidence/candidate/runtime/capture-runtime.json b/raw/candidates/ct-nvfp4/evidence/candidate/runtime/capture-runtime.json new file mode 100644 index 0000000000000000000000000000000000000000..78b9972f72a655cf80b72b6102da2af0a10b529a --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/candidate/runtime/capture-runtime.json @@ -0,0 +1,411 @@ +{ + "capture_tool": { + "expert_fill": { + "bytes_filled": 294912, + "declined": {}, + "decoded_slices": 72, + "identity": "a byte copy into the fused parameter's slice; bin/selftest_layer_outer.py L4/L6 assert equality with from_pretrained and with the converter path", + "layers_filled": 3, + "mode": "direct", + "reference": "transformers.core_model_loading.MergeModulelist(dim=0) + Concatenate(dim=1)", + "slices_filled": 72, + "staged_slices": 0, + "staging": "pageable", + "targets_filled": 6 + }, + "file": "engines/tools/hf_capture.py", + "head_module_path": "lm_head", + "head_resolution": "lm_head", + "layer_residency": "stream", + "mechanism": "transformers forward pass, layer-outer/window-inner schedule: for each decoder layer the model's own forward is run once per window with the layers below replaying their memoised output and the layers above suspending, so each layer's weights are materialised once for the whole panel. Windows are pushed through sequentially, never batched. Forward pre-hook on model.get_output_embeddings(), fired by the model's own epilogue after the last layer", + "model_view": null, + "parallel_plan_dropped": false, + "resolved_classes": { + "config": "transformers.models.glm_moe_dsa.configuration_glm_moe_dsa.GlmMoeDsaConfig", + "model": "transformers.models.glm_moe_dsa.modeling_glm_moe_dsa.GlmMoeDsaForCausalLM" + }, + "resolved_panel_binding": { + "binding": { + "content": { + "archive": { + "algorithm": "sha256(ustar: sorted regular files; mode=0644; uid=gid=mtime=0)", + "bytes": 20480, + "compression": "none", + "format": "ustar", + "sha256": "389706dfa3335a75ec70a40d079995af1a60c05512334125dbd336790f12702f" + }, + "manifest": [ + { + "bytes": 192, + "path": "arrays/causal-mask-64.npy", + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02" + }, + { + "bytes": 384, + "path": "arrays/final-0000.tokens.npy", + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af" + }, + { + "bytes": 384, + "path": "arrays/final-0001.tokens.npy", + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea" + }, + { + "bytes": 384, + "path": "arrays/final-0002.tokens.npy", + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c" + }, + { + "bytes": 384, + "path": "arrays/final-0003.tokens.npy", + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a" + }, + { + "bytes": 4195, + "path": "panel.json", + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6" + }, + { + "bytes": 7808, + "path": "panel.receipt.json", + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263" + } + ], + "manifest_sha256": "e5f2d6410a6290da1197016c5b57ae522a3570665215ddc23e2a0bd45f912181" + }, + "panel": { + "bytes": 4195, + "context_length": 64, + "contexts": 4, + "file": "panel.json", + "id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "positions_per_context": 63, + "role": "final", + "scored_positions_total": 252, + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6", + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36" + }, + "receipt": { + "bytes": 7808, + "declared_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "file": "panel.receipt.json", + "receipt_file_sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "receipt_seal_mode": "self-blank" + }, + "schema": "malaiwah.resolved-panel.v1", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } + }, + "binding_file": "panel-binding.json", + "binding_file_sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "tokenizer_equivalences": [] + }, + "schedule": "layer-outer", + "sha256": "44afcdac9f7c9cb26a35a2b7d9c1aed562344b76c8045a753651d2f2dbae99d0", + "unexpected_tensor_allowlist": null, + "verified_code": null, + "version": "hf_capture/1", + "weights_decode": { + "activation_quantization": null, + "checkpoint_bytes_read": 136664, + "comparison_class": "advisory", + "components_consumed": 330, + "components_not_consumed": [], + "components_planned": 330, + "formats_decoded": { + "nvfp4-pack-quantized": 110 + }, + "method": "microfloat-weight-reconstruction", + "modules_decoded": 110, + "modules_not_decoded": [], + "modules_planned": 110, + "output_dtype": "bfloat16", + "quantization_config": { + "config_groups": { + "group_0": { + "format": "nvfp4-pack-quantized", + "input_activations": null, + "output_activations": null, + "targets": [ + "model.layers.0.mlp.down_proj", + "model.layers.0.mlp.gate_proj", + "model.layers.0.mlp.up_proj", + "model.layers.0.self_attn.indexer.weights_proj", + "model.layers.0.self_attn.indexer.wk", + "model.layers.0.self_attn.indexer.wq_b", + "model.layers.0.self_attn.kv_a_proj_with_mqa", + "model.layers.0.self_attn.kv_b_proj", + "model.layers.0.self_attn.o_proj", + "model.layers.0.self_attn.q_a_proj", + "model.layers.0.self_attn.q_b_proj", + "model.layers.1.mlp.experts.0.down_proj", + "model.layers.1.mlp.experts.0.gate_proj", + "model.layers.1.mlp.experts.0.up_proj", + "model.layers.1.mlp.experts.1.down_proj", + "model.layers.1.mlp.experts.1.gate_proj", + "model.layers.1.mlp.experts.1.up_proj", + "model.layers.1.mlp.experts.2.down_proj", + "model.layers.1.mlp.experts.2.gate_proj", + "model.layers.1.mlp.experts.2.up_proj", + "model.layers.1.mlp.experts.3.down_proj", + "model.layers.1.mlp.experts.3.gate_proj", + "model.layers.1.mlp.experts.3.up_proj", + "model.layers.1.mlp.experts.4.down_proj", + "model.layers.1.mlp.experts.4.gate_proj", + "model.layers.1.mlp.experts.4.up_proj", + "model.layers.1.mlp.experts.5.down_proj", + "model.layers.1.mlp.experts.5.gate_proj", + "model.layers.1.mlp.experts.5.up_proj", + "model.layers.1.mlp.experts.6.down_proj", + "model.layers.1.mlp.experts.6.gate_proj", + "model.layers.1.mlp.experts.6.up_proj", + "model.layers.1.mlp.experts.7.down_proj", + "model.layers.1.mlp.experts.7.gate_proj", + "model.layers.1.mlp.experts.7.up_proj", + "model.layers.1.mlp.shared_experts.down_proj", + "model.layers.1.mlp.shared_experts.gate_proj", + "model.layers.1.mlp.shared_experts.up_proj", + "model.layers.1.self_attn.kv_a_proj_with_mqa", + "model.layers.1.self_attn.kv_b_proj", + "model.layers.1.self_attn.o_proj", + "model.layers.1.self_attn.q_a_proj", + "model.layers.1.self_attn.q_b_proj", + "model.layers.2.mlp.experts.0.down_proj", + "model.layers.2.mlp.experts.0.gate_proj", + "model.layers.2.mlp.experts.0.up_proj", + "model.layers.2.mlp.experts.1.down_proj", + "model.layers.2.mlp.experts.1.gate_proj", + "model.layers.2.mlp.experts.1.up_proj", + "model.layers.2.mlp.experts.2.down_proj", + "model.layers.2.mlp.experts.2.gate_proj", + "model.layers.2.mlp.experts.2.up_proj", + "model.layers.2.mlp.experts.3.down_proj", + "model.layers.2.mlp.experts.3.gate_proj", + "model.layers.2.mlp.experts.3.up_proj", + "model.layers.2.mlp.experts.4.down_proj", + "model.layers.2.mlp.experts.4.gate_proj", + "model.layers.2.mlp.experts.4.up_proj", + "model.layers.2.mlp.experts.5.down_proj", + "model.layers.2.mlp.experts.5.gate_proj", + "model.layers.2.mlp.experts.5.up_proj", + "model.layers.2.mlp.experts.6.down_proj", + "model.layers.2.mlp.experts.6.gate_proj", + "model.layers.2.mlp.experts.6.up_proj", + "model.layers.2.mlp.experts.7.down_proj", + "model.layers.2.mlp.experts.7.gate_proj", + "model.layers.2.mlp.experts.7.up_proj", + "model.layers.2.mlp.shared_experts.down_proj", + "model.layers.2.mlp.shared_experts.gate_proj", + "model.layers.2.mlp.shared_experts.up_proj", + "model.layers.2.self_attn.indexer.weights_proj", + "model.layers.2.self_attn.indexer.wk", + "model.layers.2.self_attn.indexer.wq_b", + "model.layers.2.self_attn.kv_a_proj_with_mqa", + "model.layers.2.self_attn.kv_b_proj", + "model.layers.2.self_attn.o_proj", + "model.layers.2.self_attn.q_a_proj", + "model.layers.2.self_attn.q_b_proj", + "model.layers.3.mlp.experts.0.down_proj", + "model.layers.3.mlp.experts.0.gate_proj", + "model.layers.3.mlp.experts.0.up_proj", + "model.layers.3.mlp.experts.1.down_proj", + "model.layers.3.mlp.experts.1.gate_proj", + "model.layers.3.mlp.experts.1.up_proj", + "model.layers.3.mlp.experts.2.down_proj", + "model.layers.3.mlp.experts.2.gate_proj", + "model.layers.3.mlp.experts.2.up_proj", + "model.layers.3.mlp.experts.3.down_proj", + "model.layers.3.mlp.experts.3.gate_proj", + "model.layers.3.mlp.experts.3.up_proj", + "model.layers.3.mlp.experts.4.down_proj", + "model.layers.3.mlp.experts.4.gate_proj", + "model.layers.3.mlp.experts.4.up_proj", + "model.layers.3.mlp.experts.5.down_proj", + "model.layers.3.mlp.experts.5.gate_proj", + "model.layers.3.mlp.experts.5.up_proj", + "model.layers.3.mlp.experts.6.down_proj", + "model.layers.3.mlp.experts.6.gate_proj", + "model.layers.3.mlp.experts.6.up_proj", + "model.layers.3.mlp.experts.7.down_proj", + "model.layers.3.mlp.experts.7.gate_proj", + "model.layers.3.mlp.experts.7.up_proj", + "model.layers.3.mlp.shared_experts.down_proj", + "model.layers.3.mlp.shared_experts.gate_proj", + "model.layers.3.mlp.shared_experts.up_proj", + "model.layers.3.self_attn.kv_a_proj_with_mqa", + "model.layers.3.self_attn.kv_b_proj", + "model.layers.3.self_attn.o_proj", + "model.layers.3.self_attn.q_a_proj", + "model.layers.3.self_attn.q_b_proj" + ], + "weights": { + "dynamic": false, + "group_size": 16, + "num_bits": 4, + "scale_dtype": "torch.float8_e4m3fn", + "strategy": "tensor_group", + "symmetric": true, + "type": "float" + } + } + }, + "format": "nvfp4-pack-quantized", + "ignore": [], + "quant_method": "compressed-tensors", + "quantization_status": "compressed" + }, + "reader_evidence": { + "decode_plan_sha256": "b460ed95a3e245541b4d510acbaa5efd96d1d87e0b04d2da3d97e814ee542427", + "gate_header_barrier": false, + "source_files": { + "engines/tools/affine_surface.py": "37e7074797d53ae836e0af12fdbd2dc36c88778098aa44c72c1cd936d2b4c053", + "engines/tools/microscale_surface.py": "588923f0a4700436221923c794a8c112971d9f08e75c746742b0f0ede7921682", + "engines/tools/nvfp4_surface.py": "044b6fd2ee22d58512476e96060f7fa09030212a33736da1393c0103eb73e0c8", + "engines/tools/quant_stream.py": "7c6cc4cbe399d066eaff80ccf1e3d3190185f194644f738a404d3c537ad8e1ab" + } + }, + "reference": "compressed-tensors@0.18.0; DeepSeek-V4-Flash@60d8d70770c6776ff598c94bb586a859a38244f1/inference/kernel.py; nvidia/Qwen3.8-Flash-Next-NVFP4@fc694b54fb0174e0913e6adf86691ef85a4ead47/config.json+headers", + "scientific_disclosure": "Stored-weight reconstruction only; no native quantized GEMM, activation arithmetic, or quantizer optimization quality claim.", + "scope": "weights_reconstructed" + }, + "weights_license": null, + "wraps": [] + }, + "container": { + "image_digest": null, + "image_reference": null, + "image_repository_digest": null + }, + "format_version": 1, + "lane": "other", + "lane_identity_inputs": [ + "torch_version", + "cuda_runtime_version", + "device_name", + "grouped_mm_kernel", + "numeric_policy", + "attention_backend", + "experts_implementation", + "parallelism", + "ep_emulate", + "reduce_order" + ], + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "lane_inferred": false, + "receipt_sha256": "2a4d547e498072f581f5d2c376261b9e8e803ea0386e53f76c5b4be173b6e985", + "resources": { + "bytes": { + "checkpoint_read": 208056, + "hidden_d2h": 36616, + "weights_h2d": null + }, + "checkpoint_bytes": 256804, + "checkpoint_files": 2, + "device_name": null, + "forward_timing": "wall-clock", + "note": "provenance, not identity: peaks and stage seconds this run measured; forward_sum is device time under cuda-events, wall time otherwise; seal covers head serialisation up to this block's assembly", + "peak_cuda_allocated_bytes": null, + "peak_cuda_reserved_bytes": null, + "peak_resident_weight_bytes": 208032, + "peak_rss_bytes": 368013312, + "rss_units_source": "Linux ru_maxrss", + "seconds": { + "decode_sum": 0.119, + "elapsed": 5.148, + "fill_sum": 0.0, + "forward_sum": 0.179, + "identity": 0.003, + "layer_load_max": 0.05, + "layer_load_sum": 0.166, + "layer_loads": 4, + "resident_load": 4.071, + "seal": 0.01 + } + }, + "runtime_environment": { + "cold_run": "20260907T165248Z-2063954", + "numeric_policy_observed": { + "NVIDIA_TF32_OVERRIDE": null, + "allow_tf32_cudnn": true, + "allow_tf32_matmul": false, + "deviates_from_default": false, + "float32_matmul_precision": "highest", + "observed_at": "seal time, after the forward" + }, + "python": "3.12.14" + }, + "schema": "malaiwah.fidelity-capture-runtime.v1", + "source_files": { + "bin/fidelity/codepin.py": "ce2a2c04d64adf7a268978a7ffe163c7d4cb5b675d5dc8e156f8a26a3b7bb5fd", + "bin/fidelity/panel.py": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "engines/tools/affine_surface.py": "37e7074797d53ae836e0af12fdbd2dc36c88778098aa44c72c1cd936d2b4c053", + "engines/tools/hf_capture.py": "44afcdac9f7c9cb26a35a2b7d9c1aed562344b76c8045a753651d2f2dbae99d0", + "engines/tools/layer_outer.py": "e3ea5715112663b1b60cf596eeffc2140e49b399809ece89a174bce41a969274", + "engines/tools/microscale_surface.py": "588923f0a4700436221923c794a8c112971d9f08e75c746742b0f0ede7921682", + "engines/tools/nvfp4_surface.py": "044b6fd2ee22d58512476e96060f7fa09030212a33736da1393c0103eb73e0c8", + "engines/tools/quant_stream.py": "7c6cc4cbe399d066eaff80ccf1e3d3190185f194644f738a404d3c537ad8e1ab" + }, + "stack_fingerprint": { + "attention_backend": "model default", + "cuda_runtime_version": null, + "device": "cpu", + "device_name": null, + "engine": "transformers-eager", + "numeric_policy": "default torch matmul precision; no TF32 override applied", + "schema": "malaiwah.stack-fingerprint.v1", + "torch_version": "2.11.0+cpu", + "transformers_version": "5.16.1" + }, + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd", + "upstream_receipts": [], + "weights": { + "checkpoint_files": [ + { + "name": "config.json", + "sha256": "188450fd2bed8cf0c6e06d785410192143b3777bcbbff315151fcecb96cd267e", + "size": 7724 + }, + { + "name": "model.safetensors", + "sha256": "640f3d7ea214015d8834a94b56b2dee2c2326dc50245cdd0ded5778799b0d300", + "size": 249080 + } + ], + "checkpoint_identity_algorithm": "sha256 over the canonical JSON {\"algorithm\": , \"files\": [{\"name\", \"size\", \"sha256\"}, ...]} of every *.safetensors shard plus config.json in the checkpoint directory, sorted by name; for a llama.cpp GGUF tree the shards are every *.gguf of the one build directory (name = /) and config.json is the official release's copy beside it", + "checkpoint_identity_sha256": "8c943a9a4f3620b5a9014721f9f6565d25e868dd1e68407f28b618216a248317", + "model_revision": null, + "repository": "/tmp/qfs-quant-microfloat-release/stage-main/ct-nvfp4", + "revision": null + } +} diff --git a/raw/candidates/ct-nvfp4/evidence/candidate/validation/structural-validation.json b/raw/candidates/ct-nvfp4/evidence/candidate/validation/structural-validation.json new file mode 100644 index 0000000000000000000000000000000000000000..5ee8ffba0107cb5416cba5d6184f9ed9b330943d --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/candidate/validation/structural-validation.json @@ -0,0 +1,14 @@ +{ + "checks_run": [ + "pre-seal" + ], + "error_count": 0, + "errors": [], + "format_version": 1, + "receipt_sha256": "df49786fa6ab7b99b4ccb964492beb1dfda015c837b9483c9f730bf69e82513c", + "schema": "malaiwah.fidelity-structural-validation.v1", + "structural_status": "sealed", + "subject": "dataset:fidelity--quant-integration.candidate", + "warning_count": 0, + "warnings": [] +} diff --git a/raw/candidates/ct-nvfp4/evidence/capture-candidate.stderr.log b/raw/candidates/ct-nvfp4/evidence/capture-candidate.stderr.log new file mode 100644 index 0000000000000000000000000000000000000000..b854dd4858a5416c65bb47f827ee776d95de9bb3 --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/capture-candidate.stderr.log @@ -0,0 +1,15 @@ + +Loading weights: 0%| | 0/6 [00:00 same_stack", + "overridden_by": null, + "passed": true + } + }, + "high_kld_contexts": [ + { + "allocation_stratum": null, + "domain": "garden", + "index": 0, + "max": 0.004202515106545733, + "mean": 0.0008326949431510729, + "scored_rows": 63, + "window_id": "final-0000" + }, + { + "allocation_stratum": null, + "domain": "arithmetic", + "index": 1, + "max": 0.004544613731867027, + "mean": 0.0007898526230284316, + "scored_rows": 63, + "window_id": "final-0001" + }, + { + "allocation_stratum": null, + "domain": "code", + "index": 2, + "max": 0.003973906370457119, + "mean": 0.0007530774358661134, + "scored_rows": 63, + "window_id": "final-0002" + }, + { + "allocation_stratum": null, + "domain": "instructions", + "index": 3, + "max": 0.002465705106573056, + "mean": 0.000725441327327259, + "scored_rows": 63, + "window_id": "final-0003" + } + ], + "kl": { + "max": 0.004544613731867027, + "mean": 0.0007752665823432193, + "median": 0.0005839642226635057, + "p95": 0.0021489524925210586, + "p99": 0.003344027461591673, + "p99_9": 0.004458746976911381 + }, + "kl_macro_stratum_mean": null, + "kl_micro_token_mean": 0.0007752665823432193, + "measurement_scope": { + "contexts": 4, + "covers_full_panel": true, + "position_filter": "all", + "positions_per_context": 63, + "scored_positions": 252, + "subset_detail": null + }, + "metric": { + "direction": "reference_to_candidate", + "direction_label": "KL(reference || candidate)", + "higher_is_better": false, + "name": "mean_tokenwise_kld", + "units": "nats", + "value": 0.0007752665823432193 + }, + "panel": { + "context_length": 64, + "contexts": 4, + "panel_id": "panel--panel", + "panel_token_sha256_legacy": "3c9467c85be43d238926f6d18bf825c2e4748814c95b8b0e8b8f1420546c3089", + "scored_positions": 252, + "scoring_window": { + "dropped_positions_total": 0, + "min_left_context_tokens": 1, + "policy": "every causal prediction position of every window is scored; nothing is dropped", + "score_from": 0, + "windowed": false + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + }, + "tokenizer_candidate": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + }, + "tokenizer_identity_equal": true, + "tokenizer_reference": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } + }, + "per_context": [ + { + "allocation_stratum": null, + "domain": "garden", + "index": 0, + "max": 0.004202515106545733, + "mean": 0.0008326949431510729, + "scored_rows": 63, + "window_id": "final-0000" + }, + { + "allocation_stratum": null, + "domain": "arithmetic", + "index": 1, + "max": 0.004544613731867027, + "mean": 0.0007898526230284316, + "scored_rows": 63, + "window_id": "final-0001" + }, + { + "allocation_stratum": null, + "domain": "code", + "index": 2, + "max": 0.003973906370457119, + "mean": 0.0007530774358661134, + "scored_rows": 63, + "window_id": "final-0002" + }, + { + "allocation_stratum": null, + "domain": "instructions", + "index": 3, + "max": 0.002465705106573056, + "mean": 0.000725441327327259, + "scored_rows": 63, + "window_id": "final-0003" + } + ], + "per_domain": { + "arithmetic": 0.0007898526230284316, + "code": 0.0007530774358661134, + "garden": 0.0008326949431510729, + "instructions": 0.000725441327327259 + }, + "per_stratum": null, + "receipt_sha256": "54c0543bdca5c551a5ce2bc41644f4d133352be0b34a0afab1467fa5137f817e", + "reference": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "dataset_id": "fidelity--quant-integration.root", + "dataset_sha256": "3f37e78a445df2974e2769ac3cab656dd3dda170271cf0923dd4abc62b38dc07", + "form": "hidden", + "head": { + "bits": 16, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510" + }, + "label": "reference", + "lane": "other", + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "repository": null, + "revision": null, + "role": "root", + "scope_digest": "attn.o=native:bf16@16|attn.qkv=native:bf16@16|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=native:bf16@16|mlp.gate=native:bf16@16|mlp.up=native:bf16@16|moe.experts=native:bf16@16|norm=native:bf16@16|head=native|kv=bf16", + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd", + "weights": { + "artifact_ref": null, + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "codec": null, + "config_sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "declared_bits": null, + "declared_head_bits": 16, + "index_sha256": null, + "model_ref": null, + "model_revision": null, + "quantized": false, + "repository": "/tmp/qfs-complete-tiny-fixture/model", + "revision": null + } + }, + "schema": "malaiwah.fidelity-comparison-receipt.v1", + "self_compare": null, + "submission": { + "emitted": false, + "path": null, + "receipt_sha256": null, + "refusal": null, + "submission_schema": null + }, + "tokenwise": { + "bytes": 2144, + "path": "tokenwise-kld.npy", + "sha256": "d115385407c3bbce7cd6e466496e7ef92a8643839b8154a05b4dcfe8d95efba7" + }, + "top1_agreement": 0.6587301587301587, + "top1_discordant_contexts": [], + "uncertainty": { + "ci95_high": null, + "ci95_low": null, + "cluster_unit": null, + "clusters": null, + "method": "none", + "samples": null, + "seed": null + } +} diff --git a/raw/candidates/ct-nvfp4/evidence/comparison/tokenwise-kld.npy b/raw/candidates/ct-nvfp4/evidence/comparison/tokenwise-kld.npy new file mode 100644 index 0000000000000000000000000000000000000000..6b8344eae94fd35a2eea2bfadca9264a55814aba --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/comparison/tokenwise-kld.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d115385407c3bbce7cd6e466496e7ef92a8643839b8154a05b4dcfe8d95efba7 +size 2144 diff --git a/raw/candidates/ct-nvfp4/evidence/panel-binding.json b/raw/candidates/ct-nvfp4/evidence/panel-binding.json new file mode 100644 index 0000000000000000000000000000000000000000..573cea0b332c636bdda89b150f95cda307b89194 --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/panel-binding.json @@ -0,0 +1,102 @@ +{ + "content": { + "archive": { + "algorithm": "sha256(ustar: sorted regular files; mode=0644; uid=gid=mtime=0)", + "bytes": 20480, + "compression": "none", + "format": "ustar", + "sha256": "389706dfa3335a75ec70a40d079995af1a60c05512334125dbd336790f12702f" + }, + "manifest": [ + { + "bytes": 192, + "path": "arrays/causal-mask-64.npy", + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02" + }, + { + "bytes": 384, + "path": "arrays/final-0000.tokens.npy", + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af" + }, + { + "bytes": 384, + "path": "arrays/final-0001.tokens.npy", + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea" + }, + { + "bytes": 384, + "path": "arrays/final-0002.tokens.npy", + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c" + }, + { + "bytes": 384, + "path": "arrays/final-0003.tokens.npy", + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a" + }, + { + "bytes": 4195, + "path": "panel.json", + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6" + }, + { + "bytes": 7808, + "path": "panel.receipt.json", + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263" + } + ], + "manifest_sha256": "e5f2d6410a6290da1197016c5b57ae522a3570665215ddc23e2a0bd45f912181" + }, + "panel": { + "bytes": 4195, + "context_length": 64, + "contexts": 4, + "file": "panel.json", + "id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "positions_per_context": 63, + "role": "final", + "scored_positions_total": 252, + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6", + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36" + }, + "receipt": { + "bytes": 7808, + "declared_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "file": "panel.receipt.json", + "receipt_file_sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "receipt_seal_mode": "self-blank" + }, + "schema": "malaiwah.resolved-panel.v1", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } +} diff --git a/raw/candidates/ct-nvfp4/evidence/root/README.md b/raw/candidates/ct-nvfp4/evidence/root/README.md new file mode 100644 index 0000000000000000000000000000000000000000..710dc82d0a53fe4dd29dbf797a459cab544ac9ed --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/root/README.md @@ -0,0 +1,95 @@ +--- +license: mit +tags: +- fidelity +- kl-divergence +- fidelity-provenance +- fidelity-dataset +- fidelity-root +x_fidelity: + spec: https://github.com/malaiwah/quant-fidelity-suite/blob/main/docs/FIDELITY-DATASET-SPEC.md + spec_version: fidelity-provenance/v1 + role: fidelity-dataset + captured_model: + repository: /tmp/qfs-complete-tiny-fixture/model + revision: null + role: root + form: hidden + lane: other + panel: + panel_id: panel--panel + suite_token_hash_sha256: 525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36 + contexts: 4 + scored_positions: 252 + repository: null + revision: null + head: + policy: native + quantized: false + bits: 16 + lm_head_tensor_content_sha256: 2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510 + lm_head_file_sha256: 07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913 + final_norm_tensor_content_sha256: null + final_norm_file_sha256: null + equality_receipt: null + replay_permitted: true + scope_digest: attn.o=native:bf16@16|attn.qkv=native:bf16@16|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=native:bf16@16|mlp.gate=native:bf16@16|mlp.up=native:bf16@16|moe.experts=native:bf16@16|norm=native:bf16@16|head=native|kv=bf16 + seal: + manifest: fidelity-dataset.json + dataset_sha256: null + checksums: checksums.txt + checksums_sha256: '0000000000000000000000000000000000000000000000000000000000000000' + note: 'written before the seal: dataset_sha256 and checksums_sha256 are digests of the tree this file + is inside, so they cannot appear in it. Read them from fidelity-dataset.json.' + interop: + compatible_with: + - kimi-k3-distribution-fidelity/1 + k3_compat_emitted: false + registry: + dataset: malaiwah/quant-fidelity-registry + schema_version: quant-fidelity-registry/v1 + artifact_id: null + measurement_ids: [] + snapshot: null + fidelity_dataset: + repository: null + revision: null + dataset_sha256: null + capture_content_digest: d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39 + form: hidden + role: root + measurements: [] +--- +# Local quant integration root + +A **root** fidelity dataset in **hidden form**, produced by `engines/tools/hf_capture.py` from `/tmp/qfs-complete-tiny-fixture/model`. + +## The cut + +the final hidden state handed to lm_head -- after the text model's final norm and immediately before the head matmul -- captured as the head module's input via torch.nn.Module.register_forward_pre_hook; replay applies the head ONLY (no final norm at replay time: the capture already sits after it). Same cut as engines/tools/hidden_replay.py and as Festr's kimi-k3 hidden-replay qualification. + +## What is here + +| | | +|---|---| +| records | 4 | +| scored positions | 252 | +| context length | 64 | +| hidden width | 64 | +| vocab size | 260 | +| capture bytes (hidden form) | 33348 | +| the same capture in logit form would be | 262080 bytes (8x) | +| scope policy | native | +| lane | other | + +## Does the model still generate sensibly + +`The capital of France is` -> `�` (p=0.0067, entropy 5.548 of a possible 5.561 nats). Recorded, not enforced. One extra window through the same schedule; its hidden state was discarded and is not part of this dataset. + +## How to check it + +``` +bin/fidelity-dataset verify +``` + +Full specification: diff --git a/raw/candidates/ct-nvfp4/evidence/root/capture/hidden_0000.safetensors b/raw/candidates/ct-nvfp4/evidence/root/capture/hidden_0000.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..3c0bac7f7a22df23c977fb818ec6bf48cda9b327 --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/root/capture/hidden_0000.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2aa106ed8412fa80c1b807c82bf037db2f15593e4286ae8e0252b1346f5a0311 +size 8337 diff --git a/raw/candidates/ct-nvfp4/evidence/root/capture/hidden_0001.safetensors b/raw/candidates/ct-nvfp4/evidence/root/capture/hidden_0001.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..fcefeb7f59f7851119a011e5d27037af68b14463 --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/root/capture/hidden_0001.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:30d610a7a6efdafcd09fe07b8ef5ba317efbf22b6364582591a6c31263b4addd +size 8337 diff --git a/raw/candidates/ct-nvfp4/evidence/root/capture/hidden_0002.safetensors b/raw/candidates/ct-nvfp4/evidence/root/capture/hidden_0002.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..c9519954436b138170aa8be753279780125e3248 --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/root/capture/hidden_0002.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e997e4f8db7f89251373e6bd9cf92afc08a2c9b3f62068b8209c8f381fca8bba +size 8337 diff --git a/raw/candidates/ct-nvfp4/evidence/root/capture/hidden_0003.safetensors b/raw/candidates/ct-nvfp4/evidence/root/capture/hidden_0003.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..346043e25ebc71f53e42e014fc010750e6d24bb8 --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/root/capture/hidden_0003.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c8847ae711a567b36148b82bd2315d5613398a57525a79ef11b14046df071ade +size 8337 diff --git a/raw/candidates/ct-nvfp4/evidence/root/capture/manifest.json b/raw/candidates/ct-nvfp4/evidence/root/capture/manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..0a1dab9945c3fce32f612516d41c523248f22697 --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/root/capture/manifest.json @@ -0,0 +1,159 @@ +{ + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "context_length": 64, + "coverage": { + "complete": true, + "declared_records": 4, + "index_range": [ + 0, + 3 + ], + "missing_indices_sample": [], + "present_records": 4, + "shard_of": null, + "subset_detail": null + }, + "created_utc": "2026-09-07T16:52:45Z", + "dtype": "BF16", + "dtype_lossless": true, + "form": "hidden", + "format_version": 1, + "hidden_width": 64, + "receipt_sha256": "5fbec44170793c30df4ef93430347eef9b7f9544359604258b1d5c61dafd458e", + "records": [ + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 0, + "document_id": "embedded-synthetic/garden.txt", + "domain": "garden", + "dtype": "BF16", + "elapsed_seconds": 0.047, + "file": "hidden_0000.safetensors", + "index": 0, + "key": "hidden_states", + "payload_sha256": "80897a67cfdc22f410255f2463193e7d765de5500d62da2c13aacbd3b9507083", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "2aa106ed8412fa80c1b807c82bf037db2f15593e4286ae8e0252b1346f5a0311", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "80897a67cfdc22f410255f2463193e7d765de5500d62da2c13aacbd3b9507083", + "token_ids_json_sha256": "08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315", + "token_ids_sha256_legacy": "9d5378f0316be57e37f80d2bae7895ba4a1140c302c87ff8cce2fbd9afc83b77", + "window_id": "final-0000", + "window_index": 0 + }, + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 1, + "document_id": "embedded-synthetic/arithmetic.txt", + "domain": "arithmetic", + "dtype": "BF16", + "elapsed_seconds": 0.043, + "file": "hidden_0001.safetensors", + "index": 1, + "key": "hidden_states", + "payload_sha256": "1fc13aaf069c53d5592198daeacfc5f652abf5b9ba552213859596c32e7c4046", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "30d610a7a6efdafcd09fe07b8ef5ba317efbf22b6364582591a6c31263b4addd", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "1fc13aaf069c53d5592198daeacfc5f652abf5b9ba552213859596c32e7c4046", + "token_ids_json_sha256": "5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46", + "token_ids_sha256_legacy": "e0f95114b71a46cb489539dc38909fb67fb378f25fafbb513e32690cc7f11b37", + "window_id": "final-0001", + "window_index": 1 + }, + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 2, + "document_id": "embedded-synthetic/code.txt", + "domain": "code", + "dtype": "BF16", + "elapsed_seconds": 0.041, + "file": "hidden_0002.safetensors", + "index": 2, + "key": "hidden_states", + "payload_sha256": "98b8d9e1ccb196898fda27cb5f625f348aa0046121c39484a4af7cb042e1be92", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "e997e4f8db7f89251373e6bd9cf92afc08a2c9b3f62068b8209c8f381fca8bba", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "98b8d9e1ccb196898fda27cb5f625f348aa0046121c39484a4af7cb042e1be92", + "token_ids_json_sha256": "51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07", + "token_ids_sha256_legacy": "482b890c7b0e2f7400257c43680093b7f2b90d6df5361c6de3ae97ddfdd2504e", + "window_id": "final-0002", + "window_index": 2 + }, + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 3, + "document_id": "embedded-synthetic/instructions.txt", + "domain": "instructions", + "dtype": "BF16", + "elapsed_seconds": 0.041, + "file": "hidden_0003.safetensors", + "index": 3, + "key": "hidden_states", + "payload_sha256": "01646a47a79cc47760fc0645c30bc9e37a930c26ac84cd3d1a1d5077a2f48df8", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "c8847ae711a567b36148b82bd2315d5613398a57525a79ef11b14046df071ade", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "01646a47a79cc47760fc0645c30bc9e37a930c26ac84cd3d1a1d5077a2f48df8", + "token_ids_json_sha256": "8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d", + "token_ids_sha256_legacy": "12e01edd3900ff2ca82621feb5504f24b003a53c0afe98a9ee0b490eb93141d4", + "window_id": "final-0003", + "window_index": 3 + } + ], + "run_name": "hf-capture", + "runtime_manifest": "../runtime/capture-runtime.json", + "runtime_manifest_sha256": "a8068c471e36a871db3517160cf5016041d0a6d8a528f70485efb0defe7b1e2a", + "schema": "malaiwah.fidelity-capture-manifest.v1", + "scored_rows_per_context": 63, + "semantic_point": "after_final_rmsnorm_before_lm_head", + "tensor_key": "hidden_states", + "total_scored_rows": 252, + "total_size_bytes": 33348, + "vocab_size": 260 +} diff --git a/raw/candidates/ct-nvfp4/evidence/root/checksums.txt b/raw/candidates/ct-nvfp4/evidence/root/checksums.txt new file mode 100644 index 0000000000000000000000000000000000000000..0c6e91559558904bca0a967dd5c322b0c4780bbb --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/root/checksums.txt @@ -0,0 +1,20 @@ +df28a18b7e9c0d39ac079235136da25818038cc09314a890063058e94bf1c226 README.md +2aa106ed8412fa80c1b807c82bf037db2f15593e4286ae8e0252b1346f5a0311 capture/hidden_0000.safetensors +30d610a7a6efdafcd09fe07b8ef5ba317efbf22b6364582591a6c31263b4addd capture/hidden_0001.safetensors +e997e4f8db7f89251373e6bd9cf92afc08a2c9b3f62068b8209c8f381fca8bba capture/hidden_0002.safetensors +c8847ae711a567b36148b82bd2315d5613398a57525a79ef11b14046df071ade capture/hidden_0003.safetensors +eb4f0b08a3a53c704994a8b86e40f87a81c51869bb217aef0b2750268fd0f707 capture/manifest.json +777b038f747bed25d1f5db8adbfd2a78c7762fb5c870ff8c3c785a984d48a168 head/head.json +07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913 head/weight.safetensors +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0000.npy +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0001.npy +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0002.npy +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0003.npy +b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263 panel/panel-receipt.json +68efa258ea3c5d4ba759c3c15aadd6e8c984711831bea3f335903109345cdcef panel/panel.json +08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315 panel/tokens/context-0000.json +5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46 panel/tokens/context-0001.json +51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07 panel/tokens/context-0002.json +8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d panel/tokens/context-0003.json +a8068c471e36a871db3517160cf5016041d0a6d8a528f70485efb0defe7b1e2a runtime/capture-runtime.json +769c103cf430360bf1b79a4d027f5bd073ce3f61204d9da77adf3ad494c27e73 validation/structural-validation.json diff --git a/raw/candidates/ct-nvfp4/evidence/root/fidelity-dataset.json b/raw/candidates/ct-nvfp4/evidence/root/fidelity-dataset.json new file mode 100644 index 0000000000000000000000000000000000000000..cb8aa0d095b0967d0afe8af67cf330d5d85c76f7 --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/root/fidelity-dataset.json @@ -0,0 +1,389 @@ +{ + "capture": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "dtype": "BF16", + "dtype_lossless": true, + "form": "hidden", + "head_not_separable_reason": null, + "head_separable": true, + "hidden_width": 64, + "lossy_codec": null, + "manifest_file": "capture/manifest.json", + "manifest_file_sha256": "eb4f0b08a3a53c704994a8b86e40f87a81c51869bb217aef0b2750268fd0f707", + "records_count": 4, + "scored_rows_total": 252, + "semantic_point": "after_final_rmsnorm_before_lm_head", + "tensor_key": "hidden_states", + "total_size_bytes": 33348, + "vocab_size": 260 + }, + "coverage": { + "complete": true, + "declared_records": 4, + "index_range": [ + 0, + 3 + ], + "missing_indices_sample": [], + "present_records": 4, + "shard_of": null, + "subset_detail": null + }, + "created_utc": "2026-09-07T16:52:45Z", + "dataset": { + "author": { + "handle": null, + "is_registry_maintainer": false, + "name": "malaiwah", + "role": "capture-author", + "url": null + }, + "base_capture": null, + "id": "fidelity--quant-integration.root", + "license": "mit", + "name": "Local quant integration root", + "qualification": null, + "repository": null, + "revision": null, + "role": "root", + "structural_status": "sealed" + }, + "dataset_sha256": "3f37e78a445df2974e2769ac3cab656dd3dda170271cf0923dd4abc62b38dc07", + "determinism": { + "cold_start_per_run": true, + "distinct_evidence_hash_count": 1, + "evidence_hashes": [ + "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39" + ], + "evidence_kind": "hidden_state_tensor_sha256", + "identical_across_runs": null, + "note": "a single cold capture; cross-run determinism is NOT asserted here. Capture a second cold run and run `fidelity-dataset compare --self-compare` -- an exactly 0.0 result is the SC-1 reproduction confirmation.", + "repeat_noise": null, + "repeats": [], + "run_count": 1 + }, + "disclosures": [ + { + "affects_comparability": false, + "code": "rtn_format_fixture", + "detail": "Local RTN-format fixture; optimizer-not-run; no model-quality or serving-kernel equivalence claim.", + "severity": "info" + }, + { + "affects_comparability": false, + "code": "reduced_run_count", + "detail": "this dataset is ONE cold capture (run_count 1, the DET-D4 floor is 5). Cross-run determinism is not asserted by the dataset; it is established by a second cold capture plus `fidelity-dataset compare --self-compare`, whose exactly-0.0 result is the SC-1 reproduction confirmation.", + "severity": "caveat" + } + ], + "format_version": 1, + "generation_sanity_probe": { + "degenerate": false, + "enforced": false, + "entropy_nats": 5.548019647470335, + "expect": null, + "logit_spread": 0.986328125, + "note": "one extra window through the same schedule; its hidden state is discarded and never enters the dataset.", + "prompt": "The capital of France is", + "schema": "malaiwah.generation-sanity-probe.v1", + "status": "recorded", + "top1_id": 113, + "top1_probability": 0.006720104384265371, + "top1_text": "�", + "top_k": [ + { + "id": 113, + "probability": 0.006720104384265371, + "text": "�" + }, + { + "id": 237, + "probability": 0.006412368399474785, + "text": "�" + }, + { + "id": 193, + "probability": 0.006035639491843906, + "text": "\u0001" + }, + { + "id": 236, + "probability": 0.0055386141320063614, + "text": "�" + }, + { + "id": 44, + "probability": 0.0054740873228682424, + "text": "I" + } + ], + "uniform_entropy_nats": 5.560681631015528, + "vocab_size": 260 + }, + "head": { + "applied_in_capture": false, + "bias": null, + "bits": 16, + "compat_tensor_key": "weight", + "dtype": "BF16", + "equality_receipt": null, + "file": "head/weight.safetensors", + "file_sha256": "07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913", + "final_norm": { + "applied_at_replay": false, + "applied_in_capture": true, + "dtype": null, + "file": null, + "file_sha256": null, + "shape": null, + "tensor_content_sha256": null, + "tensor_key": null + }, + "head_json": "head/head.json", + "present": true, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "shape": [ + 260, + 64 + ], + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "tensor_key": "lm_head.weight" + }, + "interop": { + "adapted_from": null, + "compatible_with": [ + "kimi-k3-distribution-fidelity/1" + ], + "divergences": [ + { + "field": "head", + "id": "D-1", + "reason": "every capture declares its OWN head identity by tensor content digest; the comparator refuses a hidden-form comparison across differing heads." + }, + { + "field": "runtime.lane", + "id": "D-2", + "reason": "lane is required and gated at compare time so registry BIAS-006 is checked before a number exists, not at submission." + }, + { + "field": "panel.scoring_window", + "id": "D-3", + "reason": "scoring_window is part of panel identity, not a comparator flag: a score_from=1024 number is a different panel, not a variant." + }, + { + "field": "comparison_kind", + "id": "D-4", + "reason": "self-compare is a first-class mode asserting exactly 0.0." + }, + { + "field": "estimator.accumulation_dtype", + "id": "D-5", + "reason": "required, fp64 default; an fp32 estimator lands in a different comparability class on the same data and that must be visible." + }, + { + "field": "coverage", + "id": "D-6", + "reason": "declared vs present record counts with shard_of; fixes our own manifest that claimed 5,120 captures in a 512-file repository." + }, + { + "field": "panel", + "id": "D-7", + "reason": "the panel is a separately referenceable object, which is what makes a candidate capture publishable standalone." + }, + { + "field": "capture.lossy_codec", + "id": "D-8", + "reason": "lets a llama.cpp .kld be ingested without laundering a lossy capture as exact." + }, + { + "field": "capture.records[].attention_mask_sha256", + "id": "D-9", + "reason": "our packed and streaming lanes vary mask construction; a single-request capture path makes it invariant and has no equivalent field." + }, + { + "field": "capture.head_separable", + "id": "D-10", + "reason": "hidden form is the default; logit form must declare head_separable:false with a reason." + } + ], + "k3_compat_emitted": false, + "note": null + }, + "panel": { + "contamination": { + "checked": false, + "hits": null, + "method": "not established", + "receipt": null + }, + "context_length": 64, + "contexts": 4, + "panel_file": "panel/panel.json", + "panel_file_sha256": "68efa258ea3c5d4ba759c3c15aadd6e8c984711831bea3f335903109345cdcef", + "panel_id": "panel--panel", + "panel_receipt_file": "panel/panel-receipt.json", + "panel_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "panel_token_sha256_legacy": "3c9467c85be43d238926f6d18bf825c2e4748814c95b8b0e8b8f1420546c3089", + "remap_file": null, + "repository": null, + "revision": null, + "scored_positions_total": 252, + "scoring_window": { + "dropped_positions_total": 0, + "min_left_context_tokens": 1, + "policy": "every causal prediction position of every window is scored; nothing is dropped", + "score_from": 0, + "windowed": false + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } + }, + "runtime": { + "backend_identity_sha256": null, + "file": "runtime/capture-runtime.json", + "file_sha256": "a8068c471e36a871db3517160cf5016041d0a6d8a528f70485efb0defe7b1e2a", + "lane": "other", + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "lane_inferred": false, + "runtime_reader_sha256": null, + "source": "native", + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd" + }, + "schema": "malaiwah.fidelity-dataset.v1", + "scope": { + "assignments": [ + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "embed_tokens", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "attn.qkv", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "attn.o", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "mlp.gate", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "mlp.up", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "mlp.down", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "moe.experts", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "norm", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "lm_head", + "treatment": "native" + } + ], + "head_policy": "native", + "kv_cache_dtype": "bf16", + "policy": "native", + "scope_digest": "attn.o=native:bf16@16|attn.qkv=native:bf16@16|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=native:bf16@16|mlp.gate=native:bf16@16|mlp.up=native:bf16@16|moe.experts=native:bf16@16|norm=native:bf16@16|head=native|kv=bf16" + }, + "seal": { + "checksums_file": "checksums.txt", + "checksums_format": "sha256sum", + "checksums_sha256": "6f0c926bcc8d40861499b2a7f0dfaf7c7fd2403807588d380cd33040050b3957", + "covers": [ + "every published file except checksums.txt and fidelity-dataset.json, via checksums.txt", + "fidelity-dataset.json itself, via the self-blanked seal", + "every capture tensor a second time by CONTENT, via capture.capture_content_digest" + ], + "excludes": [ + "checksums.txt", + "fidelity-dataset.json" + ], + "external_anchor": null, + "method": "self_blanked_canonical_json_sha256", + "seal_field": "dataset_sha256" + }, + "upstream_receipts": [], + "weights": { + "artifact_ref": null, + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "codec": null, + "config_sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "declared_bits": null, + "declared_head_bits": 16, + "index_sha256": null, + "model_ref": null, + "model_revision": null, + "quantized": false, + "repository": "/tmp/qfs-complete-tiny-fixture/model", + "revision": null + } +} diff --git a/raw/candidates/ct-nvfp4/evidence/root/head/head.json b/raw/candidates/ct-nvfp4/evidence/root/head/head.json new file mode 100644 index 0000000000000000000000000000000000000000..cfb1d748d203487673352f1ad645cb98a49c4002 --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/root/head/head.json @@ -0,0 +1,34 @@ +{ + "applied_in_capture": false, + "bias": null, + "bits": 16, + "compat_tensor_key": "weight", + "dtype": "BF16", + "equality_receipt": null, + "file": "head/weight.safetensors", + "file_sha256": "07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913", + "final_norm": { + "applied_at_replay": false, + "applied_in_capture": true, + "dtype": null, + "file": null, + "file_sha256": null, + "shape": null, + "tensor_content_sha256": null, + "tensor_key": null + }, + "format_version": 1, + "note": "the head is shipped verbatim from the checkpoint so a third party can replay logits = hidden @ head^T without the weights", + "present": true, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "receipt_sha256": "2da3cfbfc607296b3bb32eb6fec1f122e4ce30fe9ea96653e5bb1b4ebab6514f", + "schema": "malaiwah.fidelity-head-identity.v1", + "shape": [ + 260, + 64 + ], + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "tensor_key": "lm_head.weight" +} diff --git a/raw/candidates/ct-nvfp4/evidence/root/head/weight.safetensors b/raw/candidates/ct-nvfp4/evidence/root/head/weight.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..abe6e7c215a73bc88e85042067923bf943118086 --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/root/head/weight.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913 +size 33365 diff --git a/raw/candidates/ct-nvfp4/evidence/root/panel/masks/context-0000.npy b/raw/candidates/ct-nvfp4/evidence/root/panel/masks/context-0000.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/root/panel/masks/context-0000.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/ct-nvfp4/evidence/root/panel/masks/context-0001.npy b/raw/candidates/ct-nvfp4/evidence/root/panel/masks/context-0001.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/root/panel/masks/context-0001.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/ct-nvfp4/evidence/root/panel/masks/context-0002.npy b/raw/candidates/ct-nvfp4/evidence/root/panel/masks/context-0002.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/root/panel/masks/context-0002.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/ct-nvfp4/evidence/root/panel/masks/context-0003.npy b/raw/candidates/ct-nvfp4/evidence/root/panel/masks/context-0003.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/root/panel/masks/context-0003.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/ct-nvfp4/evidence/root/panel/panel-receipt.json b/raw/candidates/ct-nvfp4/evidence/root/panel/panel-receipt.json new file mode 100644 index 0000000000000000000000000000000000000000..fbc2ce3e8e9602a492d83ae681817e0fa02e4173 --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/root/panel/panel-receipt.json @@ -0,0 +1,376 @@ +{ + "corpus": { + "documents_considered": 4, + "documents_selected": 4, + "path_prefix": "embedded-synthetic/", + "repository": null, + "revision": null, + "source": "Synthetic texts embedded verbatim in this sealed receipt and builder." + }, + "created_utc": "2026-09-07T00:00:00Z", + "created_utc_policy": "Fixed artifact epoch for deterministic bytes; not an execution timestamp.", + "documents": [ + { + "bytes": 135, + "document": "garden.txt", + "document_sha256": "2aca14290cd4753c3b15d8a20aaa7a6963d2cb48d78e8538a4ce34d4665dcb94", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "garden", + "text_utf8": "The small garden has red flowers, green leaves, and a stone path. A gentle breeze moves the branches while a robin sings near the gate.", + "tokens_total": 137, + "window_id": "final-0000" + }, + { + "bytes": 144, + "document": "arithmetic.txt", + "document_sha256": "b867a2e8cbe81cc8d5781bfe6718a43e171fb5c7c138b9ed6ac86bebc24bca83", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "arithmetic", + "text_utf8": "A shelf holds three blue boxes and five red boxes. There are eight boxes in total. Move two boxes to the desk and count the six boxes remaining.", + "tokens_total": 146, + "window_id": "final-0001" + }, + { + "bytes": 162, + "document": "code.txt", + "document_sha256": "08c8f75f45899cbc9656a7a3fcdbf3092abfa7bc97fe353957b08d7e9660240b", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "code", + "text_utf8": "def add_values(left, right):\n return left + right\n\nresult = add_values(7, 9)\nprint(result)\n# This readable snippet is synthetic input, not a coding benchmark.\n", + "tokens_total": 164, + "window_id": "final-0002" + }, + { + "bytes": 140, + "document": "instructions.txt", + "document_sha256": "1dba5052b28929f94f322ad9e8c0b238bcbd653d6fae54ebaea8e5e3f6073378", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "instructions", + "text_utf8": "First place a clean cup on the table. Next pour cool water into the cup. Finally put the bottle away and write a short note about the steps.", + "tokens_total": 142, + "window_id": "final-0003" + } + ], + "environment": { + "numpy": "2.5.3", + "tokenizers": "0.23.2", + "transformers": "5.16.1" + }, + "format_builder": "engines/tools/build_token_panel.py", + "format_builder_sha256": "30eb4d4d7e465aaa8d9ef2d947a0ac7fd42ec45388f20c8b6db242c88dc2d851", + "format_version": 1, + "panel_id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "panel_name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "parameters": { + "context_length": 64, + "generation_seed": null, + "generation_seed_policy": "No RNG is used.", + "prediction_positions_per_window": 63, + "scored_positions_total": 252, + "strata": [ + "garden", + "arithmetic", + "code", + "instructions" + ], + "windows_per_stratum": 1, + "windows_total": 4 + }, + "receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "resolver_sha256": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "schema": "malaiwah.token-panel-build-receipt.v1", + "selection_rule": "Four embedded readable synthetic documents in declared order; native tokenizer with add_special_tokens=True, truncation=True, max_length=64, padding=False; each encoded window must be exactly 64 tokens; no chat template; all 63 shifted next-token positions scored; no RNG.", + "separation": { + "checked": false, + "method": "No contamination scan or benchmark selection.", + "note": "Authored synthetic CPU smoke inputs for a random-init model; not a benchmark, held-out quality claim, or registry-row submission." + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "add_special_tokens": true, + "chat_template_applied": false, + "class": "TokenizersBackend", + "files_sha256": { + "config.json": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "generation_config.json": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "tokenizer.json": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "tokenizer_config.json": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + }, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "local_files_only": true, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "trust_remote_code": false, + "vocab_size": 260 + }, + "tool": "build_panel.py", + "tool_sha256": "f17b17262816676d6ededcc969756ac07ff991eab73117040ec41005f6ff63f3" +} diff --git a/raw/candidates/ct-nvfp4/evidence/root/panel/panel.json b/raw/candidates/ct-nvfp4/evidence/root/panel/panel.json new file mode 100644 index 0000000000000000000000000000000000000000..cedb9d5e3c635860791c55451fde6dc9e37cddb9 --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/root/panel/panel.json @@ -0,0 +1,298 @@ +{ + "contamination": { + "checked": false, + "hits": null, + "method": "not established", + "receipt": null + }, + "context_length": 64, + "contexts": 4, + "format_version": 1, + "name": "token panel panel--panel", + "panel_id": "panel--panel", + "panel_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "panel_token_sha256_legacy": "3c9467c85be43d238926f6d18bf825c2e4748814c95b8b0e8b8f1420546c3089", + "positions_per_context": 63, + "receipt_sha256": "8a4e27a74ca6ce39569b78c3d972077ab7966f6da118110b3b08adca1e284c6f", + "records": [ + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0000.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 0, + "document_id": "embedded-synthetic/garden.txt", + "domain": "garden", + "index": 0, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0000.json", + "token_ids_first16": [ + 1, + 55, + 75, + 72, + 224, + 86, + 80, + 68, + 79, + 79, + 224, + 74, + 68, + 85, + 71, + 72 + ], + "token_ids_json_sha256": "08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315", + "token_ids_last16": [ + 224, + 68, + 81, + 71, + 224, + 68, + 224, + 86, + 87, + 82, + 81, + 72, + 224, + 83, + 68, + 2 + ], + "token_ids_sha256_legacy": "9d5378f0316be57e37f80d2bae7895ba4a1140c302c87ff8cce2fbd9afc83b77", + "window_id": "final-0000", + "window_index": 0 + }, + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0001.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 1, + "document_id": "embedded-synthetic/arithmetic.txt", + "domain": "arithmetic", + "index": 1, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0001.json", + "token_ids_first16": [ + 1, + 36, + 224, + 86, + 75, + 72, + 79, + 73, + 224, + 75, + 82, + 79, + 71, + 86, + 224, + 87 + ], + "token_ids_json_sha256": "5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46", + "token_ids_last16": [ + 72, + 86, + 17, + 224, + 55, + 75, + 72, + 85, + 72, + 224, + 68, + 85, + 72, + 224, + 72, + 2 + ], + "token_ids_sha256_legacy": "e0f95114b71a46cb489539dc38909fb67fb378f25fafbb513e32690cc7f11b37", + "window_id": "final-0001", + "window_index": 1 + }, + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0002.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 2, + "document_id": "embedded-synthetic/code.txt", + "domain": "code", + "index": 2, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0002.json", + "token_ids_first16": [ + 1, + 71, + 72, + 73, + 224, + 68, + 71, + 71, + 66, + 89, + 68, + 79, + 88, + 72, + 86, + 11 + ], + "token_ids_json_sha256": "51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07", + "token_ids_last16": [ + 85, + 76, + 74, + 75, + 87, + 202, + 202, + 85, + 72, + 86, + 88, + 79, + 87, + 224, + 32, + 2 + ], + "token_ids_sha256_legacy": "482b890c7b0e2f7400257c43680093b7f2b90d6df5361c6de3ae97ddfdd2504e", + "window_id": "final-0002", + "window_index": 2 + }, + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0003.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 3, + "document_id": "embedded-synthetic/instructions.txt", + "domain": "instructions", + "index": 3, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0003.json", + "token_ids_first16": [ + 1, + 41, + 76, + 85, + 86, + 87, + 224, + 83, + 79, + 68, + 70, + 72, + 224, + 68, + 224, + 70 + ], + "token_ids_json_sha256": "8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d", + "token_ids_last16": [ + 224, + 70, + 82, + 82, + 79, + 224, + 90, + 68, + 87, + 72, + 85, + 224, + 76, + 81, + 87, + 2 + ], + "token_ids_sha256_legacy": "12e01edd3900ff2ca82621feb5504f24b003a53c0afe98a9ee0b490eb93141d4", + "window_id": "final-0003", + "window_index": 3 + } + ], + "repository": null, + "revision": null, + "schema": "malaiwah.fidelity-panel-binding.v1", + "scored_positions_total": 252, + "scoring_window": { + "dropped_positions_total": 0, + "min_left_context_tokens": 1, + "policy": "every causal prediction position of every window is scored; nothing is dropped", + "score_from": 0, + "windowed": false + }, + "strata": {}, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "token_digest_algorithm": { + "aggregate": "sha256('\\n'.join(per_record_hex).encode('ascii'))", + "legacy_aggregate": "sha256(''.join(per_record_hex).encode('utf-8'))", + "legacy_per_record": "sha256(json.dumps(ids).encode('utf-8'))", + "per_record": "sha256(json.dumps(ids, separators=(',',':')).encode('utf-8'))" + }, + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } +} diff --git a/raw/candidates/ct-nvfp4/evidence/root/panel/tokens/context-0000.json b/raw/candidates/ct-nvfp4/evidence/root/panel/tokens/context-0000.json new file mode 100644 index 0000000000000000000000000000000000000000..c55b788f77dcb26a8c56fe6a7593353d57abb70f --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/root/panel/tokens/context-0000.json @@ -0,0 +1 @@ +[1,55,75,72,224,86,80,68,79,79,224,74,68,85,71,72,81,224,75,68,86,224,85,72,71,224,73,79,82,90,72,85,86,15,224,74,85,72,72,81,224,79,72,68,89,72,86,15,224,68,81,71,224,68,224,86,87,82,81,72,224,83,68,2] \ No newline at end of file diff --git a/raw/candidates/ct-nvfp4/evidence/root/panel/tokens/context-0001.json b/raw/candidates/ct-nvfp4/evidence/root/panel/tokens/context-0001.json new file mode 100644 index 0000000000000000000000000000000000000000..8304be93e5387811e155f869e175c0bfca57ca76 --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/root/panel/tokens/context-0001.json @@ -0,0 +1 @@ +[1,36,224,86,75,72,79,73,224,75,82,79,71,86,224,87,75,85,72,72,224,69,79,88,72,224,69,82,91,72,86,224,68,81,71,224,73,76,89,72,224,85,72,71,224,69,82,91,72,86,17,224,55,75,72,85,72,224,68,85,72,224,72,2] \ No newline at end of file diff --git a/raw/candidates/ct-nvfp4/evidence/root/panel/tokens/context-0002.json b/raw/candidates/ct-nvfp4/evidence/root/panel/tokens/context-0002.json new file mode 100644 index 0000000000000000000000000000000000000000..2a1413e634823a039c4ede6b463b549207c4c8fb --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/root/panel/tokens/context-0002.json @@ -0,0 +1 @@ +[1,71,72,73,224,68,71,71,66,89,68,79,88,72,86,11,79,72,73,87,15,224,85,76,74,75,87,12,29,202,224,224,224,224,85,72,87,88,85,81,224,79,72,73,87,224,14,224,85,76,74,75,87,202,202,85,72,86,88,79,87,224,32,2] \ No newline at end of file diff --git a/raw/candidates/ct-nvfp4/evidence/root/panel/tokens/context-0003.json b/raw/candidates/ct-nvfp4/evidence/root/panel/tokens/context-0003.json new file mode 100644 index 0000000000000000000000000000000000000000..7978732d7bf3bfc5fed35c837bc69d9d66371c4f --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/root/panel/tokens/context-0003.json @@ -0,0 +1 @@ +[1,41,76,85,86,87,224,83,79,68,70,72,224,68,224,70,79,72,68,81,224,70,88,83,224,82,81,224,87,75,72,224,87,68,69,79,72,17,224,49,72,91,87,224,83,82,88,85,224,70,82,82,79,224,90,68,87,72,85,224,76,81,87,2] \ No newline at end of file diff --git a/raw/candidates/ct-nvfp4/evidence/root/runtime/capture-runtime.json b/raw/candidates/ct-nvfp4/evidence/root/runtime/capture-runtime.json new file mode 100644 index 0000000000000000000000000000000000000000..76329196dc988c63b28f57b268fd6d31e589cdf9 --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/root/runtime/capture-runtime.json @@ -0,0 +1,245 @@ +{ + "capture_tool": { + "expert_fill": { + "bytes_filled": 294912, + "declined": {}, + "decoded_slices": 0, + "identity": "a byte copy into the fused parameter's slice; bin/selftest_layer_outer.py L4/L6 assert equality with from_pretrained and with the converter path", + "layers_filled": 3, + "mode": "direct", + "reference": "transformers.core_model_loading.MergeModulelist(dim=0) + Concatenate(dim=1)", + "slices_filled": 72, + "staged_slices": 72, + "staging": "pageable", + "targets_filled": 6 + }, + "file": "engines/tools/hf_capture.py", + "head_module_path": "lm_head", + "head_resolution": "lm_head", + "layer_residency": "stream", + "mechanism": "transformers forward pass, layer-outer/window-inner schedule: for each decoder layer the model's own forward is run once per window with the layers below replaying their memoised output and the layers above suspending, so each layer's weights are materialised once for the whole panel. Windows are pushed through sequentially, never batched. Forward pre-hook on model.get_output_embeddings(), fired by the model's own epilogue after the last layer", + "model_view": null, + "parallel_plan_dropped": false, + "resolved_classes": { + "config": "transformers.models.glm_moe_dsa.configuration_glm_moe_dsa.GlmMoeDsaConfig", + "model": "transformers.models.glm_moe_dsa.modeling_glm_moe_dsa.GlmMoeDsaForCausalLM" + }, + "resolved_panel_binding": { + "binding": { + "content": { + "archive": { + "algorithm": "sha256(ustar: sorted regular files; mode=0644; uid=gid=mtime=0)", + "bytes": 20480, + "compression": "none", + "format": "ustar", + "sha256": "389706dfa3335a75ec70a40d079995af1a60c05512334125dbd336790f12702f" + }, + "manifest": [ + { + "bytes": 192, + "path": "arrays/causal-mask-64.npy", + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02" + }, + { + "bytes": 384, + "path": "arrays/final-0000.tokens.npy", + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af" + }, + { + "bytes": 384, + "path": "arrays/final-0001.tokens.npy", + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea" + }, + { + "bytes": 384, + "path": "arrays/final-0002.tokens.npy", + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c" + }, + { + "bytes": 384, + "path": "arrays/final-0003.tokens.npy", + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a" + }, + { + "bytes": 4195, + "path": "panel.json", + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6" + }, + { + "bytes": 7808, + "path": "panel.receipt.json", + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263" + } + ], + "manifest_sha256": "e5f2d6410a6290da1197016c5b57ae522a3570665215ddc23e2a0bd45f912181" + }, + "panel": { + "bytes": 4195, + "context_length": 64, + "contexts": 4, + "file": "panel.json", + "id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "positions_per_context": 63, + "role": "final", + "scored_positions_total": 252, + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6", + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36" + }, + "receipt": { + "bytes": 7808, + "declared_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "file": "panel.receipt.json", + "receipt_file_sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "receipt_seal_mode": "self-blank" + }, + "schema": "malaiwah.resolved-panel.v1", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } + }, + "binding_file": "panel-binding.json", + "binding_file_sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "tokenizer_equivalences": [] + }, + "schedule": "layer-outer", + "sha256": "44afcdac9f7c9cb26a35a2b7d9c1aed562344b76c8045a753651d2f2dbae99d0", + "unexpected_tensor_allowlist": null, + "verified_code": null, + "version": "hf_capture/1", + "weights_decode": null, + "weights_license": null, + "wraps": [] + }, + "container": { + "image_digest": null, + "image_reference": null, + "image_repository_digest": null + }, + "format_version": 1, + "lane": "other", + "lane_identity_inputs": [ + "torch_version", + "cuda_runtime_version", + "device_name", + "grouped_mm_kernel", + "numeric_policy", + "attention_backend", + "experts_implementation", + "parallelism", + "ep_emulate", + "reduce_order" + ], + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "lane_inferred": false, + "receipt_sha256": "b292a04610b91fe4c7e345c72e8e2fd656817122c784e43d983be4ecef86952a", + "resources": { + "bytes": { + "checkpoint_read": 555744, + "hidden_d2h": 36616, + "weights_h2d": null + }, + "checkpoint_bytes": 572479, + "checkpoint_files": 2, + "device_name": null, + "forward_timing": "wall-clock", + "note": "provenance, not identity: peaks and stage seconds this run measured; forward_sum is device time under cuda-events, wall time otherwise; seal covers head serialisation up to this block's assembly", + "peak_cuda_allocated_bytes": null, + "peak_cuda_reserved_bytes": null, + "peak_resident_weight_bytes": 208032, + "peak_rss_bytes": 367255552, + "rss_units_source": "Linux ru_maxrss", + "seconds": { + "decode_sum": null, + "elapsed": 4.573, + "fill_sum": 0.011, + "forward_sum": 0.214, + "identity": 0.005, + "layer_load_max": 0.022, + "layer_load_sum": 0.073, + "layer_loads": 4, + "resident_load": 3.479, + "seal": 0.007 + } + }, + "runtime_environment": { + "cold_run": "20260907T165240Z-2062930", + "numeric_policy_observed": { + "NVIDIA_TF32_OVERRIDE": null, + "allow_tf32_cudnn": true, + "allow_tf32_matmul": false, + "deviates_from_default": false, + "float32_matmul_precision": "highest", + "observed_at": "seal time, after the forward" + }, + "python": "3.12.14" + }, + "schema": "malaiwah.fidelity-capture-runtime.v1", + "source_files": { + "bin/fidelity/codepin.py": "ce2a2c04d64adf7a268978a7ffe163c7d4cb5b675d5dc8e156f8a26a3b7bb5fd", + "bin/fidelity/panel.py": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "engines/tools/hf_capture.py": "44afcdac9f7c9cb26a35a2b7d9c1aed562344b76c8045a753651d2f2dbae99d0", + "engines/tools/layer_outer.py": "e3ea5715112663b1b60cf596eeffc2140e49b399809ece89a174bce41a969274" + }, + "stack_fingerprint": { + "attention_backend": "model default", + "cuda_runtime_version": null, + "device": "cpu", + "device_name": null, + "engine": "transformers-eager", + "numeric_policy": "default torch matmul precision; no TF32 override applied", + "schema": "malaiwah.stack-fingerprint.v1", + "torch_version": "2.11.0+cpu", + "transformers_version": "5.16.1" + }, + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd", + "upstream_receipts": [], + "weights": { + "checkpoint_files": [ + { + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "size": 1479 + }, + { + "name": "model.safetensors", + "sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1", + "size": 571000 + } + ], + "checkpoint_identity_algorithm": "sha256 over the canonical JSON {\"algorithm\": , \"files\": [{\"name\", \"size\", \"sha256\"}, ...]} of every *.safetensors shard plus config.json in the checkpoint directory, sorted by name; for a llama.cpp GGUF tree the shards are every *.gguf of the one build directory (name = /) and config.json is the official release's copy beside it", + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "model_revision": null, + "repository": "/tmp/qfs-complete-tiny-fixture/model", + "revision": null + } +} diff --git a/raw/candidates/ct-nvfp4/evidence/root/validation/structural-validation.json b/raw/candidates/ct-nvfp4/evidence/root/validation/structural-validation.json new file mode 100644 index 0000000000000000000000000000000000000000..fc9e935fa9555c9e78a2d9c830d09603008aea2a --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/root/validation/structural-validation.json @@ -0,0 +1,14 @@ +{ + "checks_run": [ + "pre-seal" + ], + "error_count": 0, + "errors": [], + "format_version": 1, + "receipt_sha256": "e119c65652612ff67b867992ad3c228bc641ef07313779c4f7fb572e2d4603f4", + "schema": "malaiwah.fidelity-structural-validation.v1", + "structural_status": "sealed", + "subject": "dataset:fidelity--quant-integration.root", + "warning_count": 0, + "warnings": [] +} diff --git a/raw/candidates/ct-nvfp4/evidence/smoke-evidence.json b/raw/candidates/ct-nvfp4/evidence/smoke-evidence.json new file mode 100644 index 0000000000000000000000000000000000000000..84c3471a14d2f580472a973caffe65364bd49361 --- /dev/null +++ b/raw/candidates/ct-nvfp4/evidence/smoke-evidence.json @@ -0,0 +1,167 @@ +{ + "kld_nats": 0.0007752665823432193, + "decode": { + "activation_quantization": null, + "checkpoint_bytes_read": 136664, + "comparison_class": "advisory", + "components_consumed": 330, + "components_not_consumed": [], + "components_planned": 330, + "formats_decoded": { + "nvfp4-pack-quantized": 110 + }, + "method": "microfloat-weight-reconstruction", + "modules_decoded": 110, + "modules_not_decoded": [], + "modules_planned": 110, + "output_dtype": "bfloat16", + "quantization_config": { + "config_groups": { + "group_0": { + "format": "nvfp4-pack-quantized", + "input_activations": null, + "output_activations": null, + "targets": [ + "model.layers.0.mlp.down_proj", + "model.layers.0.mlp.gate_proj", + "model.layers.0.mlp.up_proj", + "model.layers.0.self_attn.indexer.weights_proj", + "model.layers.0.self_attn.indexer.wk", + "model.layers.0.self_attn.indexer.wq_b", + "model.layers.0.self_attn.kv_a_proj_with_mqa", + "model.layers.0.self_attn.kv_b_proj", + "model.layers.0.self_attn.o_proj", + "model.layers.0.self_attn.q_a_proj", + "model.layers.0.self_attn.q_b_proj", + "model.layers.1.mlp.experts.0.down_proj", + "model.layers.1.mlp.experts.0.gate_proj", + "model.layers.1.mlp.experts.0.up_proj", + "model.layers.1.mlp.experts.1.down_proj", + "model.layers.1.mlp.experts.1.gate_proj", + "model.layers.1.mlp.experts.1.up_proj", + "model.layers.1.mlp.experts.2.down_proj", + "model.layers.1.mlp.experts.2.gate_proj", + "model.layers.1.mlp.experts.2.up_proj", + "model.layers.1.mlp.experts.3.down_proj", + "model.layers.1.mlp.experts.3.gate_proj", + "model.layers.1.mlp.experts.3.up_proj", + "model.layers.1.mlp.experts.4.down_proj", + "model.layers.1.mlp.experts.4.gate_proj", + "model.layers.1.mlp.experts.4.up_proj", + "model.layers.1.mlp.experts.5.down_proj", + "model.layers.1.mlp.experts.5.gate_proj", + "model.layers.1.mlp.experts.5.up_proj", + "model.layers.1.mlp.experts.6.down_proj", + "model.layers.1.mlp.experts.6.gate_proj", + "model.layers.1.mlp.experts.6.up_proj", + "model.layers.1.mlp.experts.7.down_proj", + "model.layers.1.mlp.experts.7.gate_proj", + "model.layers.1.mlp.experts.7.up_proj", + "model.layers.1.mlp.shared_experts.down_proj", + "model.layers.1.mlp.shared_experts.gate_proj", + "model.layers.1.mlp.shared_experts.up_proj", + "model.layers.1.self_attn.kv_a_proj_with_mqa", + "model.layers.1.self_attn.kv_b_proj", + "model.layers.1.self_attn.o_proj", + "model.layers.1.self_attn.q_a_proj", + "model.layers.1.self_attn.q_b_proj", + "model.layers.2.mlp.experts.0.down_proj", + "model.layers.2.mlp.experts.0.gate_proj", + "model.layers.2.mlp.experts.0.up_proj", + "model.layers.2.mlp.experts.1.down_proj", + "model.layers.2.mlp.experts.1.gate_proj", + "model.layers.2.mlp.experts.1.up_proj", + "model.layers.2.mlp.experts.2.down_proj", + "model.layers.2.mlp.experts.2.gate_proj", + "model.layers.2.mlp.experts.2.up_proj", + "model.layers.2.mlp.experts.3.down_proj", + "model.layers.2.mlp.experts.3.gate_proj", + "model.layers.2.mlp.experts.3.up_proj", + "model.layers.2.mlp.experts.4.down_proj", + "model.layers.2.mlp.experts.4.gate_proj", + "model.layers.2.mlp.experts.4.up_proj", + "model.layers.2.mlp.experts.5.down_proj", + "model.layers.2.mlp.experts.5.gate_proj", + "model.layers.2.mlp.experts.5.up_proj", + "model.layers.2.mlp.experts.6.down_proj", + "model.layers.2.mlp.experts.6.gate_proj", + "model.layers.2.mlp.experts.6.up_proj", + "model.layers.2.mlp.experts.7.down_proj", + "model.layers.2.mlp.experts.7.gate_proj", + "model.layers.2.mlp.experts.7.up_proj", + "model.layers.2.mlp.shared_experts.down_proj", + "model.layers.2.mlp.shared_experts.gate_proj", + "model.layers.2.mlp.shared_experts.up_proj", + "model.layers.2.self_attn.indexer.weights_proj", + "model.layers.2.self_attn.indexer.wk", + "model.layers.2.self_attn.indexer.wq_b", + "model.layers.2.self_attn.kv_a_proj_with_mqa", + "model.layers.2.self_attn.kv_b_proj", + "model.layers.2.self_attn.o_proj", + "model.layers.2.self_attn.q_a_proj", + "model.layers.2.self_attn.q_b_proj", + "model.layers.3.mlp.experts.0.down_proj", + "model.layers.3.mlp.experts.0.gate_proj", + "model.layers.3.mlp.experts.0.up_proj", + "model.layers.3.mlp.experts.1.down_proj", + "model.layers.3.mlp.experts.1.gate_proj", + "model.layers.3.mlp.experts.1.up_proj", + "model.layers.3.mlp.experts.2.down_proj", + "model.layers.3.mlp.experts.2.gate_proj", + "model.layers.3.mlp.experts.2.up_proj", + "model.layers.3.mlp.experts.3.down_proj", + "model.layers.3.mlp.experts.3.gate_proj", + "model.layers.3.mlp.experts.3.up_proj", + "model.layers.3.mlp.experts.4.down_proj", + "model.layers.3.mlp.experts.4.gate_proj", + "model.layers.3.mlp.experts.4.up_proj", + "model.layers.3.mlp.experts.5.down_proj", + "model.layers.3.mlp.experts.5.gate_proj", + "model.layers.3.mlp.experts.5.up_proj", + "model.layers.3.mlp.experts.6.down_proj", + "model.layers.3.mlp.experts.6.gate_proj", + "model.layers.3.mlp.experts.6.up_proj", + "model.layers.3.mlp.experts.7.down_proj", + "model.layers.3.mlp.experts.7.gate_proj", + "model.layers.3.mlp.experts.7.up_proj", + "model.layers.3.mlp.shared_experts.down_proj", + "model.layers.3.mlp.shared_experts.gate_proj", + "model.layers.3.mlp.shared_experts.up_proj", + "model.layers.3.self_attn.kv_a_proj_with_mqa", + "model.layers.3.self_attn.kv_b_proj", + "model.layers.3.self_attn.o_proj", + "model.layers.3.self_attn.q_a_proj", + "model.layers.3.self_attn.q_b_proj" + ], + "weights": { + "dynamic": false, + "group_size": 16, + "num_bits": 4, + "scale_dtype": "torch.float8_e4m3fn", + "strategy": "tensor_group", + "symmetric": true, + "type": "float" + } + } + }, + "format": "nvfp4-pack-quantized", + "ignore": [], + "quant_method": "compressed-tensors", + "quantization_status": "compressed" + }, + "reader_evidence": { + "decode_plan_sha256": "b460ed95a3e245541b4d510acbaa5efd96d1d87e0b04d2da3d97e814ee542427", + "gate_header_barrier": false, + "source_files": { + "engines/tools/affine_surface.py": "37e7074797d53ae836e0af12fdbd2dc36c88778098aa44c72c1cd936d2b4c053", + "engines/tools/microscale_surface.py": "588923f0a4700436221923c794a8c112971d9f08e75c746742b0f0ede7921682", + "engines/tools/nvfp4_surface.py": "044b6fd2ee22d58512476e96060f7fa09030212a33736da1393c0103eb73e0c8", + "engines/tools/quant_stream.py": "7c6cc4cbe399d066eaff80ccf1e3d3190185f194644f738a404d3c537ad8e1ab" + } + }, + "reference": "compressed-tensors@0.18.0; DeepSeek-V4-Flash@60d8d70770c6776ff598c94bb586a859a38244f1/inference/kernel.py; nvidia/Qwen3.8-Flash-Next-NVFP4@fc694b54fb0174e0913e6adf86691ef85a4ead47/config.json+headers", + "scientific_disclosure": "Stored-weight reconstruction only; no native quantized GEMM, activation arithmetic, or quantizer optimization quality claim.", + "scope": "weights_reconstructed" + }, + "comparison_class": "advisory" +} diff --git a/raw/candidates/ct-nvfp4/model/LICENSE b/raw/candidates/ct-nvfp4/model/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..71f32fb2284323cef90b3e784a7655747c8ae683 --- /dev/null +++ b/raw/candidates/ct-nvfp4/model/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Michel Belleau + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/raw/candidates/ct-nvfp4/model/build-manifest.json b/raw/candidates/ct-nvfp4/model/build-manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..539ac3c8e8430caad8e5c81ca4d23dce391cac14 --- /dev/null +++ b/raw/candidates/ct-nvfp4/model/build-manifest.json @@ -0,0 +1,1561 @@ +{ + "architecture_inspiration": "GLM-5.2-SIQ-Fruit-bf16 geometry and dense/MoE plus full/shared DSA schedules; no Fruit or GLM model weights reused.", + "files": { + "config.json": { + "bytes": 1479, + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + "generation_config.json": { + "bytes": 216, + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + "model.safetensors": { + "bytes": 571000, + "sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1" + }, + "tokenizer.json": { + "bytes": 6763, + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + "tokenizer_config.json": { + "bytes": 236, + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + }, + "generation": "Native GlmMoeDsaForCausalLM random initialization in FP32, rounded to the published BF16 artifact; native router correction buffers retained FP32.", + "generator_sha256": "19c3489f1bc7e8e9323cb26afbead562816a6918d6823af252eb6d04dff8e81e", + "limitations": [ + "Random initialization; not trained or distilled.", + "Not a quantization or behavioral approximation of a released GLM model.", + "MTP intentionally absent (zero next-n-prediction layers); no unmatched MTP tensors.", + "This build manifest describes generated bytes, not proof of clean loading or capture; see separately measured verification evidence." + ], + "parameter_count": 277824, + "schema": "malaiwah.glm-moe-dsa-tiny-build.v1", + "seed": 20260907, + "stored_elements": 277848, + "tensor_count": 139, + "tensors": [ + { + "bytes": 33280, + "dtype": "torch.bfloat16", + "elements": 16640, + "name": "lm_head.weight", + "sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "shape": [ + 260, + 64 + ] + }, + { + "bytes": 33280, + "dtype": "torch.bfloat16", + "elements": 16640, + "name": "model.embed_tokens.weight", + "sha256": "18df1b3a5f263a31f5bd4225c3c4629573b75e47b7e28b6e73501586bb47d6f1", + "shape": [ + 260, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.0.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 16384, + "dtype": "torch.bfloat16", + "elements": 8192, + "name": "model.layers.0.mlp.down_proj.weight", + "sha256": "101a9db78e4e21058dcb6f5240e751bcaf3bd662b98696a63a719f86ecabf787", + "shape": [ + 64, + 128 + ] + }, + { + "bytes": 16384, + "dtype": "torch.bfloat16", + "elements": 8192, + "name": "model.layers.0.mlp.gate_proj.weight", + "sha256": "ef5262b354f74dce3a9dc4c3134e4db8cbf63f03ed8a1cd78ebb3e9a05af97cc", + "shape": [ + 128, + 64 + ] + }, + { + "bytes": 16384, + "dtype": "torch.bfloat16", + "elements": 8192, + "name": "model.layers.0.mlp.up_proj.weight", + "sha256": "359b4dac1da3e3956583050af84147aef2f41b8680a85b32083ffd0e1847d997", + "shape": [ + 128, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.0.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.0.self_attn.indexer.k_norm.bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 16 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.0.self_attn.indexer.k_norm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 512, + "dtype": "torch.bfloat16", + "elements": 256, + "name": "model.layers.0.self_attn.indexer.weights_proj.weight", + "sha256": "50ca7a10fe9a0556d8c3ad38bd3f715ee6c6e13084b4cb6b51b2ef78f57c53b2", + "shape": [ + 4, + 64 + ] + }, + { + "bytes": 2048, + "dtype": "torch.bfloat16", + "elements": 1024, + "name": "model.layers.0.self_attn.indexer.wk.weight", + "sha256": "f724d0b2c09ba9ae41cfc3fbe4e458bd7f644e5f0fb8c1446e19b3cf8c650274", + "shape": [ + 16, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.0.self_attn.indexer.wq_b.weight", + "sha256": "048349f93320b7625130fa5abc86dbcc89715b9f02d6853284563e765eb7bc11", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.0.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.0.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "5ad58e7c4515d8c4e84ecf10ecfa7aacb3c39ee1d6a3219307036bd8b59f529d", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.0.self_attn.kv_b_proj.weight", + "sha256": "9a8cfdd6e51c3868d27f147509d24549480e70f278758a8c16adf1ea5c197938", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.0.self_attn.o_proj.weight", + "sha256": "734b1edea5c19958ab29dfba4314ab5a5a25280be3db3de20b82b2e7c78c35ff", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.0.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.0.self_attn.q_a_proj.weight", + "sha256": "6d6e018ec4d4251755a002469f0778accef3b7628062f82a5d292d4130fd4c85", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.0.self_attn.q_b_proj.weight", + "sha256": "28ef2f379f06054843ff97f99d63f515a2f583059dd49fd894a53d04733f0650", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.1.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.0.down_proj.weight", + "sha256": "a0378aa3bb69ed49af25a51d57476ef63ccf5dc98bc4d3008d28660e16f82492", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.0.gate_proj.weight", + "sha256": "e6c7b0ce29c7e6ea16adfd8423cd9a8a27f1be217a2061a635468c9e5603439c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.0.up_proj.weight", + "sha256": "528f777edc3fc406c76dc1e150a648c23009c701134a3a86dcbdeb15f8ddc4bb", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.1.down_proj.weight", + "sha256": "c966c5eed64d8bb32ff5cf25587fc4eb714b7536b6f670725efb136acc6ca26c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.1.gate_proj.weight", + "sha256": "e55ceb89e6891b34fb67fe5c99b529a1cab9729bea2f6ef08be6af7eefcf6c2e", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.1.up_proj.weight", + "sha256": "46b43c2f3a025bab46be05795bb60916e592bb58d4fdf2a18d2e88d37a7a4fb8", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.2.down_proj.weight", + "sha256": "a649be4fd07f95d770fbe14e87561a13f62f155d2053b8a35fa6962b5d5e8c8d", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.2.gate_proj.weight", + "sha256": "5560e590344e57ff54425f4aa6c07edaaade8c73343e32c27199f1c0dc61fe51", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.2.up_proj.weight", + "sha256": "35a639103a8a914203b4dde3f87d197515879ae6ca72557cde8ea9dea6e6e0d2", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.3.down_proj.weight", + "sha256": "0969db499dfe821348b3c06873d36635f7216f1f595968ad43ae984b57565205", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.3.gate_proj.weight", + "sha256": "75c5c77c39a77a4a6dbe7b601a88814bca9cae6fcde0069ff2ca86352e6c13e7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.3.up_proj.weight", + "sha256": "241533cb545cfed7685091b023213c9d530cb54431a712eba7bf3aaebdae3b53", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.4.down_proj.weight", + "sha256": "ca1273d291e431a10b8d8c2170031b29440c2bec8bc1d7f46353990c7fe1a03f", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.4.gate_proj.weight", + "sha256": "69dc9149cbfd65fb10bd6c11f99357d279d471e5874cf19dbef7cfd8ee4d796c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.4.up_proj.weight", + "sha256": "81cb04732e3cc53acb1152c7fc06a6399af18a5f282762cb72abb56b1e6b7c6f", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.5.down_proj.weight", + "sha256": "ebd8e01f9c2daf657e915575afb3ff5ba261a2a83c25c9c50818319dd587a2f2", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.5.gate_proj.weight", + "sha256": "bc70a7d1a5263ca17d00766bb2dc48e1debb815344150741e55dea48af4d75c0", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.5.up_proj.weight", + "sha256": "f84a95d64728067676d4f7b61ac4a589fa11e45226a8996a4719d65f0b018dbf", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.6.down_proj.weight", + "sha256": "00535633e5d98b7a527cc1198d572a9104405e2aff7ee303ae60195654fb24c2", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.6.gate_proj.weight", + "sha256": "2bb299a5e306108c7af11aa5c6114abeb4d06bde9001e6f7644e0d9dca184dc5", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.6.up_proj.weight", + "sha256": "72df8a498b866a242abc9383b16c5b4428feadab02c7f274afa28653e8586107", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.7.down_proj.weight", + "sha256": "90331ab3da1e867c32d3db1aac94c69c86349dbb539400ed9e0c19c148bf5e43", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.7.gate_proj.weight", + "sha256": "576a9df3d1d72f7323e8a8490118821d826f50c9403ca7ecbe196277e62c7730", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.7.up_proj.weight", + "sha256": "3869533066e5bca84402355c6b80b177424f2d79d2b97cbb9cff30eee748135f", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.float32", + "elements": 8, + "name": "model.layers.1.mlp.gate.e_score_correction_bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 8 + ] + }, + { + "bytes": 1024, + "dtype": "torch.bfloat16", + "elements": 512, + "name": "model.layers.1.mlp.gate.weight", + "sha256": "7d1dbc5cc90900cdc1f9d4a241c8b62d0ad50de09231f9f036cce33982cfdfe7", + "shape": [ + 8, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.shared_experts.down_proj.weight", + "sha256": "eb5297f619dfdfb40419b3330406e8ff43cb0fe35797911f2de6ebff4b95690a", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.shared_experts.gate_proj.weight", + "sha256": "eeeff2280eef91eac1215b28717f2b7fdee09fdbfd484ff44855e7e7cdd11718", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.shared_experts.up_proj.weight", + "sha256": "dab5aeab83d842104e1c5557b9b6d6cb5fe519284b909e8c0c975c752dc92d41", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.1.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.1.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.1.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "bff5998ab14190d56392c70e92927904d84a2b9d04ee222967d774a5bb5eecc4", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.1.self_attn.kv_b_proj.weight", + "sha256": "876302ef3f8bba74a997f973913ca4b802aa488d27b46747c470062c9a7ebee5", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.1.self_attn.o_proj.weight", + "sha256": "ecda88672dc8fbc3bac348fa6118010e51b170d8fe3596a811bc9aa95f71915c", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.1.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.self_attn.q_a_proj.weight", + "sha256": "29fc979642704e621b0b6b59a24c13d6900782bfa9655ea9a3311c1d4c69770a", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.self_attn.q_b_proj.weight", + "sha256": "01bae246d61c4d08e751e42e6a03315b55266ae46bd15b34bd343f606a538349", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.2.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.0.down_proj.weight", + "sha256": "8c1c19d08541dc9251736b480f53cfefd21bfbcb0b4e9f725dc66e6c52d7705c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.0.gate_proj.weight", + "sha256": "8c326913b2ef159b507b584c1ae018619573a09b6f41ab687df629d3685884c4", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.0.up_proj.weight", + "sha256": "8611bc004f735fbc1c14a9c9c23f4150c7e754127e44926a44efd0b767a653ed", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.1.down_proj.weight", + "sha256": "1d4d668c4c8183e5991eefe780a138eda70578a4740c07df5b386f233cb4e5c3", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.1.gate_proj.weight", + "sha256": "21224f6173f4785ff6252dd0c1f7a6937b36bbd5bc1c20d25feecc85d6d25f3e", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.1.up_proj.weight", + "sha256": "05542672d0174f9ddfee4bd385b56455c004532da88bf34363b1e543948bf899", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.2.down_proj.weight", + "sha256": "7330dee9a6a416e9922f61d10ee0507584e007cbdd349131471b43a745b6fed8", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.2.gate_proj.weight", + "sha256": "eca5904e6634e97ca89e7dfb1f12774f78adb33b78256136e7e8ee522af92d96", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.2.up_proj.weight", + "sha256": "5a90748752e46844a0cf0efd84c16ec2db25315ffa7a13b9c4bff2697d00bbf6", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.3.down_proj.weight", + "sha256": "a42569462225d60158dfaf24406463f135b632fe258e66ae2e521efed502a37c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.3.gate_proj.weight", + "sha256": "8cf448df350984fe0429a1ca3b2081315b594e50ce85fbc2e9f63eafb8a896b7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.3.up_proj.weight", + "sha256": "54a1269ba638d42c7d6d3926826b04d52310c82804fddcd73c253680a4270032", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.4.down_proj.weight", + "sha256": "5a236edfdc8fc79f687cec866d13724515b8f26465dca2ffde051d0870d5d0ac", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.4.gate_proj.weight", + "sha256": "6c18140a11c9986f99b7c269da01a8f69f1b5215c41be1801d6900eb511bdc76", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.4.up_proj.weight", + "sha256": "7b964f5c207a6bbeaa589a6c07f9665967aca4e7c57148190ed6a6f12e0ca572", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.5.down_proj.weight", + "sha256": "74c2633e7d3b0bf844d3e3812533774fc09b6552435e778e68b442ad161c0985", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.5.gate_proj.weight", + "sha256": "6177166c1bc51e03fde63b60d85347f5a5412446df5b4dd893817d18fcf0d56c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.5.up_proj.weight", + "sha256": "7bb8e1f65a918589a1593926dc93bf3fa1329f5d31f16266c3ad6fe0fd390d47", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.6.down_proj.weight", + "sha256": "af74e303b86b1aec96fd69b64d39848d7d08f255822739cf7d5f4456de67f010", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.6.gate_proj.weight", + "sha256": "c4fc94863e17270bf8cb5a18d3a125bea82d04bfb38457fd27896a00ddeea056", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.6.up_proj.weight", + "sha256": "4e92bebe11c518a225d75d4d7de7b85f9a82baad7a961ac090dd7343a612b577", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.7.down_proj.weight", + "sha256": "8971d6a869ba59445fe28163bd73c74c8338e0b8b675f008277b5a8973967bb2", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.7.gate_proj.weight", + "sha256": "3f90ff90c18d50349a50d11c472d48c6b297496ba5bedfe4ff0da257e1e2fdef", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.7.up_proj.weight", + "sha256": "5a2fcecdbb84a9138b4dd32da15793393aeaee1d00da95ed3d55803b1f45cc86", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.float32", + "elements": 8, + "name": "model.layers.2.mlp.gate.e_score_correction_bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 8 + ] + }, + { + "bytes": 1024, + "dtype": "torch.bfloat16", + "elements": 512, + "name": "model.layers.2.mlp.gate.weight", + "sha256": "aa35eb60ee6dd8e32728c95210b15016120675b111542f36ee1b1cca64668f9d", + "shape": [ + 8, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.shared_experts.down_proj.weight", + "sha256": "e8a1e6e8db3b1996aad9cd457ae20aa5aaac876d400fd6e8d764f543ff7833b9", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.shared_experts.gate_proj.weight", + "sha256": "c5b456aab9a02d3828987060b24d24c07e7b611d3036f0d5c28662c922d1238d", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.shared_experts.up_proj.weight", + "sha256": "6a84e814bd21fcc17878151b94508853dd70099787ef5303cdc06f90b6cd7092", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.2.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.2.self_attn.indexer.k_norm.bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 16 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.2.self_attn.indexer.k_norm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 512, + "dtype": "torch.bfloat16", + "elements": 256, + "name": "model.layers.2.self_attn.indexer.weights_proj.weight", + "sha256": "d65c6e5c3f34fcad47b7137c46dd3bcd6d5cf24ce508df7fad9d20788d3a18b8", + "shape": [ + 4, + 64 + ] + }, + { + "bytes": 2048, + "dtype": "torch.bfloat16", + "elements": 1024, + "name": "model.layers.2.self_attn.indexer.wk.weight", + "sha256": "917ff454cb253fa0e5d3d68bf15e716401bb928fbd7cd260a348afec25b1b2c8", + "shape": [ + 16, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.self_attn.indexer.wq_b.weight", + "sha256": "3fe5b407fe2d74a0dda78b6cb7ae3f65066a781fd5f81971b83be600fc911d14", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.2.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.2.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "26cecf47e8fb14a837f760549a9b9dd8589c37dc76870f8b115d4ab634b853ab", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.2.self_attn.kv_b_proj.weight", + "sha256": "23447f5f72c55b0cd7acd571ff1317c16c8097e9f0de4cc9b66101b51f7988c1", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.2.self_attn.o_proj.weight", + "sha256": "a1a0c84b3214c9b7b00c438754280833964cdc719aadeff64358b3d09b2063d8", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.2.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.self_attn.q_a_proj.weight", + "sha256": "3eda4fc6a047b282d63ad2884d870ee8150a99f3c71d21031ea71e749cf39815", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.self_attn.q_b_proj.weight", + "sha256": "58ecb919757c3c93d6a43b9344236d9abd32870e68907f37cb8db779d2c93fff", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.3.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.0.down_proj.weight", + "sha256": "e8c77c987baa36019ce1adf05e02e2a31395286e584428b2049e06331848c216", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.0.gate_proj.weight", + "sha256": "69871151865d8a23e2cc39b9fe5da60eb4f41cb6c053520f29d7c7b58e6fa5e0", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.0.up_proj.weight", + "sha256": "12df1ea42b96e959785c09427c3ca3bcdc53aa7942d15187c7b1e19bdd66d08a", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.1.down_proj.weight", + "sha256": "5feaa5de7da59348b465458b8aff5373b11dae8b5150f8e7bb8015acc172e3ff", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.1.gate_proj.weight", + "sha256": "e907e6e36b7266d56e190c1e56551e0a40d64741ce668328d898c17b488ec6c9", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.1.up_proj.weight", + "sha256": "c0062ef6004073cbabf3098703b5f565f0e973e094d90c3eba36c7be471f947e", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.2.down_proj.weight", + "sha256": "efec1e8a6a5e12a6db226699e10a6d346fa95c453009f148fe304d378567f5fe", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.2.gate_proj.weight", + "sha256": "7722cc87a7696f53e7f1e0d741230a7db18d2c324f7faec742a9621c75189cb7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.2.up_proj.weight", + "sha256": "5917df5932d0ce4854458ce357a8a2c3384bc463531996875d1c68c6ea17734c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.3.down_proj.weight", + "sha256": "fd331dc77911f8d80ddfdee938993a08b3715d06767901879c5a55700dbb8961", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.3.gate_proj.weight", + "sha256": "1e8aa3749cdc3d21baf7108c47bb69ad4a532c1f41c0556ca8d68ca2c226a7a8", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.3.up_proj.weight", + "sha256": "858e72360951a5073d117a75b2cd759bc3503c6c270388b30fe73d7554f54dae", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.4.down_proj.weight", + "sha256": "b80cf998a1db7569ca4600388bbe4c6d20bd7fe7209c4e37b5de015041d01423", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.4.gate_proj.weight", + "sha256": "b39a0f5b9cd6f9175e7fa29b342772476caf8a76dad1c34d88075988c1894853", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.4.up_proj.weight", + "sha256": "cef4d7b5fb77e750e91c17cae1622a6362ba204b1b30bf5ed7b65f9e6ed15ff1", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.5.down_proj.weight", + "sha256": "65a04840ec88842630cc6f120899a3bfa6151990d7411bfe44839727648e4d03", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.5.gate_proj.weight", + "sha256": "101836900c549af917f8392a6b1428e2f14e4e1f1ef0fdd9b04e79b98c1c3d02", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.5.up_proj.weight", + "sha256": "4fc8edda4b1a92a43be268a8b249274dd5f4370fd6ea6a3134b8c2c4cf730d95", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.6.down_proj.weight", + "sha256": "fd3a10e1464c20bf5e575c105f39882bcbddcab892ef36f24e5a852d597ee7ef", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.6.gate_proj.weight", + "sha256": "8211aaeed6f1ea2711aa1865309d2d36742c0b41021eea1e00fcac45dc353b4b", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.6.up_proj.weight", + "sha256": "ec4f5d1acc5d045de6ae4106bc8f52d17d64ac355c910f12fac8b1b0b573296d", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.7.down_proj.weight", + "sha256": "03c257936ec78df3f941fe0ca4ce5aad636654cf2a351b64515ac07ad8871cae", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.7.gate_proj.weight", + "sha256": "67c1e28fd0a028104b9c76279a3c473f50452633c8a4feabda637e5f5b71f797", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.7.up_proj.weight", + "sha256": "1b18f8b452b71ca57fec09892a48df2ee2108067f97f62b76a3817c9bea91708", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.float32", + "elements": 8, + "name": "model.layers.3.mlp.gate.e_score_correction_bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 8 + ] + }, + { + "bytes": 1024, + "dtype": "torch.bfloat16", + "elements": 512, + "name": "model.layers.3.mlp.gate.weight", + "sha256": "7e86bda3f7704f19dc2a3f6a0ca22b0df554723adf0cf3add837a1e497ad4d3a", + "shape": [ + 8, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.shared_experts.down_proj.weight", + "sha256": "110ad4d8dd59a5ec2b0d4c2e0a79d022bcdba240a4998ff84ad2590dd32fce2c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.shared_experts.gate_proj.weight", + "sha256": "cca5d02ac9eccab3ee8be47f55ef4d59750dd311800e25c22cc3f22b437ffd8b", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.shared_experts.up_proj.weight", + "sha256": "c8fe3987299d1526946a87facc4d3f99300fafbac552471ed826454c41ed31e5", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.3.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.3.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.3.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "5c230cafd4add95096f53702bab8ef1673993cca9433de8c874638958a61995a", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.3.self_attn.kv_b_proj.weight", + "sha256": "ff432280fe1fbbc2a5b7fee7fb18f6de59d675d2d7d0eec0d769a5fd012699a9", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.3.self_attn.o_proj.weight", + "sha256": "59e2e2ee8f9cba29e9cf3e6098539ddca5811d35d3df3c860488f348d6be9584", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.3.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.self_attn.q_a_proj.weight", + "sha256": "172aae8ff1a79376bf65182f5e92c06da2f9b307c15f214a20597491729aa0d7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.self_attn.q_b_proj.weight", + "sha256": "5d917d8c510906982c609808f1eb0d16da467976550e3a063637f1fde013cbdb", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.norm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + } + ], + "tokenizer": { + "kind": "byte-level BPE without merges", + "special_token_ids": { + "": 1, + "": 2, + "": 0, + "": 3 + }, + "vocab_size": 260 + }, + "versions": { + "safetensors": "0.8.0", + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "transformers": "5.16.1" + } +} diff --git a/raw/candidates/ct-nvfp4/model/config.json b/raw/candidates/ct-nvfp4/model/config.json new file mode 100644 index 0000000000000000000000000000000000000000..867123c73815c5db904ae24a6d87ae4581a25d94 --- /dev/null +++ b/raw/candidates/ct-nvfp4/model/config.json @@ -0,0 +1,202 @@ +{ + "architectures": [ + "GlmMoeDsaForCausalLM" + ], + "attention_bias": false, + "attention_dropout": 0.0, + "bos_token_id": 1, + "dtype": "bfloat16", + "eos_token_id": 2, + "first_k_dense_replace": 1, + "head_dim": 8, + "hidden_act": "silu", + "hidden_size": 64, + "index_head_dim": 16, + "index_n_heads": 4, + "index_topk": 8, + "indexer_types": [ + "full", + "shared", + "full", + "shared" + ], + "initializer_range": 0.02, + "intermediate_size": 128, + "kv_lora_rank": 16, + "layer_types": [ + "deepseek_sparse_attention", + "deepseek_sparse_attention", + "deepseek_sparse_attention", + "deepseek_sparse_attention" + ], + "max_position_embeddings": 256, + "mlp_bias": false, + "mlp_layer_types": [ + "dense", + "sparse", + "sparse", + "sparse" + ], + "model_type": "glm_moe_dsa", + "moe_intermediate_size": 32, + "n_group": 1, + "n_routed_experts": 8, + "n_shared_experts": 1, + "norm_topk_prob": true, + "num_attention_heads": 4, + "num_experts_per_tok": 2, + "num_hidden_layers": 4, + "num_key_value_heads": 4, + "num_nextn_predict_layers": 0, + "pad_token_id": 0, + "q_lora_rank": 32, + "qk_head_dim": 16, + "qk_nope_head_dim": 8, + "qk_rope_head_dim": 8, + "rms_norm_eps": 1e-05, + "rope_parameters": { + "rope_theta": 10000.0, + "rope_type": "default" + }, + "routed_scaling_factor": 2.5, + "tie_word_embeddings": false, + "topk_group": 1, + "transformers_version": "5.16.1", + "use_cache": true, + "v_head_dim": 16, + "vocab_size": 260, + "quantization_config": { + "quant_method": "compressed-tensors", + "format": "nvfp4-pack-quantized", + "quantization_status": "compressed", + "ignore": [], + "config_groups": { + "group_0": { + "format": "nvfp4-pack-quantized", + "targets": [ + "model.layers.0.mlp.down_proj", + "model.layers.0.mlp.gate_proj", + "model.layers.0.mlp.up_proj", + "model.layers.0.self_attn.indexer.weights_proj", + "model.layers.0.self_attn.indexer.wk", + "model.layers.0.self_attn.indexer.wq_b", + "model.layers.0.self_attn.kv_a_proj_with_mqa", + "model.layers.0.self_attn.kv_b_proj", + "model.layers.0.self_attn.o_proj", + "model.layers.0.self_attn.q_a_proj", + "model.layers.0.self_attn.q_b_proj", + "model.layers.1.mlp.experts.0.down_proj", + "model.layers.1.mlp.experts.0.gate_proj", + "model.layers.1.mlp.experts.0.up_proj", + "model.layers.1.mlp.experts.1.down_proj", + "model.layers.1.mlp.experts.1.gate_proj", + "model.layers.1.mlp.experts.1.up_proj", + "model.layers.1.mlp.experts.2.down_proj", + "model.layers.1.mlp.experts.2.gate_proj", + "model.layers.1.mlp.experts.2.up_proj", + "model.layers.1.mlp.experts.3.down_proj", + "model.layers.1.mlp.experts.3.gate_proj", + "model.layers.1.mlp.experts.3.up_proj", + "model.layers.1.mlp.experts.4.down_proj", + "model.layers.1.mlp.experts.4.gate_proj", + "model.layers.1.mlp.experts.4.up_proj", + "model.layers.1.mlp.experts.5.down_proj", + "model.layers.1.mlp.experts.5.gate_proj", + "model.layers.1.mlp.experts.5.up_proj", + "model.layers.1.mlp.experts.6.down_proj", + "model.layers.1.mlp.experts.6.gate_proj", + "model.layers.1.mlp.experts.6.up_proj", + "model.layers.1.mlp.experts.7.down_proj", + "model.layers.1.mlp.experts.7.gate_proj", + "model.layers.1.mlp.experts.7.up_proj", + "model.layers.1.mlp.shared_experts.down_proj", + "model.layers.1.mlp.shared_experts.gate_proj", + "model.layers.1.mlp.shared_experts.up_proj", + "model.layers.1.self_attn.kv_a_proj_with_mqa", + "model.layers.1.self_attn.kv_b_proj", + "model.layers.1.self_attn.o_proj", + "model.layers.1.self_attn.q_a_proj", + "model.layers.1.self_attn.q_b_proj", + "model.layers.2.mlp.experts.0.down_proj", + "model.layers.2.mlp.experts.0.gate_proj", + "model.layers.2.mlp.experts.0.up_proj", + "model.layers.2.mlp.experts.1.down_proj", + "model.layers.2.mlp.experts.1.gate_proj", + "model.layers.2.mlp.experts.1.up_proj", + "model.layers.2.mlp.experts.2.down_proj", + "model.layers.2.mlp.experts.2.gate_proj", + "model.layers.2.mlp.experts.2.up_proj", + "model.layers.2.mlp.experts.3.down_proj", + "model.layers.2.mlp.experts.3.gate_proj", + "model.layers.2.mlp.experts.3.up_proj", + "model.layers.2.mlp.experts.4.down_proj", + "model.layers.2.mlp.experts.4.gate_proj", + "model.layers.2.mlp.experts.4.up_proj", + "model.layers.2.mlp.experts.5.down_proj", + "model.layers.2.mlp.experts.5.gate_proj", + "model.layers.2.mlp.experts.5.up_proj", + "model.layers.2.mlp.experts.6.down_proj", + "model.layers.2.mlp.experts.6.gate_proj", + "model.layers.2.mlp.experts.6.up_proj", + "model.layers.2.mlp.experts.7.down_proj", + "model.layers.2.mlp.experts.7.gate_proj", + "model.layers.2.mlp.experts.7.up_proj", + "model.layers.2.mlp.shared_experts.down_proj", + "model.layers.2.mlp.shared_experts.gate_proj", + "model.layers.2.mlp.shared_experts.up_proj", + "model.layers.2.self_attn.indexer.weights_proj", + "model.layers.2.self_attn.indexer.wk", + "model.layers.2.self_attn.indexer.wq_b", + "model.layers.2.self_attn.kv_a_proj_with_mqa", + "model.layers.2.self_attn.kv_b_proj", + "model.layers.2.self_attn.o_proj", + "model.layers.2.self_attn.q_a_proj", + "model.layers.2.self_attn.q_b_proj", + "model.layers.3.mlp.experts.0.down_proj", + "model.layers.3.mlp.experts.0.gate_proj", + "model.layers.3.mlp.experts.0.up_proj", + "model.layers.3.mlp.experts.1.down_proj", + "model.layers.3.mlp.experts.1.gate_proj", + "model.layers.3.mlp.experts.1.up_proj", + "model.layers.3.mlp.experts.2.down_proj", + "model.layers.3.mlp.experts.2.gate_proj", + "model.layers.3.mlp.experts.2.up_proj", + "model.layers.3.mlp.experts.3.down_proj", + "model.layers.3.mlp.experts.3.gate_proj", + "model.layers.3.mlp.experts.3.up_proj", + "model.layers.3.mlp.experts.4.down_proj", + "model.layers.3.mlp.experts.4.gate_proj", + "model.layers.3.mlp.experts.4.up_proj", + "model.layers.3.mlp.experts.5.down_proj", + "model.layers.3.mlp.experts.5.gate_proj", + "model.layers.3.mlp.experts.5.up_proj", + "model.layers.3.mlp.experts.6.down_proj", + "model.layers.3.mlp.experts.6.gate_proj", + "model.layers.3.mlp.experts.6.up_proj", + "model.layers.3.mlp.experts.7.down_proj", + "model.layers.3.mlp.experts.7.gate_proj", + "model.layers.3.mlp.experts.7.up_proj", + "model.layers.3.mlp.shared_experts.down_proj", + "model.layers.3.mlp.shared_experts.gate_proj", + "model.layers.3.mlp.shared_experts.up_proj", + "model.layers.3.self_attn.kv_a_proj_with_mqa", + "model.layers.3.self_attn.kv_b_proj", + "model.layers.3.self_attn.o_proj", + "model.layers.3.self_attn.q_a_proj", + "model.layers.3.self_attn.q_b_proj" + ], + "input_activations": null, + "output_activations": null, + "weights": { + "num_bits": 4, + "type": "float", + "group_size": 16, + "strategy": "tensor_group", + "symmetric": true, + "dynamic": false, + "scale_dtype": "torch.float8_e4m3fn" + } + } + } + } +} diff --git a/raw/candidates/ct-nvfp4/model/cpu-comparison-receipt.json b/raw/candidates/ct-nvfp4/model/cpu-comparison-receipt.json new file mode 100644 index 0000000000000000000000000000000000000000..f0585d9ad8ac65ceca940a79603f522a1f534f5c --- /dev/null +++ b/raw/candidates/ct-nvfp4/model/cpu-comparison-receipt.json @@ -0,0 +1,458 @@ +{ + "candidate": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "dataset_id": "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "dataset_sha256": "c3ff6c32dc57502825d3ca3ac2133ed6a4c31e7bc7602191d595ee044ebe9048", + "form": "hidden", + "head": { + "bits": 16, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510" + }, + "label": "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d", + "lane": "other", + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "repository": "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "revision": null, + "role": "root", + "scope_digest": "attn.o=native:bf16@16|attn.qkv=native:bf16@16|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=native:bf16@16|mlp.gate=native:bf16@16|mlp.up=native:bf16@16|moe.experts=native:bf16@16|norm=native:bf16@16|head=native|kv=bf16", + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd", + "weights": { + "artifact_ref": null, + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "codec": null, + "config_sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "declared_bits": null, + "declared_head_bits": 16, + "index_sha256": null, + "model_ref": null, + "model_revision": "45563636ef723acfb826755493447dc40c7a0c37", + "quantized": false, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37" + } + }, + "comparability": { + "bias": null, + "class": "strict", + "key": null, + "key_inputs": null, + "same_lane": true, + "usable_as_floor": true + }, + "comparator": { + "accumulation_dtype": "float64", + "bf16_reduced_precision_reduction": false, + "cublas_workspace_config": null, + "deterministic_algorithms": true, + "device": "cpu", + "estimator_backend": "torch:k6_kld_report._token_kld", + "head_applied_candidate_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "head_applied_reference_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "head_applied_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "logprob_dtype": "float64", + "position_block": 128, + "replay_backend": "numpy:cpu:float32", + "replay_env": { + "blas_configuration": "OpenBLAS 0.3.34.106.0 USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell MAX_THREADS=64", + "blas_name": "scipy-openblas", + "blas_threads": 2, + "blas_threads_source": "ctypes:scipy_openblas_get_num_threads64_", + "blas_version": "0.3.34.106.0", + "cpu_model": "Intel(R) Xeon(R) CPU X5570 @ 2.93GHz", + "library": "numpy", + "numpy_version": "2.5.3", + "replay_dtype": "float32" + }, + "replay_peak_device_bytes": null, + "short_circuited": true, + "source_file_hashes_verified": true, + "tensor_content_digests_verified": true, + "tf32": false, + "tool": { + "entrypoint": "bin/fidelity-dataset compare", + "note": "the fp64 estimator is k6_kld_report._token_kld, imported not copied, whenever torch is importable; estimator_backend records which path ran." + }, + "two_pass": true, + "vocab_chunk": 8192 + }, + "comparison_kind": "reproduction_confirmation", + "context_depth_buckets": null, + "created_utc": "2026-09-07T12:39:47Z", + "determinism": { + "cold_start_per_run": null, + "distinct_evidence_hash_count": 1, + "evidence_hashes": [ + "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39" + ], + "evidence_kind": "hidden_state_tensor_sha256", + "identical_across_runs": null, + "max_run_mean": 0.0, + "min_run_mean": 0.0, + "note": "one comparison of two sealed captures. identical_across_runs is null, not true: that claim needs two independently produced captures of the SAME weights (SC-2), which is a different receipt.", + "population_stddev_of_run_means": 0.0, + "run_count": 1, + "run_means": [ + 0.0 + ] + }, + "disclosures": [ + { + "affects_comparability": false, + "code": "shared_reference_head", + "detail": "HEAD-1a: both captures declare the same lm_head tensor content digest (2364995d4009); one head applied to both sides is a shared APPLICATION of identical WEIGHTS.", + "severity": "info" + } + ], + "estimator": { + "accumulation_dtype": "float64", + "head_policy": "shared_reference_head", + "hidden_dtype": "bf16", + "logits_dtype": "float32", + "softmax_note": "full vocabulary, torch.log_softmax in float64; no truncation, no top-k, no clamp. A non-finite intermediate is a hard refusal.", + "stack_relation": "same_stack", + "two_pass": true, + "vocab_chunk": 8192, + "zero_handling": "exact zero asserted, not rounded" + }, + "format_version": 1, + "gates": { + "coverage": { + "detail": "4 of 4/4 declared records shared", + "overridden_by": null, + "passed": true + }, + "decode": { + "detail": "self-compare: both sides are the same artifact; the weights-decode caveats apply to a measurement against a reference, not to SC-1", + "overridden_by": null, + "passed": true + }, + "form": { + "detail": "hidden vs hidden", + "overridden_by": null, + "passed": true + }, + "geometry": { + "detail": "vocab_size 260 equal; hidden_width 64", + "overridden_by": null, + "passed": true + }, + "head": { + "detail": "HEAD-1a: identical head content digest on both sides", + "overridden_by": null, + "passed": true + }, + "lane": { + "detail": "lane=other vs other", + "overridden_by": null, + "passed": true + }, + "lossy": { + "detail": "lossy_codec null on both sides", + "overridden_by": null, + "passed": true + }, + "panel": { + "detail": "suite_token_hash_sha256 equal; 4 shared records; per-record token and mask digests equal; scoring_window equal", + "overridden_by": null, + "passed": true + }, + "seal": { + "detail": "both manifests self-seal and checksums.txt verified; every tensor_content_sha256 recomputed", + "overridden_by": null, + "passed": true + }, + "stack": { + "detail": "lane_identity equal / stack_fingerprint equal -> same_stack", + "overridden_by": null, + "passed": true + } + }, + "high_kld_contexts": [ + { + "allocation_stratum": null, + "domain": "garden", + "index": 0, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0000" + }, + { + "allocation_stratum": null, + "domain": "arithmetic", + "index": 1, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0001" + }, + { + "allocation_stratum": null, + "domain": "code", + "index": 2, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0002" + }, + { + "allocation_stratum": null, + "domain": "instructions", + "index": 3, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0003" + } + ], + "kl": { + "max": 0.0, + "mean": 0.0, + "median": 0.0, + "p95": 0.0, + "p99": 0.0, + "p99_9": 0.0 + }, + "kl_macro_stratum_mean": null, + "kl_micro_token_mean": 0.0, + "measurement_scope": { + "contexts": 4, + "covers_full_panel": true, + "position_filter": "all", + "positions_per_context": 63, + "scored_positions": 252, + "subset_detail": null + }, + "metric": { + "direction": "reference_to_candidate", + "direction_label": "KL(reference || candidate)", + "higher_is_better": false, + "name": "mean_tokenwise_kld", + "units": "nats", + "value": 0.0 + }, + "panel": { + "context_length": 64, + "contexts": 4, + "panel_id": "panel--panel", + "panel_token_sha256_legacy": "3c9467c85be43d238926f6d18bf825c2e4748814c95b8b0e8b8f1420546c3089", + "scored_positions": 252, + "scoring_window": { + "dropped_positions_total": 0, + "min_left_context_tokens": 1, + "policy": "every causal prediction position of every window is scored; nothing is dropped", + "score_from": 0, + "windowed": false + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + }, + "tokenizer_candidate": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + }, + "tokenizer_identity_equal": true, + "tokenizer_reference": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } + }, + "per_context": [ + { + "allocation_stratum": null, + "domain": "garden", + "index": 0, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0000" + }, + { + "allocation_stratum": null, + "domain": "arithmetic", + "index": 1, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0001" + }, + { + "allocation_stratum": null, + "domain": "code", + "index": 2, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0002" + }, + { + "allocation_stratum": null, + "domain": "instructions", + "index": 3, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0003" + } + ], + "per_domain": null, + "per_stratum": null, + "receipt_sha256": "4910833e5cc175ea351055e567c5d896475b4020598359291aedc958d8ada382", + "reference": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "dataset_id": "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "dataset_sha256": "56588f20f9cf055301f83a828fa75fa94c1e26593e64a07c5c6c4e38e9454563", + "form": "hidden", + "head": { + "bits": 16, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510" + }, + "label": "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "lane": "other", + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "repository": "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "revision": null, + "role": "root", + "scope_digest": "attn.o=native:bf16@16|attn.qkv=native:bf16@16|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=native:bf16@16|mlp.gate=native:bf16@16|mlp.up=native:bf16@16|moe.experts=native:bf16@16|norm=native:bf16@16|head=native|kv=bf16", + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd", + "weights": { + "artifact_ref": null, + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "codec": null, + "config_sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "declared_bits": null, + "declared_head_bits": 16, + "index_sha256": null, + "model_ref": null, + "model_revision": "45563636ef723acfb826755493447dc40c7a0c37", + "quantized": false, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37" + } + }, + "schema": "malaiwah.fidelity-comparison-receipt.v1", + "self_compare": { + "asserted_exact_zero": true, + "capture_content_digest_equal": true, + "expected_tokenwise_bytes": 2144, + "expected_tokenwise_sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d", + "force_compute_agreed": true, + "head_digest_equal": true, + "weights_identity_equal": true + }, + "submission": { + "emitted": false, + "path": null, + "receipt_sha256": null, + "refusal": "comparison_kind is reproduction_confirmation, not measurement; bin/fidelity/receipt.py::_scan_for_unsubmittable is the second, independent refusal axis.", + "submission_schema": null + }, + "tokenwise": { + "bytes": 2144, + "path": "tokenwise-kld.npy", + "sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d" + }, + "top1_agreement": 1.0, + "top1_discordant_contexts": [], + "uncertainty": { + "ci95_high": null, + "ci95_low": null, + "cluster_unit": null, + "clusters": null, + "method": "none", + "samples": null, + "seed": null + } +} diff --git a/raw/candidates/ct-nvfp4/model/cpu-reproduction-summary.json b/raw/candidates/ct-nvfp4/model/cpu-reproduction-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..7fe4e433fbfabcad4ab3781b796fbd3439d5db17 --- /dev/null +++ b/raw/candidates/ct-nvfp4/model/cpu-reproduction-summary.json @@ -0,0 +1,851 @@ +{ + "captures": { + "first": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "cold_run": "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "dataset_sha256": "56588f20f9cf055301f83a828fa75fa94c1e26593e64a07c5c6c4e38e9454563", + "generation_sanity_probe": { + "degenerate": false, + "enforced": false, + "entropy_nats": 5.548019647470335, + "expect": null, + "logit_spread": 0.986328125, + "note": "one extra window through the same schedule; its hidden state is discarded and never enters the dataset.", + "prompt": "The capital of France is", + "schema": "malaiwah.generation-sanity-probe.v1", + "status": "recorded", + "top1_id": 113, + "top1_probability": 0.006720104384265371, + "top1_text": "�", + "top_k": [ + { + "id": 113, + "probability": 0.006720104384265371, + "text": "�" + }, + { + "id": 237, + "probability": 0.006412368399474785, + "text": "�" + }, + { + "id": 193, + "probability": 0.006035639491843906, + "text": "\u0001" + }, + { + "id": 236, + "probability": 0.0055386141320063614, + "text": "�" + }, + { + "id": 44, + "probability": 0.0054740873228682424, + "text": "I" + } + ], + "uniform_entropy_nats": 5.560681631015528, + "vocab_size": 260 + }, + "head_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "memory_report": { + "context_length": 64, + "decoder_layers": null, + "device": "cpu", + "hidden_size": 64, + "layer_residency": null, + "model": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "peak_resident_weight_bytes": 555776, + "peak_resident_weight_detail": { + "buffers": 128, + "parameters": 555648, + "total": 555776 + }, + "peak_resident_weight_gb": 0.001, + "peak_rss_bytes": 367374336, + "peak_rss_gb": 0.367, + "resident_weight_note": "the maximum, over the run, of the materialised parameter+buffer bytes. On the CPU path peak_rss_bytes ALSO counts the safetensors mmap page cache, which is evictable and is not held by the schedule; this figure is not confounded by it. On CUDA, peak_cuda_allocated_bytes is the authoritative number because it includes activations and workspace and has no page cache.", + "rss_units_source": "Linux ru_maxrss", + "schedule": "window-outer", + "vocab_size": 260, + "windows": 4 + }, + "path": "first", + "pid": 406991, + "resources": { + "bytes": { + "checkpoint_read": 572479, + "hidden_d2h": 36616, + "weights_h2d": null + }, + "checkpoint_bytes": 572479, + "checkpoint_files": 2, + "device_name": null, + "forward_timing": "wall-clock", + "note": "provenance, not identity: peaks and stage seconds this run measured; forward_sum is device time under cuda-events, wall time otherwise; seal covers head serialisation up to this block's assembly", + "peak_cuda_allocated_bytes": null, + "peak_cuda_reserved_bytes": null, + "peak_resident_weight_bytes": 555776, + "peak_rss_bytes": 367374336, + "rss_units_source": "Linux ru_maxrss", + "seconds": { + "decode_sum": null, + "elapsed": 2.448, + "fill_sum": null, + "forward_sum": 0.126, + "identity": 0.005, + "layer_load_max": null, + "layer_load_sum": null, + "layer_loads": null, + "resident_load": 2.283, + "seal": 0.007 + } + }, + "runtime_versions": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 406991, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd" + }, + "repeat": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "cold_run": "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d", + "dataset_sha256": "c3ff6c32dc57502825d3ca3ac2133ed6a4c31e7bc7602191d595ee044ebe9048", + "generation_sanity_probe": { + "degenerate": false, + "enforced": false, + "entropy_nats": 5.548019647470335, + "expect": null, + "logit_spread": 0.986328125, + "note": "one extra window through the same schedule; its hidden state is discarded and never enters the dataset.", + "prompt": "The capital of France is", + "schema": "malaiwah.generation-sanity-probe.v1", + "status": "recorded", + "top1_id": 113, + "top1_probability": 0.006720104384265371, + "top1_text": "�", + "top_k": [ + { + "id": 113, + "probability": 0.006720104384265371, + "text": "�" + }, + { + "id": 237, + "probability": 0.006412368399474785, + "text": "�" + }, + { + "id": 193, + "probability": 0.006035639491843906, + "text": "\u0001" + }, + { + "id": 236, + "probability": 0.0055386141320063614, + "text": "�" + }, + { + "id": 44, + "probability": 0.0054740873228682424, + "text": "I" + } + ], + "uniform_entropy_nats": 5.560681631015528, + "vocab_size": 260 + }, + "head_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "memory_report": { + "context_length": 64, + "decoder_layers": null, + "device": "cpu", + "hidden_size": 64, + "layer_residency": null, + "model": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "peak_resident_weight_bytes": 555776, + "peak_resident_weight_detail": { + "buffers": 128, + "parameters": 555648, + "total": 555776 + }, + "peak_resident_weight_gb": 0.001, + "peak_rss_bytes": 367198208, + "peak_rss_gb": 0.367, + "resident_weight_note": "the maximum, over the run, of the materialised parameter+buffer bytes. On the CPU path peak_rss_bytes ALSO counts the safetensors mmap page cache, which is evictable and is not held by the schedule; this figure is not confounded by it. On CUDA, peak_cuda_allocated_bytes is the authoritative number because it includes activations and workspace and has no page cache.", + "rss_units_source": "Linux ru_maxrss", + "schedule": "window-outer", + "vocab_size": 260, + "windows": 4 + }, + "path": "repeat", + "pid": 409089, + "resources": { + "bytes": { + "checkpoint_read": 572479, + "hidden_d2h": 36616, + "weights_h2d": null + }, + "checkpoint_bytes": 572479, + "checkpoint_files": 2, + "device_name": null, + "forward_timing": "wall-clock", + "note": "provenance, not identity: peaks and stage seconds this run measured; forward_sum is device time under cuda-events, wall time otherwise; seal covers head serialisation up to this block's assembly", + "peak_cuda_allocated_bytes": null, + "peak_cuda_reserved_bytes": null, + "peak_resident_weight_bytes": 555776, + "peak_rss_bytes": 367198208, + "rss_units_source": "Linux ru_maxrss", + "seconds": { + "decode_sum": null, + "elapsed": 2.619, + "fill_sum": null, + "forward_sum": 0.128, + "identity": 0.004, + "layer_load_max": null, + "layer_load_sum": null, + "layer_loads": null, + "resident_load": 2.453, + "seal": 0.005 + } + }, + "runtime_versions": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 409089, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd" + } + }, + "commands": [ + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--model", + "/tmp/qfs-complete-tiny-fixture/model", + "--weights-repository", + "malaiwah/glm-moe-dsa-tiny-random-bf16", + "--model-revision", + "45563636ef723acfb826755493447dc40c7a0c37", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-complete-tiny-fixture/reproduction/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--role", + "root", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--schedule", + "window-outer", + "--dataset-id", + "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "--dataset-name", + "GLM MoE DSA tiny random CPU root", + "--repository", + "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "--author", + "malaiwah", + "--disclosures", + "[{\"code\":\"random_init_cpu_fixture\",\"severity\":\"info\",\"affects_comparability\":false,\"detail\":\"Complete randomly initialized tiny glm_moe_dsa checkpoint; CPU smoke fixture only, not trained quality evidence or a registry measurement. Lane other denotes CPU, not local-cuda-budget.\"}]", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--run-name", + "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "--cold-run", + "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "--memory-report", + "/tmp/qfs-complete-tiny-fixture/reproduction/first.memory.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 6.485651439987123, + "name": "capture-first", + "pid": 406991, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 406991, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "capture-first.stderr.log", + "stdout": "capture-first.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "verify", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/first.verify.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.575829998124391, + "name": "verify-first", + "pid": 408026, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 408026, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "verify-first.stderr.log", + "stdout": "verify-first.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "validate", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--strict", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/first.strict.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.8252810118719935, + "name": "strict-first", + "pid": 408494, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 408494, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "strict-first.stderr.log", + "stdout": "strict-first.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--model", + "/tmp/qfs-complete-tiny-fixture/model", + "--weights-repository", + "malaiwah/glm-moe-dsa-tiny-random-bf16", + "--model-revision", + "45563636ef723acfb826755493447dc40c7a0c37", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-complete-tiny-fixture/reproduction/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--role", + "root", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--schedule", + "window-outer", + "--dataset-id", + "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "--dataset-name", + "GLM MoE DSA tiny random CPU root", + "--repository", + "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "--author", + "malaiwah", + "--disclosures", + "[{\"code\":\"random_init_cpu_fixture\",\"severity\":\"info\",\"affects_comparability\":false,\"detail\":\"Complete randomly initialized tiny glm_moe_dsa checkpoint; CPU smoke fixture only, not trained quality evidence or a registry measurement. Lane other denotes CPU, not local-cuda-budget.\"}]", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--run-name", + "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d", + "--cold-run", + "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d", + "--memory-report", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat.memory.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 6.431767418049276, + "name": "capture-repeat", + "pid": 409089, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 409089, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "capture-repeat.stderr.log", + "stdout": "capture-repeat.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "verify", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat.verify.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.7754629959817976, + "name": "verify-repeat", + "pid": 409951, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 409951, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "verify-repeat.stderr.log", + "stdout": "verify-repeat.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "validate", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--strict", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat.strict.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.423026765929535, + "name": "strict-repeat", + "pid": 410549, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 410549, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "strict-repeat.stderr.log", + "stdout": "strict-repeat.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "compare", + "--reference", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--candidate", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction/comparison", + "--self-compare", + "--force-compute", + "--device", + "cpu", + "--replay-device", + "numpy", + "--replay-dtype", + "float32", + "--vocab-chunk", + "8192", + "--chunk-positions", + "128", + "--verify-tensors", + "--reference-label", + "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "--candidate-label", + "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.7282893639057875, + "name": "compare", + "pid": 411043, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 411043, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "compare.stderr.log", + "stdout": "compare.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "validate", + "--receipt", + "/tmp/qfs-complete-tiny-fixture/reproduction/comparison/comparison-receipt.json", + "--strict", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/comparison.validate.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.424050308065489, + "name": "validate-comparison", + "pid": 411487, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 411487, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "validate-comparison.stderr.log", + "stdout": "validate-comparison.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + } + ], + "comparison": { + "comparator": { + "accumulation_dtype": "float64", + "bf16_reduced_precision_reduction": false, + "cublas_workspace_config": null, + "deterministic_algorithms": true, + "device": "cpu", + "estimator_backend": "torch:k6_kld_report._token_kld", + "head_applied_candidate_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "head_applied_reference_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "head_applied_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "logprob_dtype": "float64", + "position_block": 128, + "replay_backend": "numpy:cpu:float32", + "replay_env": { + "blas_configuration": "OpenBLAS 0.3.34.106.0 USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell MAX_THREADS=64", + "blas_name": "scipy-openblas", + "blas_threads": 2, + "blas_threads_source": "ctypes:scipy_openblas_get_num_threads64_", + "blas_version": "0.3.34.106.0", + "cpu_model": "Intel(R) Xeon(R) CPU X5570 @ 2.93GHz", + "library": "numpy", + "numpy_version": "2.5.3", + "replay_dtype": "float32" + }, + "replay_peak_device_bytes": null, + "short_circuited": true, + "source_file_hashes_verified": true, + "tensor_content_digests_verified": true, + "tf32": false, + "tool": { + "entrypoint": "bin/fidelity-dataset compare", + "note": "the fp64 estimator is k6_kld_report._token_kld, imported not copied, whenever torch is importable; estimator_backend records which path ran." + }, + "two_pass": true, + "vocab_chunk": 8192 + }, + "comparison_kind": "reproduction_confirmation", + "kl": { + "max": 0.0, + "mean": 0.0, + "median": 0.0, + "p95": 0.0, + "p99": 0.0, + "p99_9": 0.0 + }, + "measurement_scope": { + "contexts": 4, + "covers_full_panel": true, + "position_filter": "all", + "positions_per_context": 63, + "scored_positions": 252, + "subset_detail": null + }, + "metric": { + "direction": "reference_to_candidate", + "direction_label": "KL(reference || candidate)", + "higher_is_better": false, + "name": "mean_tokenwise_kld", + "units": "nats", + "value": 0.0 + }, + "note": "QFS retains its hash-proof result and top-1 value for reproduction confirmations; --force-compute independently runs the estimator and requires its tokenwise KL array to agree exactly. short_circuited=true therefore does not mean replay was skipped.", + "receipt": "comparison/comparison-receipt.json", + "receipt_sha256": "4910833e5cc175ea351055e567c5d896475b4020598359291aedc958d8ada382", + "self_compare": { + "asserted_exact_zero": true, + "capture_content_digest_equal": true, + "expected_tokenwise_bytes": 2144, + "expected_tokenwise_sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d", + "force_compute_agreed": true, + "head_digest_equal": true, + "weights_identity_equal": true + }, + "tokenwise": { + "bytes": 2144, + "path": "tokenwise-kld.npy", + "sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d" + }, + "top1_agreement": 1.0 + }, + "cpu_threads": 2, + "dataset_id": "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "dataset_repository": "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "device": "cpu", + "driver_argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "/tmp/qfs-complete-tiny-fixture/verify_cpu.py", + "--model-dir", + "/tmp/qfs-complete-tiny-fixture/model", + "--model-repository", + "malaiwah/glm-moe-dsa-tiny-random-bf16", + "--model-revision", + "45563636ef723acfb826755493447dc40c7a0c37", + "--panel-dir", + "/tmp/qfs-complete-tiny-fixture/panel", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction", + "--qfs-root", + "/tmp/qfs-explorer-development" + ], + "driver_sha256": "2e507993f0085a72d5236527942a7143fd036d56b82223b26e90889de5cd9f98", + "dtype": "bfloat16", + "elapsed_seconds": 34.85638747992925, + "lane": "other", + "lane_description": "local CPU random-init fixture", + "model_repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "model_revision": "45563636ef723acfb826755493447dc40c7a0c37", + "panel_binding": "panel-binding.json", + "panel_binding_sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "provenance_note": "Local QFS source bytes are hashed; no source commit is asserted. The caller supplies an immutable model pin; QFS hashes the local checkpoint. This script does not independently prove Hub-to-local weight equality.", + "qfs_source_files": { + "bin/fidelity/dscompare.py": "4a53f735e1e3fb8bd739854451b57f34e8369bffa9fd4f7b7fd935fb2e7d52df", + "bin/fidelity/dsvalidate.py": "a9d6cd57e801e3ef044a37635e24518c83dbc6d1ec8a4c0b4b5d1b24483ca8d1", + "bin/fidelity/panel.py": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "bin/fidelity_dataset.py": "ac62b63bbfde67e4d5cacecf9cd417193c50f417a6749cc15ee6f1610c153a4e", + "engines/tools/hf_capture.py": "200ba12ca74fb97531307965cbbaa5c10553a5c26e008e524ea2d8aecb005b95" + }, + "schema": "malaiwah.glm-moe-dsa-tiny-cpu-reproduction.v1", + "scope": "Random-init CPU reproduction only; no quality claim or registry submission.", + "status": "passed" +} diff --git a/raw/candidates/ct-nvfp4/model/generation_config.json b/raw/candidates/ct-nvfp4/model/generation_config.json new file mode 100644 index 0000000000000000000000000000000000000000..59bd0680606c94f6570a92e60fa4acd2e2170f70 --- /dev/null +++ b/raw/candidates/ct-nvfp4/model/generation_config.json @@ -0,0 +1,10 @@ +{ + "_from_model_config": true, + "bos_token_id": 1, + "eos_token_id": 2, + "output_attentions": false, + "output_hidden_states": false, + "pad_token_id": 0, + "transformers_version": "5.16.1", + "use_cache": true +} diff --git a/raw/candidates/ct-nvfp4/model/hub-checkpoint-verification.json b/raw/candidates/ct-nvfp4/model/hub-checkpoint-verification.json new file mode 100644 index 0000000000000000000000000000000000000000..b9648c8ae18de0fb86ce18398175c6686afbd7b2 --- /dev/null +++ b/raw/candidates/ct-nvfp4/model/hub-checkpoint-verification.json @@ -0,0 +1,32 @@ +{ + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "downloaded_from_hub": true, + "files": { + "config.json": { + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "bytes": 1479, + "matches_build": true + }, + "generation_config.json": { + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "bytes": 216, + "matches_build": true + }, + "model.safetensors": { + "sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1", + "bytes": 571000, + "matches_build": true + }, + "tokenizer.json": { + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "bytes": 6763, + "matches_build": true + }, + "tokenizer_config.json": { + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63", + "bytes": 236, + "matches_build": true + } + } +} diff --git a/raw/candidates/ct-nvfp4/model/loader-verification.json b/raw/candidates/ct-nvfp4/model/loader-verification.json new file mode 100644 index 0000000000000000000000000000000000000000..871fc889a9d3a025569770a96e83ff5f0a2fb420 --- /dev/null +++ b/raw/candidates/ct-nvfp4/model/loader-verification.json @@ -0,0 +1,60 @@ +{ + "schema": "malaiwah.tiny-fixture-loader-check.v1", + "checkpoint_sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1", + "runtime": { + "torch": "2.11.0+cpu", + "transformers": "5.16.1", + "device": "cpu", + "threads": 2 + }, + "qfs_load_report": { + "observed": true, + "conversion_errors_visible": true, + "missing_keys": [], + "unexpected_keys": [], + "mismatched_keys": [], + "error_msgs": [], + "conversion_errors": {} + }, + "native_save_reload_tensor_equality": true, + "independent_build_files_byte_equal": true, + "tokenizer_roundtrip_examples": [ + "The CPU fixture carries a complete output head and real sparse attention.", + "Small deterministic tensors make a repeatable pipeline experiment.", + "Unicode roundtrip: caf\u00e9, snow \u96ea, punctuation!", + "The same bytes must survive saving and loading without repair." + ], + "forward_shape": [ + 4, + 64, + 260 + ], + "forward_all_finite": true, + "forward_logit_std": 0.16186420619487762, + "load_seconds": 2.1670503590721637, + "batch_forward_seconds": 0.05775680090300739, + "greedy_generation_seconds": 0.04374621692113578, + "generated_token_ids": [ + 1, + 55, + 75, + 72, + 224, + 38, + 51, + 56, + 224, + 73, + 76, + 91, + 87, + 88, + 85, + 72, + 171, + 105, + 156, + 236 + ], + "peak_process_rss_mib": 351.9296875 +} diff --git a/raw/candidates/ct-nvfp4/model/model.safetensors b/raw/candidates/ct-nvfp4/model/model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..895478e49de712b7c64394f58e33bc266dc4bdac --- /dev/null +++ b/raw/candidates/ct-nvfp4/model/model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:640f3d7ea214015d8834a94b56b2dee2c2326dc50245cdd0ded5778799b0d300 +size 249080 diff --git a/raw/candidates/ct-nvfp4/model/model.safetensors.index.json b/raw/candidates/ct-nvfp4/model/model.safetensors.index.json new file mode 100644 index 0000000000000000000000000000000000000000..1c6d74841437c78a53ec41b10f76416d2fcd85de --- /dev/null +++ b/raw/candidates/ct-nvfp4/model/model.safetensors.index.json @@ -0,0 +1,366 @@ +{ + "metadata": { + "total_size": 208056 + }, + "weight_map": { + "model.layers.1.mlp.gate.e_score_correction_bias": "model.safetensors", + "model.layers.2.mlp.gate.e_score_correction_bias": "model.safetensors", + "model.layers.3.mlp.gate.e_score_correction_bias": "model.safetensors", + "lm_head.weight": "model.safetensors", + "model.embed_tokens.weight": "model.safetensors", + "model.layers.0.input_layernorm.weight": "model.safetensors", + "model.layers.0.mlp.down_proj.weight_packed": "model.safetensors", + "model.layers.0.mlp.down_proj.weight_scale": "model.safetensors", + "model.layers.0.mlp.down_proj.weight_global_scale": "model.safetensors", + "model.layers.0.mlp.gate_proj.weight_packed": "model.safetensors", + "model.layers.0.mlp.gate_proj.weight_scale": "model.safetensors", + "model.layers.0.mlp.gate_proj.weight_global_scale": "model.safetensors", + "model.layers.0.mlp.up_proj.weight_packed": "model.safetensors", + "model.layers.0.mlp.up_proj.weight_scale": "model.safetensors", + "model.layers.0.mlp.up_proj.weight_global_scale": "model.safetensors", + "model.layers.0.post_attention_layernorm.weight": "model.safetensors", + "model.layers.0.self_attn.indexer.k_norm.bias": "model.safetensors", + "model.layers.0.self_attn.indexer.k_norm.weight": "model.safetensors", + "model.layers.0.self_attn.indexer.weights_proj.weight_packed": "model.safetensors", + "model.layers.0.self_attn.indexer.weights_proj.weight_scale": "model.safetensors", + "model.layers.0.self_attn.indexer.weights_proj.weight_global_scale": "model.safetensors", + "model.layers.0.self_attn.indexer.wk.weight_packed": "model.safetensors", + "model.layers.0.self_attn.indexer.wk.weight_scale": "model.safetensors", + "model.layers.0.self_attn.indexer.wk.weight_global_scale": "model.safetensors", + "model.layers.0.self_attn.indexer.wq_b.weight_packed": "model.safetensors", + "model.layers.0.self_attn.indexer.wq_b.weight_scale": "model.safetensors", + "model.layers.0.self_attn.indexer.wq_b.weight_global_scale": "model.safetensors", + "model.layers.0.self_attn.kv_a_layernorm.weight": "model.safetensors", + "model.layers.0.self_attn.kv_a_proj_with_mqa.weight_packed": "model.safetensors", + "model.layers.0.self_attn.kv_a_proj_with_mqa.weight_scale": "model.safetensors", + "model.layers.0.self_attn.kv_a_proj_with_mqa.weight_global_scale": "model.safetensors", + "model.layers.0.self_attn.kv_b_proj.weight_packed": "model.safetensors", + "model.layers.0.self_attn.kv_b_proj.weight_scale": "model.safetensors", + "model.layers.0.self_attn.kv_b_proj.weight_global_scale": "model.safetensors", + "model.layers.0.self_attn.o_proj.weight_packed": "model.safetensors", + "model.layers.0.self_attn.o_proj.weight_scale": "model.safetensors", + "model.layers.0.self_attn.o_proj.weight_global_scale": "model.safetensors", + "model.layers.0.self_attn.q_a_layernorm.weight": "model.safetensors", + "model.layers.0.self_attn.q_a_proj.weight_packed": "model.safetensors", + "model.layers.0.self_attn.q_a_proj.weight_scale": "model.safetensors", + "model.layers.0.self_attn.q_a_proj.weight_global_scale": "model.safetensors", + "model.layers.0.self_attn.q_b_proj.weight_packed": "model.safetensors", + "model.layers.0.self_attn.q_b_proj.weight_scale": "model.safetensors", + "model.layers.0.self_attn.q_b_proj.weight_global_scale": "model.safetensors", + "model.layers.1.input_layernorm.weight": "model.safetensors", + "model.layers.1.mlp.experts.0.down_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.0.down_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.0.down_proj.weight_global_scale": "model.safetensors", + "model.layers.1.mlp.experts.0.gate_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.0.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.0.gate_proj.weight_global_scale": "model.safetensors", + "model.layers.1.mlp.experts.0.up_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.0.up_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.0.up_proj.weight_global_scale": "model.safetensors", + "model.layers.1.mlp.experts.1.down_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.1.down_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.1.down_proj.weight_global_scale": "model.safetensors", + "model.layers.1.mlp.experts.1.gate_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.1.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.1.gate_proj.weight_global_scale": "model.safetensors", + "model.layers.1.mlp.experts.1.up_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.1.up_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.1.up_proj.weight_global_scale": "model.safetensors", + "model.layers.1.mlp.experts.2.down_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.2.down_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.2.down_proj.weight_global_scale": "model.safetensors", + "model.layers.1.mlp.experts.2.gate_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.2.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.2.gate_proj.weight_global_scale": "model.safetensors", + "model.layers.1.mlp.experts.2.up_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.2.up_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.2.up_proj.weight_global_scale": "model.safetensors", + "model.layers.1.mlp.experts.3.down_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.3.down_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.3.down_proj.weight_global_scale": "model.safetensors", + "model.layers.1.mlp.experts.3.gate_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.3.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.3.gate_proj.weight_global_scale": "model.safetensors", + "model.layers.1.mlp.experts.3.up_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.3.up_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.3.up_proj.weight_global_scale": "model.safetensors", + "model.layers.1.mlp.experts.4.down_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.4.down_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.4.down_proj.weight_global_scale": "model.safetensors", + "model.layers.1.mlp.experts.4.gate_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.4.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.4.gate_proj.weight_global_scale": "model.safetensors", + "model.layers.1.mlp.experts.4.up_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.4.up_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.4.up_proj.weight_global_scale": "model.safetensors", + "model.layers.1.mlp.experts.5.down_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.5.down_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.5.down_proj.weight_global_scale": "model.safetensors", + "model.layers.1.mlp.experts.5.gate_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.5.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.5.gate_proj.weight_global_scale": "model.safetensors", + "model.layers.1.mlp.experts.5.up_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.5.up_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.5.up_proj.weight_global_scale": "model.safetensors", + "model.layers.1.mlp.experts.6.down_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.6.down_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.6.down_proj.weight_global_scale": "model.safetensors", + "model.layers.1.mlp.experts.6.gate_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.6.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.6.gate_proj.weight_global_scale": "model.safetensors", + "model.layers.1.mlp.experts.6.up_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.6.up_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.6.up_proj.weight_global_scale": "model.safetensors", + "model.layers.1.mlp.experts.7.down_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.7.down_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.7.down_proj.weight_global_scale": "model.safetensors", + "model.layers.1.mlp.experts.7.gate_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.7.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.7.gate_proj.weight_global_scale": "model.safetensors", + "model.layers.1.mlp.experts.7.up_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.experts.7.up_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.7.up_proj.weight_global_scale": "model.safetensors", + "model.layers.1.mlp.gate.weight": "model.safetensors", + "model.layers.1.mlp.shared_experts.down_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.shared_experts.down_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.shared_experts.down_proj.weight_global_scale": "model.safetensors", + "model.layers.1.mlp.shared_experts.gate_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.shared_experts.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.shared_experts.gate_proj.weight_global_scale": "model.safetensors", + "model.layers.1.mlp.shared_experts.up_proj.weight_packed": "model.safetensors", + "model.layers.1.mlp.shared_experts.up_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.shared_experts.up_proj.weight_global_scale": "model.safetensors", + "model.layers.1.post_attention_layernorm.weight": "model.safetensors", + "model.layers.1.self_attn.kv_a_layernorm.weight": "model.safetensors", + "model.layers.1.self_attn.kv_a_proj_with_mqa.weight_packed": "model.safetensors", + "model.layers.1.self_attn.kv_a_proj_with_mqa.weight_scale": "model.safetensors", + "model.layers.1.self_attn.kv_a_proj_with_mqa.weight_global_scale": "model.safetensors", + "model.layers.1.self_attn.kv_b_proj.weight_packed": "model.safetensors", + "model.layers.1.self_attn.kv_b_proj.weight_scale": "model.safetensors", + "model.layers.1.self_attn.kv_b_proj.weight_global_scale": "model.safetensors", + "model.layers.1.self_attn.o_proj.weight_packed": "model.safetensors", + "model.layers.1.self_attn.o_proj.weight_scale": "model.safetensors", + "model.layers.1.self_attn.o_proj.weight_global_scale": "model.safetensors", + "model.layers.1.self_attn.q_a_layernorm.weight": "model.safetensors", + "model.layers.1.self_attn.q_a_proj.weight_packed": "model.safetensors", + "model.layers.1.self_attn.q_a_proj.weight_scale": "model.safetensors", + "model.layers.1.self_attn.q_a_proj.weight_global_scale": "model.safetensors", + "model.layers.1.self_attn.q_b_proj.weight_packed": "model.safetensors", + "model.layers.1.self_attn.q_b_proj.weight_scale": "model.safetensors", + "model.layers.1.self_attn.q_b_proj.weight_global_scale": "model.safetensors", + "model.layers.2.input_layernorm.weight": "model.safetensors", + "model.layers.2.mlp.experts.0.down_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.0.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.0.down_proj.weight_global_scale": "model.safetensors", + "model.layers.2.mlp.experts.0.gate_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.0.gate_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.0.gate_proj.weight_global_scale": "model.safetensors", + "model.layers.2.mlp.experts.0.up_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.0.up_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.0.up_proj.weight_global_scale": "model.safetensors", + "model.layers.2.mlp.experts.1.down_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.1.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.1.down_proj.weight_global_scale": "model.safetensors", + "model.layers.2.mlp.experts.1.gate_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.1.gate_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.1.gate_proj.weight_global_scale": "model.safetensors", + "model.layers.2.mlp.experts.1.up_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.1.up_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.1.up_proj.weight_global_scale": "model.safetensors", + "model.layers.2.mlp.experts.2.down_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.2.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.2.down_proj.weight_global_scale": "model.safetensors", + "model.layers.2.mlp.experts.2.gate_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.2.gate_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.2.gate_proj.weight_global_scale": "model.safetensors", + "model.layers.2.mlp.experts.2.up_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.2.up_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.2.up_proj.weight_global_scale": "model.safetensors", + "model.layers.2.mlp.experts.3.down_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.3.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.3.down_proj.weight_global_scale": "model.safetensors", + "model.layers.2.mlp.experts.3.gate_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.3.gate_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.3.gate_proj.weight_global_scale": "model.safetensors", + "model.layers.2.mlp.experts.3.up_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.3.up_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.3.up_proj.weight_global_scale": "model.safetensors", + "model.layers.2.mlp.experts.4.down_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.4.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.4.down_proj.weight_global_scale": "model.safetensors", + "model.layers.2.mlp.experts.4.gate_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.4.gate_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.4.gate_proj.weight_global_scale": "model.safetensors", + "model.layers.2.mlp.experts.4.up_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.4.up_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.4.up_proj.weight_global_scale": "model.safetensors", + "model.layers.2.mlp.experts.5.down_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.5.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.5.down_proj.weight_global_scale": "model.safetensors", + "model.layers.2.mlp.experts.5.gate_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.5.gate_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.5.gate_proj.weight_global_scale": "model.safetensors", + "model.layers.2.mlp.experts.5.up_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.5.up_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.5.up_proj.weight_global_scale": "model.safetensors", + "model.layers.2.mlp.experts.6.down_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.6.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.6.down_proj.weight_global_scale": "model.safetensors", + "model.layers.2.mlp.experts.6.gate_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.6.gate_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.6.gate_proj.weight_global_scale": "model.safetensors", + "model.layers.2.mlp.experts.6.up_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.6.up_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.6.up_proj.weight_global_scale": "model.safetensors", + "model.layers.2.mlp.experts.7.down_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.7.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.7.down_proj.weight_global_scale": "model.safetensors", + "model.layers.2.mlp.experts.7.gate_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.7.gate_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.7.gate_proj.weight_global_scale": "model.safetensors", + "model.layers.2.mlp.experts.7.up_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.experts.7.up_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.7.up_proj.weight_global_scale": "model.safetensors", + "model.layers.2.mlp.gate.weight": "model.safetensors", + "model.layers.2.mlp.shared_experts.down_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.shared_experts.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.shared_experts.down_proj.weight_global_scale": "model.safetensors", + "model.layers.2.mlp.shared_experts.gate_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.shared_experts.gate_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.shared_experts.gate_proj.weight_global_scale": "model.safetensors", + "model.layers.2.mlp.shared_experts.up_proj.weight_packed": "model.safetensors", + "model.layers.2.mlp.shared_experts.up_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.shared_experts.up_proj.weight_global_scale": "model.safetensors", + "model.layers.2.post_attention_layernorm.weight": "model.safetensors", + "model.layers.2.self_attn.indexer.k_norm.bias": "model.safetensors", + "model.layers.2.self_attn.indexer.k_norm.weight": "model.safetensors", + "model.layers.2.self_attn.indexer.weights_proj.weight_packed": "model.safetensors", + "model.layers.2.self_attn.indexer.weights_proj.weight_scale": "model.safetensors", + "model.layers.2.self_attn.indexer.weights_proj.weight_global_scale": "model.safetensors", + "model.layers.2.self_attn.indexer.wk.weight_packed": "model.safetensors", + "model.layers.2.self_attn.indexer.wk.weight_scale": "model.safetensors", + "model.layers.2.self_attn.indexer.wk.weight_global_scale": "model.safetensors", + "model.layers.2.self_attn.indexer.wq_b.weight_packed": "model.safetensors", + "model.layers.2.self_attn.indexer.wq_b.weight_scale": "model.safetensors", + "model.layers.2.self_attn.indexer.wq_b.weight_global_scale": "model.safetensors", + "model.layers.2.self_attn.kv_a_layernorm.weight": "model.safetensors", + "model.layers.2.self_attn.kv_a_proj_with_mqa.weight_packed": "model.safetensors", + "model.layers.2.self_attn.kv_a_proj_with_mqa.weight_scale": "model.safetensors", + "model.layers.2.self_attn.kv_a_proj_with_mqa.weight_global_scale": "model.safetensors", + "model.layers.2.self_attn.kv_b_proj.weight_packed": "model.safetensors", + "model.layers.2.self_attn.kv_b_proj.weight_scale": "model.safetensors", + "model.layers.2.self_attn.kv_b_proj.weight_global_scale": "model.safetensors", + "model.layers.2.self_attn.o_proj.weight_packed": "model.safetensors", + "model.layers.2.self_attn.o_proj.weight_scale": "model.safetensors", + "model.layers.2.self_attn.o_proj.weight_global_scale": "model.safetensors", + "model.layers.2.self_attn.q_a_layernorm.weight": "model.safetensors", + "model.layers.2.self_attn.q_a_proj.weight_packed": "model.safetensors", + "model.layers.2.self_attn.q_a_proj.weight_scale": "model.safetensors", + "model.layers.2.self_attn.q_a_proj.weight_global_scale": "model.safetensors", + "model.layers.2.self_attn.q_b_proj.weight_packed": "model.safetensors", + "model.layers.2.self_attn.q_b_proj.weight_scale": "model.safetensors", + "model.layers.2.self_attn.q_b_proj.weight_global_scale": "model.safetensors", + "model.layers.3.input_layernorm.weight": "model.safetensors", + "model.layers.3.mlp.experts.0.down_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.0.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.0.down_proj.weight_global_scale": "model.safetensors", + "model.layers.3.mlp.experts.0.gate_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.0.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.0.gate_proj.weight_global_scale": "model.safetensors", + "model.layers.3.mlp.experts.0.up_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.0.up_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.0.up_proj.weight_global_scale": "model.safetensors", + "model.layers.3.mlp.experts.1.down_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.1.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.1.down_proj.weight_global_scale": "model.safetensors", + "model.layers.3.mlp.experts.1.gate_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.1.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.1.gate_proj.weight_global_scale": "model.safetensors", + "model.layers.3.mlp.experts.1.up_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.1.up_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.1.up_proj.weight_global_scale": "model.safetensors", + "model.layers.3.mlp.experts.2.down_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.2.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.2.down_proj.weight_global_scale": "model.safetensors", + "model.layers.3.mlp.experts.2.gate_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.2.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.2.gate_proj.weight_global_scale": "model.safetensors", + "model.layers.3.mlp.experts.2.up_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.2.up_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.2.up_proj.weight_global_scale": "model.safetensors", + "model.layers.3.mlp.experts.3.down_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.3.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.3.down_proj.weight_global_scale": "model.safetensors", + "model.layers.3.mlp.experts.3.gate_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.3.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.3.gate_proj.weight_global_scale": "model.safetensors", + "model.layers.3.mlp.experts.3.up_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.3.up_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.3.up_proj.weight_global_scale": "model.safetensors", + "model.layers.3.mlp.experts.4.down_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.4.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.4.down_proj.weight_global_scale": "model.safetensors", + "model.layers.3.mlp.experts.4.gate_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.4.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.4.gate_proj.weight_global_scale": "model.safetensors", + "model.layers.3.mlp.experts.4.up_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.4.up_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.4.up_proj.weight_global_scale": "model.safetensors", + "model.layers.3.mlp.experts.5.down_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.5.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.5.down_proj.weight_global_scale": "model.safetensors", + "model.layers.3.mlp.experts.5.gate_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.5.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.5.gate_proj.weight_global_scale": "model.safetensors", + "model.layers.3.mlp.experts.5.up_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.5.up_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.5.up_proj.weight_global_scale": "model.safetensors", + "model.layers.3.mlp.experts.6.down_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.6.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.6.down_proj.weight_global_scale": "model.safetensors", + "model.layers.3.mlp.experts.6.gate_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.6.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.6.gate_proj.weight_global_scale": "model.safetensors", + "model.layers.3.mlp.experts.6.up_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.6.up_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.6.up_proj.weight_global_scale": "model.safetensors", + "model.layers.3.mlp.experts.7.down_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.7.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.7.down_proj.weight_global_scale": "model.safetensors", + "model.layers.3.mlp.experts.7.gate_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.7.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.7.gate_proj.weight_global_scale": "model.safetensors", + "model.layers.3.mlp.experts.7.up_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.experts.7.up_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.7.up_proj.weight_global_scale": "model.safetensors", + "model.layers.3.mlp.gate.weight": "model.safetensors", + "model.layers.3.mlp.shared_experts.down_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.shared_experts.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.shared_experts.down_proj.weight_global_scale": "model.safetensors", + "model.layers.3.mlp.shared_experts.gate_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.shared_experts.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.shared_experts.gate_proj.weight_global_scale": "model.safetensors", + "model.layers.3.mlp.shared_experts.up_proj.weight_packed": "model.safetensors", + "model.layers.3.mlp.shared_experts.up_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.shared_experts.up_proj.weight_global_scale": "model.safetensors", + "model.layers.3.post_attention_layernorm.weight": "model.safetensors", + "model.layers.3.self_attn.kv_a_layernorm.weight": "model.safetensors", + "model.layers.3.self_attn.kv_a_proj_with_mqa.weight_packed": "model.safetensors", + "model.layers.3.self_attn.kv_a_proj_with_mqa.weight_scale": "model.safetensors", + "model.layers.3.self_attn.kv_a_proj_with_mqa.weight_global_scale": "model.safetensors", + "model.layers.3.self_attn.kv_b_proj.weight_packed": "model.safetensors", + "model.layers.3.self_attn.kv_b_proj.weight_scale": "model.safetensors", + "model.layers.3.self_attn.kv_b_proj.weight_global_scale": "model.safetensors", + "model.layers.3.self_attn.o_proj.weight_packed": "model.safetensors", + "model.layers.3.self_attn.o_proj.weight_scale": "model.safetensors", + "model.layers.3.self_attn.o_proj.weight_global_scale": "model.safetensors", + "model.layers.3.self_attn.q_a_layernorm.weight": "model.safetensors", + "model.layers.3.self_attn.q_a_proj.weight_packed": "model.safetensors", + "model.layers.3.self_attn.q_a_proj.weight_scale": "model.safetensors", + "model.layers.3.self_attn.q_a_proj.weight_global_scale": "model.safetensors", + "model.layers.3.self_attn.q_b_proj.weight_packed": "model.safetensors", + "model.layers.3.self_attn.q_b_proj.weight_scale": "model.safetensors", + "model.layers.3.self_attn.q_b_proj.weight_global_scale": "model.safetensors", + "model.norm.weight": "model.safetensors" + } +} diff --git a/raw/candidates/ct-nvfp4/model/panel.binding.json b/raw/candidates/ct-nvfp4/model/panel.binding.json new file mode 100644 index 0000000000000000000000000000000000000000..573cea0b332c636bdda89b150f95cda307b89194 --- /dev/null +++ b/raw/candidates/ct-nvfp4/model/panel.binding.json @@ -0,0 +1,102 @@ +{ + "content": { + "archive": { + "algorithm": "sha256(ustar: sorted regular files; mode=0644; uid=gid=mtime=0)", + "bytes": 20480, + "compression": "none", + "format": "ustar", + "sha256": "389706dfa3335a75ec70a40d079995af1a60c05512334125dbd336790f12702f" + }, + "manifest": [ + { + "bytes": 192, + "path": "arrays/causal-mask-64.npy", + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02" + }, + { + "bytes": 384, + "path": "arrays/final-0000.tokens.npy", + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af" + }, + { + "bytes": 384, + "path": "arrays/final-0001.tokens.npy", + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea" + }, + { + "bytes": 384, + "path": "arrays/final-0002.tokens.npy", + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c" + }, + { + "bytes": 384, + "path": "arrays/final-0003.tokens.npy", + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a" + }, + { + "bytes": 4195, + "path": "panel.json", + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6" + }, + { + "bytes": 7808, + "path": "panel.receipt.json", + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263" + } + ], + "manifest_sha256": "e5f2d6410a6290da1197016c5b57ae522a3570665215ddc23e2a0bd45f912181" + }, + "panel": { + "bytes": 4195, + "context_length": 64, + "contexts": 4, + "file": "panel.json", + "id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "positions_per_context": 63, + "role": "final", + "scored_positions_total": 252, + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6", + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36" + }, + "receipt": { + "bytes": 7808, + "declared_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "file": "panel.receipt.json", + "receipt_file_sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "receipt_seal_mode": "self-blank" + }, + "schema": "malaiwah.resolved-panel.v1", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } +} diff --git a/raw/candidates/ct-nvfp4/model/panel.sha256.json b/raw/candidates/ct-nvfp4/model/panel.sha256.json new file mode 100644 index 0000000000000000000000000000000000000000..30e122a1cc6d1937fecc0d31e38e468bceefc9de --- /dev/null +++ b/raw/candidates/ct-nvfp4/model/panel.sha256.json @@ -0,0 +1,83 @@ +{ + "binding_file": "panel.binding.json", + "binding_sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "context_length": 64, + "contexts": 4, + "model_repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "model_revision": "45563636ef723acfb826755493447dc40c7a0c37", + "panel_archive": { + "algorithm": "sha256(ustar: sorted regular files; mode=0644; uid=gid=mtime=0)", + "bytes": 20480, + "compression": "none", + "format": "ustar", + "sha256": "389706dfa3335a75ec70a40d079995af1a60c05512334125dbd336790f12702f" + }, + "panel_directory": "panel", + "panel_files": [ + { + "bytes": 192, + "path": "arrays/causal-mask-64.npy", + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02" + }, + { + "bytes": 384, + "path": "arrays/final-0000.tokens.npy", + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af" + }, + { + "bytes": 384, + "path": "arrays/final-0001.tokens.npy", + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea" + }, + { + "bytes": 384, + "path": "arrays/final-0002.tokens.npy", + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c" + }, + { + "bytes": 384, + "path": "arrays/final-0003.tokens.npy", + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a" + }, + { + "bytes": 4195, + "path": "panel.json", + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6" + }, + { + "bytes": 7808, + "path": "panel.receipt.json", + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263" + } + ], + "panel_id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "panel_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "purpose": "Synthetic CPU smoke only, not a quality benchmark.", + "revision_verification": "Caller-supplied published commit; local files byte-verified offline.", + "scored_positions_total": 252, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer_files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "tokenizer_files_verified": true, + "tokenizer_identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1" +} diff --git a/raw/candidates/ct-nvfp4/model/provenance.json b/raw/candidates/ct-nvfp4/model/provenance.json new file mode 100644 index 0000000000000000000000000000000000000000..0070ab33dc763b20f88d3afe8ba5622f96235f6d --- /dev/null +++ b/raw/candidates/ct-nvfp4/model/provenance.json @@ -0,0 +1,271 @@ +{ + "source": { + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "a1a973330e4e912678adbd8ea41e8b86b1c9dccb" + }, + "format": "ct-nvfp4", + "algorithm": "Build tiny FORMAT fixtures, optionally capture via integrated QFS layer-outer.\n\nNo optimizer-quality claim: deterministic CPU minmax/conservative-scale RTN.\nMXFP4 uses ceil(log2(group_max/6)); this is NOT CT's MX observer or Kimi QAT.\nNVFP4 uses a tensor maximum global, rounded E4M3 group scales, then E2M1\nnearest-even RTN. FP8 uses ceil(log2(block_max/448)) UE8M0 + E4M3 RTN.\nNo calibration, activation quantization, kernel parity, training or model code.\n", + "claim": "FORMAT fixture, not Kimi QAT/ModelOpt calibration/CT observer quality", + "reconstruction_scope": { + "scope": "weights-reconstructed/advisory; activation-not-captured", + "applied_to_weights": false, + "declared": { + "group_0": { + "input_activations": null, + "output_activations": null + } + }, + "kv_cache_scheme": null, + "stored_components": [] + }, + "encoded_tensors": { + "model.layers.0.mlp.down_proj.weight": 0.010242283344268799, + "model.layers.0.mlp.gate_proj.weight": 0.0093470998108387, + "model.layers.0.mlp.up_proj.weight": 0.008789058774709702, + "model.layers.0.self_attn.indexer.weights_proj.weight": 0.0075683556497097015, + "model.layers.0.self_attn.indexer.wk.weight": 0.008004322648048401, + "model.layers.0.self_attn.indexer.wq_b.weight": 0.008091520518064499, + "model.layers.0.self_attn.kv_a_proj_with_mqa.weight": 0.0090680792927742, + "model.layers.0.self_attn.kv_b_proj.weight": 0.0077776238322257996, + "model.layers.0.self_attn.o_proj.weight": 0.0087890625, + "model.layers.0.self_attn.q_a_proj.weight": 0.008417036384344101, + "model.layers.0.self_attn.q_b_proj.weight": 0.0084984190762043, + "model.layers.1.mlp.experts.0.down_proj.weight": 0.008603047579526901, + "model.layers.1.mlp.experts.0.gate_proj.weight": 0.007498607039451599, + "model.layers.1.mlp.experts.0.up_proj.weight": 0.0090680792927742, + "model.layers.1.mlp.experts.1.down_proj.weight": 0.0089634470641613, + "model.layers.1.mlp.experts.1.gate_proj.weight": 0.00760323740541935, + "model.layers.1.mlp.experts.1.up_proj.weight": 0.009591236710548401, + "model.layers.1.mlp.experts.2.down_proj.weight": 0.0084286630153656, + "model.layers.1.mlp.experts.2.gate_proj.weight": 0.008196152746677399, + "model.layers.1.mlp.experts.2.up_proj.weight": 0.013671882450580597, + "model.layers.1.mlp.experts.3.down_proj.weight": 0.008789058774709702, + "model.layers.1.mlp.experts.3.gate_proj.weight": 0.00739397294819355, + "model.layers.1.mlp.experts.3.up_proj.weight": 0.008126392960548401, + "model.layers.1.mlp.experts.4.down_proj.weight": 0.009312227368354797, + "model.layers.1.mlp.experts.4.gate_proj.weight": 0.009137839078903198, + "model.layers.1.mlp.experts.4.up_proj.weight": 0.009416848421096802, + "model.layers.1.mlp.experts.5.down_proj.weight": 0.009695872664451599, + "model.layers.1.mlp.experts.5.gate_proj.weight": 0.009033203125, + "model.layers.1.mlp.experts.5.up_proj.weight": 0.0095912404358387, + "model.layers.1.mlp.experts.6.down_proj.weight": 0.00830078125, + "model.layers.1.mlp.experts.6.gate_proj.weight": 0.008405409753322601, + "model.layers.1.mlp.experts.6.up_proj.weight": 0.0085100457072258, + "model.layers.1.mlp.experts.7.down_proj.weight": 0.0085100457072258, + "model.layers.1.mlp.experts.7.gate_proj.weight": 0.010091148316860199, + "model.layers.1.mlp.experts.7.up_proj.weight": 0.0093122199177742, + "model.layers.1.mlp.shared_experts.down_proj.weight": 0.009800508618354797, + "model.layers.1.mlp.shared_experts.gate_proj.weight": 0.0104282908141613, + "model.layers.1.mlp.shared_experts.up_proj.weight": 0.0092308409512043, + "model.layers.1.self_attn.kv_a_proj_with_mqa.weight": 0.0081496462225914, + "model.layers.1.self_attn.kv_b_proj.weight": 0.0082659050822258, + "model.layers.1.self_attn.o_proj.weight": 0.009602867066860199, + "model.layers.1.self_attn.q_a_proj.weight": 0.0083705373108387, + "model.layers.1.self_attn.q_b_proj.weight": 0.008544929325580597, + "model.layers.2.mlp.experts.0.down_proj.weight": 0.009521484375, + "model.layers.2.mlp.experts.0.gate_proj.weight": 0.010009765625, + "model.layers.2.mlp.experts.0.up_proj.weight": 0.007498603314161301, + "model.layers.2.mlp.experts.1.down_proj.weight": 0.0089634470641613, + "model.layers.2.mlp.experts.1.gate_proj.weight": 0.0083240307867527, + "model.layers.2.mlp.experts.1.up_proj.weight": 0.0096609927713871, + "model.layers.2.mlp.experts.2.down_proj.weight": 0.009591236710548401, + "model.layers.2.mlp.experts.2.gate_proj.weight": 0.008056640625, + "model.layers.2.mlp.experts.2.up_proj.weight": 0.0083937868475914, + "model.layers.2.mlp.experts.3.down_proj.weight": 0.010904945433139801, + "model.layers.2.mlp.experts.3.gate_proj.weight": 0.0081612728536129, + "model.layers.2.mlp.experts.3.up_proj.weight": 0.009068083018064499, + "model.layers.2.mlp.experts.4.down_proj.weight": 0.008544921875, + "model.layers.2.mlp.experts.4.gate_proj.weight": 0.0082775317132473, + "model.layers.2.mlp.experts.4.up_proj.weight": 0.008231028914451599, + "model.layers.2.mlp.experts.5.down_proj.weight": 0.009521484375, + "model.layers.2.mlp.experts.5.gate_proj.weight": 0.0079868845641613, + "model.layers.2.mlp.experts.5.up_proj.weight": 0.0102887824177742, + "model.layers.2.mlp.experts.6.down_proj.weight": 0.008370533585548401, + "model.layers.2.mlp.experts.6.gate_proj.weight": 0.009358726441860199, + "model.layers.2.mlp.experts.6.up_proj.weight": 0.0079403817653656, + "model.layers.2.mlp.experts.7.down_proj.weight": 0.008138023316860199, + "model.layers.2.mlp.experts.7.gate_proj.weight": 0.008056640625, + "model.layers.2.mlp.experts.7.up_proj.weight": 0.008475169539451599, + "model.layers.2.mlp.shared_experts.down_proj.weight": 0.0085565485060215, + "model.layers.2.mlp.shared_experts.gate_proj.weight": 0.0085797980427742, + "model.layers.2.mlp.shared_experts.up_proj.weight": 0.0080915167927742, + "model.layers.2.self_attn.indexer.weights_proj.weight": 0.007638111710548401, + "model.layers.2.self_attn.indexer.wk.weight": 0.008649557828903198, + "model.layers.2.self_attn.indexer.wq_b.weight": 0.010463163256645203, + "model.layers.2.self_attn.kv_a_proj_with_mqa.weight": 0.0092424675822258, + "model.layers.2.self_attn.kv_b_proj.weight": 0.008126392960548401, + "model.layers.2.self_attn.o_proj.weight": 0.0085797980427742, + "model.layers.2.self_attn.q_a_proj.weight": 0.010416664183139801, + "model.layers.2.self_attn.q_b_proj.weight": 0.008626304566860199, + "model.layers.3.mlp.experts.0.down_proj.weight": 0.008544921875, + "model.layers.3.mlp.experts.0.gate_proj.weight": 0.008231028914451599, + "model.layers.3.mlp.experts.0.up_proj.weight": 0.008335664868354797, + "model.layers.3.mlp.experts.1.down_proj.weight": 0.0092424675822258, + "model.layers.3.mlp.experts.1.gate_proj.weight": 0.0094633549451828, + "model.layers.3.mlp.experts.1.up_proj.weight": 0.007219590246677399, + "model.layers.3.mlp.experts.2.down_proj.weight": 0.010428294539451599, + "model.layers.3.mlp.experts.2.gate_proj.weight": 0.010393418371677399, + "model.layers.3.mlp.experts.2.up_proj.weight": 0.0089867003262043, + "model.layers.3.mlp.experts.3.down_proj.weight": 0.008265901356935501, + "model.layers.3.mlp.experts.3.gate_proj.weight": 0.008126392960548401, + "model.layers.3.mlp.experts.3.up_proj.weight": 0.0098353810608387, + "model.layers.3.mlp.experts.4.down_proj.weight": 0.008196152746677399, + "model.layers.3.mlp.experts.4.gate_proj.weight": 0.0088820680975914, + "model.layers.3.mlp.experts.4.up_proj.weight": 0.008126392960548401, + "model.layers.3.mlp.experts.5.down_proj.weight": 0.0095912404358387, + "model.layers.3.mlp.experts.5.gate_proj.weight": 0.007899697870016098, + "model.layers.3.mlp.experts.5.up_proj.weight": 0.0101841501891613, + "model.layers.3.mlp.experts.6.down_proj.weight": 0.007568359375, + "model.layers.3.mlp.experts.6.gate_proj.weight": 0.0095796138048172, + "model.layers.3.mlp.experts.6.up_proj.weight": 0.008451912552118301, + "model.layers.3.mlp.experts.7.down_proj.weight": 0.0084402896463871, + "model.layers.3.mlp.experts.7.gate_proj.weight": 0.0099748894572258, + "model.layers.3.mlp.experts.7.up_proj.weight": 0.009626120328903198, + "model.layers.3.mlp.shared_experts.down_proj.weight": 0.008870445191860199, + "model.layers.3.mlp.shared_experts.gate_proj.weight": 0.0085914246737957, + "model.layers.3.mlp.shared_experts.up_proj.weight": 0.0083937868475914, + "model.layers.3.self_attn.kv_a_proj_with_mqa.weight": 0.0074753537774086, + "model.layers.3.self_attn.kv_b_proj.weight": 0.008475169539451599, + "model.layers.3.self_attn.o_proj.weight": 0.009765625, + "model.layers.3.self_attn.q_a_proj.weight": 0.008940193802118301, + "model.layers.3.self_attn.q_b_proj.weight": 0.0091262087225914 + }, + "encoded_formats": { + "model.layers.0.mlp.down_proj.weight": "ct-nvfp4", + "model.layers.0.mlp.gate_proj.weight": "ct-nvfp4", + "model.layers.0.mlp.up_proj.weight": "ct-nvfp4", + "model.layers.0.self_attn.indexer.weights_proj.weight": "ct-nvfp4", + "model.layers.0.self_attn.indexer.wk.weight": "ct-nvfp4", + "model.layers.0.self_attn.indexer.wq_b.weight": "ct-nvfp4", + "model.layers.0.self_attn.kv_a_proj_with_mqa.weight": "ct-nvfp4", + "model.layers.0.self_attn.kv_b_proj.weight": "ct-nvfp4", + "model.layers.0.self_attn.o_proj.weight": "ct-nvfp4", + "model.layers.0.self_attn.q_a_proj.weight": "ct-nvfp4", + "model.layers.0.self_attn.q_b_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.0.down_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.0.gate_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.0.up_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.1.down_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.1.gate_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.1.up_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.2.down_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.2.gate_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.2.up_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.3.down_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.3.gate_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.3.up_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.4.down_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.4.gate_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.4.up_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.5.down_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.5.gate_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.5.up_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.6.down_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.6.gate_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.6.up_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.7.down_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.7.gate_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.7.up_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.shared_experts.down_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.shared_experts.gate_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.shared_experts.up_proj.weight": "ct-nvfp4", + "model.layers.1.self_attn.kv_a_proj_with_mqa.weight": "ct-nvfp4", + "model.layers.1.self_attn.kv_b_proj.weight": "ct-nvfp4", + "model.layers.1.self_attn.o_proj.weight": "ct-nvfp4", + "model.layers.1.self_attn.q_a_proj.weight": "ct-nvfp4", + "model.layers.1.self_attn.q_b_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.0.down_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.0.gate_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.0.up_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.1.down_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.1.gate_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.1.up_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.2.down_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.2.gate_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.2.up_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.3.down_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.3.gate_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.3.up_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.4.down_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.4.gate_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.4.up_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.5.down_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.5.gate_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.5.up_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.6.down_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.6.gate_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.6.up_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.7.down_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.7.gate_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.7.up_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.shared_experts.down_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.shared_experts.gate_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.shared_experts.up_proj.weight": "ct-nvfp4", + "model.layers.2.self_attn.indexer.weights_proj.weight": "ct-nvfp4", + "model.layers.2.self_attn.indexer.wk.weight": "ct-nvfp4", + "model.layers.2.self_attn.indexer.wq_b.weight": "ct-nvfp4", + "model.layers.2.self_attn.kv_a_proj_with_mqa.weight": "ct-nvfp4", + "model.layers.2.self_attn.kv_b_proj.weight": "ct-nvfp4", + "model.layers.2.self_attn.o_proj.weight": "ct-nvfp4", + "model.layers.2.self_attn.q_a_proj.weight": "ct-nvfp4", + "model.layers.2.self_attn.q_b_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.0.down_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.0.gate_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.0.up_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.1.down_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.1.gate_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.1.up_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.2.down_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.2.gate_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.2.up_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.3.down_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.3.gate_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.3.up_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.4.down_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.4.gate_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.4.up_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.5.down_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.5.gate_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.5.up_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.6.down_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.6.gate_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.6.up_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.7.down_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.7.gate_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.7.up_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.shared_experts.down_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.shared_experts.gate_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.shared_experts.up_proj.weight": "ct-nvfp4", + "model.layers.3.self_attn.kv_a_proj_with_mqa.weight": "ct-nvfp4", + "model.layers.3.self_attn.kv_b_proj.weight": "ct-nvfp4", + "model.layers.3.self_attn.o_proj.weight": "ct-nvfp4", + "model.layers.3.self_attn.q_a_proj.weight": "ct-nvfp4", + "model.layers.3.self_attn.q_b_proj.weight": "ct-nvfp4" + }, + "source_sha256": { + "config.json": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "model.safetensors": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1" + }, + "output_sha256": { + "scope.json": "bbe6c75de3f40ff62d70c9ac55d7828740cb133e345dca3ded2dc1234af0be93", + "model.safetensors.index.json": "75d9ad1ceee75a14bfde401669399f14cbc80dd609ddd4c0c87a4aa4aa922d3b", + "model.safetensors": "640f3d7ea214015d8834a94b56b2dee2c2326dc50245cdd0ded5778799b0d300", + "config.json": "188450fd2bed8cf0c6e06d785410192143b3777bcbbff315151fcecb96cd267e", + "panel.binding.json": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "qfs-source.json": "624fc5b9568aa8bf12b1fc5cb3d54aef94d5e5ad72d73a55bd761dd6ca659cae", + "loader-verification.json": "086b7c5481cfbae5ee958b3bdeb85264128c59142fb005611bd837533fbdf7b0", + "tokenizer.json": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "cpu-reproduction-summary.json": "41f8263ddacbac1379c67637f83fdef2ed843ca4973179817531855939866a55", + "hub-checkpoint-verification.json": "3a4681f9c2876da6ae303592ede176ab17c6abdface107683fa2fe8386de7d36", + "tokenizer_config.json": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63", + "panel.sha256.json": "7fbfbaa8a3b1d7533177e1c2e774f5686e6a3f6b9564be7f2a99d0f66bff92fd", + "build-manifest.json": "57d74b2e6dcc8a789f51f86d251e51b2ec73c6772c329ad56f6132e08626eced", + "generation_config.json": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "cpu-comparison-receipt.json": "fcfcee1383dc0d50b42bbd97c9f2fc5ebe127c97cab791eeac01bf530d06f178", + "LICENSE": "6456969dd395bff476628945088b4cbd9d9c761b01a64e281c07b09daf9f94c3" + }, + "tool_sha256": "9fae546b8cb91df32468bcc7019c0bfbf10e41569526c7f55384f27afafe8699", + "reader_sha256": "588923f0a4700436221923c794a8c112971d9f08e75c746742b0f0ede7921682", + "reference": "compressed-tensors@0.18.0; DeepSeek-V4-Flash@60d8d70770c6776ff598c94bb586a859a38244f1/inference/kernel.py; nvidia/Qwen3.8-Flash-Next-NVFP4@fc694b54fb0174e0913e6adf86691ef85a4ead47/config.json+headers", + "verification": "independent CPU FP32 encoder reconstruction per encoded weight; no GPU parity" +} diff --git a/raw/candidates/ct-nvfp4/model/qfs-source.json b/raw/candidates/ct-nvfp4/model/qfs-source.json new file mode 100644 index 0000000000000000000000000000000000000000..3c71d8671dcbe3678b71a2efe59e0ca341bebdc0 --- /dev/null +++ b/raw/candidates/ct-nvfp4/model/qfs-source.json @@ -0,0 +1,11 @@ +{ + "repository": "https://github.com/malaiwah/quant-fidelity-suite", + "revision": "a903cddb078c2eda8c65d6e6c875a09ac932df49", + "source_files": { + "bin/fidelity/dscompare.py": "4a53f735e1e3fb8bd739854451b57f34e8369bffa9fd4f7b7fd935fb2e7d52df", + "bin/fidelity/dsvalidate.py": "a9d6cd57e801e3ef044a37635e24518c83dbc6d1ec8a4c0b4b5d1b24483ca8d1", + "bin/fidelity/panel.py": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "bin/fidelity_dataset.py": "ac62b63bbfde67e4d5cacecf9cd417193c50f417a6749cc15ee6f1610c153a4e", + "engines/tools/hf_capture.py": "200ba12ca74fb97531307965cbbaa5c10553a5c26e008e524ea2d8aecb005b95" + } +} diff --git a/raw/candidates/ct-nvfp4/model/scope.json b/raw/candidates/ct-nvfp4/model/scope.json new file mode 100644 index 0000000000000000000000000000000000000000..ecd0fb5ca5656ae39931ff731a027c935292f579 --- /dev/null +++ b/raw/candidates/ct-nvfp4/model/scope.json @@ -0,0 +1,105 @@ +{ + "policy": "mixed", + "head_policy": "native", + "kv_cache_dtype": "bf16", + "mtp_included": false, + "activation_quantization": null, + "assignments": [ + { + "tensor_class": "attn.o", + "treatment": "quantized", + "format": "ct-nvfp4", + "bits_per_weight": 4, + "layer_range": "all", + "note": "4 tensors: model.layers.N.self_attn.o_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "attn.other", + "treatment": "quantized", + "format": "mixed", + "bits_per_weight": null, + "layer_range": "0-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 12 x native:bf16@16 (model.layers.N.self_attn.indexer.k_norm.bias, model.layers.N.self_attn.indexer.k_norm.weight, model.layers.N.self_attn.kv_a_layernorm.weight); 6 x quantized:ct-nvfp4@4 (model.layers.N.self_attn.indexer.weights_proj.weight, model.layers.N.self_attn.indexer.wk.weight, model.layers.N.self_attn.indexer.wq_b.weight). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "attn.qkv", + "treatment": "quantized", + "format": "ct-nvfp4", + "bits_per_weight": 4, + "layer_range": "all", + "note": "16 tensors: model.layers.N.self_attn.kv_a_proj_with_mqa.weight, model.layers.N.self_attn.kv_b_proj.weight, model.layers.N.self_attn.q_a_proj.weight, model.layers.N.self_attn.q_b_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "embed_tokens", + "treatment": "native", + "format": "bf16", + "bits_per_weight": 16, + "layer_range": "all", + "note": "1 tensors: model.embed_tokens.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "lm_head", + "treatment": "native", + "format": "bf16", + "bits_per_weight": 16, + "layer_range": "all", + "note": "1 tensors: lm_head.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "mlp.down", + "treatment": "quantized", + "format": "ct-nvfp4", + "bits_per_weight": 4, + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.down_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "mlp.gate", + "treatment": "quantized", + "format": "ct-nvfp4", + "bits_per_weight": 4, + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.gate_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "mlp.up", + "treatment": "quantized", + "format": "ct-nvfp4", + "bits_per_weight": 4, + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "moe.experts", + "treatment": "quantized", + "format": "ct-nvfp4", + "bits_per_weight": 4, + "layer_range": "all", + "note": "72 tensors: model.layers.N.mlp.experts.E.down_proj.weight, model.layers.N.mlp.experts.E.gate_proj.weight, model.layers.N.mlp.experts.E.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "moe.router", + "treatment": "native", + "format": "mixed", + "bits_per_weight": null, + "layer_range": "1-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 3 x native:bf16@16 (model.layers.N.mlp.gate.weight); 3 x native:fp32@32 (model.layers.N.mlp.gate.e_score_correction_bias). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "moe.shared_expert", + "treatment": "quantized", + "format": "ct-nvfp4", + "bits_per_weight": 4, + "layer_range": "all", + "note": "9 tensors: model.layers.N.mlp.shared_experts.down_proj.weight, model.layers.N.mlp.shared_experts.gate_proj.weight, model.layers.N.mlp.shared_experts.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "norm", + "treatment": "native", + "format": "bf16", + "bits_per_weight": 16, + "layer_range": "all", + "note": "9 tensors: model.layers.N.input_layernorm.weight, model.layers.N.post_attention_layernorm.weight, model.norm.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + } + ] +} diff --git a/raw/candidates/ct-nvfp4/model/tokenizer.json b/raw/candidates/ct-nvfp4/model/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..5ad9cccfc9ab5ed66f1c38db328de07cbe4939a9 --- /dev/null +++ b/raw/candidates/ct-nvfp4/model/tokenizer.json @@ -0,0 +1,404 @@ +{ + "version": "1.0", + "truncation": null, + "padding": null, + "added_tokens": [ + { + "id": 0, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 1, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 2, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 3, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + } + ], + "normalizer": null, + "pre_tokenizer": { + "type": "ByteLevel", + "add_prefix_space": false, + "trim_offsets": true, + "use_regex": false + }, + "post_processor": { + "type": "TemplateProcessing", + "single": [ + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + }, + { + "Sequence": { + "id": "A", + "type_id": 0 + } + }, + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + } + ], + "pair": [ + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + }, + { + "Sequence": { + "id": "A", + "type_id": 0 + } + }, + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + }, + { + "Sequence": { + "id": "B", + "type_id": 1 + } + }, + { + "SpecialToken": { + "id": "", + "type_id": 1 + } + } + ], + "special_tokens": { + "": { + "id": "", + "ids": [ + 1 + ], + "tokens": [ + "" + ] + }, + "": { + "id": "", + "ids": [ + 2 + ], + "tokens": [ + "" + ] + } + } + }, + "decoder": { + "type": "ByteLevel", + "add_prefix_space": true, + "trim_offsets": true, + "use_regex": true + }, + "model": { + "type": "BPE", + "dropout": null, + "unk_token": "", + "continuing_subword_prefix": null, + "end_of_word_suffix": null, + "fuse_unk": false, + "byte_fallback": false, + "ignore_merges": false, + "vocab": { + "": 0, + "": 1, + "": 2, + "": 3, + "!": 4, + "\"": 5, + "#": 6, + "$": 7, + "%": 8, + "&": 9, + "'": 10, + "(": 11, + ")": 12, + "*": 13, + "+": 14, + ",": 15, + "-": 16, + ".": 17, + "/": 18, + "0": 19, + "1": 20, + "2": 21, + "3": 22, + "4": 23, + "5": 24, + "6": 25, + "7": 26, + "8": 27, + "9": 28, + ":": 29, + ";": 30, + "<": 31, + "=": 32, + ">": 33, + "?": 34, + "@": 35, + "A": 36, + "B": 37, + "C": 38, + "D": 39, + "E": 40, + "F": 41, + "G": 42, + "H": 43, + "I": 44, + "J": 45, + "K": 46, + "L": 47, + "M": 48, + "N": 49, + "O": 50, + "P": 51, + "Q": 52, + "R": 53, + "S": 54, + "T": 55, + "U": 56, + "V": 57, + "W": 58, + "X": 59, + "Y": 60, + "Z": 61, + "[": 62, + "\\": 63, + "]": 64, + "^": 65, + "_": 66, + "`": 67, + "a": 68, + "b": 69, + "c": 70, + "d": 71, + "e": 72, + "f": 73, + "g": 74, + "h": 75, + "i": 76, + "j": 77, + "k": 78, + "l": 79, + "m": 80, + "n": 81, + "o": 82, + "p": 83, + "q": 84, + "r": 85, + "s": 86, + "t": 87, + "u": 88, + "v": 89, + "w": 90, + "x": 91, + "y": 92, + "z": 93, + "{": 94, + "|": 95, + "}": 96, + "~": 97, + "¡": 98, + "¢": 99, + "£": 100, + "¤": 101, + "¥": 102, + "¦": 103, + "§": 104, + "¨": 105, + "©": 106, + "ª": 107, + "«": 108, + "¬": 109, + "®": 110, + "¯": 111, + "°": 112, + "±": 113, + "²": 114, + "³": 115, + "´": 116, + "µ": 117, + "¶": 118, + "·": 119, + "¸": 120, + "¹": 121, + "º": 122, + "»": 123, + "¼": 124, + "½": 125, + "¾": 126, + "¿": 127, + "À": 128, + "Á": 129, + "Â": 130, + "Ã": 131, + "Ä": 132, + "Å": 133, + "Æ": 134, + "Ç": 135, + "È": 136, + "É": 137, + "Ê": 138, + "Ë": 139, + "Ì": 140, + "Í": 141, + "Î": 142, + "Ï": 143, + "Ð": 144, + "Ñ": 145, + "Ò": 146, + "Ó": 147, + "Ô": 148, + "Õ": 149, + "Ö": 150, + "×": 151, + "Ø": 152, + "Ù": 153, + "Ú": 154, + "Û": 155, + "Ü": 156, + "Ý": 157, + "Þ": 158, + "ß": 159, + "à": 160, + "á": 161, + "â": 162, + "ã": 163, + "ä": 164, + "å": 165, + "æ": 166, + "ç": 167, + "è": 168, + "é": 169, + "ê": 170, + "ë": 171, + "ì": 172, + "í": 173, + "î": 174, + "ï": 175, + "ð": 176, + "ñ": 177, + "ò": 178, + "ó": 179, + "ô": 180, + "õ": 181, + "ö": 182, + "÷": 183, + "ø": 184, + "ù": 185, + "ú": 186, + "û": 187, + "ü": 188, + "ý": 189, + "þ": 190, + "ÿ": 191, + "Ā": 192, + "ā": 193, + "Ă": 194, + "ă": 195, + "Ą": 196, + "ą": 197, + "Ć": 198, + "ć": 199, + "Ĉ": 200, + "ĉ": 201, + "Ċ": 202, + "ċ": 203, + "Č": 204, + "č": 205, + "Ď": 206, + "ď": 207, + "Đ": 208, + "đ": 209, + "Ē": 210, + "ē": 211, + "Ĕ": 212, + "ĕ": 213, + "Ė": 214, + "ė": 215, + "Ę": 216, + "ę": 217, + "Ě": 218, + "ě": 219, + "Ĝ": 220, + "ĝ": 221, + "Ğ": 222, + "ğ": 223, + "Ġ": 224, + "ġ": 225, + "Ģ": 226, + "ģ": 227, + "Ĥ": 228, + "ĥ": 229, + "Ħ": 230, + "ħ": 231, + "Ĩ": 232, + "ĩ": 233, + "Ī": 234, + "ī": 235, + "Ĭ": 236, + "ĭ": 237, + "Į": 238, + "į": 239, + "İ": 240, + "ı": 241, + "IJ": 242, + "ij": 243, + "Ĵ": 244, + "ĵ": 245, + "Ķ": 246, + "ķ": 247, + "ĸ": 248, + "Ĺ": 249, + "ĺ": 250, + "Ļ": 251, + "ļ": 252, + "Ľ": 253, + "ľ": 254, + "Ŀ": 255, + "ŀ": 256, + "Ł": 257, + "ł": 258, + "Ń": 259 + }, + "merges": [] + } +} \ No newline at end of file diff --git a/raw/candidates/ct-nvfp4/model/tokenizer_config.json b/raw/candidates/ct-nvfp4/model/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..df4d789a0874511220f5e2676081000298ad025d --- /dev/null +++ b/raw/candidates/ct-nvfp4/model/tokenizer_config.json @@ -0,0 +1,10 @@ +{ + "backend": "tokenizers", + "bos_token": "", + "clean_up_tokenization_spaces": false, + "eos_token": "", + "model_max_length": 256, + "pad_token": "", + "tokenizer_class": "TokenizersBackend", + "unk_token": "" +} diff --git a/raw/candidates/ct-nvfp4/source-pin-evidence.json b/raw/candidates/ct-nvfp4/source-pin-evidence.json new file mode 100644 index 0000000000000000000000000000000000000000..0070ab33dc763b20f88d3afe8ba5622f96235f6d --- /dev/null +++ b/raw/candidates/ct-nvfp4/source-pin-evidence.json @@ -0,0 +1,271 @@ +{ + "source": { + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "a1a973330e4e912678adbd8ea41e8b86b1c9dccb" + }, + "format": "ct-nvfp4", + "algorithm": "Build tiny FORMAT fixtures, optionally capture via integrated QFS layer-outer.\n\nNo optimizer-quality claim: deterministic CPU minmax/conservative-scale RTN.\nMXFP4 uses ceil(log2(group_max/6)); this is NOT CT's MX observer or Kimi QAT.\nNVFP4 uses a tensor maximum global, rounded E4M3 group scales, then E2M1\nnearest-even RTN. FP8 uses ceil(log2(block_max/448)) UE8M0 + E4M3 RTN.\nNo calibration, activation quantization, kernel parity, training or model code.\n", + "claim": "FORMAT fixture, not Kimi QAT/ModelOpt calibration/CT observer quality", + "reconstruction_scope": { + "scope": "weights-reconstructed/advisory; activation-not-captured", + "applied_to_weights": false, + "declared": { + "group_0": { + "input_activations": null, + "output_activations": null + } + }, + "kv_cache_scheme": null, + "stored_components": [] + }, + "encoded_tensors": { + "model.layers.0.mlp.down_proj.weight": 0.010242283344268799, + "model.layers.0.mlp.gate_proj.weight": 0.0093470998108387, + "model.layers.0.mlp.up_proj.weight": 0.008789058774709702, + "model.layers.0.self_attn.indexer.weights_proj.weight": 0.0075683556497097015, + "model.layers.0.self_attn.indexer.wk.weight": 0.008004322648048401, + "model.layers.0.self_attn.indexer.wq_b.weight": 0.008091520518064499, + "model.layers.0.self_attn.kv_a_proj_with_mqa.weight": 0.0090680792927742, + "model.layers.0.self_attn.kv_b_proj.weight": 0.0077776238322257996, + "model.layers.0.self_attn.o_proj.weight": 0.0087890625, + "model.layers.0.self_attn.q_a_proj.weight": 0.008417036384344101, + "model.layers.0.self_attn.q_b_proj.weight": 0.0084984190762043, + "model.layers.1.mlp.experts.0.down_proj.weight": 0.008603047579526901, + "model.layers.1.mlp.experts.0.gate_proj.weight": 0.007498607039451599, + "model.layers.1.mlp.experts.0.up_proj.weight": 0.0090680792927742, + "model.layers.1.mlp.experts.1.down_proj.weight": 0.0089634470641613, + "model.layers.1.mlp.experts.1.gate_proj.weight": 0.00760323740541935, + "model.layers.1.mlp.experts.1.up_proj.weight": 0.009591236710548401, + "model.layers.1.mlp.experts.2.down_proj.weight": 0.0084286630153656, + "model.layers.1.mlp.experts.2.gate_proj.weight": 0.008196152746677399, + "model.layers.1.mlp.experts.2.up_proj.weight": 0.013671882450580597, + "model.layers.1.mlp.experts.3.down_proj.weight": 0.008789058774709702, + "model.layers.1.mlp.experts.3.gate_proj.weight": 0.00739397294819355, + "model.layers.1.mlp.experts.3.up_proj.weight": 0.008126392960548401, + "model.layers.1.mlp.experts.4.down_proj.weight": 0.009312227368354797, + "model.layers.1.mlp.experts.4.gate_proj.weight": 0.009137839078903198, + "model.layers.1.mlp.experts.4.up_proj.weight": 0.009416848421096802, + "model.layers.1.mlp.experts.5.down_proj.weight": 0.009695872664451599, + "model.layers.1.mlp.experts.5.gate_proj.weight": 0.009033203125, + "model.layers.1.mlp.experts.5.up_proj.weight": 0.0095912404358387, + "model.layers.1.mlp.experts.6.down_proj.weight": 0.00830078125, + "model.layers.1.mlp.experts.6.gate_proj.weight": 0.008405409753322601, + "model.layers.1.mlp.experts.6.up_proj.weight": 0.0085100457072258, + "model.layers.1.mlp.experts.7.down_proj.weight": 0.0085100457072258, + "model.layers.1.mlp.experts.7.gate_proj.weight": 0.010091148316860199, + "model.layers.1.mlp.experts.7.up_proj.weight": 0.0093122199177742, + "model.layers.1.mlp.shared_experts.down_proj.weight": 0.009800508618354797, + "model.layers.1.mlp.shared_experts.gate_proj.weight": 0.0104282908141613, + "model.layers.1.mlp.shared_experts.up_proj.weight": 0.0092308409512043, + "model.layers.1.self_attn.kv_a_proj_with_mqa.weight": 0.0081496462225914, + "model.layers.1.self_attn.kv_b_proj.weight": 0.0082659050822258, + "model.layers.1.self_attn.o_proj.weight": 0.009602867066860199, + "model.layers.1.self_attn.q_a_proj.weight": 0.0083705373108387, + "model.layers.1.self_attn.q_b_proj.weight": 0.008544929325580597, + "model.layers.2.mlp.experts.0.down_proj.weight": 0.009521484375, + "model.layers.2.mlp.experts.0.gate_proj.weight": 0.010009765625, + "model.layers.2.mlp.experts.0.up_proj.weight": 0.007498603314161301, + "model.layers.2.mlp.experts.1.down_proj.weight": 0.0089634470641613, + "model.layers.2.mlp.experts.1.gate_proj.weight": 0.0083240307867527, + "model.layers.2.mlp.experts.1.up_proj.weight": 0.0096609927713871, + "model.layers.2.mlp.experts.2.down_proj.weight": 0.009591236710548401, + "model.layers.2.mlp.experts.2.gate_proj.weight": 0.008056640625, + "model.layers.2.mlp.experts.2.up_proj.weight": 0.0083937868475914, + "model.layers.2.mlp.experts.3.down_proj.weight": 0.010904945433139801, + "model.layers.2.mlp.experts.3.gate_proj.weight": 0.0081612728536129, + "model.layers.2.mlp.experts.3.up_proj.weight": 0.009068083018064499, + "model.layers.2.mlp.experts.4.down_proj.weight": 0.008544921875, + "model.layers.2.mlp.experts.4.gate_proj.weight": 0.0082775317132473, + "model.layers.2.mlp.experts.4.up_proj.weight": 0.008231028914451599, + "model.layers.2.mlp.experts.5.down_proj.weight": 0.009521484375, + "model.layers.2.mlp.experts.5.gate_proj.weight": 0.0079868845641613, + "model.layers.2.mlp.experts.5.up_proj.weight": 0.0102887824177742, + "model.layers.2.mlp.experts.6.down_proj.weight": 0.008370533585548401, + "model.layers.2.mlp.experts.6.gate_proj.weight": 0.009358726441860199, + "model.layers.2.mlp.experts.6.up_proj.weight": 0.0079403817653656, + "model.layers.2.mlp.experts.7.down_proj.weight": 0.008138023316860199, + "model.layers.2.mlp.experts.7.gate_proj.weight": 0.008056640625, + "model.layers.2.mlp.experts.7.up_proj.weight": 0.008475169539451599, + "model.layers.2.mlp.shared_experts.down_proj.weight": 0.0085565485060215, + "model.layers.2.mlp.shared_experts.gate_proj.weight": 0.0085797980427742, + "model.layers.2.mlp.shared_experts.up_proj.weight": 0.0080915167927742, + "model.layers.2.self_attn.indexer.weights_proj.weight": 0.007638111710548401, + "model.layers.2.self_attn.indexer.wk.weight": 0.008649557828903198, + "model.layers.2.self_attn.indexer.wq_b.weight": 0.010463163256645203, + "model.layers.2.self_attn.kv_a_proj_with_mqa.weight": 0.0092424675822258, + "model.layers.2.self_attn.kv_b_proj.weight": 0.008126392960548401, + "model.layers.2.self_attn.o_proj.weight": 0.0085797980427742, + "model.layers.2.self_attn.q_a_proj.weight": 0.010416664183139801, + "model.layers.2.self_attn.q_b_proj.weight": 0.008626304566860199, + "model.layers.3.mlp.experts.0.down_proj.weight": 0.008544921875, + "model.layers.3.mlp.experts.0.gate_proj.weight": 0.008231028914451599, + "model.layers.3.mlp.experts.0.up_proj.weight": 0.008335664868354797, + "model.layers.3.mlp.experts.1.down_proj.weight": 0.0092424675822258, + "model.layers.3.mlp.experts.1.gate_proj.weight": 0.0094633549451828, + "model.layers.3.mlp.experts.1.up_proj.weight": 0.007219590246677399, + "model.layers.3.mlp.experts.2.down_proj.weight": 0.010428294539451599, + "model.layers.3.mlp.experts.2.gate_proj.weight": 0.010393418371677399, + "model.layers.3.mlp.experts.2.up_proj.weight": 0.0089867003262043, + "model.layers.3.mlp.experts.3.down_proj.weight": 0.008265901356935501, + "model.layers.3.mlp.experts.3.gate_proj.weight": 0.008126392960548401, + "model.layers.3.mlp.experts.3.up_proj.weight": 0.0098353810608387, + "model.layers.3.mlp.experts.4.down_proj.weight": 0.008196152746677399, + "model.layers.3.mlp.experts.4.gate_proj.weight": 0.0088820680975914, + "model.layers.3.mlp.experts.4.up_proj.weight": 0.008126392960548401, + "model.layers.3.mlp.experts.5.down_proj.weight": 0.0095912404358387, + "model.layers.3.mlp.experts.5.gate_proj.weight": 0.007899697870016098, + "model.layers.3.mlp.experts.5.up_proj.weight": 0.0101841501891613, + "model.layers.3.mlp.experts.6.down_proj.weight": 0.007568359375, + "model.layers.3.mlp.experts.6.gate_proj.weight": 0.0095796138048172, + "model.layers.3.mlp.experts.6.up_proj.weight": 0.008451912552118301, + "model.layers.3.mlp.experts.7.down_proj.weight": 0.0084402896463871, + "model.layers.3.mlp.experts.7.gate_proj.weight": 0.0099748894572258, + "model.layers.3.mlp.experts.7.up_proj.weight": 0.009626120328903198, + "model.layers.3.mlp.shared_experts.down_proj.weight": 0.008870445191860199, + "model.layers.3.mlp.shared_experts.gate_proj.weight": 0.0085914246737957, + "model.layers.3.mlp.shared_experts.up_proj.weight": 0.0083937868475914, + "model.layers.3.self_attn.kv_a_proj_with_mqa.weight": 0.0074753537774086, + "model.layers.3.self_attn.kv_b_proj.weight": 0.008475169539451599, + "model.layers.3.self_attn.o_proj.weight": 0.009765625, + "model.layers.3.self_attn.q_a_proj.weight": 0.008940193802118301, + "model.layers.3.self_attn.q_b_proj.weight": 0.0091262087225914 + }, + "encoded_formats": { + "model.layers.0.mlp.down_proj.weight": "ct-nvfp4", + "model.layers.0.mlp.gate_proj.weight": "ct-nvfp4", + "model.layers.0.mlp.up_proj.weight": "ct-nvfp4", + "model.layers.0.self_attn.indexer.weights_proj.weight": "ct-nvfp4", + "model.layers.0.self_attn.indexer.wk.weight": "ct-nvfp4", + "model.layers.0.self_attn.indexer.wq_b.weight": "ct-nvfp4", + "model.layers.0.self_attn.kv_a_proj_with_mqa.weight": "ct-nvfp4", + "model.layers.0.self_attn.kv_b_proj.weight": "ct-nvfp4", + "model.layers.0.self_attn.o_proj.weight": "ct-nvfp4", + "model.layers.0.self_attn.q_a_proj.weight": "ct-nvfp4", + "model.layers.0.self_attn.q_b_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.0.down_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.0.gate_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.0.up_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.1.down_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.1.gate_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.1.up_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.2.down_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.2.gate_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.2.up_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.3.down_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.3.gate_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.3.up_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.4.down_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.4.gate_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.4.up_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.5.down_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.5.gate_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.5.up_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.6.down_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.6.gate_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.6.up_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.7.down_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.7.gate_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.experts.7.up_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.shared_experts.down_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.shared_experts.gate_proj.weight": "ct-nvfp4", + "model.layers.1.mlp.shared_experts.up_proj.weight": "ct-nvfp4", + "model.layers.1.self_attn.kv_a_proj_with_mqa.weight": "ct-nvfp4", + "model.layers.1.self_attn.kv_b_proj.weight": "ct-nvfp4", + "model.layers.1.self_attn.o_proj.weight": "ct-nvfp4", + "model.layers.1.self_attn.q_a_proj.weight": "ct-nvfp4", + "model.layers.1.self_attn.q_b_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.0.down_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.0.gate_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.0.up_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.1.down_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.1.gate_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.1.up_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.2.down_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.2.gate_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.2.up_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.3.down_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.3.gate_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.3.up_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.4.down_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.4.gate_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.4.up_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.5.down_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.5.gate_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.5.up_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.6.down_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.6.gate_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.6.up_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.7.down_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.7.gate_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.experts.7.up_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.shared_experts.down_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.shared_experts.gate_proj.weight": "ct-nvfp4", + "model.layers.2.mlp.shared_experts.up_proj.weight": "ct-nvfp4", + "model.layers.2.self_attn.indexer.weights_proj.weight": "ct-nvfp4", + "model.layers.2.self_attn.indexer.wk.weight": "ct-nvfp4", + "model.layers.2.self_attn.indexer.wq_b.weight": "ct-nvfp4", + "model.layers.2.self_attn.kv_a_proj_with_mqa.weight": "ct-nvfp4", + "model.layers.2.self_attn.kv_b_proj.weight": "ct-nvfp4", + "model.layers.2.self_attn.o_proj.weight": "ct-nvfp4", + "model.layers.2.self_attn.q_a_proj.weight": "ct-nvfp4", + "model.layers.2.self_attn.q_b_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.0.down_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.0.gate_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.0.up_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.1.down_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.1.gate_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.1.up_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.2.down_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.2.gate_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.2.up_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.3.down_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.3.gate_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.3.up_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.4.down_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.4.gate_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.4.up_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.5.down_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.5.gate_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.5.up_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.6.down_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.6.gate_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.6.up_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.7.down_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.7.gate_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.experts.7.up_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.shared_experts.down_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.shared_experts.gate_proj.weight": "ct-nvfp4", + "model.layers.3.mlp.shared_experts.up_proj.weight": "ct-nvfp4", + "model.layers.3.self_attn.kv_a_proj_with_mqa.weight": "ct-nvfp4", + "model.layers.3.self_attn.kv_b_proj.weight": "ct-nvfp4", + "model.layers.3.self_attn.o_proj.weight": "ct-nvfp4", + "model.layers.3.self_attn.q_a_proj.weight": "ct-nvfp4", + "model.layers.3.self_attn.q_b_proj.weight": "ct-nvfp4" + }, + "source_sha256": { + "config.json": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "model.safetensors": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1" + }, + "output_sha256": { + "scope.json": "bbe6c75de3f40ff62d70c9ac55d7828740cb133e345dca3ded2dc1234af0be93", + "model.safetensors.index.json": "75d9ad1ceee75a14bfde401669399f14cbc80dd609ddd4c0c87a4aa4aa922d3b", + "model.safetensors": "640f3d7ea214015d8834a94b56b2dee2c2326dc50245cdd0ded5778799b0d300", + "config.json": "188450fd2bed8cf0c6e06d785410192143b3777bcbbff315151fcecb96cd267e", + "panel.binding.json": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "qfs-source.json": "624fc5b9568aa8bf12b1fc5cb3d54aef94d5e5ad72d73a55bd761dd6ca659cae", + "loader-verification.json": "086b7c5481cfbae5ee958b3bdeb85264128c59142fb005611bd837533fbdf7b0", + "tokenizer.json": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "cpu-reproduction-summary.json": "41f8263ddacbac1379c67637f83fdef2ed843ca4973179817531855939866a55", + "hub-checkpoint-verification.json": "3a4681f9c2876da6ae303592ede176ab17c6abdface107683fa2fe8386de7d36", + "tokenizer_config.json": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63", + "panel.sha256.json": "7fbfbaa8a3b1d7533177e1c2e774f5686e6a3f6b9564be7f2a99d0f66bff92fd", + "build-manifest.json": "57d74b2e6dcc8a789f51f86d251e51b2ec73c6772c329ad56f6132e08626eced", + "generation_config.json": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "cpu-comparison-receipt.json": "fcfcee1383dc0d50b42bbd97c9f2fc5ebe127c97cab791eeac01bf530d06f178", + "LICENSE": "6456969dd395bff476628945088b4cbd9d9c761b01a64e281c07b09daf9f94c3" + }, + "tool_sha256": "9fae546b8cb91df32468bcc7019c0bfbf10e41569526c7f55384f27afafe8699", + "reader_sha256": "588923f0a4700436221923c794a8c112971d9f08e75c746742b0f0ede7921682", + "reference": "compressed-tensors@0.18.0; DeepSeek-V4-Flash@60d8d70770c6776ff598c94bb586a859a38244f1/inference/kernel.py; nvidia/Qwen3.8-Flash-Next-NVFP4@fc694b54fb0174e0913e6adf86691ef85a4ead47/config.json+headers", + "verification": "independent CPU FP32 encoder reconstruction per encoded weight; no GPU parity" +} diff --git a/raw/candidates/ct-nvfp4/source/LICENSE b/raw/candidates/ct-nvfp4/source/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..71f32fb2284323cef90b3e784a7655747c8ae683 --- /dev/null +++ b/raw/candidates/ct-nvfp4/source/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Michel Belleau + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/raw/candidates/ct-nvfp4/source/README.md b/raw/candidates/ct-nvfp4/source/README.md new file mode 100644 index 0000000000000000000000000000000000000000..84524ad288d3abdc9da67201d2e6389b3968319b --- /dev/null +++ b/raw/candidates/ct-nvfp4/source/README.md @@ -0,0 +1,202 @@ +--- +license: mit +library_name: transformers +pipeline_tag: text-generation +tags: + - glm_moe_dsa + - fixture + - testing + - random-initialization + - cpu + - bfloat16 + - reproducibility +datasets: + - malaiwah/glm-moe-dsa-tiny-cpu-repro-v1 +--- + +# Complete tiny GLM MoE DSA fixture — CPU, BF16, reproducible + +**A runnable random-init architecture fixture, not a language model quality claim.** +It is not trained, distilled, or a quantization of GLM/Fruit. Generated text is meaningless. + +This checkpoint is constructed and saved by the native Transformers +`GlmMoeDsaForCausalLM` implementation. It includes the complete MLA attention path, +DSA indexers, dense/MoE weights, router buffers, independent `lm_head`, and a working +byte-level tokenizer. There is no `trust_remote_code` requirement and no missing-weight +or mismatched-size override. + +Inspired by [GLM-5.2-SIQ-Fruit-bf16](https://huggingface.co/malaiwah/GLM-5.2-SIQ-Fruit-bf16)'s +architecture and dense/MoE plus full/shared-indexer schedules. **No Fruit or other GLM +weights were reused.** Fruit is about 10.1 GB; this checkpoint is **571,000 bytes**. + +## Geometry + +| Property | Value | +|---|---:| +| Trainable parameters | 277,824 | +| Additional stored router-buffer elements | 24, FP32 | +| Stored tensors | 139 (native saving expands fused experts into per-expert keys) | +| Decoder layers / hidden width | 4 / 64 | +| Dense/MoE schedule | dense, sparse, sparse, sparse | +| Routed experts / active experts / shared experts | 8 / 2 / 1 | +| Attention heads / key-value heads | 4 / 4 | +| Query LoRA rank / KV LoRA rank | 32 / 16 | +| QK non-RoPE / RoPE / value head dimensions | 8 / 8 / 16 | +| DSA indexer heads / head dimension / token top-k | 4 / 16 / 8 | +| DSA indexer schedule | full, shared, full, shared | +| Vocabulary | 260: 256 byte symbols + pad/BOS/EOS/unknown | +| Maximum context | 256 tokens | +| Output head | Complete, untied, 260 x 64 BF16 | +| Weight dtype | BF16; native router correction buffers retained FP32 | +| MTP | Intentionally absent: zero next-n-prediction layers, no orphan MTP tensors | + +The shared DSA layers correctly reuse the preceding full indexer's selection. +The published artifact is deliberately BF16, matching QFS's lossless BF16 hidden-capture +contract. Initialization starts in FP32 and is rounded during **artifact construction**, +not silently inside a capture labelled lossless. + +## What was actually verified + +Tested on Linux x86-64, Intel Xeon X5570, Python 3.12.14, **two CPU threads**, no CUDA, +with PyTorch **2.11.0+cpu** and Transformers **5.16.1**. The exact package environment is +in [requirements-cpu.txt](requirements-cpu.txt). + +- Native save/reload preserved every in-memory state tensor's value and dtype. +- QFS loading report: **zero missing, unexpected, mismatched, or conversion-error weights**. +- Two independent generator processes produced byte-identical checkpoint/config/tokenizer files. +- Tokenizer roundtrips include ASCII, accented text, and non-Latin UTF-8 text. +- A real four-by-64-token CPU forward produced finite, nonconstant logits of shape `[4,64,260]`. +- Greedy cached generation executed successfully on CPU. +- **Two fresh QFS capture processes** covered four 64-token windows, **252 scored positions**. +- Both complete captures passed QFS tensor verification and strict dataset validation. +- Their checkpoint, head, stack and capture-content digests agree. +- `fidelity-dataset compare --self-compare --force-compute` returned **exactly 0.0 nats**; + the saved tokenwise array contains **252 literal positive float64 zeros**. +- The comparison receipt passed strict validation. Its reported top-1 agreement is **1.0**. + +QFS retains its reproduction hash-proof result (`short_circuited: true`) even when +forced arithmetic runs. **`self_compare.force_compute_agreed: true` proves that the +independently executed numerical KL replay agreed with those zeros.** The receipt's +top-1 value comes from the identity proof, not a separate top-1 benchmark. + +This is a reproduction confirmation, **not registry admission, a qualified production +reference, or evidence of quantization quality**. The comparison receipt's generic +`determinism.run_count` is one comparison and its `identical_across_runs` field remains +null; the separate evidence summary records the two actual fresh capture processes +and equal tensor digests. No registry row was submitted. + +### Measured resource use + +| Operation | Measured result | +|---|---:| +| First fresh QFS capture, including process startup | 6.49 s | +| Second fresh QFS capture, including process startup | 6.43 s | +| Forced comparison command, including process startup | 3.73 s | +| Full two-capture + verification + comparison driver | 34.86 s | +| Peak capture process RSS | 367,374,336 bytes (about 350 MiB) | +| Materialized model parameters + runtime buffers | 555,776 bytes | + +These are local two-thread CPU observations, **not a benchmark of HF CPU Basic** or a +latency guarantee for another machine. They make this fixture a practical candidate +for a bounded CPU-only demo without downloading large GLM weights. + +## Immutable identities and evidence + +Checkpoint/config/tokenizer revision used for the captures: + +```text +45563636ef723acfb826755493447dc40c7a0c37 +``` + +Checkpoint file SHA-256: + +```text +9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1 +``` + +Both independent captures' content digest: + +```text +d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39 +``` + +- [Build manifest and all tensor hashes](build-manifest.json) +- [Clean loader, tokenizer, forward and generation evidence](loader-verification.json) +- [Fresh Hub-download byte verification](hub-checkpoint-verification.json) +- [CPU reproduction summary](cpu-reproduction-summary.json) +- [Forced zero-KL comparison receipt](cpu-comparison-receipt.json) +- [Full capture/replay evidence bundle](https://huggingface.co/datasets/malaiwah/glm-moe-dsa-tiny-cpu-repro-v1) +- [Pinned QFS source identity](qfs-source.json) + +The evidence dataset is a **bundle**: `first/` and `repeat/` are separate conformant +fidelity dataset trees, while `comparison/` contains the computed comparison. Download +the bundle and use these local subdirectories; its repository root is not itself a +single root-format fidelity dataset. Original sealed capture files are not rewritten. + +## Load and run on CPU + +Use a Python 3.12 Linux environment with the recorded CPU packages. At minimum: + +```bash +pip install 'torch==2.11.0+cpu' --index-url https://download.pytorch.org/whl/cpu +pip install 'transformers==5.16.1' 'tokenizers==0.23.2' 'safetensors==0.8.0' +``` + +```python +import torch +from transformers import AutoModelForCausalLM, AutoTokenizer + +repo = "malaiwah/glm-moe-dsa-tiny-random-bf16" +revision = "45563636ef723acfb826755493447dc40c7a0c37" +torch.set_num_threads(2) +tokenizer = AutoTokenizer.from_pretrained(repo, revision=revision, trust_remote_code=False) +model = AutoModelForCausalLM.from_pretrained( + repo, revision=revision, dtype=torch.bfloat16, trust_remote_code=False +).to("cpu").eval() +inputs = tokenizer("A tiny, complete CPU fixture.", return_tensors="pt", + return_token_type_ids=False) +with torch.inference_mode(): + logits = model(**inputs, use_cache=False).logits +print(logits.shape, torch.isfinite(logits).all().item()) +``` + +## Reproduce the full QFS zero-KL check + +In a fresh Python 3.12 Linux environment, install the HF CLI if needed, then: + +```bash +pip install 'huggingface_hub==1.30.0' +hf download malaiwah/glm-moe-dsa-tiny-random-bf16 \ + --revision 45563636ef723acfb826755493447dc40c7a0c37 --local-dir tiny +pip install -r tiny/requirements-cpu.txt + +git clone https://github.com/malaiwah/quant-fidelity-suite.git qfs +git -C qfs checkout a903cddb078c2eda8c65d6e6c875a09ac932df49 + +python tiny/build_panel.py --model-dir tiny \ + --model-repository malaiwah/glm-moe-dsa-tiny-random-bf16 \ + --model-revision 45563636ef723acfb826755493447dc40c7a0c37 \ + --out tiny-panel --qfs-root qfs + +python tiny/verify_cpu.py --model-dir tiny \ + --model-repository malaiwah/glm-moe-dsa-tiny-random-bf16 \ + --model-revision 45563636ef723acfb826755493447dc40c7a0c37 \ + --panel-dir tiny-panel --out cpu-proof --qfs-root qfs +``` + +Both tools refuse existing output directories. No GPU, cloud API, registry changes, +missing-weight exception, or disabled sanity probe is used. The lane is the schema's +`other`, explicitly disclosed as CPU; it is never mislabelled `local-cuda-budget`. +The synthetic panel is independent of the large-vocabulary GLM benchmark panels and +cannot be used to rank real GLM quantizations. + +To regenerate the native checkpoint itself with the recorded build versions: + +```bash +python tiny/build_fixture.py --out regenerated-tiny +``` + +The fixed seed is **20260907**. The generator checks native save/reload equality; +[build-manifest.json](build-manifest.json) provides the expected file/tensor hashes. +Byte-identical generation was measured in this pinned CPU environment, not asserted +across arbitrary future PyTorch releases or hardware architectures. diff --git a/raw/candidates/ct-nvfp4/source/build-manifest.json b/raw/candidates/ct-nvfp4/source/build-manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..539ac3c8e8430caad8e5c81ca4d23dce391cac14 --- /dev/null +++ b/raw/candidates/ct-nvfp4/source/build-manifest.json @@ -0,0 +1,1561 @@ +{ + "architecture_inspiration": "GLM-5.2-SIQ-Fruit-bf16 geometry and dense/MoE plus full/shared DSA schedules; no Fruit or GLM model weights reused.", + "files": { + "config.json": { + "bytes": 1479, + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + "generation_config.json": { + "bytes": 216, + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + "model.safetensors": { + "bytes": 571000, + "sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1" + }, + "tokenizer.json": { + "bytes": 6763, + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + "tokenizer_config.json": { + "bytes": 236, + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + }, + "generation": "Native GlmMoeDsaForCausalLM random initialization in FP32, rounded to the published BF16 artifact; native router correction buffers retained FP32.", + "generator_sha256": "19c3489f1bc7e8e9323cb26afbead562816a6918d6823af252eb6d04dff8e81e", + "limitations": [ + "Random initialization; not trained or distilled.", + "Not a quantization or behavioral approximation of a released GLM model.", + "MTP intentionally absent (zero next-n-prediction layers); no unmatched MTP tensors.", + "This build manifest describes generated bytes, not proof of clean loading or capture; see separately measured verification evidence." + ], + "parameter_count": 277824, + "schema": "malaiwah.glm-moe-dsa-tiny-build.v1", + "seed": 20260907, + "stored_elements": 277848, + "tensor_count": 139, + "tensors": [ + { + "bytes": 33280, + "dtype": "torch.bfloat16", + "elements": 16640, + "name": "lm_head.weight", + "sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "shape": [ + 260, + 64 + ] + }, + { + "bytes": 33280, + "dtype": "torch.bfloat16", + "elements": 16640, + "name": "model.embed_tokens.weight", + "sha256": "18df1b3a5f263a31f5bd4225c3c4629573b75e47b7e28b6e73501586bb47d6f1", + "shape": [ + 260, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.0.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 16384, + "dtype": "torch.bfloat16", + "elements": 8192, + "name": "model.layers.0.mlp.down_proj.weight", + "sha256": "101a9db78e4e21058dcb6f5240e751bcaf3bd662b98696a63a719f86ecabf787", + "shape": [ + 64, + 128 + ] + }, + { + "bytes": 16384, + "dtype": "torch.bfloat16", + "elements": 8192, + "name": "model.layers.0.mlp.gate_proj.weight", + "sha256": "ef5262b354f74dce3a9dc4c3134e4db8cbf63f03ed8a1cd78ebb3e9a05af97cc", + "shape": [ + 128, + 64 + ] + }, + { + "bytes": 16384, + "dtype": "torch.bfloat16", + "elements": 8192, + "name": "model.layers.0.mlp.up_proj.weight", + "sha256": "359b4dac1da3e3956583050af84147aef2f41b8680a85b32083ffd0e1847d997", + "shape": [ + 128, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.0.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.0.self_attn.indexer.k_norm.bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 16 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.0.self_attn.indexer.k_norm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 512, + "dtype": "torch.bfloat16", + "elements": 256, + "name": "model.layers.0.self_attn.indexer.weights_proj.weight", + "sha256": "50ca7a10fe9a0556d8c3ad38bd3f715ee6c6e13084b4cb6b51b2ef78f57c53b2", + "shape": [ + 4, + 64 + ] + }, + { + "bytes": 2048, + "dtype": "torch.bfloat16", + "elements": 1024, + "name": "model.layers.0.self_attn.indexer.wk.weight", + "sha256": "f724d0b2c09ba9ae41cfc3fbe4e458bd7f644e5f0fb8c1446e19b3cf8c650274", + "shape": [ + 16, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.0.self_attn.indexer.wq_b.weight", + "sha256": "048349f93320b7625130fa5abc86dbcc89715b9f02d6853284563e765eb7bc11", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.0.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.0.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "5ad58e7c4515d8c4e84ecf10ecfa7aacb3c39ee1d6a3219307036bd8b59f529d", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.0.self_attn.kv_b_proj.weight", + "sha256": "9a8cfdd6e51c3868d27f147509d24549480e70f278758a8c16adf1ea5c197938", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.0.self_attn.o_proj.weight", + "sha256": "734b1edea5c19958ab29dfba4314ab5a5a25280be3db3de20b82b2e7c78c35ff", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.0.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.0.self_attn.q_a_proj.weight", + "sha256": "6d6e018ec4d4251755a002469f0778accef3b7628062f82a5d292d4130fd4c85", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.0.self_attn.q_b_proj.weight", + "sha256": "28ef2f379f06054843ff97f99d63f515a2f583059dd49fd894a53d04733f0650", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.1.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.0.down_proj.weight", + "sha256": "a0378aa3bb69ed49af25a51d57476ef63ccf5dc98bc4d3008d28660e16f82492", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.0.gate_proj.weight", + "sha256": "e6c7b0ce29c7e6ea16adfd8423cd9a8a27f1be217a2061a635468c9e5603439c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.0.up_proj.weight", + "sha256": "528f777edc3fc406c76dc1e150a648c23009c701134a3a86dcbdeb15f8ddc4bb", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.1.down_proj.weight", + "sha256": "c966c5eed64d8bb32ff5cf25587fc4eb714b7536b6f670725efb136acc6ca26c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.1.gate_proj.weight", + "sha256": "e55ceb89e6891b34fb67fe5c99b529a1cab9729bea2f6ef08be6af7eefcf6c2e", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.1.up_proj.weight", + "sha256": "46b43c2f3a025bab46be05795bb60916e592bb58d4fdf2a18d2e88d37a7a4fb8", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.2.down_proj.weight", + "sha256": "a649be4fd07f95d770fbe14e87561a13f62f155d2053b8a35fa6962b5d5e8c8d", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.2.gate_proj.weight", + "sha256": "5560e590344e57ff54425f4aa6c07edaaade8c73343e32c27199f1c0dc61fe51", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.2.up_proj.weight", + "sha256": "35a639103a8a914203b4dde3f87d197515879ae6ca72557cde8ea9dea6e6e0d2", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.3.down_proj.weight", + "sha256": "0969db499dfe821348b3c06873d36635f7216f1f595968ad43ae984b57565205", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.3.gate_proj.weight", + "sha256": "75c5c77c39a77a4a6dbe7b601a88814bca9cae6fcde0069ff2ca86352e6c13e7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.3.up_proj.weight", + "sha256": "241533cb545cfed7685091b023213c9d530cb54431a712eba7bf3aaebdae3b53", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.4.down_proj.weight", + "sha256": "ca1273d291e431a10b8d8c2170031b29440c2bec8bc1d7f46353990c7fe1a03f", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.4.gate_proj.weight", + "sha256": "69dc9149cbfd65fb10bd6c11f99357d279d471e5874cf19dbef7cfd8ee4d796c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.4.up_proj.weight", + "sha256": "81cb04732e3cc53acb1152c7fc06a6399af18a5f282762cb72abb56b1e6b7c6f", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.5.down_proj.weight", + "sha256": "ebd8e01f9c2daf657e915575afb3ff5ba261a2a83c25c9c50818319dd587a2f2", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.5.gate_proj.weight", + "sha256": "bc70a7d1a5263ca17d00766bb2dc48e1debb815344150741e55dea48af4d75c0", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.5.up_proj.weight", + "sha256": "f84a95d64728067676d4f7b61ac4a589fa11e45226a8996a4719d65f0b018dbf", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.6.down_proj.weight", + "sha256": "00535633e5d98b7a527cc1198d572a9104405e2aff7ee303ae60195654fb24c2", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.6.gate_proj.weight", + "sha256": "2bb299a5e306108c7af11aa5c6114abeb4d06bde9001e6f7644e0d9dca184dc5", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.6.up_proj.weight", + "sha256": "72df8a498b866a242abc9383b16c5b4428feadab02c7f274afa28653e8586107", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.7.down_proj.weight", + "sha256": "90331ab3da1e867c32d3db1aac94c69c86349dbb539400ed9e0c19c148bf5e43", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.7.gate_proj.weight", + "sha256": "576a9df3d1d72f7323e8a8490118821d826f50c9403ca7ecbe196277e62c7730", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.7.up_proj.weight", + "sha256": "3869533066e5bca84402355c6b80b177424f2d79d2b97cbb9cff30eee748135f", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.float32", + "elements": 8, + "name": "model.layers.1.mlp.gate.e_score_correction_bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 8 + ] + }, + { + "bytes": 1024, + "dtype": "torch.bfloat16", + "elements": 512, + "name": "model.layers.1.mlp.gate.weight", + "sha256": "7d1dbc5cc90900cdc1f9d4a241c8b62d0ad50de09231f9f036cce33982cfdfe7", + "shape": [ + 8, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.shared_experts.down_proj.weight", + "sha256": "eb5297f619dfdfb40419b3330406e8ff43cb0fe35797911f2de6ebff4b95690a", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.shared_experts.gate_proj.weight", + "sha256": "eeeff2280eef91eac1215b28717f2b7fdee09fdbfd484ff44855e7e7cdd11718", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.shared_experts.up_proj.weight", + "sha256": "dab5aeab83d842104e1c5557b9b6d6cb5fe519284b909e8c0c975c752dc92d41", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.1.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.1.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.1.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "bff5998ab14190d56392c70e92927904d84a2b9d04ee222967d774a5bb5eecc4", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.1.self_attn.kv_b_proj.weight", + "sha256": "876302ef3f8bba74a997f973913ca4b802aa488d27b46747c470062c9a7ebee5", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.1.self_attn.o_proj.weight", + "sha256": "ecda88672dc8fbc3bac348fa6118010e51b170d8fe3596a811bc9aa95f71915c", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.1.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.self_attn.q_a_proj.weight", + "sha256": "29fc979642704e621b0b6b59a24c13d6900782bfa9655ea9a3311c1d4c69770a", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.self_attn.q_b_proj.weight", + "sha256": "01bae246d61c4d08e751e42e6a03315b55266ae46bd15b34bd343f606a538349", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.2.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.0.down_proj.weight", + "sha256": "8c1c19d08541dc9251736b480f53cfefd21bfbcb0b4e9f725dc66e6c52d7705c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.0.gate_proj.weight", + "sha256": "8c326913b2ef159b507b584c1ae018619573a09b6f41ab687df629d3685884c4", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.0.up_proj.weight", + "sha256": "8611bc004f735fbc1c14a9c9c23f4150c7e754127e44926a44efd0b767a653ed", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.1.down_proj.weight", + "sha256": "1d4d668c4c8183e5991eefe780a138eda70578a4740c07df5b386f233cb4e5c3", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.1.gate_proj.weight", + "sha256": "21224f6173f4785ff6252dd0c1f7a6937b36bbd5bc1c20d25feecc85d6d25f3e", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.1.up_proj.weight", + "sha256": "05542672d0174f9ddfee4bd385b56455c004532da88bf34363b1e543948bf899", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.2.down_proj.weight", + "sha256": "7330dee9a6a416e9922f61d10ee0507584e007cbdd349131471b43a745b6fed8", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.2.gate_proj.weight", + "sha256": "eca5904e6634e97ca89e7dfb1f12774f78adb33b78256136e7e8ee522af92d96", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.2.up_proj.weight", + "sha256": "5a90748752e46844a0cf0efd84c16ec2db25315ffa7a13b9c4bff2697d00bbf6", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.3.down_proj.weight", + "sha256": "a42569462225d60158dfaf24406463f135b632fe258e66ae2e521efed502a37c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.3.gate_proj.weight", + "sha256": "8cf448df350984fe0429a1ca3b2081315b594e50ce85fbc2e9f63eafb8a896b7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.3.up_proj.weight", + "sha256": "54a1269ba638d42c7d6d3926826b04d52310c82804fddcd73c253680a4270032", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.4.down_proj.weight", + "sha256": "5a236edfdc8fc79f687cec866d13724515b8f26465dca2ffde051d0870d5d0ac", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.4.gate_proj.weight", + "sha256": "6c18140a11c9986f99b7c269da01a8f69f1b5215c41be1801d6900eb511bdc76", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.4.up_proj.weight", + "sha256": "7b964f5c207a6bbeaa589a6c07f9665967aca4e7c57148190ed6a6f12e0ca572", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.5.down_proj.weight", + "sha256": "74c2633e7d3b0bf844d3e3812533774fc09b6552435e778e68b442ad161c0985", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.5.gate_proj.weight", + "sha256": "6177166c1bc51e03fde63b60d85347f5a5412446df5b4dd893817d18fcf0d56c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.5.up_proj.weight", + "sha256": "7bb8e1f65a918589a1593926dc93bf3fa1329f5d31f16266c3ad6fe0fd390d47", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.6.down_proj.weight", + "sha256": "af74e303b86b1aec96fd69b64d39848d7d08f255822739cf7d5f4456de67f010", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.6.gate_proj.weight", + "sha256": "c4fc94863e17270bf8cb5a18d3a125bea82d04bfb38457fd27896a00ddeea056", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.6.up_proj.weight", + "sha256": "4e92bebe11c518a225d75d4d7de7b85f9a82baad7a961ac090dd7343a612b577", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.7.down_proj.weight", + "sha256": "8971d6a869ba59445fe28163bd73c74c8338e0b8b675f008277b5a8973967bb2", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.7.gate_proj.weight", + "sha256": "3f90ff90c18d50349a50d11c472d48c6b297496ba5bedfe4ff0da257e1e2fdef", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.7.up_proj.weight", + "sha256": "5a2fcecdbb84a9138b4dd32da15793393aeaee1d00da95ed3d55803b1f45cc86", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.float32", + "elements": 8, + "name": "model.layers.2.mlp.gate.e_score_correction_bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 8 + ] + }, + { + "bytes": 1024, + "dtype": "torch.bfloat16", + "elements": 512, + "name": "model.layers.2.mlp.gate.weight", + "sha256": "aa35eb60ee6dd8e32728c95210b15016120675b111542f36ee1b1cca64668f9d", + "shape": [ + 8, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.shared_experts.down_proj.weight", + "sha256": "e8a1e6e8db3b1996aad9cd457ae20aa5aaac876d400fd6e8d764f543ff7833b9", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.shared_experts.gate_proj.weight", + "sha256": "c5b456aab9a02d3828987060b24d24c07e7b611d3036f0d5c28662c922d1238d", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.shared_experts.up_proj.weight", + "sha256": "6a84e814bd21fcc17878151b94508853dd70099787ef5303cdc06f90b6cd7092", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.2.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.2.self_attn.indexer.k_norm.bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 16 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.2.self_attn.indexer.k_norm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 512, + "dtype": "torch.bfloat16", + "elements": 256, + "name": "model.layers.2.self_attn.indexer.weights_proj.weight", + "sha256": "d65c6e5c3f34fcad47b7137c46dd3bcd6d5cf24ce508df7fad9d20788d3a18b8", + "shape": [ + 4, + 64 + ] + }, + { + "bytes": 2048, + "dtype": "torch.bfloat16", + "elements": 1024, + "name": "model.layers.2.self_attn.indexer.wk.weight", + "sha256": "917ff454cb253fa0e5d3d68bf15e716401bb928fbd7cd260a348afec25b1b2c8", + "shape": [ + 16, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.self_attn.indexer.wq_b.weight", + "sha256": "3fe5b407fe2d74a0dda78b6cb7ae3f65066a781fd5f81971b83be600fc911d14", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.2.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.2.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "26cecf47e8fb14a837f760549a9b9dd8589c37dc76870f8b115d4ab634b853ab", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.2.self_attn.kv_b_proj.weight", + "sha256": "23447f5f72c55b0cd7acd571ff1317c16c8097e9f0de4cc9b66101b51f7988c1", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.2.self_attn.o_proj.weight", + "sha256": "a1a0c84b3214c9b7b00c438754280833964cdc719aadeff64358b3d09b2063d8", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.2.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.self_attn.q_a_proj.weight", + "sha256": "3eda4fc6a047b282d63ad2884d870ee8150a99f3c71d21031ea71e749cf39815", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.self_attn.q_b_proj.weight", + "sha256": "58ecb919757c3c93d6a43b9344236d9abd32870e68907f37cb8db779d2c93fff", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.3.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.0.down_proj.weight", + "sha256": "e8c77c987baa36019ce1adf05e02e2a31395286e584428b2049e06331848c216", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.0.gate_proj.weight", + "sha256": "69871151865d8a23e2cc39b9fe5da60eb4f41cb6c053520f29d7c7b58e6fa5e0", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.0.up_proj.weight", + "sha256": "12df1ea42b96e959785c09427c3ca3bcdc53aa7942d15187c7b1e19bdd66d08a", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.1.down_proj.weight", + "sha256": "5feaa5de7da59348b465458b8aff5373b11dae8b5150f8e7bb8015acc172e3ff", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.1.gate_proj.weight", + "sha256": "e907e6e36b7266d56e190c1e56551e0a40d64741ce668328d898c17b488ec6c9", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.1.up_proj.weight", + "sha256": "c0062ef6004073cbabf3098703b5f565f0e973e094d90c3eba36c7be471f947e", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.2.down_proj.weight", + "sha256": "efec1e8a6a5e12a6db226699e10a6d346fa95c453009f148fe304d378567f5fe", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.2.gate_proj.weight", + "sha256": "7722cc87a7696f53e7f1e0d741230a7db18d2c324f7faec742a9621c75189cb7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.2.up_proj.weight", + "sha256": "5917df5932d0ce4854458ce357a8a2c3384bc463531996875d1c68c6ea17734c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.3.down_proj.weight", + "sha256": "fd331dc77911f8d80ddfdee938993a08b3715d06767901879c5a55700dbb8961", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.3.gate_proj.weight", + "sha256": "1e8aa3749cdc3d21baf7108c47bb69ad4a532c1f41c0556ca8d68ca2c226a7a8", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.3.up_proj.weight", + "sha256": "858e72360951a5073d117a75b2cd759bc3503c6c270388b30fe73d7554f54dae", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.4.down_proj.weight", + "sha256": "b80cf998a1db7569ca4600388bbe4c6d20bd7fe7209c4e37b5de015041d01423", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.4.gate_proj.weight", + "sha256": "b39a0f5b9cd6f9175e7fa29b342772476caf8a76dad1c34d88075988c1894853", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.4.up_proj.weight", + "sha256": "cef4d7b5fb77e750e91c17cae1622a6362ba204b1b30bf5ed7b65f9e6ed15ff1", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.5.down_proj.weight", + "sha256": "65a04840ec88842630cc6f120899a3bfa6151990d7411bfe44839727648e4d03", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.5.gate_proj.weight", + "sha256": "101836900c549af917f8392a6b1428e2f14e4e1f1ef0fdd9b04e79b98c1c3d02", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.5.up_proj.weight", + "sha256": "4fc8edda4b1a92a43be268a8b249274dd5f4370fd6ea6a3134b8c2c4cf730d95", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.6.down_proj.weight", + "sha256": "fd3a10e1464c20bf5e575c105f39882bcbddcab892ef36f24e5a852d597ee7ef", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.6.gate_proj.weight", + "sha256": "8211aaeed6f1ea2711aa1865309d2d36742c0b41021eea1e00fcac45dc353b4b", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.6.up_proj.weight", + "sha256": "ec4f5d1acc5d045de6ae4106bc8f52d17d64ac355c910f12fac8b1b0b573296d", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.7.down_proj.weight", + "sha256": "03c257936ec78df3f941fe0ca4ce5aad636654cf2a351b64515ac07ad8871cae", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.7.gate_proj.weight", + "sha256": "67c1e28fd0a028104b9c76279a3c473f50452633c8a4feabda637e5f5b71f797", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.7.up_proj.weight", + "sha256": "1b18f8b452b71ca57fec09892a48df2ee2108067f97f62b76a3817c9bea91708", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.float32", + "elements": 8, + "name": "model.layers.3.mlp.gate.e_score_correction_bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 8 + ] + }, + { + "bytes": 1024, + "dtype": "torch.bfloat16", + "elements": 512, + "name": "model.layers.3.mlp.gate.weight", + "sha256": "7e86bda3f7704f19dc2a3f6a0ca22b0df554723adf0cf3add837a1e497ad4d3a", + "shape": [ + 8, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.shared_experts.down_proj.weight", + "sha256": "110ad4d8dd59a5ec2b0d4c2e0a79d022bcdba240a4998ff84ad2590dd32fce2c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.shared_experts.gate_proj.weight", + "sha256": "cca5d02ac9eccab3ee8be47f55ef4d59750dd311800e25c22cc3f22b437ffd8b", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.shared_experts.up_proj.weight", + "sha256": "c8fe3987299d1526946a87facc4d3f99300fafbac552471ed826454c41ed31e5", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.3.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.3.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.3.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "5c230cafd4add95096f53702bab8ef1673993cca9433de8c874638958a61995a", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.3.self_attn.kv_b_proj.weight", + "sha256": "ff432280fe1fbbc2a5b7fee7fb18f6de59d675d2d7d0eec0d769a5fd012699a9", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.3.self_attn.o_proj.weight", + "sha256": "59e2e2ee8f9cba29e9cf3e6098539ddca5811d35d3df3c860488f348d6be9584", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.3.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.self_attn.q_a_proj.weight", + "sha256": "172aae8ff1a79376bf65182f5e92c06da2f9b307c15f214a20597491729aa0d7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.self_attn.q_b_proj.weight", + "sha256": "5d917d8c510906982c609808f1eb0d16da467976550e3a063637f1fde013cbdb", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.norm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + } + ], + "tokenizer": { + "kind": "byte-level BPE without merges", + "special_token_ids": { + "": 1, + "": 2, + "": 0, + "": 3 + }, + "vocab_size": 260 + }, + "versions": { + "safetensors": "0.8.0", + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "transformers": "5.16.1" + } +} diff --git a/raw/candidates/ct-nvfp4/source/build_fixture.py b/raw/candidates/ct-nvfp4/source/build_fixture.py new file mode 100644 index 0000000000000000000000000000000000000000..c86f3466f6c2ac6df7f31bb4ac5ca8bbcaeebf2c --- /dev/null +++ b/raw/candidates/ct-nvfp4/source/build_fixture.py @@ -0,0 +1,145 @@ +#!/usr/bin/env python3 +"""Build a complete, untrained GLM MoE DSA checkpoint for CPU pipeline checks. + +No source model weights, remote Python code, training data or paid compute are used. +Reproducibility is asserted only for the recorded dependency versions on CPU. +""" +from __future__ import annotations + +import argparse +import hashlib +import json +from pathlib import Path +import shutil + +SEED = 20260907 +SPECIAL_TOKENS = ["", "", "", ""] +VERSIONS = {"torch": "2.11.0+cpu", "transformers": "5.16.1", "tokenizers": "0.23.2", "safetensors": "0.8.0"} + + +def write_json(path, value): + path.write_text(json.dumps(value, sort_keys=True, indent=2, ensure_ascii=False, allow_nan=False) + "\n", encoding="utf-8") + + +def build(destination): + import torch + import transformers + import tokenizers + import safetensors + from tokenizers import Tokenizer, decoders, models, pre_tokenizers, processors + from transformers import GlmMoeDsaConfig, GlmMoeDsaForCausalLM, PreTrainedTokenizerFast + + observed = {"torch": torch.__version__, "transformers": transformers.__version__, + "tokenizers": tokenizers.__version__, "safetensors": safetensors.__version__} + if observed != VERSIONS: + raise ValueError("Use the recorded CPU build environment: expected %s; observed %s" % (VERSIONS, observed)) + if destination.exists(): + raise ValueError("Refusing to overwrite an existing destination: %s" % destination) + destination.mkdir(parents=True) + torch.set_num_threads(2) + torch.set_num_interop_threads(1) + torch.manual_seed(SEED) + torch.use_deterministic_algorithms(True) + + alphabet = sorted(pre_tokenizers.ByteLevel.alphabet()) + if len(alphabet) != 256: + raise ValueError("The byte alphabet must contain exactly 256 symbols") + vocabulary = {token: index for index, token in enumerate(SPECIAL_TOKENS + alphabet)} + backend = Tokenizer(models.BPE(vocab=vocabulary, merges=[], unk_token="")) + backend.pre_tokenizer = pre_tokenizers.ByteLevel(add_prefix_space=False, use_regex=False) + backend.decoder = decoders.ByteLevel() + backend.post_processor = processors.TemplateProcessing( + single=" $A ", pair=" $A $B:1 :1", + special_tokens=[("", 1), ("", 2)]) + tokenizer = PreTrainedTokenizerFast( + tokenizer_object=backend, pad_token="", bos_token="", + eos_token="", unk_token="", model_max_length=256, + clean_up_tokenization_spaces=False) + tokenizer.save_pretrained(destination) + + config = GlmMoeDsaConfig( + vocab_size=len(tokenizer), hidden_size=64, intermediate_size=128, + moe_intermediate_size=32, num_hidden_layers=4, + num_attention_heads=4, num_key_value_heads=4, + n_shared_experts=1, n_routed_experts=8, num_experts_per_tok=2, + n_group=1, topk_group=1, norm_topk_prob=True, routed_scaling_factor=2.5, + q_lora_rank=32, kv_lora_rank=16, qk_nope_head_dim=8, + qk_rope_head_dim=8, v_head_dim=16, + index_n_heads=4, index_head_dim=16, index_topk=8, + indexer_types=["full", "shared", "full", "shared"], + first_k_dense_replace=1, mlp_layer_types=["dense", "sparse", "sparse", "sparse"], + num_nextn_predict_layers=0, max_position_embeddings=256, + rope_parameters={"rope_type": "default", "rope_theta": 10000.0}, + pad_token_id=0, bos_token_id=1, eos_token_id=2, tie_word_embeddings=False, + attention_bias=False, attention_dropout=0.0, mlp_bias=False, + initializer_range=0.02, rms_norm_eps=1e-5, dtype="bfloat16", + ) + # Construct the native class, never hand-author a subset of state_dict keys. + # Initialize in FP32, then deliberately define the published artifact in BF16. + model = GlmMoeDsaForCausalLM(config).to(device="cpu", dtype=torch.bfloat16).eval() + # The native BF16 loader strictly retains router correction buffers in FP32. + # Store that exception explicitly; the rest reloads without dtype changes. + for module in model.modules(): + if hasattr(module, "e_score_correction_bias"): + module.e_score_correction_bias = module.e_score_correction_bias.float() + if model.get_output_embeddings().weight.data_ptr() == model.get_input_embeddings().weight.data_ptr(): + raise ValueError("Fixture must contain a complete, independent output head") + for name, tensor in model.state_dict().items(): + if tensor.is_floating_point() and not torch.isfinite(tensor).all(): + raise ValueError("Non-finite initialized tensor: " + name) + model.save_pretrained(destination, safe_serialization=True, max_shard_size="10MB") + + from safetensors import safe_open + tensors = [] + with safe_open(destination / "model.safetensors", framework="pt", device="cpu") as saved: + for name in sorted(saved.keys()): + tensor = saved.get_tensor(name) + raw = tensor.contiguous().view(torch.uint8).numpy().tobytes() + tensors.append({"name": name, "shape": list(tensor.shape), "dtype": str(tensor.dtype), + "elements": tensor.numel(), "bytes": len(raw), + "sha256": hashlib.sha256(raw).hexdigest()}) + # Native saving expands fused expert tensors into canonical per-expert + # checkpoint keys. Verify their semantic roundtrip, not name equality between + # the storage representation and the in-memory fused representation. + reloaded = transformers.AutoModelForCausalLM.from_pretrained( + destination, dtype=torch.bfloat16, local_files_only=True, trust_remote_code=False) + expected_state, observed_state = model.state_dict(), reloaded.state_dict() + if expected_state.keys() != observed_state.keys(): + raise ValueError("Native state keys changed across save/reload") + for name, tensor in expected_state.items(): + if tensor.dtype != observed_state[name].dtype or not torch.equal(tensor, observed_state[name]): + raise ValueError("Tensor changed across native save/reload: " + name) + files = {} + for name in ("config.json", "generation_config.json", "model.safetensors", "tokenizer.json", "tokenizer_config.json"): + raw = (destination / name).read_bytes() + files[name] = {"bytes": len(raw), "sha256": hashlib.sha256(raw).hexdigest()} + manifest = { + "schema": "malaiwah.glm-moe-dsa-tiny-build.v1", + "seed": SEED, "versions": observed, + "generator_sha256": hashlib.sha256(Path(__file__).read_bytes()).hexdigest(), + "generation": "Native GlmMoeDsaForCausalLM random initialization in FP32, rounded to the published BF16 artifact; native router correction buffers retained FP32.", + "parameter_count": sum(p.numel() for p in model.parameters()), + "tensor_count": len(tensors), "stored_elements": sum(t["elements"] for t in tensors), + "files": files, "tensors": tensors, + "tokenizer": {"kind": "byte-level BPE without merges", "vocab_size": len(tokenizer), + "special_token_ids": {token: tokenizer.convert_tokens_to_ids(token) for token in SPECIAL_TOKENS}}, + "architecture_inspiration": "GLM-5.2-SIQ-Fruit-bf16 geometry and dense/MoE plus full/shared DSA schedules; no Fruit or GLM model weights reused.", + "limitations": ["Random initialization; not trained or distilled.", "Not a quantization or behavioral approximation of a released GLM model.", + "MTP intentionally absent (zero next-n-prediction layers); no unmatched MTP tensors.", + "This build manifest describes generated bytes, not proof of clean loading or capture; see separately measured verification evidence."], + } + write_json(destination / "build-manifest.json", manifest) + shutil.copyfile(__file__, destination / "build_fixture.py") + print(json.dumps({"destination": str(destination), "parameter_count": manifest["parameter_count"], + "tensor_count": len(tensors), "weight_file": files["model.safetensors"]}, indent=2)) + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--out", required=True, type=Path) + args = parser.parse_args() + build(args.out) + + +if __name__ == "__main__": + main() diff --git a/raw/candidates/ct-nvfp4/source/build_panel.py b/raw/candidates/ct-nvfp4/source/build_panel.py new file mode 100644 index 0000000000000000000000000000000000000000..258be1a623b3009940fb0b1417c5be9ea02904be --- /dev/null +++ b/raw/candidates/ct-nvfp4/source/build_panel.py @@ -0,0 +1,232 @@ +#!/usr/bin/env python3 +"""Build the tiny GLM-MoE-DSA synthetic CPU smoke panel, not a benchmark. + +The QFS panel directory has an exact sealed file closure. Its resolved binding +and SHA report are therefore written beside --out, never inside it. The caller +must supply the genuine published model commit; this offline builder verifies +local bytes, not their remote availability at that commit. +""" +from __future__ import annotations + +import argparse +import importlib.util +import json +from pathlib import Path +import re +import sys + + +PANEL_ID = "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1" +PANEL_NAME = "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)" +CONTEXT_LENGTH = 64 +VOCAB_SIZE = 260 +ARTIFACT_EPOCH = "2026-09-07T00:00:00Z" +# Authored synthetic inputs, embedded verbatim in the receipt for reconstruction. +TEXTS = ( + ("garden", "The small garden has red flowers, green leaves, and a stone path. " + "A gentle breeze moves the branches while a robin sings near the gate."), + ("arithmetic", "A shelf holds three blue boxes and five red boxes. There are eight " + "boxes in total. Move two boxes to the desk and count the six boxes remaining."), + ("code", "def add_values(left, right):\n return left + right\n\n" + "result = add_values(7, 9)\nprint(result)\n" + "# This readable snippet is synthetic input, not a coding benchmark.\n"), + ("instructions", "First place a clean cup on the table. Next pour cool water into " + "the cup. Finally put the bottle away and write a short note about the steps."), +) +TOKENIZER_FILES = ( + "config.json", "generation_config.json", "tokenizer.json", "tokenizer_config.json", + "special_tokens_map.json", "added_tokens.json", "vocab.json", "merges.txt", + "tokenizer.model", "spiece.model", "sentencepiece.bpe.model", "chat_template.jinja", +) + + +def write_json(path: Path, value: object) -> None: + with path.open("x", encoding="utf-8", newline="\n") as handle: + handle.write(json.dumps(value, indent=2, sort_keys=True, + ensure_ascii=False, allow_nan=False) + "\n") + + +def main(argv: list[str] | None = None) -> int: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--model-dir", required=True, type=Path) + parser.add_argument("--model-repository", required=True) + parser.add_argument("--model-revision", required=True, + help="genuine immutable published model commit (40 lowercase hex)") + parser.add_argument("--out", required=True, type=Path, + help="new sealed panel directory; binding/report are sibling files") + parser.add_argument("--qfs-root", required=True, type=Path, + help="QFS checkout containing bin/fidelity and engines/tools") + args = parser.parse_args(argv) + if re.fullmatch(r"[0-9a-f]{40}", args.model_revision) is None: + parser.error("--model-revision must be an immutable 40-character lowercase hex commit") + if re.fullmatch(r"[A-Za-z0-9][A-Za-z0-9._-]*/[A-Za-z0-9][A-Za-z0-9._-]*", + args.model_repository) is None: + parser.error("--model-repository must be a Hugging Face owner/repository ID") + model_dir = args.model_dir.resolve() + qfs_root = args.qfs_root.resolve() + out = args.out.resolve() + binding_path = out.with_name(out.name + ".binding.json") + report_path = out.with_name(out.name + ".sha256.json") + if not model_dir.is_dir(): + parser.error("--model-dir must already contain the saved model and native tokenizer") + for destination in (out, binding_path, report_path): + if destination.exists() or destination.is_symlink(): + parser.error("refusing to overwrite %s" % destination) + if destination.is_relative_to(model_dir) or destination.is_relative_to(qfs_root): + parser.error("output must be outside the model directory and QFS checkout") + builder_path = qfs_root / "engines/tools/build_token_panel.py" + resolver_path = qfs_root / "bin/fidelity/panel.py" + if not builder_path.is_file() or not resolver_path.is_file(): + parser.error("--qfs-root lacks the existing token-panel builder or resolver") + + # Reuse the existing format's seal and token preimages. Its CLI cannot meet + # this contract: it hardcodes add_special_tokens=False and not local-only. + spec = importlib.util.spec_from_file_location("qfs_token_panel_builder", builder_path) + if spec is None or spec.loader is None: + raise RuntimeError("cannot import the QFS token-panel builder") + builder = importlib.util.module_from_spec(spec) + spec.loader.exec_module(builder) + sys.path.insert(0, str(qfs_root / "bin")) + from fidelity import panel as panel_contract + import numpy as np + import tokenizers + import transformers + from transformers import AutoTokenizer + + for name in ("config.json", "tokenizer.json", "tokenizer_config.json"): + if not (model_dir / name).is_file(): + raise ValueError("required native tokenizer/model file missing: " + name) + config = json.loads((model_dir / "config.json").read_text(encoding="utf-8")) + if config.get("model_type") != "glm_moe_dsa" or config.get("vocab_size") != VOCAB_SIZE: + raise ValueError("expected glm_moe_dsa model with vocabulary size 260") + if config.get("max_position_embeddings", 0) < CONTEXT_LENGTH: + raise ValueError("model context limit cannot accommodate 64-token windows") + file_hashes = {name: builder.sha256_file(model_dir / name) + for name in sorted(TOKENIZER_FILES) if (model_dir / name).is_file()} + tokenizer = AutoTokenizer.from_pretrained( + model_dir, local_files_only=True, trust_remote_code=False) + if len(tokenizer) != VOCAB_SIZE or tokenizer.vocab_size != VOCAB_SIZE: + raise ValueError("expected exactly 260 native tokenizer entries, including special tokens") + if set(tokenizer.get_vocab().values()) != set(range(VOCAB_SIZE)): + raise ValueError("tokenizer IDs must cover the contiguous interval [0,260)") + expected_specials = {"pad_token_id": 0, "bos_token_id": 1, + "eos_token_id": 2, "unk_token_id": 3} + for name, expected in expected_specials.items(): + if getattr(tokenizer, name, None) != expected: + raise ValueError("unexpected tokenizer special ID for " + name) + + encoded_windows = [] + sources = [] + for index, (domain, text) in enumerate(TEXTS): + encoded = tokenizer(text, add_special_tokens=True, truncation=True, + max_length=CONTEXT_LENGTH, padding=False, + return_attention_mask=True, return_special_tokens_mask=True) + ids = encoded["input_ids"] + mask = encoded["attention_mask"] + special_mask = encoded["special_tokens_mask"] + if (len(ids) != CONTEXT_LENGTH or len(mask) != CONTEXT_LENGTH + or len(special_mask) != CONTEXT_LENGTH + or any(type(value) is not int or not 0 <= value < VOCAB_SIZE for value in ids) + or mask != [1] * CONTEXT_LENGTH): + raise ValueError("tokenizer produced invalid token IDs or 64-token/mask shape") + if (any(value not in (0, 1) for value in special_mask) + or not any(special_mask) + or not all(ids[pos] in tokenizer.all_special_ids + for pos, marked in enumerate(special_mask) if marked)): + raise ValueError("native tokenizer did not apply a valid special-token template") + window_id = "final-%04d" % index + encoded_windows.append((window_id, domain, ids)) + raw = text.encode("utf-8") + sources.append({"stratum": domain, "document": domain + ".txt", + "document_sha256": builder.sha256_bytes(raw), "bytes": len(raw), + "text_utf8": text, "selected": True, "window_id": window_id, + "tokens_total": len(tokenizer(text, add_special_tokens=True)["input_ids"]), + "num_tokens": len(ids), "special_tokens_mask": special_mask}) + + arrays = out / "arrays" + arrays.mkdir(parents=True, exist_ok=False) + mask_path = arrays / "causal-mask-64.npy" + np.save(mask_path, np.ones(CONTEXT_LENGTH, dtype=np.uint8), allow_pickle=False) + mask_sha = builder.sha256_file(mask_path) + windows = [] + for window_id, domain, ids in encoded_windows: + token_path = arrays / (window_id + ".tokens.npy") + np.save(token_path, np.asarray(ids, dtype=" same_stack", + "overridden_by": null, + "passed": true + } + }, + "high_kld_contexts": [ + { + "allocation_stratum": null, + "domain": "garden", + "index": 0, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0000" + }, + { + "allocation_stratum": null, + "domain": "arithmetic", + "index": 1, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0001" + }, + { + "allocation_stratum": null, + "domain": "code", + "index": 2, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0002" + }, + { + "allocation_stratum": null, + "domain": "instructions", + "index": 3, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0003" + } + ], + "kl": { + "max": 0.0, + "mean": 0.0, + "median": 0.0, + "p95": 0.0, + "p99": 0.0, + "p99_9": 0.0 + }, + "kl_macro_stratum_mean": null, + "kl_micro_token_mean": 0.0, + "measurement_scope": { + "contexts": 4, + "covers_full_panel": true, + "position_filter": "all", + "positions_per_context": 63, + "scored_positions": 252, + "subset_detail": null + }, + "metric": { + "direction": "reference_to_candidate", + "direction_label": "KL(reference || candidate)", + "higher_is_better": false, + "name": "mean_tokenwise_kld", + "units": "nats", + "value": 0.0 + }, + "panel": { + "context_length": 64, + "contexts": 4, + "panel_id": "panel--panel", + "panel_token_sha256_legacy": "3c9467c85be43d238926f6d18bf825c2e4748814c95b8b0e8b8f1420546c3089", + "scored_positions": 252, + "scoring_window": { + "dropped_positions_total": 0, + "min_left_context_tokens": 1, + "policy": "every causal prediction position of every window is scored; nothing is dropped", + "score_from": 0, + "windowed": false + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + }, + "tokenizer_candidate": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + }, + "tokenizer_identity_equal": true, + "tokenizer_reference": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } + }, + "per_context": [ + { + "allocation_stratum": null, + "domain": "garden", + "index": 0, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0000" + }, + { + "allocation_stratum": null, + "domain": "arithmetic", + "index": 1, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0001" + }, + { + "allocation_stratum": null, + "domain": "code", + "index": 2, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0002" + }, + { + "allocation_stratum": null, + "domain": "instructions", + "index": 3, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0003" + } + ], + "per_domain": null, + "per_stratum": null, + "receipt_sha256": "4910833e5cc175ea351055e567c5d896475b4020598359291aedc958d8ada382", + "reference": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "dataset_id": "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "dataset_sha256": "56588f20f9cf055301f83a828fa75fa94c1e26593e64a07c5c6c4e38e9454563", + "form": "hidden", + "head": { + "bits": 16, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510" + }, + "label": "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "lane": "other", + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "repository": "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "revision": null, + "role": "root", + "scope_digest": "attn.o=native:bf16@16|attn.qkv=native:bf16@16|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=native:bf16@16|mlp.gate=native:bf16@16|mlp.up=native:bf16@16|moe.experts=native:bf16@16|norm=native:bf16@16|head=native|kv=bf16", + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd", + "weights": { + "artifact_ref": null, + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "codec": null, + "config_sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "declared_bits": null, + "declared_head_bits": 16, + "index_sha256": null, + "model_ref": null, + "model_revision": "45563636ef723acfb826755493447dc40c7a0c37", + "quantized": false, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37" + } + }, + "schema": "malaiwah.fidelity-comparison-receipt.v1", + "self_compare": { + "asserted_exact_zero": true, + "capture_content_digest_equal": true, + "expected_tokenwise_bytes": 2144, + "expected_tokenwise_sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d", + "force_compute_agreed": true, + "head_digest_equal": true, + "weights_identity_equal": true + }, + "submission": { + "emitted": false, + "path": null, + "receipt_sha256": null, + "refusal": "comparison_kind is reproduction_confirmation, not measurement; bin/fidelity/receipt.py::_scan_for_unsubmittable is the second, independent refusal axis.", + "submission_schema": null + }, + "tokenwise": { + "bytes": 2144, + "path": "tokenwise-kld.npy", + "sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d" + }, + "top1_agreement": 1.0, + "top1_discordant_contexts": [], + "uncertainty": { + "ci95_high": null, + "ci95_low": null, + "cluster_unit": null, + "clusters": null, + "method": "none", + "samples": null, + "seed": null + } +} diff --git a/raw/candidates/ct-nvfp4/source/cpu-reproduction-summary.json b/raw/candidates/ct-nvfp4/source/cpu-reproduction-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..7fe4e433fbfabcad4ab3781b796fbd3439d5db17 --- /dev/null +++ b/raw/candidates/ct-nvfp4/source/cpu-reproduction-summary.json @@ -0,0 +1,851 @@ +{ + "captures": { + "first": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "cold_run": "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "dataset_sha256": "56588f20f9cf055301f83a828fa75fa94c1e26593e64a07c5c6c4e38e9454563", + "generation_sanity_probe": { + "degenerate": false, + "enforced": false, + "entropy_nats": 5.548019647470335, + "expect": null, + "logit_spread": 0.986328125, + "note": "one extra window through the same schedule; its hidden state is discarded and never enters the dataset.", + "prompt": "The capital of France is", + "schema": "malaiwah.generation-sanity-probe.v1", + "status": "recorded", + "top1_id": 113, + "top1_probability": 0.006720104384265371, + "top1_text": "�", + "top_k": [ + { + "id": 113, + "probability": 0.006720104384265371, + "text": "�" + }, + { + "id": 237, + "probability": 0.006412368399474785, + "text": "�" + }, + { + "id": 193, + "probability": 0.006035639491843906, + "text": "\u0001" + }, + { + "id": 236, + "probability": 0.0055386141320063614, + "text": "�" + }, + { + "id": 44, + "probability": 0.0054740873228682424, + "text": "I" + } + ], + "uniform_entropy_nats": 5.560681631015528, + "vocab_size": 260 + }, + "head_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "memory_report": { + "context_length": 64, + "decoder_layers": null, + "device": "cpu", + "hidden_size": 64, + "layer_residency": null, + "model": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "peak_resident_weight_bytes": 555776, + "peak_resident_weight_detail": { + "buffers": 128, + "parameters": 555648, + "total": 555776 + }, + "peak_resident_weight_gb": 0.001, + "peak_rss_bytes": 367374336, + "peak_rss_gb": 0.367, + "resident_weight_note": "the maximum, over the run, of the materialised parameter+buffer bytes. On the CPU path peak_rss_bytes ALSO counts the safetensors mmap page cache, which is evictable and is not held by the schedule; this figure is not confounded by it. On CUDA, peak_cuda_allocated_bytes is the authoritative number because it includes activations and workspace and has no page cache.", + "rss_units_source": "Linux ru_maxrss", + "schedule": "window-outer", + "vocab_size": 260, + "windows": 4 + }, + "path": "first", + "pid": 406991, + "resources": { + "bytes": { + "checkpoint_read": 572479, + "hidden_d2h": 36616, + "weights_h2d": null + }, + "checkpoint_bytes": 572479, + "checkpoint_files": 2, + "device_name": null, + "forward_timing": "wall-clock", + "note": "provenance, not identity: peaks and stage seconds this run measured; forward_sum is device time under cuda-events, wall time otherwise; seal covers head serialisation up to this block's assembly", + "peak_cuda_allocated_bytes": null, + "peak_cuda_reserved_bytes": null, + "peak_resident_weight_bytes": 555776, + "peak_rss_bytes": 367374336, + "rss_units_source": "Linux ru_maxrss", + "seconds": { + "decode_sum": null, + "elapsed": 2.448, + "fill_sum": null, + "forward_sum": 0.126, + "identity": 0.005, + "layer_load_max": null, + "layer_load_sum": null, + "layer_loads": null, + "resident_load": 2.283, + "seal": 0.007 + } + }, + "runtime_versions": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 406991, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd" + }, + "repeat": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "cold_run": "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d", + "dataset_sha256": "c3ff6c32dc57502825d3ca3ac2133ed6a4c31e7bc7602191d595ee044ebe9048", + "generation_sanity_probe": { + "degenerate": false, + "enforced": false, + "entropy_nats": 5.548019647470335, + "expect": null, + "logit_spread": 0.986328125, + "note": "one extra window through the same schedule; its hidden state is discarded and never enters the dataset.", + "prompt": "The capital of France is", + "schema": "malaiwah.generation-sanity-probe.v1", + "status": "recorded", + "top1_id": 113, + "top1_probability": 0.006720104384265371, + "top1_text": "�", + "top_k": [ + { + "id": 113, + "probability": 0.006720104384265371, + "text": "�" + }, + { + "id": 237, + "probability": 0.006412368399474785, + "text": "�" + }, + { + "id": 193, + "probability": 0.006035639491843906, + "text": "\u0001" + }, + { + "id": 236, + "probability": 0.0055386141320063614, + "text": "�" + }, + { + "id": 44, + "probability": 0.0054740873228682424, + "text": "I" + } + ], + "uniform_entropy_nats": 5.560681631015528, + "vocab_size": 260 + }, + "head_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "memory_report": { + "context_length": 64, + "decoder_layers": null, + "device": "cpu", + "hidden_size": 64, + "layer_residency": null, + "model": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "peak_resident_weight_bytes": 555776, + "peak_resident_weight_detail": { + "buffers": 128, + "parameters": 555648, + "total": 555776 + }, + "peak_resident_weight_gb": 0.001, + "peak_rss_bytes": 367198208, + "peak_rss_gb": 0.367, + "resident_weight_note": "the maximum, over the run, of the materialised parameter+buffer bytes. On the CPU path peak_rss_bytes ALSO counts the safetensors mmap page cache, which is evictable and is not held by the schedule; this figure is not confounded by it. On CUDA, peak_cuda_allocated_bytes is the authoritative number because it includes activations and workspace and has no page cache.", + "rss_units_source": "Linux ru_maxrss", + "schedule": "window-outer", + "vocab_size": 260, + "windows": 4 + }, + "path": "repeat", + "pid": 409089, + "resources": { + "bytes": { + "checkpoint_read": 572479, + "hidden_d2h": 36616, + "weights_h2d": null + }, + "checkpoint_bytes": 572479, + "checkpoint_files": 2, + "device_name": null, + "forward_timing": "wall-clock", + "note": "provenance, not identity: peaks and stage seconds this run measured; forward_sum is device time under cuda-events, wall time otherwise; seal covers head serialisation up to this block's assembly", + "peak_cuda_allocated_bytes": null, + "peak_cuda_reserved_bytes": null, + "peak_resident_weight_bytes": 555776, + "peak_rss_bytes": 367198208, + "rss_units_source": "Linux ru_maxrss", + "seconds": { + "decode_sum": null, + "elapsed": 2.619, + "fill_sum": null, + "forward_sum": 0.128, + "identity": 0.004, + "layer_load_max": null, + "layer_load_sum": null, + "layer_loads": null, + "resident_load": 2.453, + "seal": 0.005 + } + }, + "runtime_versions": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 409089, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd" + } + }, + "commands": [ + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--model", + "/tmp/qfs-complete-tiny-fixture/model", + "--weights-repository", + "malaiwah/glm-moe-dsa-tiny-random-bf16", + "--model-revision", + "45563636ef723acfb826755493447dc40c7a0c37", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-complete-tiny-fixture/reproduction/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--role", + "root", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--schedule", + "window-outer", + "--dataset-id", + "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "--dataset-name", + "GLM MoE DSA tiny random CPU root", + "--repository", + "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "--author", + "malaiwah", + "--disclosures", + "[{\"code\":\"random_init_cpu_fixture\",\"severity\":\"info\",\"affects_comparability\":false,\"detail\":\"Complete randomly initialized tiny glm_moe_dsa checkpoint; CPU smoke fixture only, not trained quality evidence or a registry measurement. Lane other denotes CPU, not local-cuda-budget.\"}]", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--run-name", + "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "--cold-run", + "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "--memory-report", + "/tmp/qfs-complete-tiny-fixture/reproduction/first.memory.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 6.485651439987123, + "name": "capture-first", + "pid": 406991, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 406991, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "capture-first.stderr.log", + "stdout": "capture-first.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "verify", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/first.verify.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.575829998124391, + "name": "verify-first", + "pid": 408026, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 408026, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "verify-first.stderr.log", + "stdout": "verify-first.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "validate", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--strict", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/first.strict.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.8252810118719935, + "name": "strict-first", + "pid": 408494, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 408494, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "strict-first.stderr.log", + "stdout": "strict-first.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--model", + "/tmp/qfs-complete-tiny-fixture/model", + "--weights-repository", + "malaiwah/glm-moe-dsa-tiny-random-bf16", + "--model-revision", + "45563636ef723acfb826755493447dc40c7a0c37", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-complete-tiny-fixture/reproduction/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--role", + "root", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--schedule", + "window-outer", + "--dataset-id", + "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "--dataset-name", + "GLM MoE DSA tiny random CPU root", + "--repository", + "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "--author", + "malaiwah", + "--disclosures", + "[{\"code\":\"random_init_cpu_fixture\",\"severity\":\"info\",\"affects_comparability\":false,\"detail\":\"Complete randomly initialized tiny glm_moe_dsa checkpoint; CPU smoke fixture only, not trained quality evidence or a registry measurement. Lane other denotes CPU, not local-cuda-budget.\"}]", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--run-name", + "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d", + "--cold-run", + "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d", + "--memory-report", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat.memory.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 6.431767418049276, + "name": "capture-repeat", + "pid": 409089, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 409089, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "capture-repeat.stderr.log", + "stdout": "capture-repeat.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "verify", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat.verify.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.7754629959817976, + "name": "verify-repeat", + "pid": 409951, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 409951, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "verify-repeat.stderr.log", + "stdout": "verify-repeat.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "validate", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--strict", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat.strict.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.423026765929535, + "name": "strict-repeat", + "pid": 410549, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 410549, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "strict-repeat.stderr.log", + "stdout": "strict-repeat.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "compare", + "--reference", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--candidate", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction/comparison", + "--self-compare", + "--force-compute", + "--device", + "cpu", + "--replay-device", + "numpy", + "--replay-dtype", + "float32", + "--vocab-chunk", + "8192", + "--chunk-positions", + "128", + "--verify-tensors", + "--reference-label", + "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "--candidate-label", + "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.7282893639057875, + "name": "compare", + "pid": 411043, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 411043, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "compare.stderr.log", + "stdout": "compare.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "validate", + "--receipt", + "/tmp/qfs-complete-tiny-fixture/reproduction/comparison/comparison-receipt.json", + "--strict", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/comparison.validate.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.424050308065489, + "name": "validate-comparison", + "pid": 411487, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 411487, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "validate-comparison.stderr.log", + "stdout": "validate-comparison.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + } + ], + "comparison": { + "comparator": { + "accumulation_dtype": "float64", + "bf16_reduced_precision_reduction": false, + "cublas_workspace_config": null, + "deterministic_algorithms": true, + "device": "cpu", + "estimator_backend": "torch:k6_kld_report._token_kld", + "head_applied_candidate_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "head_applied_reference_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "head_applied_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "logprob_dtype": "float64", + "position_block": 128, + "replay_backend": "numpy:cpu:float32", + "replay_env": { + "blas_configuration": "OpenBLAS 0.3.34.106.0 USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell MAX_THREADS=64", + "blas_name": "scipy-openblas", + "blas_threads": 2, + "blas_threads_source": "ctypes:scipy_openblas_get_num_threads64_", + "blas_version": "0.3.34.106.0", + "cpu_model": "Intel(R) Xeon(R) CPU X5570 @ 2.93GHz", + "library": "numpy", + "numpy_version": "2.5.3", + "replay_dtype": "float32" + }, + "replay_peak_device_bytes": null, + "short_circuited": true, + "source_file_hashes_verified": true, + "tensor_content_digests_verified": true, + "tf32": false, + "tool": { + "entrypoint": "bin/fidelity-dataset compare", + "note": "the fp64 estimator is k6_kld_report._token_kld, imported not copied, whenever torch is importable; estimator_backend records which path ran." + }, + "two_pass": true, + "vocab_chunk": 8192 + }, + "comparison_kind": "reproduction_confirmation", + "kl": { + "max": 0.0, + "mean": 0.0, + "median": 0.0, + "p95": 0.0, + "p99": 0.0, + "p99_9": 0.0 + }, + "measurement_scope": { + "contexts": 4, + "covers_full_panel": true, + "position_filter": "all", + "positions_per_context": 63, + "scored_positions": 252, + "subset_detail": null + }, + "metric": { + "direction": "reference_to_candidate", + "direction_label": "KL(reference || candidate)", + "higher_is_better": false, + "name": "mean_tokenwise_kld", + "units": "nats", + "value": 0.0 + }, + "note": "QFS retains its hash-proof result and top-1 value for reproduction confirmations; --force-compute independently runs the estimator and requires its tokenwise KL array to agree exactly. short_circuited=true therefore does not mean replay was skipped.", + "receipt": "comparison/comparison-receipt.json", + "receipt_sha256": "4910833e5cc175ea351055e567c5d896475b4020598359291aedc958d8ada382", + "self_compare": { + "asserted_exact_zero": true, + "capture_content_digest_equal": true, + "expected_tokenwise_bytes": 2144, + "expected_tokenwise_sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d", + "force_compute_agreed": true, + "head_digest_equal": true, + "weights_identity_equal": true + }, + "tokenwise": { + "bytes": 2144, + "path": "tokenwise-kld.npy", + "sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d" + }, + "top1_agreement": 1.0 + }, + "cpu_threads": 2, + "dataset_id": "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "dataset_repository": "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "device": "cpu", + "driver_argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "/tmp/qfs-complete-tiny-fixture/verify_cpu.py", + "--model-dir", + "/tmp/qfs-complete-tiny-fixture/model", + "--model-repository", + "malaiwah/glm-moe-dsa-tiny-random-bf16", + "--model-revision", + "45563636ef723acfb826755493447dc40c7a0c37", + "--panel-dir", + "/tmp/qfs-complete-tiny-fixture/panel", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction", + "--qfs-root", + "/tmp/qfs-explorer-development" + ], + "driver_sha256": "2e507993f0085a72d5236527942a7143fd036d56b82223b26e90889de5cd9f98", + "dtype": "bfloat16", + "elapsed_seconds": 34.85638747992925, + "lane": "other", + "lane_description": "local CPU random-init fixture", + "model_repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "model_revision": "45563636ef723acfb826755493447dc40c7a0c37", + "panel_binding": "panel-binding.json", + "panel_binding_sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "provenance_note": "Local QFS source bytes are hashed; no source commit is asserted. The caller supplies an immutable model pin; QFS hashes the local checkpoint. This script does not independently prove Hub-to-local weight equality.", + "qfs_source_files": { + "bin/fidelity/dscompare.py": "4a53f735e1e3fb8bd739854451b57f34e8369bffa9fd4f7b7fd935fb2e7d52df", + "bin/fidelity/dsvalidate.py": "a9d6cd57e801e3ef044a37635e24518c83dbc6d1ec8a4c0b4b5d1b24483ca8d1", + "bin/fidelity/panel.py": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "bin/fidelity_dataset.py": "ac62b63bbfde67e4d5cacecf9cd417193c50f417a6749cc15ee6f1610c153a4e", + "engines/tools/hf_capture.py": "200ba12ca74fb97531307965cbbaa5c10553a5c26e008e524ea2d8aecb005b95" + }, + "schema": "malaiwah.glm-moe-dsa-tiny-cpu-reproduction.v1", + "scope": "Random-init CPU reproduction only; no quality claim or registry submission.", + "status": "passed" +} diff --git a/raw/candidates/ct-nvfp4/source/generation_config.json b/raw/candidates/ct-nvfp4/source/generation_config.json new file mode 100644 index 0000000000000000000000000000000000000000..59bd0680606c94f6570a92e60fa4acd2e2170f70 --- /dev/null +++ b/raw/candidates/ct-nvfp4/source/generation_config.json @@ -0,0 +1,10 @@ +{ + "_from_model_config": true, + "bos_token_id": 1, + "eos_token_id": 2, + "output_attentions": false, + "output_hidden_states": false, + "pad_token_id": 0, + "transformers_version": "5.16.1", + "use_cache": true +} diff --git a/raw/candidates/ct-nvfp4/source/hub-checkpoint-verification.json b/raw/candidates/ct-nvfp4/source/hub-checkpoint-verification.json new file mode 100644 index 0000000000000000000000000000000000000000..b9648c8ae18de0fb86ce18398175c6686afbd7b2 --- /dev/null +++ b/raw/candidates/ct-nvfp4/source/hub-checkpoint-verification.json @@ -0,0 +1,32 @@ +{ + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "downloaded_from_hub": true, + "files": { + "config.json": { + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "bytes": 1479, + "matches_build": true + }, + "generation_config.json": { + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "bytes": 216, + "matches_build": true + }, + "model.safetensors": { + "sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1", + "bytes": 571000, + "matches_build": true + }, + "tokenizer.json": { + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "bytes": 6763, + "matches_build": true + }, + "tokenizer_config.json": { + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63", + "bytes": 236, + "matches_build": true + } + } +} diff --git a/raw/candidates/ct-nvfp4/source/loader-verification.json b/raw/candidates/ct-nvfp4/source/loader-verification.json new file mode 100644 index 0000000000000000000000000000000000000000..871fc889a9d3a025569770a96e83ff5f0a2fb420 --- /dev/null +++ b/raw/candidates/ct-nvfp4/source/loader-verification.json @@ -0,0 +1,60 @@ +{ + "schema": "malaiwah.tiny-fixture-loader-check.v1", + "checkpoint_sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1", + "runtime": { + "torch": "2.11.0+cpu", + "transformers": "5.16.1", + "device": "cpu", + "threads": 2 + }, + "qfs_load_report": { + "observed": true, + "conversion_errors_visible": true, + "missing_keys": [], + "unexpected_keys": [], + "mismatched_keys": [], + "error_msgs": [], + "conversion_errors": {} + }, + "native_save_reload_tensor_equality": true, + "independent_build_files_byte_equal": true, + "tokenizer_roundtrip_examples": [ + "The CPU fixture carries a complete output head and real sparse attention.", + "Small deterministic tensors make a repeatable pipeline experiment.", + "Unicode roundtrip: caf\u00e9, snow \u96ea, punctuation!", + "The same bytes must survive saving and loading without repair." + ], + "forward_shape": [ + 4, + 64, + 260 + ], + "forward_all_finite": true, + "forward_logit_std": 0.16186420619487762, + "load_seconds": 2.1670503590721637, + "batch_forward_seconds": 0.05775680090300739, + "greedy_generation_seconds": 0.04374621692113578, + "generated_token_ids": [ + 1, + 55, + 75, + 72, + 224, + 38, + 51, + 56, + 224, + 73, + 76, + 91, + 87, + 88, + 85, + 72, + 171, + 105, + 156, + 236 + ], + "peak_process_rss_mib": 351.9296875 +} diff --git a/raw/candidates/ct-nvfp4/source/model.safetensors b/raw/candidates/ct-nvfp4/source/model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..4fb280ef48135a3788c03440ffe9075628c12dfd --- /dev/null +++ b/raw/candidates/ct-nvfp4/source/model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1 +size 571000 diff --git a/raw/candidates/ct-nvfp4/source/panel.binding.json b/raw/candidates/ct-nvfp4/source/panel.binding.json new file mode 100644 index 0000000000000000000000000000000000000000..573cea0b332c636bdda89b150f95cda307b89194 --- /dev/null +++ b/raw/candidates/ct-nvfp4/source/panel.binding.json @@ -0,0 +1,102 @@ +{ + "content": { + "archive": { + "algorithm": "sha256(ustar: sorted regular files; mode=0644; uid=gid=mtime=0)", + "bytes": 20480, + "compression": "none", + "format": "ustar", + "sha256": "389706dfa3335a75ec70a40d079995af1a60c05512334125dbd336790f12702f" + }, + "manifest": [ + { + "bytes": 192, + "path": "arrays/causal-mask-64.npy", + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02" + }, + { + "bytes": 384, + "path": "arrays/final-0000.tokens.npy", + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af" + }, + { + "bytes": 384, + "path": "arrays/final-0001.tokens.npy", + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea" + }, + { + "bytes": 384, + "path": "arrays/final-0002.tokens.npy", + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c" + }, + { + "bytes": 384, + "path": "arrays/final-0003.tokens.npy", + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a" + }, + { + "bytes": 4195, + "path": "panel.json", + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6" + }, + { + "bytes": 7808, + "path": "panel.receipt.json", + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263" + } + ], + "manifest_sha256": "e5f2d6410a6290da1197016c5b57ae522a3570665215ddc23e2a0bd45f912181" + }, + "panel": { + "bytes": 4195, + "context_length": 64, + "contexts": 4, + "file": "panel.json", + "id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "positions_per_context": 63, + "role": "final", + "scored_positions_total": 252, + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6", + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36" + }, + "receipt": { + "bytes": 7808, + "declared_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "file": "panel.receipt.json", + "receipt_file_sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "receipt_seal_mode": "self-blank" + }, + "schema": "malaiwah.resolved-panel.v1", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } +} diff --git a/raw/candidates/ct-nvfp4/source/panel.sha256.json b/raw/candidates/ct-nvfp4/source/panel.sha256.json new file mode 100644 index 0000000000000000000000000000000000000000..30e122a1cc6d1937fecc0d31e38e468bceefc9de --- /dev/null +++ b/raw/candidates/ct-nvfp4/source/panel.sha256.json @@ -0,0 +1,83 @@ +{ + "binding_file": "panel.binding.json", + "binding_sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "context_length": 64, + "contexts": 4, + "model_repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "model_revision": "45563636ef723acfb826755493447dc40c7a0c37", + "panel_archive": { + "algorithm": "sha256(ustar: sorted regular files; mode=0644; uid=gid=mtime=0)", + "bytes": 20480, + "compression": "none", + "format": "ustar", + "sha256": "389706dfa3335a75ec70a40d079995af1a60c05512334125dbd336790f12702f" + }, + "panel_directory": "panel", + "panel_files": [ + { + "bytes": 192, + "path": "arrays/causal-mask-64.npy", + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02" + }, + { + "bytes": 384, + "path": "arrays/final-0000.tokens.npy", + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af" + }, + { + "bytes": 384, + "path": "arrays/final-0001.tokens.npy", + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea" + }, + { + "bytes": 384, + "path": "arrays/final-0002.tokens.npy", + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c" + }, + { + "bytes": 384, + "path": "arrays/final-0003.tokens.npy", + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a" + }, + { + "bytes": 4195, + "path": "panel.json", + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6" + }, + { + "bytes": 7808, + "path": "panel.receipt.json", + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263" + } + ], + "panel_id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "panel_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "purpose": "Synthetic CPU smoke only, not a quality benchmark.", + "revision_verification": "Caller-supplied published commit; local files byte-verified offline.", + "scored_positions_total": 252, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer_files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "tokenizer_files_verified": true, + "tokenizer_identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1" +} diff --git a/raw/candidates/ct-nvfp4/source/panel/arrays/causal-mask-64.npy b/raw/candidates/ct-nvfp4/source/panel/arrays/causal-mask-64.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/ct-nvfp4/source/panel/arrays/causal-mask-64.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/ct-nvfp4/source/panel/arrays/final-0000.tokens.npy b/raw/candidates/ct-nvfp4/source/panel/arrays/final-0000.tokens.npy new file mode 100644 index 0000000000000000000000000000000000000000..b53a3cc1093c0363db45470d868194d867ed93cf --- /dev/null +++ b/raw/candidates/ct-nvfp4/source/panel/arrays/final-0000.tokens.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af +size 384 diff --git a/raw/candidates/ct-nvfp4/source/panel/arrays/final-0001.tokens.npy b/raw/candidates/ct-nvfp4/source/panel/arrays/final-0001.tokens.npy new file mode 100644 index 0000000000000000000000000000000000000000..54551046d9609a29e60c1b1460b4927e45b9d785 --- /dev/null +++ b/raw/candidates/ct-nvfp4/source/panel/arrays/final-0001.tokens.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea +size 384 diff --git a/raw/candidates/ct-nvfp4/source/panel/arrays/final-0002.tokens.npy b/raw/candidates/ct-nvfp4/source/panel/arrays/final-0002.tokens.npy new file mode 100644 index 0000000000000000000000000000000000000000..557330708fb66b049bf4bb046038e98fafced952 --- /dev/null +++ b/raw/candidates/ct-nvfp4/source/panel/arrays/final-0002.tokens.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c +size 384 diff --git a/raw/candidates/ct-nvfp4/source/panel/arrays/final-0003.tokens.npy b/raw/candidates/ct-nvfp4/source/panel/arrays/final-0003.tokens.npy new file mode 100644 index 0000000000000000000000000000000000000000..88ac7b071317640a2ac3432c2cc17a46a2741688 --- /dev/null +++ b/raw/candidates/ct-nvfp4/source/panel/arrays/final-0003.tokens.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a +size 384 diff --git a/raw/candidates/ct-nvfp4/source/panel/panel.json b/raw/candidates/ct-nvfp4/source/panel/panel.json new file mode 100644 index 0000000000000000000000000000000000000000..bc0b51f795d2ba81d472c21c88dc52cad9910a41 --- /dev/null +++ b/raw/candidates/ct-nvfp4/source/panel/panel.json @@ -0,0 +1,197 @@ +{ + "name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "panel_id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "schema": "quant-pipeline.glm53-token-panel.v1", + "sealed_corpus_sha256": null, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "windows": [ + { + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "document_id": "embedded-synthetic/garden.txt", + "domain": "garden", + "num_tokens": 64, + "prediction_positions": 63, + "role": "final", + "token_ids_first16": [ + 1, + 55, + 75, + 72, + 224, + 86, + 80, + 68, + 79, + 79, + 224, + 74, + 68, + 85, + 71, + 72 + ], + "token_ids_json_sha256": "08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315", + "token_ids_last16": [ + 224, + 68, + 81, + 71, + 224, + 68, + 224, + 86, + 87, + 82, + 81, + 72, + 224, + 83, + 68, + 2 + ], + "token_ids_sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af", + "window_id": "final-0000" + }, + { + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "document_id": "embedded-synthetic/arithmetic.txt", + "domain": "arithmetic", + "num_tokens": 64, + "prediction_positions": 63, + "role": "final", + "token_ids_first16": [ + 1, + 36, + 224, + 86, + 75, + 72, + 79, + 73, + 224, + 75, + 82, + 79, + 71, + 86, + 224, + 87 + ], + "token_ids_json_sha256": "5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46", + "token_ids_last16": [ + 72, + 86, + 17, + 224, + 55, + 75, + 72, + 85, + 72, + 224, + 68, + 85, + 72, + 224, + 72, + 2 + ], + "token_ids_sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea", + "window_id": "final-0001" + }, + { + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "document_id": "embedded-synthetic/code.txt", + "domain": "code", + "num_tokens": 64, + "prediction_positions": 63, + "role": "final", + "token_ids_first16": [ + 1, + 71, + 72, + 73, + 224, + 68, + 71, + 71, + 66, + 89, + 68, + 79, + 88, + 72, + 86, + 11 + ], + "token_ids_json_sha256": "51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07", + "token_ids_last16": [ + 85, + 76, + 74, + 75, + 87, + 202, + 202, + 85, + 72, + 86, + 88, + 79, + 87, + 224, + 32, + 2 + ], + "token_ids_sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c", + "window_id": "final-0002" + }, + { + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "document_id": "embedded-synthetic/instructions.txt", + "domain": "instructions", + "num_tokens": 64, + "prediction_positions": 63, + "role": "final", + "token_ids_first16": [ + 1, + 41, + 76, + 85, + 86, + 87, + 224, + 83, + 79, + 68, + 70, + 72, + 224, + 68, + 224, + 70 + ], + "token_ids_json_sha256": "8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d", + "token_ids_last16": [ + 224, + 70, + 82, + 82, + 79, + 224, + 90, + 68, + 87, + 72, + 85, + 224, + 76, + 81, + 87, + 2 + ], + "token_ids_sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a", + "window_id": "final-0003" + } + ] +} diff --git a/raw/candidates/ct-nvfp4/source/panel/panel.receipt.json b/raw/candidates/ct-nvfp4/source/panel/panel.receipt.json new file mode 100644 index 0000000000000000000000000000000000000000..fbc2ce3e8e9602a492d83ae681817e0fa02e4173 --- /dev/null +++ b/raw/candidates/ct-nvfp4/source/panel/panel.receipt.json @@ -0,0 +1,376 @@ +{ + "corpus": { + "documents_considered": 4, + "documents_selected": 4, + "path_prefix": "embedded-synthetic/", + "repository": null, + "revision": null, + "source": "Synthetic texts embedded verbatim in this sealed receipt and builder." + }, + "created_utc": "2026-09-07T00:00:00Z", + "created_utc_policy": "Fixed artifact epoch for deterministic bytes; not an execution timestamp.", + "documents": [ + { + "bytes": 135, + "document": "garden.txt", + "document_sha256": "2aca14290cd4753c3b15d8a20aaa7a6963d2cb48d78e8538a4ce34d4665dcb94", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "garden", + "text_utf8": "The small garden has red flowers, green leaves, and a stone path. A gentle breeze moves the branches while a robin sings near the gate.", + "tokens_total": 137, + "window_id": "final-0000" + }, + { + "bytes": 144, + "document": "arithmetic.txt", + "document_sha256": "b867a2e8cbe81cc8d5781bfe6718a43e171fb5c7c138b9ed6ac86bebc24bca83", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "arithmetic", + "text_utf8": "A shelf holds three blue boxes and five red boxes. There are eight boxes in total. Move two boxes to the desk and count the six boxes remaining.", + "tokens_total": 146, + "window_id": "final-0001" + }, + { + "bytes": 162, + "document": "code.txt", + "document_sha256": "08c8f75f45899cbc9656a7a3fcdbf3092abfa7bc97fe353957b08d7e9660240b", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "code", + "text_utf8": "def add_values(left, right):\n return left + right\n\nresult = add_values(7, 9)\nprint(result)\n# This readable snippet is synthetic input, not a coding benchmark.\n", + "tokens_total": 164, + "window_id": "final-0002" + }, + { + "bytes": 140, + "document": "instructions.txt", + "document_sha256": "1dba5052b28929f94f322ad9e8c0b238bcbd653d6fae54ebaea8e5e3f6073378", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "instructions", + "text_utf8": "First place a clean cup on the table. Next pour cool water into the cup. Finally put the bottle away and write a short note about the steps.", + "tokens_total": 142, + "window_id": "final-0003" + } + ], + "environment": { + "numpy": "2.5.3", + "tokenizers": "0.23.2", + "transformers": "5.16.1" + }, + "format_builder": "engines/tools/build_token_panel.py", + "format_builder_sha256": "30eb4d4d7e465aaa8d9ef2d947a0ac7fd42ec45388f20c8b6db242c88dc2d851", + "format_version": 1, + "panel_id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "panel_name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "parameters": { + "context_length": 64, + "generation_seed": null, + "generation_seed_policy": "No RNG is used.", + "prediction_positions_per_window": 63, + "scored_positions_total": 252, + "strata": [ + "garden", + "arithmetic", + "code", + "instructions" + ], + "windows_per_stratum": 1, + "windows_total": 4 + }, + "receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "resolver_sha256": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "schema": "malaiwah.token-panel-build-receipt.v1", + "selection_rule": "Four embedded readable synthetic documents in declared order; native tokenizer with add_special_tokens=True, truncation=True, max_length=64, padding=False; each encoded window must be exactly 64 tokens; no chat template; all 63 shifted next-token positions scored; no RNG.", + "separation": { + "checked": false, + "method": "No contamination scan or benchmark selection.", + "note": "Authored synthetic CPU smoke inputs for a random-init model; not a benchmark, held-out quality claim, or registry-row submission." + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "add_special_tokens": true, + "chat_template_applied": false, + "class": "TokenizersBackend", + "files_sha256": { + "config.json": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "generation_config.json": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "tokenizer.json": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "tokenizer_config.json": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + }, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "local_files_only": true, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "trust_remote_code": false, + "vocab_size": 260 + }, + "tool": "build_panel.py", + "tool_sha256": "f17b17262816676d6ededcc969756ac07ff991eab73117040ec41005f6ff63f3" +} diff --git a/raw/candidates/ct-nvfp4/source/qfs-source.json b/raw/candidates/ct-nvfp4/source/qfs-source.json new file mode 100644 index 0000000000000000000000000000000000000000..3c71d8671dcbe3678b71a2efe59e0ca341bebdc0 --- /dev/null +++ b/raw/candidates/ct-nvfp4/source/qfs-source.json @@ -0,0 +1,11 @@ +{ + "repository": "https://github.com/malaiwah/quant-fidelity-suite", + "revision": "a903cddb078c2eda8c65d6e6c875a09ac932df49", + "source_files": { + "bin/fidelity/dscompare.py": "4a53f735e1e3fb8bd739854451b57f34e8369bffa9fd4f7b7fd935fb2e7d52df", + "bin/fidelity/dsvalidate.py": "a9d6cd57e801e3ef044a37635e24518c83dbc6d1ec8a4c0b4b5d1b24483ca8d1", + "bin/fidelity/panel.py": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "bin/fidelity_dataset.py": "ac62b63bbfde67e4d5cacecf9cd417193c50f417a6749cc15ee6f1610c153a4e", + "engines/tools/hf_capture.py": "200ba12ca74fb97531307965cbbaa5c10553a5c26e008e524ea2d8aecb005b95" + } +} diff --git a/raw/candidates/ct-nvfp4/source/requirements-cpu.txt b/raw/candidates/ct-nvfp4/source/requirements-cpu.txt new file mode 100644 index 0000000000000000000000000000000000000000..5d504ef63dffa9df18b1e01a3492065235acbe48 --- /dev/null +++ b/raw/candidates/ct-nvfp4/source/requirements-cpu.txt @@ -0,0 +1,38 @@ +# Tested Linux CPU environment, Python 3.12.14. +--extra-index-url https://download.pytorch.org/whl/cpu +accelerate==1.14.0 +annotated-doc==0.0.5 +anyio==4.15.1 +certifi==2026.7.22 +click==8.5.0 +filelock==3.32.5 +fsspec==2026.7.0 +h11==0.16.0 +hf-xet==1.6.0 +httpcore==1.0.9 +httpx==0.28.1 +huggingface-hub==1.30.0 +idna==3.19 +jinja2==3.1.6 +markdown-it-py==4.2.0 +markupsafe==3.0.3 +mdurl==0.1.2 +mpmath==1.3.0 +networkx==3.6.1 +numpy==2.5.3 +packaging==26.3 +psutil==7.2.2 +pygments==2.21.0 +pyyaml==6.0.3 +regex==2026.9.3 +rich==15.0.0 +safetensors==0.8.0 +setuptools==81.0.0 +shellingham==1.5.4 +sympy==1.14.0 +tokenizers==0.23.2 +torch==2.11.0+cpu +tqdm==4.70.0 +transformers==5.16.1 +typer==0.27.2 +typing-extensions==4.16.0 diff --git a/raw/candidates/ct-nvfp4/source/tokenizer.json b/raw/candidates/ct-nvfp4/source/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..5ad9cccfc9ab5ed66f1c38db328de07cbe4939a9 --- /dev/null +++ b/raw/candidates/ct-nvfp4/source/tokenizer.json @@ -0,0 +1,404 @@ +{ + "version": "1.0", + "truncation": null, + "padding": null, + "added_tokens": [ + { + "id": 0, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 1, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 2, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 3, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + } + ], + "normalizer": null, + "pre_tokenizer": { + "type": "ByteLevel", + "add_prefix_space": false, + "trim_offsets": true, + "use_regex": false + }, + "post_processor": { + "type": "TemplateProcessing", + "single": [ + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + }, + { + "Sequence": { + "id": "A", + "type_id": 0 + } + }, + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + } + ], + "pair": [ + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + }, + { + "Sequence": { + "id": "A", + "type_id": 0 + } + }, + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + }, + { + "Sequence": { + "id": "B", + "type_id": 1 + } + }, + { + "SpecialToken": { + "id": "", + "type_id": 1 + } + } + ], + "special_tokens": { + "": { + "id": "", + "ids": [ + 1 + ], + "tokens": [ + "" + ] + }, + "": { + "id": "", + "ids": [ + 2 + ], + "tokens": [ + "" + ] + } + } + }, + "decoder": { + "type": "ByteLevel", + "add_prefix_space": true, + "trim_offsets": true, + "use_regex": true + }, + "model": { + "type": "BPE", + "dropout": null, + "unk_token": "", + "continuing_subword_prefix": null, + "end_of_word_suffix": null, + "fuse_unk": false, + "byte_fallback": false, + "ignore_merges": false, + "vocab": { + "": 0, + "": 1, + "": 2, + "": 3, + "!": 4, + "\"": 5, + "#": 6, + "$": 7, + "%": 8, + "&": 9, + "'": 10, + "(": 11, + ")": 12, + "*": 13, + "+": 14, + ",": 15, + "-": 16, + ".": 17, + "/": 18, + "0": 19, + "1": 20, + "2": 21, + "3": 22, + "4": 23, + "5": 24, + "6": 25, + "7": 26, + "8": 27, + "9": 28, + ":": 29, + ";": 30, + "<": 31, + "=": 32, + ">": 33, + "?": 34, + "@": 35, + "A": 36, + "B": 37, + "C": 38, + "D": 39, + "E": 40, + "F": 41, + "G": 42, + "H": 43, + "I": 44, + "J": 45, + "K": 46, + "L": 47, + "M": 48, + "N": 49, + "O": 50, + "P": 51, + "Q": 52, + "R": 53, + "S": 54, + "T": 55, + "U": 56, + "V": 57, + "W": 58, + "X": 59, + "Y": 60, + "Z": 61, + "[": 62, + "\\": 63, + "]": 64, + "^": 65, + "_": 66, + "`": 67, + "a": 68, + "b": 69, + "c": 70, + "d": 71, + "e": 72, + "f": 73, + "g": 74, + "h": 75, + "i": 76, + "j": 77, + "k": 78, + "l": 79, + "m": 80, + "n": 81, + "o": 82, + "p": 83, + "q": 84, + "r": 85, + "s": 86, + "t": 87, + "u": 88, + "v": 89, + "w": 90, + "x": 91, + "y": 92, + "z": 93, + "{": 94, + "|": 95, + "}": 96, + "~": 97, + "¡": 98, + "¢": 99, + "£": 100, + "¤": 101, + "¥": 102, + "¦": 103, + "§": 104, + "¨": 105, + "©": 106, + "ª": 107, + "«": 108, + "¬": 109, + "®": 110, + "¯": 111, + "°": 112, + "±": 113, + "²": 114, + "³": 115, + "´": 116, + "µ": 117, + "¶": 118, + "·": 119, + "¸": 120, + "¹": 121, + "º": 122, + "»": 123, + "¼": 124, + "½": 125, + "¾": 126, + "¿": 127, + "À": 128, + "Á": 129, + "Â": 130, + "Ã": 131, + "Ä": 132, + "Å": 133, + "Æ": 134, + "Ç": 135, + "È": 136, + "É": 137, + "Ê": 138, + "Ë": 139, + "Ì": 140, + "Í": 141, + "Î": 142, + "Ï": 143, + "Ð": 144, + "Ñ": 145, + "Ò": 146, + "Ó": 147, + "Ô": 148, + "Õ": 149, + "Ö": 150, + "×": 151, + "Ø": 152, + "Ù": 153, + "Ú": 154, + "Û": 155, + "Ü": 156, + "Ý": 157, + "Þ": 158, + "ß": 159, + "à": 160, + "á": 161, + "â": 162, + "ã": 163, + "ä": 164, + "å": 165, + "æ": 166, + "ç": 167, + "è": 168, + "é": 169, + "ê": 170, + "ë": 171, + "ì": 172, + "í": 173, + "î": 174, + "ï": 175, + "ð": 176, + "ñ": 177, + "ò": 178, + "ó": 179, + "ô": 180, + "õ": 181, + "ö": 182, + "÷": 183, + "ø": 184, + "ù": 185, + "ú": 186, + "û": 187, + "ü": 188, + "ý": 189, + "þ": 190, + "ÿ": 191, + "Ā": 192, + "ā": 193, + "Ă": 194, + "ă": 195, + "Ą": 196, + "ą": 197, + "Ć": 198, + "ć": 199, + "Ĉ": 200, + "ĉ": 201, + "Ċ": 202, + "ċ": 203, + "Č": 204, + "č": 205, + "Ď": 206, + "ď": 207, + "Đ": 208, + "đ": 209, + "Ē": 210, + "ē": 211, + "Ĕ": 212, + "ĕ": 213, + "Ė": 214, + "ė": 215, + "Ę": 216, + "ę": 217, + "Ě": 218, + "ě": 219, + "Ĝ": 220, + "ĝ": 221, + "Ğ": 222, + "ğ": 223, + "Ġ": 224, + "ġ": 225, + "Ģ": 226, + "ģ": 227, + "Ĥ": 228, + "ĥ": 229, + "Ħ": 230, + "ħ": 231, + "Ĩ": 232, + "ĩ": 233, + "Ī": 234, + "ī": 235, + "Ĭ": 236, + "ĭ": 237, + "Į": 238, + "į": 239, + "İ": 240, + "ı": 241, + "IJ": 242, + "ij": 243, + "Ĵ": 244, + "ĵ": 245, + "Ķ": 246, + "ķ": 247, + "ĸ": 248, + "Ĺ": 249, + "ĺ": 250, + "Ļ": 251, + "ļ": 252, + "Ľ": 253, + "ľ": 254, + "Ŀ": 255, + "ŀ": 256, + "Ł": 257, + "ł": 258, + "Ń": 259 + }, + "merges": [] + } +} \ No newline at end of file diff --git a/raw/candidates/ct-nvfp4/source/tokenizer_config.json b/raw/candidates/ct-nvfp4/source/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..df4d789a0874511220f5e2676081000298ad025d --- /dev/null +++ b/raw/candidates/ct-nvfp4/source/tokenizer_config.json @@ -0,0 +1,10 @@ +{ + "backend": "tokenizers", + "bos_token": "", + "clean_up_tokenization_spaces": false, + "eos_token": "", + "model_max_length": 256, + "pad_token": "", + "tokenizer_class": "TokenizersBackend", + "unk_token": "" +} diff --git a/raw/candidates/ct-nvfp4/source/verify_cpu.py b/raw/candidates/ct-nvfp4/source/verify_cpu.py new file mode 100644 index 0000000000000000000000000000000000000000..9081677f6d92ed81eec78043634f56eec3e193f5 --- /dev/null +++ b/raw/candidates/ct-nvfp4/source/verify_cpu.py @@ -0,0 +1,320 @@ +#!/usr/bin/env python3 +"""Two cold QFS CPU captures, strict verification, and forced numerical replay.""" +from __future__ import annotations + +import argparse +import hashlib +import json +import math +import os +from pathlib import Path +import re +import signal +import subprocess +import sys +import time +import traceback +import uuid + +DATASET_ID = "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1" +DATASET_REPOSITORY = "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1" +PANEL_ID = "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1" +TIMEOUT_SECONDS = 300 + +# Execute the real entrypoint without changing its implementation. Set thread +# counts before any model work, and record the observed counts in every child. +CHILD_BOOTSTRAP = r''' +import json, os, platform, runpy, sys +import numpy, torch, transformers, safetensors, tokenizers +import huggingface_hub +torch.set_num_threads(2) +torch.set_num_interop_threads(2) +print(json.dumps({"stage": "fixture_child_runtime", "pid": os.getpid(), + "python": sys.version, "executable": sys.executable, + "platform": platform.platform(), "machine": platform.machine(), + "torch": torch.__version__, "transformers": transformers.__version__, + "numpy": numpy.__version__, "safetensors": safetensors.__version__, + "tokenizers": tokenizers.__version__, "huggingface_hub": huggingface_hub.__version__, + "torch_num_threads": torch.get_num_threads(), + "torch_num_interop_threads": torch.get_num_interop_threads(), + "cuda_runtime": torch.version.cuda, + "thread_environment": {k: os.environ.get(k) for k in + ("OMP_NUM_THREADS", "MKL_NUM_THREADS", "OPENBLAS_NUM_THREADS", + "NUMEXPR_NUM_THREADS", "VECLIB_MAXIMUM_THREADS")}}, sort_keys=True), flush=True) +sys.argv = sys.argv[1:] +runpy.run_path(sys.argv[0], run_name="__main__") +''' + + +def require(condition, message): + if not condition: + raise RuntimeError(message) + + +def read_json(path): + def reject_constant(value): + raise ValueError("Non-finite JSON constant: " + value) + return json.loads(Path(path).read_text(encoding="utf-8"), parse_constant=reject_constant) + + +def write_json(path, value): + Path(path).write_text(json.dumps(value, sort_keys=True, indent=2, + ensure_ascii=False, allow_nan=False) + "\n", + encoding="utf-8") + + +def sha256(path): + with Path(path).open("rb") as stream: + return hashlib.file_digest(stream, "sha256").hexdigest() + + +def positive_zero(value): + return type(value) is float and value == 0.0 and math.copysign(1.0, value) == 1.0 + + +def run_command(name, entrypoint, arguments, *, out, qfs_root, summary): + argv = [sys.executable, "-c", CHILD_BOOTSTRAP, str(entrypoint), *map(str, arguments)] + stdout_path, stderr_path = out / (name + ".stdout.log"), out / (name + ".stderr.log") + environment = os.environ.copy() + environment.update({key: "2" for key in ( + "OMP_NUM_THREADS", "MKL_NUM_THREADS", "OPENBLAS_NUM_THREADS", + "NUMEXPR_NUM_THREADS", "VECLIB_MAXIMUM_THREADS")}) + environment.update({"HF_HUB_OFFLINE": "1", "TRANSFORMERS_OFFLINE": "1", + "TOKENIZERS_PARALLELISM": "false", "PYTHONUNBUFFERED": "1"}) + record = {"name": name, "argv": argv, "cwd": str(qfs_root), + "stdout": stdout_path.name, "stderr": stderr_path.name, + "timeout_seconds": TIMEOUT_SECONDS, "returncode": None, + "timed_out": False} + summary["commands"].append(record) + started = time.monotonic() + try: + with stdout_path.open("xb") as stdout, stderr_path.open("xb") as stderr: + process = subprocess.Popen(argv, cwd=qfs_root, env=environment, + stdout=stdout, stderr=stderr, start_new_session=True) + record["pid"] = process.pid + try: + record["returncode"] = process.wait(timeout=TIMEOUT_SECONDS) + except subprocess.TimeoutExpired: + record["timed_out"] = True + os.killpg(process.pid, signal.SIGKILL) + record["returncode"] = process.wait() + finally: + record["elapsed_seconds"] = time.monotonic() - started + write_json(out / "evidence-summary.json", summary) + # Capture children produce JSONL mixed with human-readable engine output. + with stdout_path.open(encoding="utf-8", errors="replace") as stdout: + for line in stdout: + if not line.startswith("{"): + continue + try: + item = json.loads(line) + except ValueError: + continue + if isinstance(item, dict) and item.get("stage") == "fixture_child_runtime": + record["runtime"] = item + break + require(not record["timed_out"], f"{name} exceeded {TIMEOUT_SECONDS}s; logs preserved") + require(record["returncode"] == 0, + f"{name} exited {record['returncode']}; see {stderr_path.name} and {stdout_path.name}") + require(record.get("runtime", {}).get("torch_num_threads") == 2, + f"{name} did not report two observed CPU threads") + return record + + +def check_report(path): + report = read_json(path) + require(report["structural_status"] == "sealed" and report["error_count"] == 0 + and report["warning_count"] == 0, f"Strict QFS verification failed: {path}") + return report + + +def reproduce(args, out, summary): + qfs_root, model_dir, panel_dir = (Path(value).resolve(strict=True) + for value in (args.qfs_root, args.model_dir, args.panel_dir)) + require(all(path.is_dir() for path in (qfs_root, model_dir, panel_dir)), + "--qfs-root, --model-dir and --panel-dir must be directories") + capture_tool = qfs_root / "engines/tools/hf_capture.py" + dataset_tool = qfs_root / "bin/fidelity_dataset.py" + require(capture_tool.is_file() and dataset_tool.is_file(), "QFS entrypoints not found") + sys.path.insert(0, str(qfs_root / "bin")) + from fidelity import dsformat as F + from fidelity import panel + + binding = panel.resolve_panel(panel_dir, role="final", tokenizer_root=model_dir).to_dict() + tokenizer, dimensions = binding["tokenizer"], binding["panel"] + require(tokenizer["files_verified"] is True, "Panel tokenizer bytes were not verified") + require(tokenizer["repository"] == args.model_repository + and tokenizer["revision"] == args.model_revision, + "Panel tokenizer repository/revision differs from the explicit model pin") + require(tokenizer["vocab_size"] == 260, "Expected byte-level vocabulary of 260 tokens") + require(dimensions["id"] == PANEL_ID and dimensions["role"] == "final" + and dimensions["contexts"] == 4 and dimensions["context_length"] == 64 + and dimensions["positions_per_context"] == 63 + and dimensions["scored_positions_total"] == 252, + "Expected the complete four-window, 64-token, 252-position fixture panel") + require("other" in F.LANES, "QFS no longer permits the honest CPU lane 'other'") + binding_path = out / "panel-binding.json" + write_json(binding_path, binding) + binding_sha = sha256(binding_path) + summary.update({"panel_binding": binding_path.name, "panel_binding_sha256": binding_sha, + "model_repository": args.model_repository, "model_revision": args.model_revision, + "dataset_id": DATASET_ID, "dataset_repository": DATASET_REPOSITORY, + "lane": "other", "lane_description": "local CPU random-init fixture", + "device": "cpu", "dtype": "bfloat16", "cpu_threads": 2, + "qfs_source_files": {str(path.relative_to(qfs_root)): sha256(path) + for path in (capture_tool, dataset_tool, qfs_root / "bin/fidelity/panel.py", + qfs_root / "bin/fidelity/dscompare.py", + qfs_root / "bin/fidelity/dsvalidate.py")}, + "provenance_note": "Local QFS source bytes are hashed; no source commit is asserted. " + "The caller supplies an immutable model pin; QFS hashes the local checkpoint. " + "This script does not independently prove Hub-to-local weight equality.", + "captures": {}}) + disclosure = [{"code": "random_init_cpu_fixture", "severity": "info", + "affects_comparability": False, + "detail": "Complete randomly initialized tiny glm_moe_dsa checkpoint; CPU smoke " + "fixture only, not trained quality evidence or a registry measurement. " + "Lane other denotes CPU, not local-cuda-budget."}] + common = ["--model", model_dir, "--weights-repository", args.model_repository, + "--model-revision", args.model_revision, "--panel", panel_dir, + "--panel-role", "final", "--panel-binding", binding_path, + "--panel-binding-sha256", binding_sha, "--panel-tokenizer-root", model_dir, + "--role", "root", "--lane", "other", "--device", "cpu", + "--dtype", "bfloat16", "--schedule", "window-outer", + "--dataset-id", DATASET_ID, "--dataset-name", "GLM MoE DSA tiny random CPU root", + "--repository", DATASET_REPOSITORY, "--author", "malaiwah", + "--disclosures", json.dumps(disclosure, separators=(",", ":"))] + run = lambda name, tool, argv: run_command(name, tool, argv, out=out, + qfs_root=qfs_root, summary=summary) + cold_labels = {side: f"cpu-{side}-{uuid.uuid4().hex}" for side in ("first", "repeat")} + for side in ("first", "repeat"): + root = out / side + memory_path = out / (side + ".memory.json") + command = run("capture-" + side, capture_tool, + [*common, "--out", root, "--run-name", cold_labels[side], + "--cold-run", cold_labels[side], "--memory-report", memory_path]) + verify_path, strict_path = out / (side + ".verify.json"), out / (side + ".strict.json") + run("verify-" + side, dataset_tool, + ["verify", root, "--verify-tensors", "--json", verify_path]) + run("strict-" + side, dataset_tool, + ["validate", root, "--strict", "--verify-tensors", "--json", strict_path]) + check_report(verify_path) + check_report(strict_path) + manifest = F.load_manifest(str(root)) + runtime = read_json(root / manifest["runtime"]["file"]) + probe = manifest["generation_sanity_probe"] + require(probe["status"] == "recorded" and probe["degenerate"] is False + and probe["expect"] is None and probe["logit_spread"] > 0, + f"{side}: default nondegenerate generation sanity probe did not run") + require(runtime["runtime_environment"]["cold_run"] == cold_labels[side], + f"{side}: cold-run label not recorded") + require(runtime["stack_fingerprint"]["device"] == "cpu" + and manifest["runtime"]["lane"] == "other", f"{side}: not an honest CPU capture") + require(manifest["dataset"]["id"] == DATASET_ID and manifest["dataset"]["role"] == "root" + and manifest["weights"]["revision"] == args.model_revision + and manifest["weights"]["repository"] == args.model_repository, + f"{side}: model/dataset identity mismatch") + require(runtime["capture_tool"]["resolved_panel_binding"]["binding"] == binding, + f"{side}: captured panel binding differs") + require(manifest["capture"]["records_count"] == 4 + and manifest["capture"]["scored_rows_total"] == 252 + and manifest["capture"]["dtype"] == "BF16", f"{side}: incomplete BF16 capture") + summary["captures"][side] = { + "path": side, "cold_run": cold_labels[side], "pid": command["pid"], + "dataset_sha256": manifest[F.SEAL_FIELD], + "capture_content_digest": manifest["capture"]["capture_content_digest"], + "head_tensor_content_sha256": manifest["head"]["tensor_content_sha256"], + "checkpoint_identity_sha256": manifest["weights"]["checkpoint_identity_sha256"], + "stack_fingerprint_sha256": manifest["runtime"]["stack_fingerprint_sha256"], + "resources": runtime["resources"], "memory_report": read_json(memory_path), + "generation_sanity_probe": probe, "runtime_versions": command["runtime"]} + write_json(out / "evidence-summary.json", summary) + + first, repeat = (summary["captures"][side] for side in ("first", "repeat")) + for key in ("capture_content_digest", "head_tensor_content_sha256", + "checkpoint_identity_sha256", "stack_fingerprint_sha256"): + require(first[key] == repeat[key], f"Cold captures disagree: {key}") + comparison_dir = out / "comparison" + run("compare", dataset_tool, + ["compare", "--reference", out / "first", "--candidate", out / "repeat", + "--out", comparison_dir, "--self-compare", "--force-compute", "--device", "cpu", + "--replay-device", "numpy", "--replay-dtype", "float32", "--vocab-chunk", "8192", + "--chunk-positions", "128", "--verify-tensors", + "--reference-label", cold_labels["first"], "--candidate-label", cold_labels["repeat"]]) + receipt_path = comparison_dir / "comparison-receipt.json" + receipt_report = out / "comparison.validate.json" + run("validate-comparison", dataset_tool, + ["validate", "--receipt", receipt_path, "--strict", "--json", receipt_report]) + check_report(receipt_report) + receipt = read_json(receipt_path) + require(receipt["comparison_kind"] == "reproduction_confirmation" + and receipt["comparability"]["class"] == "strict", "Not a strict reproduction") + require(receipt["self_compare"]["force_compute_agreed"] is True + and receipt["self_compare"]["capture_content_digest_equal"] is True, + "Forced numerical replay did not agree with the content hash proof") + require(positive_zero(receipt["metric"]["value"]) + and all(positive_zero(value) for value in receipt["kl"].values()) + and type(receipt["top1_agreement"]) is float and receipt["top1_agreement"] == 1.0, + "Comparison did not report literal +0.0 KL and 1.0 top-1 agreement") + require(receipt["comparator"]["replay_backend"] == "numpy:cpu:float32" + and receipt["comparator"]["tensor_content_digests_verified"] is True + and receipt["measurement_scope"]["scored_positions"] == 252 + and receipt["measurement_scope"]["contexts"] == 4 + and receipt["measurement_scope"]["covers_full_panel"] is True, + "Replay backend, verification, or panel coverage differs") + import numpy as np + tokenwise_path = comparison_dir / receipt["tokenwise"]["path"] + require(sha256(tokenwise_path) == receipt["tokenwise"]["sha256"], "Tokenwise file hash differs") + values = np.load(tokenwise_path, allow_pickle=False) + require(values.dtype == np.dtype("float64") and values.shape == (252,) + and bool(np.all(values == 0.0)) and not bool(np.any(np.signbit(values))), + "Tokenwise artifact is not exactly 252 positive float64 zeros") + summary["comparison"] = { + "receipt": str(receipt_path.relative_to(out)), "receipt_sha256": receipt["receipt_sha256"], + "comparison_kind": receipt["comparison_kind"], "metric": receipt["metric"], + "kl": receipt["kl"], "top1_agreement": receipt["top1_agreement"], + "comparator": receipt["comparator"], "self_compare": receipt["self_compare"], + "tokenwise": receipt["tokenwise"], "measurement_scope": receipt["measurement_scope"], + "note": "QFS retains its hash-proof result and top-1 value for reproduction confirmations; " + "--force-compute independently runs the estimator and requires its tokenwise KL " + "array to agree exactly. short_circuited=true therefore does not mean replay was skipped."} + + +def main(argv=None): + parser = argparse.ArgumentParser(description=__doc__) + for flag in ("model-dir", "model-repository", "model-revision", "panel-dir", "out", "qfs-root"): + parser.add_argument("--" + flag, required=True) + args = parser.parse_args(argv) + if not re.fullmatch(r"[0-9a-f]{40}", args.model_revision): + parser.error("--model-revision must be an actual immutable lowercase 40-hex Hub commit") + if not re.fullmatch(r"[A-Za-z0-9][A-Za-z0-9._-]*/[A-Za-z0-9][A-Za-z0-9._-]*", args.model_repository): + parser.error("--model-repository must be an owner/repository Hub identity") + out = Path(args.out).absolute() + try: + out.mkdir(parents=True, exist_ok=False) + except OSError as exc: + parser.error(f"Refusing output directory {out}: {exc}") + started = time.monotonic() + summary = {"schema": "malaiwah.glm-moe-dsa-tiny-cpu-reproduction.v1", "status": "running", + "commands": [], "driver_argv": [sys.executable, str(Path(__file__).resolve()), + *(sys.argv[1:] if argv is None else argv)], + "driver_sha256": sha256(__file__), + "scope": "Random-init CPU reproduction only; no quality claim or registry submission."} + try: + reproduce(args, out, summary) + summary["status"] = "passed" + code = 0 + except Exception as exc: + summary.update({"status": "failed", "error": f"{type(exc).__name__}: {exc}"}) + (out / "failure.traceback.log").write_text(traceback.format_exc(), encoding="utf-8") + print(summary["error"], file=sys.stderr) + code = 1 + finally: + summary["elapsed_seconds"] = time.monotonic() - started + write_json(out / "evidence-summary.json", summary) + print(json.dumps({"status": summary["status"], "evidence": str(out / "evidence-summary.json")}, + sort_keys=True)) + return code + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/raw/candidates/fp8-ue8m0/evidence/candidate/README.md b/raw/candidates/fp8-ue8m0/evidence/candidate/README.md new file mode 100644 index 0000000000000000000000000000000000000000..445ea64ffb5bcd31359c150605f1d4e5cd21ab80 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/candidate/README.md @@ -0,0 +1,95 @@ +--- +license: mit +tags: +- fidelity +- kl-divergence +- fidelity-provenance +- fidelity-dataset +- fidelity-quant +x_fidelity: + spec: https://github.com/malaiwah/quant-fidelity-suite/blob/main/docs/FIDELITY-DATASET-SPEC.md + spec_version: fidelity-provenance/v1 + role: fidelity-dataset + captured_model: + repository: /tmp/qfs-quant-microfloat-release/stage-main/fp8-ue8m0 + revision: null + role: quant + form: hidden + lane: other + panel: + panel_id: panel--panel + suite_token_hash_sha256: 525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36 + contexts: 4 + scored_positions: 252 + repository: null + revision: null + head: + policy: native + quantized: false + bits: 16 + lm_head_tensor_content_sha256: 2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510 + lm_head_file_sha256: 07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913 + final_norm_tensor_content_sha256: null + final_norm_file_sha256: null + equality_receipt: null + replay_permitted: true + scope_digest: attn.o=quantized:fp8-ue8m0@8|attn.other=quantized:mixed|attn.qkv=quantized:fp8-ue8m0@8|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=quantized:fp8-ue8m0@8|mlp.gate=quantized:fp8-ue8m0@8|mlp.up=quantized:fp8-ue8m0@8|moe.experts=quantized:fp8-ue8m0@8|moe.router=native:mixed|moe.shared_expert=quantized:fp8-ue8m0@8|norm=native:bf16@16|head=native|kv=bf16 + seal: + manifest: fidelity-dataset.json + dataset_sha256: null + checksums: checksums.txt + checksums_sha256: '0000000000000000000000000000000000000000000000000000000000000000' + note: 'written before the seal: dataset_sha256 and checksums_sha256 are digests of the tree this file + is inside, so they cannot appear in it. Read them from fidelity-dataset.json.' + interop: + compatible_with: + - kimi-k3-distribution-fidelity/1 + k3_compat_emitted: false + registry: + dataset: malaiwah/quant-fidelity-registry + schema_version: quant-fidelity-registry/v1 + artifact_id: null + measurement_ids: [] + snapshot: null + fidelity_dataset: + repository: null + revision: null + dataset_sha256: null + capture_content_digest: b8c1c2ab57a23abb2220ef682898976416d557116a4a01154f8112187a6b9103 + form: hidden + role: quant + measurements: [] +--- +# Local quant integration candidate + +A **quant** fidelity dataset in **hidden form**, produced by `engines/tools/hf_capture.py` from `/tmp/qfs-quant-microfloat-release/stage-main/fp8-ue8m0`. + +## The cut + +the final hidden state handed to lm_head -- after the text model's final norm and immediately before the head matmul -- captured as the head module's input via torch.nn.Module.register_forward_pre_hook; replay applies the head ONLY (no final norm at replay time: the capture already sits after it). Same cut as engines/tools/hidden_replay.py and as Festr's kimi-k3 hidden-replay qualification. + +## What is here + +| | | +|---|---| +| records | 4 | +| scored positions | 252 | +| context length | 64 | +| hidden width | 64 | +| vocab size | 260 | +| capture bytes (hidden form) | 33348 | +| the same capture in logit form would be | 262080 bytes (8x) | +| scope policy | mixed | +| lane | other | + +## Does the model still generate sensibly + +`The capital of France is` -> `�` (p=0.0067, entropy 5.548 of a possible 5.561 nats). Recorded, not enforced. One extra window through the same schedule; its hidden state was discarded and is not part of this dataset. + +## How to check it + +``` +bin/fidelity-dataset verify +``` + +Full specification: diff --git a/raw/candidates/fp8-ue8m0/evidence/candidate/capture/hidden_0000.safetensors b/raw/candidates/fp8-ue8m0/evidence/candidate/capture/hidden_0000.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..9d2029c9fbf2e147b4d4294b76210b3992bb5dfd --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/candidate/capture/hidden_0000.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:40cd1cd108cb70d6b33b4add2a08115d9b9c8de4ebcff3fd7e69c4fff205757b +size 8337 diff --git a/raw/candidates/fp8-ue8m0/evidence/candidate/capture/hidden_0001.safetensors b/raw/candidates/fp8-ue8m0/evidence/candidate/capture/hidden_0001.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..fae1dbaa391908479807b90936f9cb0bc5eea2da --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/candidate/capture/hidden_0001.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dd67772c7ffe8c3d1a6efa229ed374333d63f1ff7ac8eac1c62c18122221850e +size 8337 diff --git a/raw/candidates/fp8-ue8m0/evidence/candidate/capture/hidden_0002.safetensors b/raw/candidates/fp8-ue8m0/evidence/candidate/capture/hidden_0002.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..f19946646468c02ead0aae34fe4dd47e8e5650cc --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/candidate/capture/hidden_0002.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:875bbbf99aa5e09d7d11ed617d02baed83fafac6c50c9c2f454d5abd45d94148 +size 8337 diff --git a/raw/candidates/fp8-ue8m0/evidence/candidate/capture/hidden_0003.safetensors b/raw/candidates/fp8-ue8m0/evidence/candidate/capture/hidden_0003.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..256ab7bb5cee2397e96b51c3916d31a7b55037b1 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/candidate/capture/hidden_0003.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:037443576b69a6505b8cbc9c161e025992886cbcc0b08762ef9b906e9214cd0f +size 8337 diff --git a/raw/candidates/fp8-ue8m0/evidence/candidate/capture/manifest.json b/raw/candidates/fp8-ue8m0/evidence/candidate/capture/manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..0113ae7eca5358d001935ccb0a19428e6999b57b --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/candidate/capture/manifest.json @@ -0,0 +1,159 @@ +{ + "capture_content_digest": "b8c1c2ab57a23abb2220ef682898976416d557116a4a01154f8112187a6b9103", + "context_length": 64, + "coverage": { + "complete": true, + "declared_records": 4, + "index_range": [ + 0, + 3 + ], + "missing_indices_sample": [], + "present_records": 4, + "shard_of": null, + "subset_detail": null + }, + "created_utc": "2026-09-07T16:52:53Z", + "dtype": "BF16", + "dtype_lossless": true, + "form": "hidden", + "format_version": 1, + "hidden_width": 64, + "receipt_sha256": "3631b18761f9114cc4a5170774c7bd70a8609dcfb086eb2bcba7a254e86ce706", + "records": [ + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 0, + "document_id": "embedded-synthetic/garden.txt", + "domain": "garden", + "dtype": "BF16", + "elapsed_seconds": 0.046, + "file": "hidden_0000.safetensors", + "index": 0, + "key": "hidden_states", + "payload_sha256": "d9e9ec8db715454d00b5bff7856e3e36347b10ce007036ca3f6a9255f1949532", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "40cd1cd108cb70d6b33b4add2a08115d9b9c8de4ebcff3fd7e69c4fff205757b", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "d9e9ec8db715454d00b5bff7856e3e36347b10ce007036ca3f6a9255f1949532", + "token_ids_json_sha256": "08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315", + "token_ids_sha256_legacy": "9d5378f0316be57e37f80d2bae7895ba4a1140c302c87ff8cce2fbd9afc83b77", + "window_id": "final-0000", + "window_index": 0 + }, + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 1, + "document_id": "embedded-synthetic/arithmetic.txt", + "domain": "arithmetic", + "dtype": "BF16", + "elapsed_seconds": 0.038, + "file": "hidden_0001.safetensors", + "index": 1, + "key": "hidden_states", + "payload_sha256": "1662ce4a1fbcd33eda9c5d36ab7fb2cc044c3089f36ef99acd3f0c108688aa67", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "dd67772c7ffe8c3d1a6efa229ed374333d63f1ff7ac8eac1c62c18122221850e", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "1662ce4a1fbcd33eda9c5d36ab7fb2cc044c3089f36ef99acd3f0c108688aa67", + "token_ids_json_sha256": "5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46", + "token_ids_sha256_legacy": "e0f95114b71a46cb489539dc38909fb67fb378f25fafbb513e32690cc7f11b37", + "window_id": "final-0001", + "window_index": 1 + }, + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 2, + "document_id": "embedded-synthetic/code.txt", + "domain": "code", + "dtype": "BF16", + "elapsed_seconds": 0.038, + "file": "hidden_0002.safetensors", + "index": 2, + "key": "hidden_states", + "payload_sha256": "d8daa5a8ae705b1c707f98e672382905e7551bd97ac0fd23e5c2101a18672810", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "875bbbf99aa5e09d7d11ed617d02baed83fafac6c50c9c2f454d5abd45d94148", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "d8daa5a8ae705b1c707f98e672382905e7551bd97ac0fd23e5c2101a18672810", + "token_ids_json_sha256": "51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07", + "token_ids_sha256_legacy": "482b890c7b0e2f7400257c43680093b7f2b90d6df5361c6de3ae97ddfdd2504e", + "window_id": "final-0002", + "window_index": 2 + }, + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 3, + "document_id": "embedded-synthetic/instructions.txt", + "domain": "instructions", + "dtype": "BF16", + "elapsed_seconds": 0.033, + "file": "hidden_0003.safetensors", + "index": 3, + "key": "hidden_states", + "payload_sha256": "3e2a9761c62fd85223dfd6703700b08231bce909419816fac7fdecbbfa858b4f", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "037443576b69a6505b8cbc9c161e025992886cbcc0b08762ef9b906e9214cd0f", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "3e2a9761c62fd85223dfd6703700b08231bce909419816fac7fdecbbfa858b4f", + "token_ids_json_sha256": "8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d", + "token_ids_sha256_legacy": "12e01edd3900ff2ca82621feb5504f24b003a53c0afe98a9ee0b490eb93141d4", + "window_id": "final-0003", + "window_index": 3 + } + ], + "run_name": "hf-capture", + "runtime_manifest": "../runtime/capture-runtime.json", + "runtime_manifest_sha256": "7f88841b83658acc28cf414abd0a61716073118f8a9c70190c56b711a0e20c0a", + "schema": "malaiwah.fidelity-capture-manifest.v1", + "scored_rows_per_context": 63, + "semantic_point": "after_final_rmsnorm_before_lm_head", + "tensor_key": "hidden_states", + "total_scored_rows": 252, + "total_size_bytes": 33348, + "vocab_size": 260 +} diff --git a/raw/candidates/fp8-ue8m0/evidence/candidate/checksums.txt b/raw/candidates/fp8-ue8m0/evidence/candidate/checksums.txt new file mode 100644 index 0000000000000000000000000000000000000000..7a2092785cebed50a0caeb2b0d31509824e411c6 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/candidate/checksums.txt @@ -0,0 +1,20 @@ +eae14cb939ad0e3c9e5598fd470db04f30e804caf8af6ba65b27904b578df3ec README.md +40cd1cd108cb70d6b33b4add2a08115d9b9c8de4ebcff3fd7e69c4fff205757b capture/hidden_0000.safetensors +dd67772c7ffe8c3d1a6efa229ed374333d63f1ff7ac8eac1c62c18122221850e capture/hidden_0001.safetensors +875bbbf99aa5e09d7d11ed617d02baed83fafac6c50c9c2f454d5abd45d94148 capture/hidden_0002.safetensors +037443576b69a6505b8cbc9c161e025992886cbcc0b08762ef9b906e9214cd0f capture/hidden_0003.safetensors +6bf2749c054ac3f028cc1008dff42a02c549f0a253e49f2c5be9a2b60dc051b3 capture/manifest.json +777b038f747bed25d1f5db8adbfd2a78c7762fb5c870ff8c3c785a984d48a168 head/head.json +07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913 head/weight.safetensors +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0000.npy +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0001.npy +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0002.npy +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0003.npy +b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263 panel/panel-receipt.json +68efa258ea3c5d4ba759c3c15aadd6e8c984711831bea3f335903109345cdcef panel/panel.json +08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315 panel/tokens/context-0000.json +5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46 panel/tokens/context-0001.json +51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07 panel/tokens/context-0002.json +8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d panel/tokens/context-0003.json +7f88841b83658acc28cf414abd0a61716073118f8a9c70190c56b711a0e20c0a runtime/capture-runtime.json +d3024ee8845d123018358b9c98a844bcdc3c985fbbc92d9e1b8565b121fe8a45 validation/structural-validation.json diff --git a/raw/candidates/fp8-ue8m0/evidence/candidate/fidelity-dataset.json b/raw/candidates/fp8-ue8m0/evidence/candidate/fidelity-dataset.json new file mode 100644 index 0000000000000000000000000000000000000000..d4fe26fe39711e3cb010024bfe6711ffdce12429 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/candidate/fidelity-dataset.json @@ -0,0 +1,422 @@ +{ + "capture": { + "capture_content_digest": "b8c1c2ab57a23abb2220ef682898976416d557116a4a01154f8112187a6b9103", + "dtype": "BF16", + "dtype_lossless": true, + "form": "hidden", + "head_not_separable_reason": null, + "head_separable": true, + "hidden_width": 64, + "lossy_codec": null, + "manifest_file": "capture/manifest.json", + "manifest_file_sha256": "6bf2749c054ac3f028cc1008dff42a02c549f0a253e49f2c5be9a2b60dc051b3", + "records_count": 4, + "scored_rows_total": 252, + "semantic_point": "after_final_rmsnorm_before_lm_head", + "tensor_key": "hidden_states", + "total_size_bytes": 33348, + "vocab_size": 260 + }, + "coverage": { + "complete": true, + "declared_records": 4, + "index_range": [ + 0, + 3 + ], + "missing_indices_sample": [], + "present_records": 4, + "shard_of": null, + "subset_detail": null + }, + "created_utc": "2026-09-07T16:52:53Z", + "dataset": { + "author": { + "handle": null, + "is_registry_maintainer": false, + "name": "malaiwah", + "role": "capture-author", + "url": null + }, + "base_capture": null, + "id": "fidelity--quant-integration.candidate", + "license": "mit", + "name": "Local quant integration candidate", + "qualification": null, + "repository": null, + "revision": null, + "role": "quant", + "structural_status": "sealed" + }, + "dataset_sha256": "c557b61c917465ed3d0ffe5e1ad83e3c27d1314a99309020f802de6bd65a51e6", + "determinism": { + "cold_start_per_run": true, + "distinct_evidence_hash_count": 1, + "evidence_hashes": [ + "b8c1c2ab57a23abb2220ef682898976416d557116a4a01154f8112187a6b9103" + ], + "evidence_kind": "hidden_state_tensor_sha256", + "identical_across_runs": null, + "note": "a single cold capture; cross-run determinism is NOT asserted here. Capture a second cold run and run `fidelity-dataset compare --self-compare` -- an exactly 0.0 result is the SC-1 reproduction confirmation.", + "repeat_noise": null, + "repeats": [], + "run_count": 1 + }, + "disclosures": [ + { + "affects_comparability": false, + "code": "rtn_format_fixture", + "detail": "Local RTN-format fixture; optimizer-not-run; no model-quality or serving-kernel equivalence claim.", + "severity": "info" + }, + { + "affects_comparability": false, + "code": "reduced_run_count", + "detail": "this dataset is ONE cold capture (run_count 1, the DET-D4 floor is 5). Cross-run determinism is not asserted by the dataset; it is established by a second cold capture plus `fidelity-dataset compare --self-compare`, whose exactly-0.0 result is the SC-1 reproduction confirmation.", + "severity": "caveat" + } + ], + "format_version": 1, + "generation_sanity_probe": { + "degenerate": false, + "enforced": false, + "entropy_nats": 5.547887879700491, + "expect": null, + "logit_spread": 0.978515625, + "note": "one extra window through the same schedule; its hidden state is discarded and never enters the dataset.", + "prompt": "The capital of France is", + "schema": "malaiwah.generation-sanity-probe.v1", + "status": "recorded", + "top1_id": 113, + "top1_probability": 0.00669652293663199, + "top1_text": "�", + "top_k": [ + { + "id": 113, + "probability": 0.00669652293663199, + "text": "�" + }, + { + "id": 237, + "probability": 0.006389866824949809, + "text": "�" + }, + { + "id": 193, + "probability": 0.005956010793381178, + "text": "\u0001" + }, + { + "id": 236, + "probability": 0.005628034684087549, + "text": "�" + }, + { + "id": 44, + "probability": 0.005454878260603225, + "text": "I" + } + ], + "uniform_entropy_nats": 5.560681631015528, + "vocab_size": 260 + }, + "head": { + "applied_in_capture": false, + "bias": null, + "bits": 16, + "compat_tensor_key": "weight", + "dtype": "BF16", + "equality_receipt": null, + "file": "head/weight.safetensors", + "file_sha256": "07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913", + "final_norm": { + "applied_at_replay": false, + "applied_in_capture": true, + "dtype": null, + "file": null, + "file_sha256": null, + "shape": null, + "tensor_content_sha256": null, + "tensor_key": null + }, + "head_json": "head/head.json", + "present": true, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "shape": [ + 260, + 64 + ], + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "tensor_key": "lm_head.weight" + }, + "interop": { + "adapted_from": null, + "compatible_with": [ + "kimi-k3-distribution-fidelity/1" + ], + "divergences": [ + { + "field": "head", + "id": "D-1", + "reason": "every capture declares its OWN head identity by tensor content digest; the comparator refuses a hidden-form comparison across differing heads." + }, + { + "field": "runtime.lane", + "id": "D-2", + "reason": "lane is required and gated at compare time so registry BIAS-006 is checked before a number exists, not at submission." + }, + { + "field": "panel.scoring_window", + "id": "D-3", + "reason": "scoring_window is part of panel identity, not a comparator flag: a score_from=1024 number is a different panel, not a variant." + }, + { + "field": "comparison_kind", + "id": "D-4", + "reason": "self-compare is a first-class mode asserting exactly 0.0." + }, + { + "field": "estimator.accumulation_dtype", + "id": "D-5", + "reason": "required, fp64 default; an fp32 estimator lands in a different comparability class on the same data and that must be visible." + }, + { + "field": "coverage", + "id": "D-6", + "reason": "declared vs present record counts with shard_of; fixes our own manifest that claimed 5,120 captures in a 512-file repository." + }, + { + "field": "panel", + "id": "D-7", + "reason": "the panel is a separately referenceable object, which is what makes a candidate capture publishable standalone." + }, + { + "field": "capture.lossy_codec", + "id": "D-8", + "reason": "lets a llama.cpp .kld be ingested without laundering a lossy capture as exact." + }, + { + "field": "capture.records[].attention_mask_sha256", + "id": "D-9", + "reason": "our packed and streaming lanes vary mask construction; a single-request capture path makes it invariant and has no equivalent field." + }, + { + "field": "capture.head_separable", + "id": "D-10", + "reason": "hidden form is the default; logit form must declare head_separable:false with a reason." + } + ], + "k3_compat_emitted": false, + "note": null + }, + "panel": { + "contamination": { + "checked": false, + "hits": null, + "method": "not established", + "receipt": null + }, + "context_length": 64, + "contexts": 4, + "panel_file": "panel/panel.json", + "panel_file_sha256": "68efa258ea3c5d4ba759c3c15aadd6e8c984711831bea3f335903109345cdcef", + "panel_id": "panel--panel", + "panel_receipt_file": "panel/panel-receipt.json", + "panel_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "panel_token_sha256_legacy": "3c9467c85be43d238926f6d18bf825c2e4748814c95b8b0e8b8f1420546c3089", + "remap_file": null, + "repository": null, + "revision": null, + "scored_positions_total": 252, + "scoring_window": { + "dropped_positions_total": 0, + "min_left_context_tokens": 1, + "policy": "every causal prediction position of every window is scored; nothing is dropped", + "score_from": 0, + "windowed": false + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } + }, + "runtime": { + "backend_identity_sha256": null, + "file": "runtime/capture-runtime.json", + "file_sha256": "7f88841b83658acc28cf414abd0a61716073118f8a9c70190c56b711a0e20c0a", + "lane": "other", + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "lane_inferred": false, + "runtime_reader_sha256": null, + "source": "native", + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd" + }, + "schema": "malaiwah.fidelity-dataset.v1", + "scope": { + "assignments": [ + { + "bits_per_weight": 8, + "format": "fp8-ue8m0", + "layer_range": "all", + "note": "4 tensors: model.layers.N.self_attn.o_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "attn.o", + "treatment": "quantized" + }, + { + "bits_per_weight": null, + "format": "mixed", + "layer_range": "0-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 12 x native:bf16@16 (model.layers.N.self_attn.indexer.k_norm.bias, model.layers.N.self_attn.indexer.k_norm.weight, model.layers.N.self_attn.kv_a_layernorm.weight); 6 x quantized:fp8-ue8m0@8 (model.layers.N.self_attn.indexer.weights_proj.weight, model.layers.N.self_attn.indexer.wk.weight, model.layers.N.self_attn.indexer.wq_b.weight). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "attn.other", + "treatment": "quantized" + }, + { + "bits_per_weight": 8, + "format": "fp8-ue8m0", + "layer_range": "all", + "note": "16 tensors: model.layers.N.self_attn.kv_a_proj_with_mqa.weight, model.layers.N.self_attn.kv_b_proj.weight, model.layers.N.self_attn.q_a_proj.weight, model.layers.N.self_attn.q_b_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "attn.qkv", + "treatment": "quantized" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": "all", + "note": "1 tensors: model.embed_tokens.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "embed_tokens", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": "all", + "note": "1 tensors: lm_head.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "lm_head", + "treatment": "native" + }, + { + "bits_per_weight": 8, + "format": "fp8-ue8m0", + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.down_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "mlp.down", + "treatment": "quantized" + }, + { + "bits_per_weight": 8, + "format": "fp8-ue8m0", + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.gate_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "mlp.gate", + "treatment": "quantized" + }, + { + "bits_per_weight": 8, + "format": "fp8-ue8m0", + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "mlp.up", + "treatment": "quantized" + }, + { + "bits_per_weight": 8, + "format": "fp8-ue8m0", + "layer_range": "all", + "note": "72 tensors: model.layers.N.mlp.experts.E.down_proj.weight, model.layers.N.mlp.experts.E.gate_proj.weight, model.layers.N.mlp.experts.E.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "moe.experts", + "treatment": "quantized" + }, + { + "bits_per_weight": null, + "format": "mixed", + "layer_range": "1-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 3 x native:bf16@16 (model.layers.N.mlp.gate.weight); 3 x native:fp32@32 (model.layers.N.mlp.gate.e_score_correction_bias). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "moe.router", + "treatment": "native" + }, + { + "bits_per_weight": 8, + "format": "fp8-ue8m0", + "layer_range": "all", + "note": "9 tensors: model.layers.N.mlp.shared_experts.down_proj.weight, model.layers.N.mlp.shared_experts.gate_proj.weight, model.layers.N.mlp.shared_experts.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "moe.shared_expert", + "treatment": "quantized" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": "all", + "note": "9 tensors: model.layers.N.input_layernorm.weight, model.layers.N.post_attention_layernorm.weight, model.norm.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "norm", + "treatment": "native" + } + ], + "head_policy": "native", + "kv_cache_dtype": "bf16", + "policy": "mixed", + "scope_digest": "attn.o=quantized:fp8-ue8m0@8|attn.other=quantized:mixed|attn.qkv=quantized:fp8-ue8m0@8|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=quantized:fp8-ue8m0@8|mlp.gate=quantized:fp8-ue8m0@8|mlp.up=quantized:fp8-ue8m0@8|moe.experts=quantized:fp8-ue8m0@8|moe.router=native:mixed|moe.shared_expert=quantized:fp8-ue8m0@8|norm=native:bf16@16|head=native|kv=bf16" + }, + "seal": { + "checksums_file": "checksums.txt", + "checksums_format": "sha256sum", + "checksums_sha256": "881aff799afa4f76a8538da3ebdece4d7ffef20db7b22bf626d1bb90d084b2cf", + "covers": [ + "every published file except checksums.txt and fidelity-dataset.json, via checksums.txt", + "fidelity-dataset.json itself, via the self-blanked seal", + "every capture tensor a second time by CONTENT, via capture.capture_content_digest" + ], + "excludes": [ + "checksums.txt", + "fidelity-dataset.json" + ], + "external_anchor": null, + "method": "self_blanked_canonical_json_sha256", + "seal_field": "dataset_sha256" + }, + "upstream_receipts": [], + "weights": { + "artifact_ref": null, + "checkpoint_identity_sha256": "7239a3bd9a4ca38a32c32d110586c688197ee04f6662bc900a175d3107ad9a18", + "codec": "fp8_e4m3", + "config_sha256": "cbf3fcc7cdf78aec98f645c6920345f2fdebde6764223349249f6389606229ec", + "declared_bits": 8.0, + "declared_head_bits": 16, + "index_sha256": null, + "model_ref": null, + "model_revision": null, + "quantized": true, + "repository": "/tmp/qfs-quant-microfloat-release/stage-main/fp8-ue8m0", + "revision": null + } +} diff --git a/raw/candidates/fp8-ue8m0/evidence/candidate/head/head.json b/raw/candidates/fp8-ue8m0/evidence/candidate/head/head.json new file mode 100644 index 0000000000000000000000000000000000000000..cfb1d748d203487673352f1ad645cb98a49c4002 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/candidate/head/head.json @@ -0,0 +1,34 @@ +{ + "applied_in_capture": false, + "bias": null, + "bits": 16, + "compat_tensor_key": "weight", + "dtype": "BF16", + "equality_receipt": null, + "file": "head/weight.safetensors", + "file_sha256": "07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913", + "final_norm": { + "applied_at_replay": false, + "applied_in_capture": true, + "dtype": null, + "file": null, + "file_sha256": null, + "shape": null, + "tensor_content_sha256": null, + "tensor_key": null + }, + "format_version": 1, + "note": "the head is shipped verbatim from the checkpoint so a third party can replay logits = hidden @ head^T without the weights", + "present": true, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "receipt_sha256": "2da3cfbfc607296b3bb32eb6fec1f122e4ce30fe9ea96653e5bb1b4ebab6514f", + "schema": "malaiwah.fidelity-head-identity.v1", + "shape": [ + 260, + 64 + ], + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "tensor_key": "lm_head.weight" +} diff --git a/raw/candidates/fp8-ue8m0/evidence/candidate/head/weight.safetensors b/raw/candidates/fp8-ue8m0/evidence/candidate/head/weight.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..abe6e7c215a73bc88e85042067923bf943118086 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/candidate/head/weight.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913 +size 33365 diff --git a/raw/candidates/fp8-ue8m0/evidence/candidate/panel/masks/context-0000.npy b/raw/candidates/fp8-ue8m0/evidence/candidate/panel/masks/context-0000.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/candidate/panel/masks/context-0000.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/fp8-ue8m0/evidence/candidate/panel/masks/context-0001.npy b/raw/candidates/fp8-ue8m0/evidence/candidate/panel/masks/context-0001.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/candidate/panel/masks/context-0001.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/fp8-ue8m0/evidence/candidate/panel/masks/context-0002.npy b/raw/candidates/fp8-ue8m0/evidence/candidate/panel/masks/context-0002.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/candidate/panel/masks/context-0002.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/fp8-ue8m0/evidence/candidate/panel/masks/context-0003.npy b/raw/candidates/fp8-ue8m0/evidence/candidate/panel/masks/context-0003.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/candidate/panel/masks/context-0003.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/fp8-ue8m0/evidence/candidate/panel/panel-receipt.json b/raw/candidates/fp8-ue8m0/evidence/candidate/panel/panel-receipt.json new file mode 100644 index 0000000000000000000000000000000000000000..fbc2ce3e8e9602a492d83ae681817e0fa02e4173 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/candidate/panel/panel-receipt.json @@ -0,0 +1,376 @@ +{ + "corpus": { + "documents_considered": 4, + "documents_selected": 4, + "path_prefix": "embedded-synthetic/", + "repository": null, + "revision": null, + "source": "Synthetic texts embedded verbatim in this sealed receipt and builder." + }, + "created_utc": "2026-09-07T00:00:00Z", + "created_utc_policy": "Fixed artifact epoch for deterministic bytes; not an execution timestamp.", + "documents": [ + { + "bytes": 135, + "document": "garden.txt", + "document_sha256": "2aca14290cd4753c3b15d8a20aaa7a6963d2cb48d78e8538a4ce34d4665dcb94", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "garden", + "text_utf8": "The small garden has red flowers, green leaves, and a stone path. A gentle breeze moves the branches while a robin sings near the gate.", + "tokens_total": 137, + "window_id": "final-0000" + }, + { + "bytes": 144, + "document": "arithmetic.txt", + "document_sha256": "b867a2e8cbe81cc8d5781bfe6718a43e171fb5c7c138b9ed6ac86bebc24bca83", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "arithmetic", + "text_utf8": "A shelf holds three blue boxes and five red boxes. There are eight boxes in total. Move two boxes to the desk and count the six boxes remaining.", + "tokens_total": 146, + "window_id": "final-0001" + }, + { + "bytes": 162, + "document": "code.txt", + "document_sha256": "08c8f75f45899cbc9656a7a3fcdbf3092abfa7bc97fe353957b08d7e9660240b", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "code", + "text_utf8": "def add_values(left, right):\n return left + right\n\nresult = add_values(7, 9)\nprint(result)\n# This readable snippet is synthetic input, not a coding benchmark.\n", + "tokens_total": 164, + "window_id": "final-0002" + }, + { + "bytes": 140, + "document": "instructions.txt", + "document_sha256": "1dba5052b28929f94f322ad9e8c0b238bcbd653d6fae54ebaea8e5e3f6073378", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "instructions", + "text_utf8": "First place a clean cup on the table. Next pour cool water into the cup. Finally put the bottle away and write a short note about the steps.", + "tokens_total": 142, + "window_id": "final-0003" + } + ], + "environment": { + "numpy": "2.5.3", + "tokenizers": "0.23.2", + "transformers": "5.16.1" + }, + "format_builder": "engines/tools/build_token_panel.py", + "format_builder_sha256": "30eb4d4d7e465aaa8d9ef2d947a0ac7fd42ec45388f20c8b6db242c88dc2d851", + "format_version": 1, + "panel_id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "panel_name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "parameters": { + "context_length": 64, + "generation_seed": null, + "generation_seed_policy": "No RNG is used.", + "prediction_positions_per_window": 63, + "scored_positions_total": 252, + "strata": [ + "garden", + "arithmetic", + "code", + "instructions" + ], + "windows_per_stratum": 1, + "windows_total": 4 + }, + "receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "resolver_sha256": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "schema": "malaiwah.token-panel-build-receipt.v1", + "selection_rule": "Four embedded readable synthetic documents in declared order; native tokenizer with add_special_tokens=True, truncation=True, max_length=64, padding=False; each encoded window must be exactly 64 tokens; no chat template; all 63 shifted next-token positions scored; no RNG.", + "separation": { + "checked": false, + "method": "No contamination scan or benchmark selection.", + "note": "Authored synthetic CPU smoke inputs for a random-init model; not a benchmark, held-out quality claim, or registry-row submission." + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "add_special_tokens": true, + "chat_template_applied": false, + "class": "TokenizersBackend", + "files_sha256": { + "config.json": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "generation_config.json": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "tokenizer.json": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "tokenizer_config.json": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + }, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "local_files_only": true, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "trust_remote_code": false, + "vocab_size": 260 + }, + "tool": "build_panel.py", + "tool_sha256": "f17b17262816676d6ededcc969756ac07ff991eab73117040ec41005f6ff63f3" +} diff --git a/raw/candidates/fp8-ue8m0/evidence/candidate/panel/panel.json b/raw/candidates/fp8-ue8m0/evidence/candidate/panel/panel.json new file mode 100644 index 0000000000000000000000000000000000000000..cedb9d5e3c635860791c55451fde6dc9e37cddb9 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/candidate/panel/panel.json @@ -0,0 +1,298 @@ +{ + "contamination": { + "checked": false, + "hits": null, + "method": "not established", + "receipt": null + }, + "context_length": 64, + "contexts": 4, + "format_version": 1, + "name": "token panel panel--panel", + "panel_id": "panel--panel", + "panel_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "panel_token_sha256_legacy": "3c9467c85be43d238926f6d18bf825c2e4748814c95b8b0e8b8f1420546c3089", + "positions_per_context": 63, + "receipt_sha256": "8a4e27a74ca6ce39569b78c3d972077ab7966f6da118110b3b08adca1e284c6f", + "records": [ + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0000.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 0, + "document_id": "embedded-synthetic/garden.txt", + "domain": "garden", + "index": 0, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0000.json", + "token_ids_first16": [ + 1, + 55, + 75, + 72, + 224, + 86, + 80, + 68, + 79, + 79, + 224, + 74, + 68, + 85, + 71, + 72 + ], + "token_ids_json_sha256": "08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315", + "token_ids_last16": [ + 224, + 68, + 81, + 71, + 224, + 68, + 224, + 86, + 87, + 82, + 81, + 72, + 224, + 83, + 68, + 2 + ], + "token_ids_sha256_legacy": "9d5378f0316be57e37f80d2bae7895ba4a1140c302c87ff8cce2fbd9afc83b77", + "window_id": "final-0000", + "window_index": 0 + }, + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0001.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 1, + "document_id": "embedded-synthetic/arithmetic.txt", + "domain": "arithmetic", + "index": 1, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0001.json", + "token_ids_first16": [ + 1, + 36, + 224, + 86, + 75, + 72, + 79, + 73, + 224, + 75, + 82, + 79, + 71, + 86, + 224, + 87 + ], + "token_ids_json_sha256": "5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46", + "token_ids_last16": [ + 72, + 86, + 17, + 224, + 55, + 75, + 72, + 85, + 72, + 224, + 68, + 85, + 72, + 224, + 72, + 2 + ], + "token_ids_sha256_legacy": "e0f95114b71a46cb489539dc38909fb67fb378f25fafbb513e32690cc7f11b37", + "window_id": "final-0001", + "window_index": 1 + }, + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0002.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 2, + "document_id": "embedded-synthetic/code.txt", + "domain": "code", + "index": 2, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0002.json", + "token_ids_first16": [ + 1, + 71, + 72, + 73, + 224, + 68, + 71, + 71, + 66, + 89, + 68, + 79, + 88, + 72, + 86, + 11 + ], + "token_ids_json_sha256": "51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07", + "token_ids_last16": [ + 85, + 76, + 74, + 75, + 87, + 202, + 202, + 85, + 72, + 86, + 88, + 79, + 87, + 224, + 32, + 2 + ], + "token_ids_sha256_legacy": "482b890c7b0e2f7400257c43680093b7f2b90d6df5361c6de3ae97ddfdd2504e", + "window_id": "final-0002", + "window_index": 2 + }, + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0003.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 3, + "document_id": "embedded-synthetic/instructions.txt", + "domain": "instructions", + "index": 3, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0003.json", + "token_ids_first16": [ + 1, + 41, + 76, + 85, + 86, + 87, + 224, + 83, + 79, + 68, + 70, + 72, + 224, + 68, + 224, + 70 + ], + "token_ids_json_sha256": "8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d", + "token_ids_last16": [ + 224, + 70, + 82, + 82, + 79, + 224, + 90, + 68, + 87, + 72, + 85, + 224, + 76, + 81, + 87, + 2 + ], + "token_ids_sha256_legacy": "12e01edd3900ff2ca82621feb5504f24b003a53c0afe98a9ee0b490eb93141d4", + "window_id": "final-0003", + "window_index": 3 + } + ], + "repository": null, + "revision": null, + "schema": "malaiwah.fidelity-panel-binding.v1", + "scored_positions_total": 252, + "scoring_window": { + "dropped_positions_total": 0, + "min_left_context_tokens": 1, + "policy": "every causal prediction position of every window is scored; nothing is dropped", + "score_from": 0, + "windowed": false + }, + "strata": {}, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "token_digest_algorithm": { + "aggregate": "sha256('\\n'.join(per_record_hex).encode('ascii'))", + "legacy_aggregate": "sha256(''.join(per_record_hex).encode('utf-8'))", + "legacy_per_record": "sha256(json.dumps(ids).encode('utf-8'))", + "per_record": "sha256(json.dumps(ids, separators=(',',':')).encode('utf-8'))" + }, + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } +} diff --git a/raw/candidates/fp8-ue8m0/evidence/candidate/panel/tokens/context-0000.json b/raw/candidates/fp8-ue8m0/evidence/candidate/panel/tokens/context-0000.json new file mode 100644 index 0000000000000000000000000000000000000000..c55b788f77dcb26a8c56fe6a7593353d57abb70f --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/candidate/panel/tokens/context-0000.json @@ -0,0 +1 @@ +[1,55,75,72,224,86,80,68,79,79,224,74,68,85,71,72,81,224,75,68,86,224,85,72,71,224,73,79,82,90,72,85,86,15,224,74,85,72,72,81,224,79,72,68,89,72,86,15,224,68,81,71,224,68,224,86,87,82,81,72,224,83,68,2] \ No newline at end of file diff --git a/raw/candidates/fp8-ue8m0/evidence/candidate/panel/tokens/context-0001.json b/raw/candidates/fp8-ue8m0/evidence/candidate/panel/tokens/context-0001.json new file mode 100644 index 0000000000000000000000000000000000000000..8304be93e5387811e155f869e175c0bfca57ca76 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/candidate/panel/tokens/context-0001.json @@ -0,0 +1 @@ +[1,36,224,86,75,72,79,73,224,75,82,79,71,86,224,87,75,85,72,72,224,69,79,88,72,224,69,82,91,72,86,224,68,81,71,224,73,76,89,72,224,85,72,71,224,69,82,91,72,86,17,224,55,75,72,85,72,224,68,85,72,224,72,2] \ No newline at end of file diff --git a/raw/candidates/fp8-ue8m0/evidence/candidate/panel/tokens/context-0002.json b/raw/candidates/fp8-ue8m0/evidence/candidate/panel/tokens/context-0002.json new file mode 100644 index 0000000000000000000000000000000000000000..2a1413e634823a039c4ede6b463b549207c4c8fb --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/candidate/panel/tokens/context-0002.json @@ -0,0 +1 @@ +[1,71,72,73,224,68,71,71,66,89,68,79,88,72,86,11,79,72,73,87,15,224,85,76,74,75,87,12,29,202,224,224,224,224,85,72,87,88,85,81,224,79,72,73,87,224,14,224,85,76,74,75,87,202,202,85,72,86,88,79,87,224,32,2] \ No newline at end of file diff --git a/raw/candidates/fp8-ue8m0/evidence/candidate/panel/tokens/context-0003.json b/raw/candidates/fp8-ue8m0/evidence/candidate/panel/tokens/context-0003.json new file mode 100644 index 0000000000000000000000000000000000000000..7978732d7bf3bfc5fed35c837bc69d9d66371c4f --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/candidate/panel/tokens/context-0003.json @@ -0,0 +1 @@ +[1,41,76,85,86,87,224,83,79,68,70,72,224,68,224,70,79,72,68,81,224,70,88,83,224,82,81,224,87,75,72,224,87,68,69,79,72,17,224,49,72,91,87,224,83,82,88,85,224,70,82,82,79,224,90,68,87,72,85,224,76,81,87,2] \ No newline at end of file diff --git a/raw/candidates/fp8-ue8m0/evidence/candidate/runtime/capture-runtime.json b/raw/candidates/fp8-ue8m0/evidence/candidate/runtime/capture-runtime.json new file mode 100644 index 0000000000000000000000000000000000000000..dca4d93dc13b29d194c08f47bbb4420ca5798cd4 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/candidate/runtime/capture-runtime.json @@ -0,0 +1,296 @@ +{ + "capture_tool": { + "expert_fill": { + "bytes_filled": 294912, + "declined": {}, + "decoded_slices": 72, + "identity": "a byte copy into the fused parameter's slice; bin/selftest_layer_outer.py L4/L6 assert equality with from_pretrained and with the converter path", + "layers_filled": 3, + "mode": "direct", + "reference": "transformers.core_model_loading.MergeModulelist(dim=0) + Concatenate(dim=1)", + "slices_filled": 72, + "staged_slices": 0, + "staging": "pageable", + "targets_filled": 6 + }, + "file": "engines/tools/hf_capture.py", + "head_module_path": "lm_head", + "head_resolution": "lm_head", + "layer_residency": "stream", + "mechanism": "transformers forward pass, layer-outer/window-inner schedule: for each decoder layer the model's own forward is run once per window with the layers below replaying their memoised output and the layers above suspending, so each layer's weights are materialised once for the whole panel. Windows are pushed through sequentially, never batched. Forward pre-hook on model.get_output_embeddings(), fired by the model's own epilogue after the last layer", + "model_view": null, + "parallel_plan_dropped": false, + "resolved_classes": { + "config": "transformers.models.glm_moe_dsa.configuration_glm_moe_dsa.GlmMoeDsaConfig", + "model": "transformers.models.glm_moe_dsa.modeling_glm_moe_dsa.GlmMoeDsaForCausalLM" + }, + "resolved_panel_binding": { + "binding": { + "content": { + "archive": { + "algorithm": "sha256(ustar: sorted regular files; mode=0644; uid=gid=mtime=0)", + "bytes": 20480, + "compression": "none", + "format": "ustar", + "sha256": "389706dfa3335a75ec70a40d079995af1a60c05512334125dbd336790f12702f" + }, + "manifest": [ + { + "bytes": 192, + "path": "arrays/causal-mask-64.npy", + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02" + }, + { + "bytes": 384, + "path": "arrays/final-0000.tokens.npy", + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af" + }, + { + "bytes": 384, + "path": "arrays/final-0001.tokens.npy", + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea" + }, + { + "bytes": 384, + "path": "arrays/final-0002.tokens.npy", + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c" + }, + { + "bytes": 384, + "path": "arrays/final-0003.tokens.npy", + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a" + }, + { + "bytes": 4195, + "path": "panel.json", + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6" + }, + { + "bytes": 7808, + "path": "panel.receipt.json", + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263" + } + ], + "manifest_sha256": "e5f2d6410a6290da1197016c5b57ae522a3570665215ddc23e2a0bd45f912181" + }, + "panel": { + "bytes": 4195, + "context_length": 64, + "contexts": 4, + "file": "panel.json", + "id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "positions_per_context": 63, + "role": "final", + "scored_positions_total": 252, + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6", + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36" + }, + "receipt": { + "bytes": 7808, + "declared_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "file": "panel.receipt.json", + "receipt_file_sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "receipt_seal_mode": "self-blank" + }, + "schema": "malaiwah.resolved-panel.v1", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } + }, + "binding_file": "panel-binding.json", + "binding_file_sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "tokenizer_equivalences": [] + }, + "schedule": "layer-outer", + "sha256": "44afcdac9f7c9cb26a35a2b7d9c1aed562344b76c8045a753651d2f2dbae99d0", + "unexpected_tensor_allowlist": null, + "verified_code": null, + "version": "hf_capture/1", + "weights_decode": { + "activation_quantization": { + "applied_to_weights": false, + "declared": { + "activation_scheme": "dynamic", + "scale_fmt": "ue8m0" + }, + "kv_cache_scheme": null, + "scope": "weights-reconstructed/advisory; activation-not-captured", + "stored_components": [] + }, + "checkpoint_bytes_read": 242286, + "comparison_class": "advisory", + "components_consumed": 220, + "components_not_consumed": [], + "components_planned": 220, + "formats_decoded": { + "fp8-ue8m0": 110 + }, + "method": "microfloat-weight-reconstruction", + "modules_decoded": 110, + "modules_not_decoded": [], + "modules_planned": 110, + "output_dtype": "bfloat16", + "quantization_config": { + "activation_scheme": "dynamic", + "fmt": "e4m3", + "quant_method": "fp8", + "scale_fmt": "ue8m0", + "weight_block_size": [ + 128, + 128 + ] + }, + "reader_evidence": { + "decode_plan_sha256": "5ba92234f4b0487318ab6ee1ebd8c7bdc20a826d3376a4ad5933500488a6ca6f", + "gate_header_barrier": false, + "source_files": { + "engines/tools/affine_surface.py": "37e7074797d53ae836e0af12fdbd2dc36c88778098aa44c72c1cd936d2b4c053", + "engines/tools/microscale_surface.py": "588923f0a4700436221923c794a8c112971d9f08e75c746742b0f0ede7921682", + "engines/tools/nvfp4_surface.py": "044b6fd2ee22d58512476e96060f7fa09030212a33736da1393c0103eb73e0c8", + "engines/tools/quant_stream.py": "7c6cc4cbe399d066eaff80ccf1e3d3190185f194644f738a404d3c537ad8e1ab" + } + }, + "reference": "compressed-tensors@0.18.0; DeepSeek-V4-Flash@60d8d70770c6776ff598c94bb586a859a38244f1/inference/kernel.py; nvidia/Qwen3.8-Flash-Next-NVFP4@fc694b54fb0174e0913e6adf86691ef85a4ead47/config.json+headers", + "scientific_disclosure": "Stored-weight reconstruction only; no native quantized GEMM, activation arithmetic, or quantizer optimization quality claim.", + "scope": "weights_reconstructed" + }, + "weights_license": null, + "wraps": [] + }, + "container": { + "image_digest": null, + "image_reference": null, + "image_repository_digest": null + }, + "format_version": 1, + "lane": "other", + "lane_identity_inputs": [ + "torch_version", + "cuda_runtime_version", + "device_name", + "grouped_mm_kernel", + "numeric_policy", + "attention_backend", + "experts_implementation", + "parallelism", + "ep_emulate", + "reduce_order" + ], + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "lane_inferred": false, + "receipt_sha256": "8b530be77defc2a85c6518e320420e571be78654edc34e37c930ca65d2afe36b", + "resources": { + "bytes": { + "checkpoint_read": 313678, + "hidden_d2h": 36616, + "weights_h2d": null + }, + "checkpoint_bytes": 342551, + "checkpoint_files": 2, + "device_name": null, + "forward_timing": "wall-clock", + "note": "provenance, not identity: peaks and stage seconds this run measured; forward_sum is device time under cuda-events, wall time otherwise; seal covers head serialisation up to this block's assembly", + "peak_cuda_allocated_bytes": null, + "peak_cuda_reserved_bytes": null, + "peak_resident_weight_bytes": 208032, + "peak_rss_bytes": 367894528, + "rss_units_source": "Linux ru_maxrss", + "seconds": { + "decode_sum": 0.1, + "elapsed": 4.989, + "fill_sum": 0.0, + "forward_sum": 0.177, + "identity": 0.005, + "layer_load_max": 0.045, + "layer_load_sum": 0.156, + "layer_loads": 4, + "resident_load": 3.823, + "seal": 0.008 + } + }, + "runtime_environment": { + "cold_run": "20260907T165248Z-2063963", + "numeric_policy_observed": { + "NVIDIA_TF32_OVERRIDE": null, + "allow_tf32_cudnn": true, + "allow_tf32_matmul": false, + "deviates_from_default": false, + "float32_matmul_precision": "highest", + "observed_at": "seal time, after the forward" + }, + "python": "3.12.14" + }, + "schema": "malaiwah.fidelity-capture-runtime.v1", + "source_files": { + "bin/fidelity/codepin.py": "ce2a2c04d64adf7a268978a7ffe163c7d4cb5b675d5dc8e156f8a26a3b7bb5fd", + "bin/fidelity/panel.py": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "engines/tools/affine_surface.py": "37e7074797d53ae836e0af12fdbd2dc36c88778098aa44c72c1cd936d2b4c053", + "engines/tools/hf_capture.py": "44afcdac9f7c9cb26a35a2b7d9c1aed562344b76c8045a753651d2f2dbae99d0", + "engines/tools/layer_outer.py": "e3ea5715112663b1b60cf596eeffc2140e49b399809ece89a174bce41a969274", + "engines/tools/microscale_surface.py": "588923f0a4700436221923c794a8c112971d9f08e75c746742b0f0ede7921682", + "engines/tools/nvfp4_surface.py": "044b6fd2ee22d58512476e96060f7fa09030212a33736da1393c0103eb73e0c8", + "engines/tools/quant_stream.py": "7c6cc4cbe399d066eaff80ccf1e3d3190185f194644f738a404d3c537ad8e1ab" + }, + "stack_fingerprint": { + "attention_backend": "model default", + "cuda_runtime_version": null, + "device": "cpu", + "device_name": null, + "engine": "transformers-eager", + "numeric_policy": "default torch matmul precision; no TF32 override applied", + "schema": "malaiwah.stack-fingerprint.v1", + "torch_version": "2.11.0+cpu", + "transformers_version": "5.16.1" + }, + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd", + "upstream_receipts": [], + "weights": { + "checkpoint_files": [ + { + "name": "config.json", + "sha256": "cbf3fcc7cdf78aec98f645c6920345f2fdebde6764223349249f6389606229ec", + "size": 1673 + }, + { + "name": "model.safetensors", + "sha256": "e26433482b4d0c4e0cf15cd313cfaf140708378cce3e73866bb8badc8298a159", + "size": 340878 + } + ], + "checkpoint_identity_algorithm": "sha256 over the canonical JSON {\"algorithm\": , \"files\": [{\"name\", \"size\", \"sha256\"}, ...]} of every *.safetensors shard plus config.json in the checkpoint directory, sorted by name; for a llama.cpp GGUF tree the shards are every *.gguf of the one build directory (name = /) and config.json is the official release's copy beside it", + "checkpoint_identity_sha256": "7239a3bd9a4ca38a32c32d110586c688197ee04f6662bc900a175d3107ad9a18", + "model_revision": null, + "repository": "/tmp/qfs-quant-microfloat-release/stage-main/fp8-ue8m0", + "revision": null + } +} diff --git a/raw/candidates/fp8-ue8m0/evidence/candidate/validation/structural-validation.json b/raw/candidates/fp8-ue8m0/evidence/candidate/validation/structural-validation.json new file mode 100644 index 0000000000000000000000000000000000000000..5ee8ffba0107cb5416cba5d6184f9ed9b330943d --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/candidate/validation/structural-validation.json @@ -0,0 +1,14 @@ +{ + "checks_run": [ + "pre-seal" + ], + "error_count": 0, + "errors": [], + "format_version": 1, + "receipt_sha256": "df49786fa6ab7b99b4ccb964492beb1dfda015c837b9483c9f730bf69e82513c", + "schema": "malaiwah.fidelity-structural-validation.v1", + "structural_status": "sealed", + "subject": "dataset:fidelity--quant-integration.candidate", + "warning_count": 0, + "warnings": [] +} diff --git a/raw/candidates/fp8-ue8m0/evidence/capture-candidate.stderr.log b/raw/candidates/fp8-ue8m0/evidence/capture-candidate.stderr.log new file mode 100644 index 0000000000000000000000000000000000000000..28c64a9f783657ca720333ce64b8d58a6c150365 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/capture-candidate.stderr.log @@ -0,0 +1,15 @@ + +Loading weights: 0%| | 0/6 [00:00 same_stack", + "overridden_by": null, + "passed": true + } + }, + "high_kld_contexts": [ + { + "allocation_stratum": null, + "domain": "arithmetic", + "index": 1, + "max": 0.0013181312674733826, + "mean": 0.0002341835461995974, + "scored_rows": 63, + "window_id": "final-0001" + }, + { + "allocation_stratum": null, + "domain": "garden", + "index": 0, + "max": 0.0018409278377431036, + "mean": 0.00020513397156859213, + "scored_rows": 63, + "window_id": "final-0000" + }, + { + "allocation_stratum": null, + "domain": "code", + "index": 2, + "max": 0.0008971079796135505, + "mean": 0.0002007930670502944, + "scored_rows": 63, + "window_id": "final-0002" + }, + { + "allocation_stratum": null, + "domain": "instructions", + "index": 3, + "max": 0.00143078462351735, + "mean": 0.00016973652917178663, + "scored_rows": 63, + "window_id": "final-0003" + } + ], + "kl": { + "max": 0.0018409278377431036, + "mean": 0.00020246177849756768, + "median": 8.936340446120458e-05, + "p95": 0.0007401572496273623, + "p99": 0.0013953947160745429, + "p99_9": 0.0017709696300617658 + }, + "kl_macro_stratum_mean": null, + "kl_micro_token_mean": 0.00020246177849756768, + "measurement_scope": { + "contexts": 4, + "covers_full_panel": true, + "position_filter": "all", + "positions_per_context": 63, + "scored_positions": 252, + "subset_detail": null + }, + "metric": { + "direction": "reference_to_candidate", + "direction_label": "KL(reference || candidate)", + "higher_is_better": false, + "name": "mean_tokenwise_kld", + "units": "nats", + "value": 0.00020246177849756768 + }, + "panel": { + "context_length": 64, + "contexts": 4, + "panel_id": "panel--panel", + "panel_token_sha256_legacy": "3c9467c85be43d238926f6d18bf825c2e4748814c95b8b0e8b8f1420546c3089", + "scored_positions": 252, + "scoring_window": { + "dropped_positions_total": 0, + "min_left_context_tokens": 1, + "policy": "every causal prediction position of every window is scored; nothing is dropped", + "score_from": 0, + "windowed": false + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + }, + "tokenizer_candidate": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + }, + "tokenizer_identity_equal": true, + "tokenizer_reference": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } + }, + "per_context": [ + { + "allocation_stratum": null, + "domain": "garden", + "index": 0, + "max": 0.0018409278377431036, + "mean": 0.00020513397156859213, + "scored_rows": 63, + "window_id": "final-0000" + }, + { + "allocation_stratum": null, + "domain": "arithmetic", + "index": 1, + "max": 0.0013181312674733826, + "mean": 0.0002341835461995974, + "scored_rows": 63, + "window_id": "final-0001" + }, + { + "allocation_stratum": null, + "domain": "code", + "index": 2, + "max": 0.0008971079796135505, + "mean": 0.0002007930670502944, + "scored_rows": 63, + "window_id": "final-0002" + }, + { + "allocation_stratum": null, + "domain": "instructions", + "index": 3, + "max": 0.00143078462351735, + "mean": 0.00016973652917178663, + "scored_rows": 63, + "window_id": "final-0003" + } + ], + "per_domain": { + "arithmetic": 0.0002341835461995974, + "code": 0.0002007930670502944, + "garden": 0.00020513397156859213, + "instructions": 0.00016973652917178663 + }, + "per_stratum": null, + "receipt_sha256": "4e03857ab1c31b045782a4f8258b26199041f212cf13d2f0eece2d6062fe6929", + "reference": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "dataset_id": "fidelity--quant-integration.root", + "dataset_sha256": "176290a2afa84dcb56c85eb7e8ff70bbdfc11f347581d709a6a75dfd0d7600a1", + "form": "hidden", + "head": { + "bits": 16, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510" + }, + "label": "reference", + "lane": "other", + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "repository": null, + "revision": null, + "role": "root", + "scope_digest": "attn.o=native:bf16@16|attn.qkv=native:bf16@16|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=native:bf16@16|mlp.gate=native:bf16@16|mlp.up=native:bf16@16|moe.experts=native:bf16@16|norm=native:bf16@16|head=native|kv=bf16", + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd", + "weights": { + "artifact_ref": null, + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "codec": null, + "config_sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "declared_bits": null, + "declared_head_bits": 16, + "index_sha256": null, + "model_ref": null, + "model_revision": null, + "quantized": false, + "repository": "/tmp/qfs-complete-tiny-fixture/model", + "revision": null + } + }, + "schema": "malaiwah.fidelity-comparison-receipt.v1", + "self_compare": null, + "submission": { + "emitted": false, + "path": null, + "receipt_sha256": null, + "refusal": null, + "submission_schema": null + }, + "tokenwise": { + "bytes": 2144, + "path": "tokenwise-kld.npy", + "sha256": "f2e0f6c3b58443d6371a4d48a19be19ac75432c3951e09d2d1aebd3812791e0e" + }, + "top1_agreement": 0.8095238095238095, + "top1_discordant_contexts": [], + "uncertainty": { + "ci95_high": null, + "ci95_low": null, + "cluster_unit": null, + "clusters": null, + "method": "none", + "samples": null, + "seed": null + } +} diff --git a/raw/candidates/fp8-ue8m0/evidence/comparison/tokenwise-kld.npy b/raw/candidates/fp8-ue8m0/evidence/comparison/tokenwise-kld.npy new file mode 100644 index 0000000000000000000000000000000000000000..147f491940f0789d985abdaf3906e85838c9134e --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/comparison/tokenwise-kld.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f2e0f6c3b58443d6371a4d48a19be19ac75432c3951e09d2d1aebd3812791e0e +size 2144 diff --git a/raw/candidates/fp8-ue8m0/evidence/panel-binding.json b/raw/candidates/fp8-ue8m0/evidence/panel-binding.json new file mode 100644 index 0000000000000000000000000000000000000000..573cea0b332c636bdda89b150f95cda307b89194 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/panel-binding.json @@ -0,0 +1,102 @@ +{ + "content": { + "archive": { + "algorithm": "sha256(ustar: sorted regular files; mode=0644; uid=gid=mtime=0)", + "bytes": 20480, + "compression": "none", + "format": "ustar", + "sha256": "389706dfa3335a75ec70a40d079995af1a60c05512334125dbd336790f12702f" + }, + "manifest": [ + { + "bytes": 192, + "path": "arrays/causal-mask-64.npy", + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02" + }, + { + "bytes": 384, + "path": "arrays/final-0000.tokens.npy", + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af" + }, + { + "bytes": 384, + "path": "arrays/final-0001.tokens.npy", + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea" + }, + { + "bytes": 384, + "path": "arrays/final-0002.tokens.npy", + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c" + }, + { + "bytes": 384, + "path": "arrays/final-0003.tokens.npy", + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a" + }, + { + "bytes": 4195, + "path": "panel.json", + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6" + }, + { + "bytes": 7808, + "path": "panel.receipt.json", + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263" + } + ], + "manifest_sha256": "e5f2d6410a6290da1197016c5b57ae522a3570665215ddc23e2a0bd45f912181" + }, + "panel": { + "bytes": 4195, + "context_length": 64, + "contexts": 4, + "file": "panel.json", + "id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "positions_per_context": 63, + "role": "final", + "scored_positions_total": 252, + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6", + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36" + }, + "receipt": { + "bytes": 7808, + "declared_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "file": "panel.receipt.json", + "receipt_file_sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "receipt_seal_mode": "self-blank" + }, + "schema": "malaiwah.resolved-panel.v1", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } +} diff --git a/raw/candidates/fp8-ue8m0/evidence/root/README.md b/raw/candidates/fp8-ue8m0/evidence/root/README.md new file mode 100644 index 0000000000000000000000000000000000000000..710dc82d0a53fe4dd29dbf797a459cab544ac9ed --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/root/README.md @@ -0,0 +1,95 @@ +--- +license: mit +tags: +- fidelity +- kl-divergence +- fidelity-provenance +- fidelity-dataset +- fidelity-root +x_fidelity: + spec: https://github.com/malaiwah/quant-fidelity-suite/blob/main/docs/FIDELITY-DATASET-SPEC.md + spec_version: fidelity-provenance/v1 + role: fidelity-dataset + captured_model: + repository: /tmp/qfs-complete-tiny-fixture/model + revision: null + role: root + form: hidden + lane: other + panel: + panel_id: panel--panel + suite_token_hash_sha256: 525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36 + contexts: 4 + scored_positions: 252 + repository: null + revision: null + head: + policy: native + quantized: false + bits: 16 + lm_head_tensor_content_sha256: 2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510 + lm_head_file_sha256: 07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913 + final_norm_tensor_content_sha256: null + final_norm_file_sha256: null + equality_receipt: null + replay_permitted: true + scope_digest: attn.o=native:bf16@16|attn.qkv=native:bf16@16|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=native:bf16@16|mlp.gate=native:bf16@16|mlp.up=native:bf16@16|moe.experts=native:bf16@16|norm=native:bf16@16|head=native|kv=bf16 + seal: + manifest: fidelity-dataset.json + dataset_sha256: null + checksums: checksums.txt + checksums_sha256: '0000000000000000000000000000000000000000000000000000000000000000' + note: 'written before the seal: dataset_sha256 and checksums_sha256 are digests of the tree this file + is inside, so they cannot appear in it. Read them from fidelity-dataset.json.' + interop: + compatible_with: + - kimi-k3-distribution-fidelity/1 + k3_compat_emitted: false + registry: + dataset: malaiwah/quant-fidelity-registry + schema_version: quant-fidelity-registry/v1 + artifact_id: null + measurement_ids: [] + snapshot: null + fidelity_dataset: + repository: null + revision: null + dataset_sha256: null + capture_content_digest: d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39 + form: hidden + role: root + measurements: [] +--- +# Local quant integration root + +A **root** fidelity dataset in **hidden form**, produced by `engines/tools/hf_capture.py` from `/tmp/qfs-complete-tiny-fixture/model`. + +## The cut + +the final hidden state handed to lm_head -- after the text model's final norm and immediately before the head matmul -- captured as the head module's input via torch.nn.Module.register_forward_pre_hook; replay applies the head ONLY (no final norm at replay time: the capture already sits after it). Same cut as engines/tools/hidden_replay.py and as Festr's kimi-k3 hidden-replay qualification. + +## What is here + +| | | +|---|---| +| records | 4 | +| scored positions | 252 | +| context length | 64 | +| hidden width | 64 | +| vocab size | 260 | +| capture bytes (hidden form) | 33348 | +| the same capture in logit form would be | 262080 bytes (8x) | +| scope policy | native | +| lane | other | + +## Does the model still generate sensibly + +`The capital of France is` -> `�` (p=0.0067, entropy 5.548 of a possible 5.561 nats). Recorded, not enforced. One extra window through the same schedule; its hidden state was discarded and is not part of this dataset. + +## How to check it + +``` +bin/fidelity-dataset verify +``` + +Full specification: diff --git a/raw/candidates/fp8-ue8m0/evidence/root/capture/hidden_0000.safetensors b/raw/candidates/fp8-ue8m0/evidence/root/capture/hidden_0000.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..fc2e071062557d9ba4925b6a825ce3c89b0c68a6 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/root/capture/hidden_0000.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1d90bd93643e3a7c966b038aa9f9b0055cb443651449e428ba78183056b55591 +size 8337 diff --git a/raw/candidates/fp8-ue8m0/evidence/root/capture/hidden_0001.safetensors b/raw/candidates/fp8-ue8m0/evidence/root/capture/hidden_0001.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..1c887ff09234b8c0668faefdab11c91e0552e821 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/root/capture/hidden_0001.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2d5958f829bf504016f4abc37863bf1f8ed84c1a4328453902c38eb4b10f7a41 +size 8337 diff --git a/raw/candidates/fp8-ue8m0/evidence/root/capture/hidden_0002.safetensors b/raw/candidates/fp8-ue8m0/evidence/root/capture/hidden_0002.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..947c47e79b119cf3f8ccc0456d437ea07ce4e812 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/root/capture/hidden_0002.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d338b42bc1f0b582671b9e5672f6c5a8160c10765b4dddde7d00148df49a3f11 +size 8337 diff --git a/raw/candidates/fp8-ue8m0/evidence/root/capture/hidden_0003.safetensors b/raw/candidates/fp8-ue8m0/evidence/root/capture/hidden_0003.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..0fb1a4661f600df8ade6694ae6727d8d3ae683bf --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/root/capture/hidden_0003.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:52dc114d85f9d89821e332ada73be3ffabcac270906b89165ca2a7a51c684f94 +size 8337 diff --git a/raw/candidates/fp8-ue8m0/evidence/root/capture/manifest.json b/raw/candidates/fp8-ue8m0/evidence/root/capture/manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..802dc21b1e7d946cede715e7abf7d35a9a24613c --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/root/capture/manifest.json @@ -0,0 +1,159 @@ +{ + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "context_length": 64, + "coverage": { + "complete": true, + "declared_records": 4, + "index_range": [ + 0, + 3 + ], + "missing_indices_sample": [], + "present_records": 4, + "shard_of": null, + "subset_detail": null + }, + "created_utc": "2026-09-07T16:52:45Z", + "dtype": "BF16", + "dtype_lossless": true, + "form": "hidden", + "format_version": 1, + "hidden_width": 64, + "receipt_sha256": "e707c21013c4bb6eaa4c5d5a9a6baceb6384d92074a50087c650917d29ea7a49", + "records": [ + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 0, + "document_id": "embedded-synthetic/garden.txt", + "domain": "garden", + "dtype": "BF16", + "elapsed_seconds": 0.041, + "file": "hidden_0000.safetensors", + "index": 0, + "key": "hidden_states", + "payload_sha256": "80897a67cfdc22f410255f2463193e7d765de5500d62da2c13aacbd3b9507083", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "1d90bd93643e3a7c966b038aa9f9b0055cb443651449e428ba78183056b55591", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "80897a67cfdc22f410255f2463193e7d765de5500d62da2c13aacbd3b9507083", + "token_ids_json_sha256": "08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315", + "token_ids_sha256_legacy": "9d5378f0316be57e37f80d2bae7895ba4a1140c302c87ff8cce2fbd9afc83b77", + "window_id": "final-0000", + "window_index": 0 + }, + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 1, + "document_id": "embedded-synthetic/arithmetic.txt", + "domain": "arithmetic", + "dtype": "BF16", + "elapsed_seconds": 0.035, + "file": "hidden_0001.safetensors", + "index": 1, + "key": "hidden_states", + "payload_sha256": "1fc13aaf069c53d5592198daeacfc5f652abf5b9ba552213859596c32e7c4046", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "2d5958f829bf504016f4abc37863bf1f8ed84c1a4328453902c38eb4b10f7a41", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "1fc13aaf069c53d5592198daeacfc5f652abf5b9ba552213859596c32e7c4046", + "token_ids_json_sha256": "5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46", + "token_ids_sha256_legacy": "e0f95114b71a46cb489539dc38909fb67fb378f25fafbb513e32690cc7f11b37", + "window_id": "final-0001", + "window_index": 1 + }, + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 2, + "document_id": "embedded-synthetic/code.txt", + "domain": "code", + "dtype": "BF16", + "elapsed_seconds": 0.038, + "file": "hidden_0002.safetensors", + "index": 2, + "key": "hidden_states", + "payload_sha256": "98b8d9e1ccb196898fda27cb5f625f348aa0046121c39484a4af7cb042e1be92", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "d338b42bc1f0b582671b9e5672f6c5a8160c10765b4dddde7d00148df49a3f11", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "98b8d9e1ccb196898fda27cb5f625f348aa0046121c39484a4af7cb042e1be92", + "token_ids_json_sha256": "51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07", + "token_ids_sha256_legacy": "482b890c7b0e2f7400257c43680093b7f2b90d6df5361c6de3ae97ddfdd2504e", + "window_id": "final-0002", + "window_index": 2 + }, + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 3, + "document_id": "embedded-synthetic/instructions.txt", + "domain": "instructions", + "dtype": "BF16", + "elapsed_seconds": 0.035, + "file": "hidden_0003.safetensors", + "index": 3, + "key": "hidden_states", + "payload_sha256": "01646a47a79cc47760fc0645c30bc9e37a930c26ac84cd3d1a1d5077a2f48df8", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "52dc114d85f9d89821e332ada73be3ffabcac270906b89165ca2a7a51c684f94", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "01646a47a79cc47760fc0645c30bc9e37a930c26ac84cd3d1a1d5077a2f48df8", + "token_ids_json_sha256": "8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d", + "token_ids_sha256_legacy": "12e01edd3900ff2ca82621feb5504f24b003a53c0afe98a9ee0b490eb93141d4", + "window_id": "final-0003", + "window_index": 3 + } + ], + "run_name": "hf-capture", + "runtime_manifest": "../runtime/capture-runtime.json", + "runtime_manifest_sha256": "d7da58d6426d19b129ef09638c0a30ca982b36597fe7978a2efd33d292f539c5", + "schema": "malaiwah.fidelity-capture-manifest.v1", + "scored_rows_per_context": 63, + "semantic_point": "after_final_rmsnorm_before_lm_head", + "tensor_key": "hidden_states", + "total_scored_rows": 252, + "total_size_bytes": 33348, + "vocab_size": 260 +} diff --git a/raw/candidates/fp8-ue8m0/evidence/root/checksums.txt b/raw/candidates/fp8-ue8m0/evidence/root/checksums.txt new file mode 100644 index 0000000000000000000000000000000000000000..cdebbcde0c46b20167ee1296991c7d9556f389da --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/root/checksums.txt @@ -0,0 +1,20 @@ +df28a18b7e9c0d39ac079235136da25818038cc09314a890063058e94bf1c226 README.md +1d90bd93643e3a7c966b038aa9f9b0055cb443651449e428ba78183056b55591 capture/hidden_0000.safetensors +2d5958f829bf504016f4abc37863bf1f8ed84c1a4328453902c38eb4b10f7a41 capture/hidden_0001.safetensors +d338b42bc1f0b582671b9e5672f6c5a8160c10765b4dddde7d00148df49a3f11 capture/hidden_0002.safetensors +52dc114d85f9d89821e332ada73be3ffabcac270906b89165ca2a7a51c684f94 capture/hidden_0003.safetensors +b89ed72d77544f47068c33e9de7b70579874dc5bd6c1e970a0567ac91540eac0 capture/manifest.json +777b038f747bed25d1f5db8adbfd2a78c7762fb5c870ff8c3c785a984d48a168 head/head.json +07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913 head/weight.safetensors +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0000.npy +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0001.npy +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0002.npy +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0003.npy +b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263 panel/panel-receipt.json +68efa258ea3c5d4ba759c3c15aadd6e8c984711831bea3f335903109345cdcef panel/panel.json +08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315 panel/tokens/context-0000.json +5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46 panel/tokens/context-0001.json +51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07 panel/tokens/context-0002.json +8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d panel/tokens/context-0003.json +d7da58d6426d19b129ef09638c0a30ca982b36597fe7978a2efd33d292f539c5 runtime/capture-runtime.json +769c103cf430360bf1b79a4d027f5bd073ce3f61204d9da77adf3ad494c27e73 validation/structural-validation.json diff --git a/raw/candidates/fp8-ue8m0/evidence/root/fidelity-dataset.json b/raw/candidates/fp8-ue8m0/evidence/root/fidelity-dataset.json new file mode 100644 index 0000000000000000000000000000000000000000..507f64855ce063a6b8149c642f11497258a99c51 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/root/fidelity-dataset.json @@ -0,0 +1,389 @@ +{ + "capture": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "dtype": "BF16", + "dtype_lossless": true, + "form": "hidden", + "head_not_separable_reason": null, + "head_separable": true, + "hidden_width": 64, + "lossy_codec": null, + "manifest_file": "capture/manifest.json", + "manifest_file_sha256": "b89ed72d77544f47068c33e9de7b70579874dc5bd6c1e970a0567ac91540eac0", + "records_count": 4, + "scored_rows_total": 252, + "semantic_point": "after_final_rmsnorm_before_lm_head", + "tensor_key": "hidden_states", + "total_size_bytes": 33348, + "vocab_size": 260 + }, + "coverage": { + "complete": true, + "declared_records": 4, + "index_range": [ + 0, + 3 + ], + "missing_indices_sample": [], + "present_records": 4, + "shard_of": null, + "subset_detail": null + }, + "created_utc": "2026-09-07T16:52:45Z", + "dataset": { + "author": { + "handle": null, + "is_registry_maintainer": false, + "name": "malaiwah", + "role": "capture-author", + "url": null + }, + "base_capture": null, + "id": "fidelity--quant-integration.root", + "license": "mit", + "name": "Local quant integration root", + "qualification": null, + "repository": null, + "revision": null, + "role": "root", + "structural_status": "sealed" + }, + "dataset_sha256": "176290a2afa84dcb56c85eb7e8ff70bbdfc11f347581d709a6a75dfd0d7600a1", + "determinism": { + "cold_start_per_run": true, + "distinct_evidence_hash_count": 1, + "evidence_hashes": [ + "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39" + ], + "evidence_kind": "hidden_state_tensor_sha256", + "identical_across_runs": null, + "note": "a single cold capture; cross-run determinism is NOT asserted here. Capture a second cold run and run `fidelity-dataset compare --self-compare` -- an exactly 0.0 result is the SC-1 reproduction confirmation.", + "repeat_noise": null, + "repeats": [], + "run_count": 1 + }, + "disclosures": [ + { + "affects_comparability": false, + "code": "rtn_format_fixture", + "detail": "Local RTN-format fixture; optimizer-not-run; no model-quality or serving-kernel equivalence claim.", + "severity": "info" + }, + { + "affects_comparability": false, + "code": "reduced_run_count", + "detail": "this dataset is ONE cold capture (run_count 1, the DET-D4 floor is 5). Cross-run determinism is not asserted by the dataset; it is established by a second cold capture plus `fidelity-dataset compare --self-compare`, whose exactly-0.0 result is the SC-1 reproduction confirmation.", + "severity": "caveat" + } + ], + "format_version": 1, + "generation_sanity_probe": { + "degenerate": false, + "enforced": false, + "entropy_nats": 5.548019647470335, + "expect": null, + "logit_spread": 0.986328125, + "note": "one extra window through the same schedule; its hidden state is discarded and never enters the dataset.", + "prompt": "The capital of France is", + "schema": "malaiwah.generation-sanity-probe.v1", + "status": "recorded", + "top1_id": 113, + "top1_probability": 0.006720104384265371, + "top1_text": "�", + "top_k": [ + { + "id": 113, + "probability": 0.006720104384265371, + "text": "�" + }, + { + "id": 237, + "probability": 0.006412368399474785, + "text": "�" + }, + { + "id": 193, + "probability": 0.006035639491843906, + "text": "\u0001" + }, + { + "id": 236, + "probability": 0.0055386141320063614, + "text": "�" + }, + { + "id": 44, + "probability": 0.0054740873228682424, + "text": "I" + } + ], + "uniform_entropy_nats": 5.560681631015528, + "vocab_size": 260 + }, + "head": { + "applied_in_capture": false, + "bias": null, + "bits": 16, + "compat_tensor_key": "weight", + "dtype": "BF16", + "equality_receipt": null, + "file": "head/weight.safetensors", + "file_sha256": "07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913", + "final_norm": { + "applied_at_replay": false, + "applied_in_capture": true, + "dtype": null, + "file": null, + "file_sha256": null, + "shape": null, + "tensor_content_sha256": null, + "tensor_key": null + }, + "head_json": "head/head.json", + "present": true, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "shape": [ + 260, + 64 + ], + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "tensor_key": "lm_head.weight" + }, + "interop": { + "adapted_from": null, + "compatible_with": [ + "kimi-k3-distribution-fidelity/1" + ], + "divergences": [ + { + "field": "head", + "id": "D-1", + "reason": "every capture declares its OWN head identity by tensor content digest; the comparator refuses a hidden-form comparison across differing heads." + }, + { + "field": "runtime.lane", + "id": "D-2", + "reason": "lane is required and gated at compare time so registry BIAS-006 is checked before a number exists, not at submission." + }, + { + "field": "panel.scoring_window", + "id": "D-3", + "reason": "scoring_window is part of panel identity, not a comparator flag: a score_from=1024 number is a different panel, not a variant." + }, + { + "field": "comparison_kind", + "id": "D-4", + "reason": "self-compare is a first-class mode asserting exactly 0.0." + }, + { + "field": "estimator.accumulation_dtype", + "id": "D-5", + "reason": "required, fp64 default; an fp32 estimator lands in a different comparability class on the same data and that must be visible." + }, + { + "field": "coverage", + "id": "D-6", + "reason": "declared vs present record counts with shard_of; fixes our own manifest that claimed 5,120 captures in a 512-file repository." + }, + { + "field": "panel", + "id": "D-7", + "reason": "the panel is a separately referenceable object, which is what makes a candidate capture publishable standalone." + }, + { + "field": "capture.lossy_codec", + "id": "D-8", + "reason": "lets a llama.cpp .kld be ingested without laundering a lossy capture as exact." + }, + { + "field": "capture.records[].attention_mask_sha256", + "id": "D-9", + "reason": "our packed and streaming lanes vary mask construction; a single-request capture path makes it invariant and has no equivalent field." + }, + { + "field": "capture.head_separable", + "id": "D-10", + "reason": "hidden form is the default; logit form must declare head_separable:false with a reason." + } + ], + "k3_compat_emitted": false, + "note": null + }, + "panel": { + "contamination": { + "checked": false, + "hits": null, + "method": "not established", + "receipt": null + }, + "context_length": 64, + "contexts": 4, + "panel_file": "panel/panel.json", + "panel_file_sha256": "68efa258ea3c5d4ba759c3c15aadd6e8c984711831bea3f335903109345cdcef", + "panel_id": "panel--panel", + "panel_receipt_file": "panel/panel-receipt.json", + "panel_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "panel_token_sha256_legacy": "3c9467c85be43d238926f6d18bf825c2e4748814c95b8b0e8b8f1420546c3089", + "remap_file": null, + "repository": null, + "revision": null, + "scored_positions_total": 252, + "scoring_window": { + "dropped_positions_total": 0, + "min_left_context_tokens": 1, + "policy": "every causal prediction position of every window is scored; nothing is dropped", + "score_from": 0, + "windowed": false + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } + }, + "runtime": { + "backend_identity_sha256": null, + "file": "runtime/capture-runtime.json", + "file_sha256": "d7da58d6426d19b129ef09638c0a30ca982b36597fe7978a2efd33d292f539c5", + "lane": "other", + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "lane_inferred": false, + "runtime_reader_sha256": null, + "source": "native", + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd" + }, + "schema": "malaiwah.fidelity-dataset.v1", + "scope": { + "assignments": [ + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "embed_tokens", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "attn.qkv", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "attn.o", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "mlp.gate", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "mlp.up", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "mlp.down", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "moe.experts", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "norm", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "lm_head", + "treatment": "native" + } + ], + "head_policy": "native", + "kv_cache_dtype": "bf16", + "policy": "native", + "scope_digest": "attn.o=native:bf16@16|attn.qkv=native:bf16@16|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=native:bf16@16|mlp.gate=native:bf16@16|mlp.up=native:bf16@16|moe.experts=native:bf16@16|norm=native:bf16@16|head=native|kv=bf16" + }, + "seal": { + "checksums_file": "checksums.txt", + "checksums_format": "sha256sum", + "checksums_sha256": "feba1278b95ddd3cbe4f4e95234055ac499659cd4f409f8c9d6ffca531c3b62a", + "covers": [ + "every published file except checksums.txt and fidelity-dataset.json, via checksums.txt", + "fidelity-dataset.json itself, via the self-blanked seal", + "every capture tensor a second time by CONTENT, via capture.capture_content_digest" + ], + "excludes": [ + "checksums.txt", + "fidelity-dataset.json" + ], + "external_anchor": null, + "method": "self_blanked_canonical_json_sha256", + "seal_field": "dataset_sha256" + }, + "upstream_receipts": [], + "weights": { + "artifact_ref": null, + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "codec": null, + "config_sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "declared_bits": null, + "declared_head_bits": 16, + "index_sha256": null, + "model_ref": null, + "model_revision": null, + "quantized": false, + "repository": "/tmp/qfs-complete-tiny-fixture/model", + "revision": null + } +} diff --git a/raw/candidates/fp8-ue8m0/evidence/root/head/head.json b/raw/candidates/fp8-ue8m0/evidence/root/head/head.json new file mode 100644 index 0000000000000000000000000000000000000000..cfb1d748d203487673352f1ad645cb98a49c4002 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/root/head/head.json @@ -0,0 +1,34 @@ +{ + "applied_in_capture": false, + "bias": null, + "bits": 16, + "compat_tensor_key": "weight", + "dtype": "BF16", + "equality_receipt": null, + "file": "head/weight.safetensors", + "file_sha256": "07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913", + "final_norm": { + "applied_at_replay": false, + "applied_in_capture": true, + "dtype": null, + "file": null, + "file_sha256": null, + "shape": null, + "tensor_content_sha256": null, + "tensor_key": null + }, + "format_version": 1, + "note": "the head is shipped verbatim from the checkpoint so a third party can replay logits = hidden @ head^T without the weights", + "present": true, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "receipt_sha256": "2da3cfbfc607296b3bb32eb6fec1f122e4ce30fe9ea96653e5bb1b4ebab6514f", + "schema": "malaiwah.fidelity-head-identity.v1", + "shape": [ + 260, + 64 + ], + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "tensor_key": "lm_head.weight" +} diff --git a/raw/candidates/fp8-ue8m0/evidence/root/head/weight.safetensors b/raw/candidates/fp8-ue8m0/evidence/root/head/weight.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..abe6e7c215a73bc88e85042067923bf943118086 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/root/head/weight.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913 +size 33365 diff --git a/raw/candidates/fp8-ue8m0/evidence/root/panel/masks/context-0000.npy b/raw/candidates/fp8-ue8m0/evidence/root/panel/masks/context-0000.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/root/panel/masks/context-0000.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/fp8-ue8m0/evidence/root/panel/masks/context-0001.npy b/raw/candidates/fp8-ue8m0/evidence/root/panel/masks/context-0001.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/root/panel/masks/context-0001.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/fp8-ue8m0/evidence/root/panel/masks/context-0002.npy b/raw/candidates/fp8-ue8m0/evidence/root/panel/masks/context-0002.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/root/panel/masks/context-0002.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/fp8-ue8m0/evidence/root/panel/masks/context-0003.npy b/raw/candidates/fp8-ue8m0/evidence/root/panel/masks/context-0003.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/root/panel/masks/context-0003.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/fp8-ue8m0/evidence/root/panel/panel-receipt.json b/raw/candidates/fp8-ue8m0/evidence/root/panel/panel-receipt.json new file mode 100644 index 0000000000000000000000000000000000000000..fbc2ce3e8e9602a492d83ae681817e0fa02e4173 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/root/panel/panel-receipt.json @@ -0,0 +1,376 @@ +{ + "corpus": { + "documents_considered": 4, + "documents_selected": 4, + "path_prefix": "embedded-synthetic/", + "repository": null, + "revision": null, + "source": "Synthetic texts embedded verbatim in this sealed receipt and builder." + }, + "created_utc": "2026-09-07T00:00:00Z", + "created_utc_policy": "Fixed artifact epoch for deterministic bytes; not an execution timestamp.", + "documents": [ + { + "bytes": 135, + "document": "garden.txt", + "document_sha256": "2aca14290cd4753c3b15d8a20aaa7a6963d2cb48d78e8538a4ce34d4665dcb94", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "garden", + "text_utf8": "The small garden has red flowers, green leaves, and a stone path. A gentle breeze moves the branches while a robin sings near the gate.", + "tokens_total": 137, + "window_id": "final-0000" + }, + { + "bytes": 144, + "document": "arithmetic.txt", + "document_sha256": "b867a2e8cbe81cc8d5781bfe6718a43e171fb5c7c138b9ed6ac86bebc24bca83", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "arithmetic", + "text_utf8": "A shelf holds three blue boxes and five red boxes. There are eight boxes in total. Move two boxes to the desk and count the six boxes remaining.", + "tokens_total": 146, + "window_id": "final-0001" + }, + { + "bytes": 162, + "document": "code.txt", + "document_sha256": "08c8f75f45899cbc9656a7a3fcdbf3092abfa7bc97fe353957b08d7e9660240b", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "code", + "text_utf8": "def add_values(left, right):\n return left + right\n\nresult = add_values(7, 9)\nprint(result)\n# This readable snippet is synthetic input, not a coding benchmark.\n", + "tokens_total": 164, + "window_id": "final-0002" + }, + { + "bytes": 140, + "document": "instructions.txt", + "document_sha256": "1dba5052b28929f94f322ad9e8c0b238bcbd653d6fae54ebaea8e5e3f6073378", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "instructions", + "text_utf8": "First place a clean cup on the table. Next pour cool water into the cup. Finally put the bottle away and write a short note about the steps.", + "tokens_total": 142, + "window_id": "final-0003" + } + ], + "environment": { + "numpy": "2.5.3", + "tokenizers": "0.23.2", + "transformers": "5.16.1" + }, + "format_builder": "engines/tools/build_token_panel.py", + "format_builder_sha256": "30eb4d4d7e465aaa8d9ef2d947a0ac7fd42ec45388f20c8b6db242c88dc2d851", + "format_version": 1, + "panel_id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "panel_name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "parameters": { + "context_length": 64, + "generation_seed": null, + "generation_seed_policy": "No RNG is used.", + "prediction_positions_per_window": 63, + "scored_positions_total": 252, + "strata": [ + "garden", + "arithmetic", + "code", + "instructions" + ], + "windows_per_stratum": 1, + "windows_total": 4 + }, + "receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "resolver_sha256": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "schema": "malaiwah.token-panel-build-receipt.v1", + "selection_rule": "Four embedded readable synthetic documents in declared order; native tokenizer with add_special_tokens=True, truncation=True, max_length=64, padding=False; each encoded window must be exactly 64 tokens; no chat template; all 63 shifted next-token positions scored; no RNG.", + "separation": { + "checked": false, + "method": "No contamination scan or benchmark selection.", + "note": "Authored synthetic CPU smoke inputs for a random-init model; not a benchmark, held-out quality claim, or registry-row submission." + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "add_special_tokens": true, + "chat_template_applied": false, + "class": "TokenizersBackend", + "files_sha256": { + "config.json": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "generation_config.json": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "tokenizer.json": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "tokenizer_config.json": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + }, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "local_files_only": true, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "trust_remote_code": false, + "vocab_size": 260 + }, + "tool": "build_panel.py", + "tool_sha256": "f17b17262816676d6ededcc969756ac07ff991eab73117040ec41005f6ff63f3" +} diff --git a/raw/candidates/fp8-ue8m0/evidence/root/panel/panel.json b/raw/candidates/fp8-ue8m0/evidence/root/panel/panel.json new file mode 100644 index 0000000000000000000000000000000000000000..cedb9d5e3c635860791c55451fde6dc9e37cddb9 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/root/panel/panel.json @@ -0,0 +1,298 @@ +{ + "contamination": { + "checked": false, + "hits": null, + "method": "not established", + "receipt": null + }, + "context_length": 64, + "contexts": 4, + "format_version": 1, + "name": "token panel panel--panel", + "panel_id": "panel--panel", + "panel_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "panel_token_sha256_legacy": "3c9467c85be43d238926f6d18bf825c2e4748814c95b8b0e8b8f1420546c3089", + "positions_per_context": 63, + "receipt_sha256": "8a4e27a74ca6ce39569b78c3d972077ab7966f6da118110b3b08adca1e284c6f", + "records": [ + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0000.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 0, + "document_id": "embedded-synthetic/garden.txt", + "domain": "garden", + "index": 0, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0000.json", + "token_ids_first16": [ + 1, + 55, + 75, + 72, + 224, + 86, + 80, + 68, + 79, + 79, + 224, + 74, + 68, + 85, + 71, + 72 + ], + "token_ids_json_sha256": "08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315", + "token_ids_last16": [ + 224, + 68, + 81, + 71, + 224, + 68, + 224, + 86, + 87, + 82, + 81, + 72, + 224, + 83, + 68, + 2 + ], + "token_ids_sha256_legacy": "9d5378f0316be57e37f80d2bae7895ba4a1140c302c87ff8cce2fbd9afc83b77", + "window_id": "final-0000", + "window_index": 0 + }, + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0001.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 1, + "document_id": "embedded-synthetic/arithmetic.txt", + "domain": "arithmetic", + "index": 1, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0001.json", + "token_ids_first16": [ + 1, + 36, + 224, + 86, + 75, + 72, + 79, + 73, + 224, + 75, + 82, + 79, + 71, + 86, + 224, + 87 + ], + "token_ids_json_sha256": "5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46", + "token_ids_last16": [ + 72, + 86, + 17, + 224, + 55, + 75, + 72, + 85, + 72, + 224, + 68, + 85, + 72, + 224, + 72, + 2 + ], + "token_ids_sha256_legacy": "e0f95114b71a46cb489539dc38909fb67fb378f25fafbb513e32690cc7f11b37", + "window_id": "final-0001", + "window_index": 1 + }, + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0002.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 2, + "document_id": "embedded-synthetic/code.txt", + "domain": "code", + "index": 2, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0002.json", + "token_ids_first16": [ + 1, + 71, + 72, + 73, + 224, + 68, + 71, + 71, + 66, + 89, + 68, + 79, + 88, + 72, + 86, + 11 + ], + "token_ids_json_sha256": "51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07", + "token_ids_last16": [ + 85, + 76, + 74, + 75, + 87, + 202, + 202, + 85, + 72, + 86, + 88, + 79, + 87, + 224, + 32, + 2 + ], + "token_ids_sha256_legacy": "482b890c7b0e2f7400257c43680093b7f2b90d6df5361c6de3ae97ddfdd2504e", + "window_id": "final-0002", + "window_index": 2 + }, + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0003.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 3, + "document_id": "embedded-synthetic/instructions.txt", + "domain": "instructions", + "index": 3, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0003.json", + "token_ids_first16": [ + 1, + 41, + 76, + 85, + 86, + 87, + 224, + 83, + 79, + 68, + 70, + 72, + 224, + 68, + 224, + 70 + ], + "token_ids_json_sha256": "8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d", + "token_ids_last16": [ + 224, + 70, + 82, + 82, + 79, + 224, + 90, + 68, + 87, + 72, + 85, + 224, + 76, + 81, + 87, + 2 + ], + "token_ids_sha256_legacy": "12e01edd3900ff2ca82621feb5504f24b003a53c0afe98a9ee0b490eb93141d4", + "window_id": "final-0003", + "window_index": 3 + } + ], + "repository": null, + "revision": null, + "schema": "malaiwah.fidelity-panel-binding.v1", + "scored_positions_total": 252, + "scoring_window": { + "dropped_positions_total": 0, + "min_left_context_tokens": 1, + "policy": "every causal prediction position of every window is scored; nothing is dropped", + "score_from": 0, + "windowed": false + }, + "strata": {}, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "token_digest_algorithm": { + "aggregate": "sha256('\\n'.join(per_record_hex).encode('ascii'))", + "legacy_aggregate": "sha256(''.join(per_record_hex).encode('utf-8'))", + "legacy_per_record": "sha256(json.dumps(ids).encode('utf-8'))", + "per_record": "sha256(json.dumps(ids, separators=(',',':')).encode('utf-8'))" + }, + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } +} diff --git a/raw/candidates/fp8-ue8m0/evidence/root/panel/tokens/context-0000.json b/raw/candidates/fp8-ue8m0/evidence/root/panel/tokens/context-0000.json new file mode 100644 index 0000000000000000000000000000000000000000..c55b788f77dcb26a8c56fe6a7593353d57abb70f --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/root/panel/tokens/context-0000.json @@ -0,0 +1 @@ +[1,55,75,72,224,86,80,68,79,79,224,74,68,85,71,72,81,224,75,68,86,224,85,72,71,224,73,79,82,90,72,85,86,15,224,74,85,72,72,81,224,79,72,68,89,72,86,15,224,68,81,71,224,68,224,86,87,82,81,72,224,83,68,2] \ No newline at end of file diff --git a/raw/candidates/fp8-ue8m0/evidence/root/panel/tokens/context-0001.json b/raw/candidates/fp8-ue8m0/evidence/root/panel/tokens/context-0001.json new file mode 100644 index 0000000000000000000000000000000000000000..8304be93e5387811e155f869e175c0bfca57ca76 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/root/panel/tokens/context-0001.json @@ -0,0 +1 @@ +[1,36,224,86,75,72,79,73,224,75,82,79,71,86,224,87,75,85,72,72,224,69,79,88,72,224,69,82,91,72,86,224,68,81,71,224,73,76,89,72,224,85,72,71,224,69,82,91,72,86,17,224,55,75,72,85,72,224,68,85,72,224,72,2] \ No newline at end of file diff --git a/raw/candidates/fp8-ue8m0/evidence/root/panel/tokens/context-0002.json b/raw/candidates/fp8-ue8m0/evidence/root/panel/tokens/context-0002.json new file mode 100644 index 0000000000000000000000000000000000000000..2a1413e634823a039c4ede6b463b549207c4c8fb --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/root/panel/tokens/context-0002.json @@ -0,0 +1 @@ +[1,71,72,73,224,68,71,71,66,89,68,79,88,72,86,11,79,72,73,87,15,224,85,76,74,75,87,12,29,202,224,224,224,224,85,72,87,88,85,81,224,79,72,73,87,224,14,224,85,76,74,75,87,202,202,85,72,86,88,79,87,224,32,2] \ No newline at end of file diff --git a/raw/candidates/fp8-ue8m0/evidence/root/panel/tokens/context-0003.json b/raw/candidates/fp8-ue8m0/evidence/root/panel/tokens/context-0003.json new file mode 100644 index 0000000000000000000000000000000000000000..7978732d7bf3bfc5fed35c837bc69d9d66371c4f --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/root/panel/tokens/context-0003.json @@ -0,0 +1 @@ +[1,41,76,85,86,87,224,83,79,68,70,72,224,68,224,70,79,72,68,81,224,70,88,83,224,82,81,224,87,75,72,224,87,68,69,79,72,17,224,49,72,91,87,224,83,82,88,85,224,70,82,82,79,224,90,68,87,72,85,224,76,81,87,2] \ No newline at end of file diff --git a/raw/candidates/fp8-ue8m0/evidence/root/runtime/capture-runtime.json b/raw/candidates/fp8-ue8m0/evidence/root/runtime/capture-runtime.json new file mode 100644 index 0000000000000000000000000000000000000000..5049e85eea1db8ef1418331c47da656fdca6a125 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/root/runtime/capture-runtime.json @@ -0,0 +1,245 @@ +{ + "capture_tool": { + "expert_fill": { + "bytes_filled": 294912, + "declined": {}, + "decoded_slices": 0, + "identity": "a byte copy into the fused parameter's slice; bin/selftest_layer_outer.py L4/L6 assert equality with from_pretrained and with the converter path", + "layers_filled": 3, + "mode": "direct", + "reference": "transformers.core_model_loading.MergeModulelist(dim=0) + Concatenate(dim=1)", + "slices_filled": 72, + "staged_slices": 72, + "staging": "pageable", + "targets_filled": 6 + }, + "file": "engines/tools/hf_capture.py", + "head_module_path": "lm_head", + "head_resolution": "lm_head", + "layer_residency": "stream", + "mechanism": "transformers forward pass, layer-outer/window-inner schedule: for each decoder layer the model's own forward is run once per window with the layers below replaying their memoised output and the layers above suspending, so each layer's weights are materialised once for the whole panel. Windows are pushed through sequentially, never batched. Forward pre-hook on model.get_output_embeddings(), fired by the model's own epilogue after the last layer", + "model_view": null, + "parallel_plan_dropped": false, + "resolved_classes": { + "config": "transformers.models.glm_moe_dsa.configuration_glm_moe_dsa.GlmMoeDsaConfig", + "model": "transformers.models.glm_moe_dsa.modeling_glm_moe_dsa.GlmMoeDsaForCausalLM" + }, + "resolved_panel_binding": { + "binding": { + "content": { + "archive": { + "algorithm": "sha256(ustar: sorted regular files; mode=0644; uid=gid=mtime=0)", + "bytes": 20480, + "compression": "none", + "format": "ustar", + "sha256": "389706dfa3335a75ec70a40d079995af1a60c05512334125dbd336790f12702f" + }, + "manifest": [ + { + "bytes": 192, + "path": "arrays/causal-mask-64.npy", + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02" + }, + { + "bytes": 384, + "path": "arrays/final-0000.tokens.npy", + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af" + }, + { + "bytes": 384, + "path": "arrays/final-0001.tokens.npy", + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea" + }, + { + "bytes": 384, + "path": "arrays/final-0002.tokens.npy", + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c" + }, + { + "bytes": 384, + "path": "arrays/final-0003.tokens.npy", + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a" + }, + { + "bytes": 4195, + "path": "panel.json", + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6" + }, + { + "bytes": 7808, + "path": "panel.receipt.json", + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263" + } + ], + "manifest_sha256": "e5f2d6410a6290da1197016c5b57ae522a3570665215ddc23e2a0bd45f912181" + }, + "panel": { + "bytes": 4195, + "context_length": 64, + "contexts": 4, + "file": "panel.json", + "id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "positions_per_context": 63, + "role": "final", + "scored_positions_total": 252, + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6", + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36" + }, + "receipt": { + "bytes": 7808, + "declared_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "file": "panel.receipt.json", + "receipt_file_sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "receipt_seal_mode": "self-blank" + }, + "schema": "malaiwah.resolved-panel.v1", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } + }, + "binding_file": "panel-binding.json", + "binding_file_sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "tokenizer_equivalences": [] + }, + "schedule": "layer-outer", + "sha256": "44afcdac9f7c9cb26a35a2b7d9c1aed562344b76c8045a753651d2f2dbae99d0", + "unexpected_tensor_allowlist": null, + "verified_code": null, + "version": "hf_capture/1", + "weights_decode": null, + "weights_license": null, + "wraps": [] + }, + "container": { + "image_digest": null, + "image_reference": null, + "image_repository_digest": null + }, + "format_version": 1, + "lane": "other", + "lane_identity_inputs": [ + "torch_version", + "cuda_runtime_version", + "device_name", + "grouped_mm_kernel", + "numeric_policy", + "attention_backend", + "experts_implementation", + "parallelism", + "ep_emulate", + "reduce_order" + ], + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "lane_inferred": false, + "receipt_sha256": "ddc7e4d4716d564fadc197486f356d75ac0283627ca59fbcb283ab3c610ed9c5", + "resources": { + "bytes": { + "checkpoint_read": 555744, + "hidden_d2h": 36616, + "weights_h2d": null + }, + "checkpoint_bytes": 572479, + "checkpoint_files": 2, + "device_name": null, + "forward_timing": "wall-clock", + "note": "provenance, not identity: peaks and stage seconds this run measured; forward_sum is device time under cuda-events, wall time otherwise; seal covers head serialisation up to this block's assembly", + "peak_cuda_allocated_bytes": null, + "peak_cuda_reserved_bytes": null, + "peak_resident_weight_bytes": 208032, + "peak_rss_bytes": 366985216, + "rss_units_source": "Linux ru_maxrss", + "seconds": { + "decode_sum": null, + "elapsed": 4.483, + "fill_sum": 0.008, + "forward_sum": 0.174, + "identity": 0.005, + "layer_load_max": 0.018, + "layer_load_sum": 0.063, + "layer_loads": 4, + "resident_load": 3.475, + "seal": 0.006 + } + }, + "runtime_environment": { + "cold_run": "20260907T165240Z-2063005", + "numeric_policy_observed": { + "NVIDIA_TF32_OVERRIDE": null, + "allow_tf32_cudnn": true, + "allow_tf32_matmul": false, + "deviates_from_default": false, + "float32_matmul_precision": "highest", + "observed_at": "seal time, after the forward" + }, + "python": "3.12.14" + }, + "schema": "malaiwah.fidelity-capture-runtime.v1", + "source_files": { + "bin/fidelity/codepin.py": "ce2a2c04d64adf7a268978a7ffe163c7d4cb5b675d5dc8e156f8a26a3b7bb5fd", + "bin/fidelity/panel.py": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "engines/tools/hf_capture.py": "44afcdac9f7c9cb26a35a2b7d9c1aed562344b76c8045a753651d2f2dbae99d0", + "engines/tools/layer_outer.py": "e3ea5715112663b1b60cf596eeffc2140e49b399809ece89a174bce41a969274" + }, + "stack_fingerprint": { + "attention_backend": "model default", + "cuda_runtime_version": null, + "device": "cpu", + "device_name": null, + "engine": "transformers-eager", + "numeric_policy": "default torch matmul precision; no TF32 override applied", + "schema": "malaiwah.stack-fingerprint.v1", + "torch_version": "2.11.0+cpu", + "transformers_version": "5.16.1" + }, + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd", + "upstream_receipts": [], + "weights": { + "checkpoint_files": [ + { + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "size": 1479 + }, + { + "name": "model.safetensors", + "sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1", + "size": 571000 + } + ], + "checkpoint_identity_algorithm": "sha256 over the canonical JSON {\"algorithm\": , \"files\": [{\"name\", \"size\", \"sha256\"}, ...]} of every *.safetensors shard plus config.json in the checkpoint directory, sorted by name; for a llama.cpp GGUF tree the shards are every *.gguf of the one build directory (name = /) and config.json is the official release's copy beside it", + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "model_revision": null, + "repository": "/tmp/qfs-complete-tiny-fixture/model", + "revision": null + } +} diff --git a/raw/candidates/fp8-ue8m0/evidence/root/validation/structural-validation.json b/raw/candidates/fp8-ue8m0/evidence/root/validation/structural-validation.json new file mode 100644 index 0000000000000000000000000000000000000000..fc9e935fa9555c9e78a2d9c830d09603008aea2a --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/root/validation/structural-validation.json @@ -0,0 +1,14 @@ +{ + "checks_run": [ + "pre-seal" + ], + "error_count": 0, + "errors": [], + "format_version": 1, + "receipt_sha256": "e119c65652612ff67b867992ad3c228bc641ef07313779c4f7fb572e2d4603f4", + "schema": "malaiwah.fidelity-structural-validation.v1", + "structural_status": "sealed", + "subject": "dataset:fidelity--quant-integration.root", + "warning_count": 0, + "warnings": [] +} diff --git a/raw/candidates/fp8-ue8m0/evidence/smoke-evidence.json b/raw/candidates/fp8-ue8m0/evidence/smoke-evidence.json new file mode 100644 index 0000000000000000000000000000000000000000..35e0be7731f172f7b07ddca5d3c960e2d88ba481 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/evidence/smoke-evidence.json @@ -0,0 +1,52 @@ +{ + "kld_nats": 0.00020246177849756768, + "decode": { + "activation_quantization": { + "applied_to_weights": false, + "declared": { + "activation_scheme": "dynamic", + "scale_fmt": "ue8m0" + }, + "kv_cache_scheme": null, + "scope": "weights-reconstructed/advisory; activation-not-captured", + "stored_components": [] + }, + "checkpoint_bytes_read": 242286, + "comparison_class": "advisory", + "components_consumed": 220, + "components_not_consumed": [], + "components_planned": 220, + "formats_decoded": { + "fp8-ue8m0": 110 + }, + "method": "microfloat-weight-reconstruction", + "modules_decoded": 110, + "modules_not_decoded": [], + "modules_planned": 110, + "output_dtype": "bfloat16", + "quantization_config": { + "activation_scheme": "dynamic", + "fmt": "e4m3", + "quant_method": "fp8", + "scale_fmt": "ue8m0", + "weight_block_size": [ + 128, + 128 + ] + }, + "reader_evidence": { + "decode_plan_sha256": "5ba92234f4b0487318ab6ee1ebd8c7bdc20a826d3376a4ad5933500488a6ca6f", + "gate_header_barrier": false, + "source_files": { + "engines/tools/affine_surface.py": "37e7074797d53ae836e0af12fdbd2dc36c88778098aa44c72c1cd936d2b4c053", + "engines/tools/microscale_surface.py": "588923f0a4700436221923c794a8c112971d9f08e75c746742b0f0ede7921682", + "engines/tools/nvfp4_surface.py": "044b6fd2ee22d58512476e96060f7fa09030212a33736da1393c0103eb73e0c8", + "engines/tools/quant_stream.py": "7c6cc4cbe399d066eaff80ccf1e3d3190185f194644f738a404d3c537ad8e1ab" + } + }, + "reference": "compressed-tensors@0.18.0; DeepSeek-V4-Flash@60d8d70770c6776ff598c94bb586a859a38244f1/inference/kernel.py; nvidia/Qwen3.8-Flash-Next-NVFP4@fc694b54fb0174e0913e6adf86691ef85a4ead47/config.json+headers", + "scientific_disclosure": "Stored-weight reconstruction only; no native quantized GEMM, activation arithmetic, or quantizer optimization quality claim.", + "scope": "weights_reconstructed" + }, + "comparison_class": "advisory" +} diff --git a/raw/candidates/fp8-ue8m0/model/LICENSE b/raw/candidates/fp8-ue8m0/model/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..71f32fb2284323cef90b3e784a7655747c8ae683 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/model/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Michel Belleau + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/raw/candidates/fp8-ue8m0/model/build-manifest.json b/raw/candidates/fp8-ue8m0/model/build-manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..539ac3c8e8430caad8e5c81ca4d23dce391cac14 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/model/build-manifest.json @@ -0,0 +1,1561 @@ +{ + "architecture_inspiration": "GLM-5.2-SIQ-Fruit-bf16 geometry and dense/MoE plus full/shared DSA schedules; no Fruit or GLM model weights reused.", + "files": { + "config.json": { + "bytes": 1479, + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + "generation_config.json": { + "bytes": 216, + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + "model.safetensors": { + "bytes": 571000, + "sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1" + }, + "tokenizer.json": { + "bytes": 6763, + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + "tokenizer_config.json": { + "bytes": 236, + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + }, + "generation": "Native GlmMoeDsaForCausalLM random initialization in FP32, rounded to the published BF16 artifact; native router correction buffers retained FP32.", + "generator_sha256": "19c3489f1bc7e8e9323cb26afbead562816a6918d6823af252eb6d04dff8e81e", + "limitations": [ + "Random initialization; not trained or distilled.", + "Not a quantization or behavioral approximation of a released GLM model.", + "MTP intentionally absent (zero next-n-prediction layers); no unmatched MTP tensors.", + "This build manifest describes generated bytes, not proof of clean loading or capture; see separately measured verification evidence." + ], + "parameter_count": 277824, + "schema": "malaiwah.glm-moe-dsa-tiny-build.v1", + "seed": 20260907, + "stored_elements": 277848, + "tensor_count": 139, + "tensors": [ + { + "bytes": 33280, + "dtype": "torch.bfloat16", + "elements": 16640, + "name": "lm_head.weight", + "sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "shape": [ + 260, + 64 + ] + }, + { + "bytes": 33280, + "dtype": "torch.bfloat16", + "elements": 16640, + "name": "model.embed_tokens.weight", + "sha256": "18df1b3a5f263a31f5bd4225c3c4629573b75e47b7e28b6e73501586bb47d6f1", + "shape": [ + 260, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.0.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 16384, + "dtype": "torch.bfloat16", + "elements": 8192, + "name": "model.layers.0.mlp.down_proj.weight", + "sha256": "101a9db78e4e21058dcb6f5240e751bcaf3bd662b98696a63a719f86ecabf787", + "shape": [ + 64, + 128 + ] + }, + { + "bytes": 16384, + "dtype": "torch.bfloat16", + "elements": 8192, + "name": "model.layers.0.mlp.gate_proj.weight", + "sha256": "ef5262b354f74dce3a9dc4c3134e4db8cbf63f03ed8a1cd78ebb3e9a05af97cc", + "shape": [ + 128, + 64 + ] + }, + { + "bytes": 16384, + "dtype": "torch.bfloat16", + "elements": 8192, + "name": "model.layers.0.mlp.up_proj.weight", + "sha256": "359b4dac1da3e3956583050af84147aef2f41b8680a85b32083ffd0e1847d997", + "shape": [ + 128, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.0.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.0.self_attn.indexer.k_norm.bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 16 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.0.self_attn.indexer.k_norm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 512, + "dtype": "torch.bfloat16", + "elements": 256, + "name": "model.layers.0.self_attn.indexer.weights_proj.weight", + "sha256": "50ca7a10fe9a0556d8c3ad38bd3f715ee6c6e13084b4cb6b51b2ef78f57c53b2", + "shape": [ + 4, + 64 + ] + }, + { + "bytes": 2048, + "dtype": "torch.bfloat16", + "elements": 1024, + "name": "model.layers.0.self_attn.indexer.wk.weight", + "sha256": "f724d0b2c09ba9ae41cfc3fbe4e458bd7f644e5f0fb8c1446e19b3cf8c650274", + "shape": [ + 16, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.0.self_attn.indexer.wq_b.weight", + "sha256": "048349f93320b7625130fa5abc86dbcc89715b9f02d6853284563e765eb7bc11", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.0.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.0.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "5ad58e7c4515d8c4e84ecf10ecfa7aacb3c39ee1d6a3219307036bd8b59f529d", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.0.self_attn.kv_b_proj.weight", + "sha256": "9a8cfdd6e51c3868d27f147509d24549480e70f278758a8c16adf1ea5c197938", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.0.self_attn.o_proj.weight", + "sha256": "734b1edea5c19958ab29dfba4314ab5a5a25280be3db3de20b82b2e7c78c35ff", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.0.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.0.self_attn.q_a_proj.weight", + "sha256": "6d6e018ec4d4251755a002469f0778accef3b7628062f82a5d292d4130fd4c85", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.0.self_attn.q_b_proj.weight", + "sha256": "28ef2f379f06054843ff97f99d63f515a2f583059dd49fd894a53d04733f0650", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.1.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.0.down_proj.weight", + "sha256": "a0378aa3bb69ed49af25a51d57476ef63ccf5dc98bc4d3008d28660e16f82492", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.0.gate_proj.weight", + "sha256": "e6c7b0ce29c7e6ea16adfd8423cd9a8a27f1be217a2061a635468c9e5603439c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.0.up_proj.weight", + "sha256": "528f777edc3fc406c76dc1e150a648c23009c701134a3a86dcbdeb15f8ddc4bb", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.1.down_proj.weight", + "sha256": "c966c5eed64d8bb32ff5cf25587fc4eb714b7536b6f670725efb136acc6ca26c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.1.gate_proj.weight", + "sha256": "e55ceb89e6891b34fb67fe5c99b529a1cab9729bea2f6ef08be6af7eefcf6c2e", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.1.up_proj.weight", + "sha256": "46b43c2f3a025bab46be05795bb60916e592bb58d4fdf2a18d2e88d37a7a4fb8", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.2.down_proj.weight", + "sha256": "a649be4fd07f95d770fbe14e87561a13f62f155d2053b8a35fa6962b5d5e8c8d", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.2.gate_proj.weight", + "sha256": "5560e590344e57ff54425f4aa6c07edaaade8c73343e32c27199f1c0dc61fe51", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.2.up_proj.weight", + "sha256": "35a639103a8a914203b4dde3f87d197515879ae6ca72557cde8ea9dea6e6e0d2", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.3.down_proj.weight", + "sha256": "0969db499dfe821348b3c06873d36635f7216f1f595968ad43ae984b57565205", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.3.gate_proj.weight", + "sha256": "75c5c77c39a77a4a6dbe7b601a88814bca9cae6fcde0069ff2ca86352e6c13e7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.3.up_proj.weight", + "sha256": "241533cb545cfed7685091b023213c9d530cb54431a712eba7bf3aaebdae3b53", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.4.down_proj.weight", + "sha256": "ca1273d291e431a10b8d8c2170031b29440c2bec8bc1d7f46353990c7fe1a03f", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.4.gate_proj.weight", + "sha256": "69dc9149cbfd65fb10bd6c11f99357d279d471e5874cf19dbef7cfd8ee4d796c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.4.up_proj.weight", + "sha256": "81cb04732e3cc53acb1152c7fc06a6399af18a5f282762cb72abb56b1e6b7c6f", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.5.down_proj.weight", + "sha256": "ebd8e01f9c2daf657e915575afb3ff5ba261a2a83c25c9c50818319dd587a2f2", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.5.gate_proj.weight", + "sha256": "bc70a7d1a5263ca17d00766bb2dc48e1debb815344150741e55dea48af4d75c0", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.5.up_proj.weight", + "sha256": "f84a95d64728067676d4f7b61ac4a589fa11e45226a8996a4719d65f0b018dbf", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.6.down_proj.weight", + "sha256": "00535633e5d98b7a527cc1198d572a9104405e2aff7ee303ae60195654fb24c2", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.6.gate_proj.weight", + "sha256": "2bb299a5e306108c7af11aa5c6114abeb4d06bde9001e6f7644e0d9dca184dc5", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.6.up_proj.weight", + "sha256": "72df8a498b866a242abc9383b16c5b4428feadab02c7f274afa28653e8586107", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.7.down_proj.weight", + "sha256": "90331ab3da1e867c32d3db1aac94c69c86349dbb539400ed9e0c19c148bf5e43", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.7.gate_proj.weight", + "sha256": "576a9df3d1d72f7323e8a8490118821d826f50c9403ca7ecbe196277e62c7730", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.7.up_proj.weight", + "sha256": "3869533066e5bca84402355c6b80b177424f2d79d2b97cbb9cff30eee748135f", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.float32", + "elements": 8, + "name": "model.layers.1.mlp.gate.e_score_correction_bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 8 + ] + }, + { + "bytes": 1024, + "dtype": "torch.bfloat16", + "elements": 512, + "name": "model.layers.1.mlp.gate.weight", + "sha256": "7d1dbc5cc90900cdc1f9d4a241c8b62d0ad50de09231f9f036cce33982cfdfe7", + "shape": [ + 8, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.shared_experts.down_proj.weight", + "sha256": "eb5297f619dfdfb40419b3330406e8ff43cb0fe35797911f2de6ebff4b95690a", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.shared_experts.gate_proj.weight", + "sha256": "eeeff2280eef91eac1215b28717f2b7fdee09fdbfd484ff44855e7e7cdd11718", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.shared_experts.up_proj.weight", + "sha256": "dab5aeab83d842104e1c5557b9b6d6cb5fe519284b909e8c0c975c752dc92d41", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.1.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.1.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.1.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "bff5998ab14190d56392c70e92927904d84a2b9d04ee222967d774a5bb5eecc4", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.1.self_attn.kv_b_proj.weight", + "sha256": "876302ef3f8bba74a997f973913ca4b802aa488d27b46747c470062c9a7ebee5", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.1.self_attn.o_proj.weight", + "sha256": "ecda88672dc8fbc3bac348fa6118010e51b170d8fe3596a811bc9aa95f71915c", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.1.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.self_attn.q_a_proj.weight", + "sha256": "29fc979642704e621b0b6b59a24c13d6900782bfa9655ea9a3311c1d4c69770a", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.self_attn.q_b_proj.weight", + "sha256": "01bae246d61c4d08e751e42e6a03315b55266ae46bd15b34bd343f606a538349", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.2.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.0.down_proj.weight", + "sha256": "8c1c19d08541dc9251736b480f53cfefd21bfbcb0b4e9f725dc66e6c52d7705c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.0.gate_proj.weight", + "sha256": "8c326913b2ef159b507b584c1ae018619573a09b6f41ab687df629d3685884c4", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.0.up_proj.weight", + "sha256": "8611bc004f735fbc1c14a9c9c23f4150c7e754127e44926a44efd0b767a653ed", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.1.down_proj.weight", + "sha256": "1d4d668c4c8183e5991eefe780a138eda70578a4740c07df5b386f233cb4e5c3", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.1.gate_proj.weight", + "sha256": "21224f6173f4785ff6252dd0c1f7a6937b36bbd5bc1c20d25feecc85d6d25f3e", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.1.up_proj.weight", + "sha256": "05542672d0174f9ddfee4bd385b56455c004532da88bf34363b1e543948bf899", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.2.down_proj.weight", + "sha256": "7330dee9a6a416e9922f61d10ee0507584e007cbdd349131471b43a745b6fed8", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.2.gate_proj.weight", + "sha256": "eca5904e6634e97ca89e7dfb1f12774f78adb33b78256136e7e8ee522af92d96", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.2.up_proj.weight", + "sha256": "5a90748752e46844a0cf0efd84c16ec2db25315ffa7a13b9c4bff2697d00bbf6", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.3.down_proj.weight", + "sha256": "a42569462225d60158dfaf24406463f135b632fe258e66ae2e521efed502a37c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.3.gate_proj.weight", + "sha256": "8cf448df350984fe0429a1ca3b2081315b594e50ce85fbc2e9f63eafb8a896b7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.3.up_proj.weight", + "sha256": "54a1269ba638d42c7d6d3926826b04d52310c82804fddcd73c253680a4270032", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.4.down_proj.weight", + "sha256": "5a236edfdc8fc79f687cec866d13724515b8f26465dca2ffde051d0870d5d0ac", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.4.gate_proj.weight", + "sha256": "6c18140a11c9986f99b7c269da01a8f69f1b5215c41be1801d6900eb511bdc76", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.4.up_proj.weight", + "sha256": "7b964f5c207a6bbeaa589a6c07f9665967aca4e7c57148190ed6a6f12e0ca572", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.5.down_proj.weight", + "sha256": "74c2633e7d3b0bf844d3e3812533774fc09b6552435e778e68b442ad161c0985", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.5.gate_proj.weight", + "sha256": "6177166c1bc51e03fde63b60d85347f5a5412446df5b4dd893817d18fcf0d56c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.5.up_proj.weight", + "sha256": "7bb8e1f65a918589a1593926dc93bf3fa1329f5d31f16266c3ad6fe0fd390d47", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.6.down_proj.weight", + "sha256": "af74e303b86b1aec96fd69b64d39848d7d08f255822739cf7d5f4456de67f010", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.6.gate_proj.weight", + "sha256": "c4fc94863e17270bf8cb5a18d3a125bea82d04bfb38457fd27896a00ddeea056", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.6.up_proj.weight", + "sha256": "4e92bebe11c518a225d75d4d7de7b85f9a82baad7a961ac090dd7343a612b577", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.7.down_proj.weight", + "sha256": "8971d6a869ba59445fe28163bd73c74c8338e0b8b675f008277b5a8973967bb2", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.7.gate_proj.weight", + "sha256": "3f90ff90c18d50349a50d11c472d48c6b297496ba5bedfe4ff0da257e1e2fdef", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.7.up_proj.weight", + "sha256": "5a2fcecdbb84a9138b4dd32da15793393aeaee1d00da95ed3d55803b1f45cc86", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.float32", + "elements": 8, + "name": "model.layers.2.mlp.gate.e_score_correction_bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 8 + ] + }, + { + "bytes": 1024, + "dtype": "torch.bfloat16", + "elements": 512, + "name": "model.layers.2.mlp.gate.weight", + "sha256": "aa35eb60ee6dd8e32728c95210b15016120675b111542f36ee1b1cca64668f9d", + "shape": [ + 8, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.shared_experts.down_proj.weight", + "sha256": "e8a1e6e8db3b1996aad9cd457ae20aa5aaac876d400fd6e8d764f543ff7833b9", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.shared_experts.gate_proj.weight", + "sha256": "c5b456aab9a02d3828987060b24d24c07e7b611d3036f0d5c28662c922d1238d", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.shared_experts.up_proj.weight", + "sha256": "6a84e814bd21fcc17878151b94508853dd70099787ef5303cdc06f90b6cd7092", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.2.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.2.self_attn.indexer.k_norm.bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 16 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.2.self_attn.indexer.k_norm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 512, + "dtype": "torch.bfloat16", + "elements": 256, + "name": "model.layers.2.self_attn.indexer.weights_proj.weight", + "sha256": "d65c6e5c3f34fcad47b7137c46dd3bcd6d5cf24ce508df7fad9d20788d3a18b8", + "shape": [ + 4, + 64 + ] + }, + { + "bytes": 2048, + "dtype": "torch.bfloat16", + "elements": 1024, + "name": "model.layers.2.self_attn.indexer.wk.weight", + "sha256": "917ff454cb253fa0e5d3d68bf15e716401bb928fbd7cd260a348afec25b1b2c8", + "shape": [ + 16, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.self_attn.indexer.wq_b.weight", + "sha256": "3fe5b407fe2d74a0dda78b6cb7ae3f65066a781fd5f81971b83be600fc911d14", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.2.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.2.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "26cecf47e8fb14a837f760549a9b9dd8589c37dc76870f8b115d4ab634b853ab", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.2.self_attn.kv_b_proj.weight", + "sha256": "23447f5f72c55b0cd7acd571ff1317c16c8097e9f0de4cc9b66101b51f7988c1", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.2.self_attn.o_proj.weight", + "sha256": "a1a0c84b3214c9b7b00c438754280833964cdc719aadeff64358b3d09b2063d8", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.2.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.self_attn.q_a_proj.weight", + "sha256": "3eda4fc6a047b282d63ad2884d870ee8150a99f3c71d21031ea71e749cf39815", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.self_attn.q_b_proj.weight", + "sha256": "58ecb919757c3c93d6a43b9344236d9abd32870e68907f37cb8db779d2c93fff", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.3.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.0.down_proj.weight", + "sha256": "e8c77c987baa36019ce1adf05e02e2a31395286e584428b2049e06331848c216", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.0.gate_proj.weight", + "sha256": "69871151865d8a23e2cc39b9fe5da60eb4f41cb6c053520f29d7c7b58e6fa5e0", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.0.up_proj.weight", + "sha256": "12df1ea42b96e959785c09427c3ca3bcdc53aa7942d15187c7b1e19bdd66d08a", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.1.down_proj.weight", + "sha256": "5feaa5de7da59348b465458b8aff5373b11dae8b5150f8e7bb8015acc172e3ff", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.1.gate_proj.weight", + "sha256": "e907e6e36b7266d56e190c1e56551e0a40d64741ce668328d898c17b488ec6c9", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.1.up_proj.weight", + "sha256": "c0062ef6004073cbabf3098703b5f565f0e973e094d90c3eba36c7be471f947e", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.2.down_proj.weight", + "sha256": "efec1e8a6a5e12a6db226699e10a6d346fa95c453009f148fe304d378567f5fe", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.2.gate_proj.weight", + "sha256": "7722cc87a7696f53e7f1e0d741230a7db18d2c324f7faec742a9621c75189cb7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.2.up_proj.weight", + "sha256": "5917df5932d0ce4854458ce357a8a2c3384bc463531996875d1c68c6ea17734c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.3.down_proj.weight", + "sha256": "fd331dc77911f8d80ddfdee938993a08b3715d06767901879c5a55700dbb8961", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.3.gate_proj.weight", + "sha256": "1e8aa3749cdc3d21baf7108c47bb69ad4a532c1f41c0556ca8d68ca2c226a7a8", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.3.up_proj.weight", + "sha256": "858e72360951a5073d117a75b2cd759bc3503c6c270388b30fe73d7554f54dae", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.4.down_proj.weight", + "sha256": "b80cf998a1db7569ca4600388bbe4c6d20bd7fe7209c4e37b5de015041d01423", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.4.gate_proj.weight", + "sha256": "b39a0f5b9cd6f9175e7fa29b342772476caf8a76dad1c34d88075988c1894853", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.4.up_proj.weight", + "sha256": "cef4d7b5fb77e750e91c17cae1622a6362ba204b1b30bf5ed7b65f9e6ed15ff1", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.5.down_proj.weight", + "sha256": "65a04840ec88842630cc6f120899a3bfa6151990d7411bfe44839727648e4d03", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.5.gate_proj.weight", + "sha256": "101836900c549af917f8392a6b1428e2f14e4e1f1ef0fdd9b04e79b98c1c3d02", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.5.up_proj.weight", + "sha256": "4fc8edda4b1a92a43be268a8b249274dd5f4370fd6ea6a3134b8c2c4cf730d95", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.6.down_proj.weight", + "sha256": "fd3a10e1464c20bf5e575c105f39882bcbddcab892ef36f24e5a852d597ee7ef", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.6.gate_proj.weight", + "sha256": "8211aaeed6f1ea2711aa1865309d2d36742c0b41021eea1e00fcac45dc353b4b", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.6.up_proj.weight", + "sha256": "ec4f5d1acc5d045de6ae4106bc8f52d17d64ac355c910f12fac8b1b0b573296d", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.7.down_proj.weight", + "sha256": "03c257936ec78df3f941fe0ca4ce5aad636654cf2a351b64515ac07ad8871cae", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.7.gate_proj.weight", + "sha256": "67c1e28fd0a028104b9c76279a3c473f50452633c8a4feabda637e5f5b71f797", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.7.up_proj.weight", + "sha256": "1b18f8b452b71ca57fec09892a48df2ee2108067f97f62b76a3817c9bea91708", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.float32", + "elements": 8, + "name": "model.layers.3.mlp.gate.e_score_correction_bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 8 + ] + }, + { + "bytes": 1024, + "dtype": "torch.bfloat16", + "elements": 512, + "name": "model.layers.3.mlp.gate.weight", + "sha256": "7e86bda3f7704f19dc2a3f6a0ca22b0df554723adf0cf3add837a1e497ad4d3a", + "shape": [ + 8, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.shared_experts.down_proj.weight", + "sha256": "110ad4d8dd59a5ec2b0d4c2e0a79d022bcdba240a4998ff84ad2590dd32fce2c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.shared_experts.gate_proj.weight", + "sha256": "cca5d02ac9eccab3ee8be47f55ef4d59750dd311800e25c22cc3f22b437ffd8b", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.shared_experts.up_proj.weight", + "sha256": "c8fe3987299d1526946a87facc4d3f99300fafbac552471ed826454c41ed31e5", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.3.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.3.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.3.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "5c230cafd4add95096f53702bab8ef1673993cca9433de8c874638958a61995a", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.3.self_attn.kv_b_proj.weight", + "sha256": "ff432280fe1fbbc2a5b7fee7fb18f6de59d675d2d7d0eec0d769a5fd012699a9", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.3.self_attn.o_proj.weight", + "sha256": "59e2e2ee8f9cba29e9cf3e6098539ddca5811d35d3df3c860488f348d6be9584", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.3.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.self_attn.q_a_proj.weight", + "sha256": "172aae8ff1a79376bf65182f5e92c06da2f9b307c15f214a20597491729aa0d7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.self_attn.q_b_proj.weight", + "sha256": "5d917d8c510906982c609808f1eb0d16da467976550e3a063637f1fde013cbdb", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.norm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + } + ], + "tokenizer": { + "kind": "byte-level BPE without merges", + "special_token_ids": { + "": 1, + "": 2, + "": 0, + "": 3 + }, + "vocab_size": 260 + }, + "versions": { + "safetensors": "0.8.0", + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "transformers": "5.16.1" + } +} diff --git a/raw/candidates/fp8-ue8m0/model/config.json b/raw/candidates/fp8-ue8m0/model/config.json new file mode 100644 index 0000000000000000000000000000000000000000..3bc6c027fc5b767a2036fd049d0c644c1b104a93 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/model/config.json @@ -0,0 +1,78 @@ +{ + "architectures": [ + "GlmMoeDsaForCausalLM" + ], + "attention_bias": false, + "attention_dropout": 0.0, + "bos_token_id": 1, + "dtype": "bfloat16", + "eos_token_id": 2, + "first_k_dense_replace": 1, + "head_dim": 8, + "hidden_act": "silu", + "hidden_size": 64, + "index_head_dim": 16, + "index_n_heads": 4, + "index_topk": 8, + "indexer_types": [ + "full", + "shared", + "full", + "shared" + ], + "initializer_range": 0.02, + "intermediate_size": 128, + "kv_lora_rank": 16, + "layer_types": [ + "deepseek_sparse_attention", + "deepseek_sparse_attention", + "deepseek_sparse_attention", + "deepseek_sparse_attention" + ], + "max_position_embeddings": 256, + "mlp_bias": false, + "mlp_layer_types": [ + "dense", + "sparse", + "sparse", + "sparse" + ], + "model_type": "glm_moe_dsa", + "moe_intermediate_size": 32, + "n_group": 1, + "n_routed_experts": 8, + "n_shared_experts": 1, + "norm_topk_prob": true, + "num_attention_heads": 4, + "num_experts_per_tok": 2, + "num_hidden_layers": 4, + "num_key_value_heads": 4, + "num_nextn_predict_layers": 0, + "pad_token_id": 0, + "q_lora_rank": 32, + "qk_head_dim": 16, + "qk_nope_head_dim": 8, + "qk_rope_head_dim": 8, + "rms_norm_eps": 1e-05, + "rope_parameters": { + "rope_theta": 10000.0, + "rope_type": "default" + }, + "routed_scaling_factor": 2.5, + "tie_word_embeddings": false, + "topk_group": 1, + "transformers_version": "5.16.1", + "use_cache": true, + "v_head_dim": 16, + "vocab_size": 260, + "quantization_config": { + "quant_method": "fp8", + "fmt": "e4m3", + "scale_fmt": "ue8m0", + "activation_scheme": "dynamic", + "weight_block_size": [ + 128, + 128 + ] + } +} diff --git a/raw/candidates/fp8-ue8m0/model/cpu-comparison-receipt.json b/raw/candidates/fp8-ue8m0/model/cpu-comparison-receipt.json new file mode 100644 index 0000000000000000000000000000000000000000..f0585d9ad8ac65ceca940a79603f522a1f534f5c --- /dev/null +++ b/raw/candidates/fp8-ue8m0/model/cpu-comparison-receipt.json @@ -0,0 +1,458 @@ +{ + "candidate": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "dataset_id": "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "dataset_sha256": "c3ff6c32dc57502825d3ca3ac2133ed6a4c31e7bc7602191d595ee044ebe9048", + "form": "hidden", + "head": { + "bits": 16, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510" + }, + "label": "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d", + "lane": "other", + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "repository": "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "revision": null, + "role": "root", + "scope_digest": "attn.o=native:bf16@16|attn.qkv=native:bf16@16|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=native:bf16@16|mlp.gate=native:bf16@16|mlp.up=native:bf16@16|moe.experts=native:bf16@16|norm=native:bf16@16|head=native|kv=bf16", + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd", + "weights": { + "artifact_ref": null, + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "codec": null, + "config_sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "declared_bits": null, + "declared_head_bits": 16, + "index_sha256": null, + "model_ref": null, + "model_revision": "45563636ef723acfb826755493447dc40c7a0c37", + "quantized": false, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37" + } + }, + "comparability": { + "bias": null, + "class": "strict", + "key": null, + "key_inputs": null, + "same_lane": true, + "usable_as_floor": true + }, + "comparator": { + "accumulation_dtype": "float64", + "bf16_reduced_precision_reduction": false, + "cublas_workspace_config": null, + "deterministic_algorithms": true, + "device": "cpu", + "estimator_backend": "torch:k6_kld_report._token_kld", + "head_applied_candidate_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "head_applied_reference_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "head_applied_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "logprob_dtype": "float64", + "position_block": 128, + "replay_backend": "numpy:cpu:float32", + "replay_env": { + "blas_configuration": "OpenBLAS 0.3.34.106.0 USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell MAX_THREADS=64", + "blas_name": "scipy-openblas", + "blas_threads": 2, + "blas_threads_source": "ctypes:scipy_openblas_get_num_threads64_", + "blas_version": "0.3.34.106.0", + "cpu_model": "Intel(R) Xeon(R) CPU X5570 @ 2.93GHz", + "library": "numpy", + "numpy_version": "2.5.3", + "replay_dtype": "float32" + }, + "replay_peak_device_bytes": null, + "short_circuited": true, + "source_file_hashes_verified": true, + "tensor_content_digests_verified": true, + "tf32": false, + "tool": { + "entrypoint": "bin/fidelity-dataset compare", + "note": "the fp64 estimator is k6_kld_report._token_kld, imported not copied, whenever torch is importable; estimator_backend records which path ran." + }, + "two_pass": true, + "vocab_chunk": 8192 + }, + "comparison_kind": "reproduction_confirmation", + "context_depth_buckets": null, + "created_utc": "2026-09-07T12:39:47Z", + "determinism": { + "cold_start_per_run": null, + "distinct_evidence_hash_count": 1, + "evidence_hashes": [ + "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39" + ], + "evidence_kind": "hidden_state_tensor_sha256", + "identical_across_runs": null, + "max_run_mean": 0.0, + "min_run_mean": 0.0, + "note": "one comparison of two sealed captures. identical_across_runs is null, not true: that claim needs two independently produced captures of the SAME weights (SC-2), which is a different receipt.", + "population_stddev_of_run_means": 0.0, + "run_count": 1, + "run_means": [ + 0.0 + ] + }, + "disclosures": [ + { + "affects_comparability": false, + "code": "shared_reference_head", + "detail": "HEAD-1a: both captures declare the same lm_head tensor content digest (2364995d4009); one head applied to both sides is a shared APPLICATION of identical WEIGHTS.", + "severity": "info" + } + ], + "estimator": { + "accumulation_dtype": "float64", + "head_policy": "shared_reference_head", + "hidden_dtype": "bf16", + "logits_dtype": "float32", + "softmax_note": "full vocabulary, torch.log_softmax in float64; no truncation, no top-k, no clamp. A non-finite intermediate is a hard refusal.", + "stack_relation": "same_stack", + "two_pass": true, + "vocab_chunk": 8192, + "zero_handling": "exact zero asserted, not rounded" + }, + "format_version": 1, + "gates": { + "coverage": { + "detail": "4 of 4/4 declared records shared", + "overridden_by": null, + "passed": true + }, + "decode": { + "detail": "self-compare: both sides are the same artifact; the weights-decode caveats apply to a measurement against a reference, not to SC-1", + "overridden_by": null, + "passed": true + }, + "form": { + "detail": "hidden vs hidden", + "overridden_by": null, + "passed": true + }, + "geometry": { + "detail": "vocab_size 260 equal; hidden_width 64", + "overridden_by": null, + "passed": true + }, + "head": { + "detail": "HEAD-1a: identical head content digest on both sides", + "overridden_by": null, + "passed": true + }, + "lane": { + "detail": "lane=other vs other", + "overridden_by": null, + "passed": true + }, + "lossy": { + "detail": "lossy_codec null on both sides", + "overridden_by": null, + "passed": true + }, + "panel": { + "detail": "suite_token_hash_sha256 equal; 4 shared records; per-record token and mask digests equal; scoring_window equal", + "overridden_by": null, + "passed": true + }, + "seal": { + "detail": "both manifests self-seal and checksums.txt verified; every tensor_content_sha256 recomputed", + "overridden_by": null, + "passed": true + }, + "stack": { + "detail": "lane_identity equal / stack_fingerprint equal -> same_stack", + "overridden_by": null, + "passed": true + } + }, + "high_kld_contexts": [ + { + "allocation_stratum": null, + "domain": "garden", + "index": 0, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0000" + }, + { + "allocation_stratum": null, + "domain": "arithmetic", + "index": 1, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0001" + }, + { + "allocation_stratum": null, + "domain": "code", + "index": 2, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0002" + }, + { + "allocation_stratum": null, + "domain": "instructions", + "index": 3, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0003" + } + ], + "kl": { + "max": 0.0, + "mean": 0.0, + "median": 0.0, + "p95": 0.0, + "p99": 0.0, + "p99_9": 0.0 + }, + "kl_macro_stratum_mean": null, + "kl_micro_token_mean": 0.0, + "measurement_scope": { + "contexts": 4, + "covers_full_panel": true, + "position_filter": "all", + "positions_per_context": 63, + "scored_positions": 252, + "subset_detail": null + }, + "metric": { + "direction": "reference_to_candidate", + "direction_label": "KL(reference || candidate)", + "higher_is_better": false, + "name": "mean_tokenwise_kld", + "units": "nats", + "value": 0.0 + }, + "panel": { + "context_length": 64, + "contexts": 4, + "panel_id": "panel--panel", + "panel_token_sha256_legacy": "3c9467c85be43d238926f6d18bf825c2e4748814c95b8b0e8b8f1420546c3089", + "scored_positions": 252, + "scoring_window": { + "dropped_positions_total": 0, + "min_left_context_tokens": 1, + "policy": "every causal prediction position of every window is scored; nothing is dropped", + "score_from": 0, + "windowed": false + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + }, + "tokenizer_candidate": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + }, + "tokenizer_identity_equal": true, + "tokenizer_reference": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } + }, + "per_context": [ + { + "allocation_stratum": null, + "domain": "garden", + "index": 0, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0000" + }, + { + "allocation_stratum": null, + "domain": "arithmetic", + "index": 1, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0001" + }, + { + "allocation_stratum": null, + "domain": "code", + "index": 2, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0002" + }, + { + "allocation_stratum": null, + "domain": "instructions", + "index": 3, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0003" + } + ], + "per_domain": null, + "per_stratum": null, + "receipt_sha256": "4910833e5cc175ea351055e567c5d896475b4020598359291aedc958d8ada382", + "reference": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "dataset_id": "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "dataset_sha256": "56588f20f9cf055301f83a828fa75fa94c1e26593e64a07c5c6c4e38e9454563", + "form": "hidden", + "head": { + "bits": 16, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510" + }, + "label": "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "lane": "other", + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "repository": "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "revision": null, + "role": "root", + "scope_digest": "attn.o=native:bf16@16|attn.qkv=native:bf16@16|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=native:bf16@16|mlp.gate=native:bf16@16|mlp.up=native:bf16@16|moe.experts=native:bf16@16|norm=native:bf16@16|head=native|kv=bf16", + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd", + "weights": { + "artifact_ref": null, + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "codec": null, + "config_sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "declared_bits": null, + "declared_head_bits": 16, + "index_sha256": null, + "model_ref": null, + "model_revision": "45563636ef723acfb826755493447dc40c7a0c37", + "quantized": false, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37" + } + }, + "schema": "malaiwah.fidelity-comparison-receipt.v1", + "self_compare": { + "asserted_exact_zero": true, + "capture_content_digest_equal": true, + "expected_tokenwise_bytes": 2144, + "expected_tokenwise_sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d", + "force_compute_agreed": true, + "head_digest_equal": true, + "weights_identity_equal": true + }, + "submission": { + "emitted": false, + "path": null, + "receipt_sha256": null, + "refusal": "comparison_kind is reproduction_confirmation, not measurement; bin/fidelity/receipt.py::_scan_for_unsubmittable is the second, independent refusal axis.", + "submission_schema": null + }, + "tokenwise": { + "bytes": 2144, + "path": "tokenwise-kld.npy", + "sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d" + }, + "top1_agreement": 1.0, + "top1_discordant_contexts": [], + "uncertainty": { + "ci95_high": null, + "ci95_low": null, + "cluster_unit": null, + "clusters": null, + "method": "none", + "samples": null, + "seed": null + } +} diff --git a/raw/candidates/fp8-ue8m0/model/cpu-reproduction-summary.json b/raw/candidates/fp8-ue8m0/model/cpu-reproduction-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..7fe4e433fbfabcad4ab3781b796fbd3439d5db17 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/model/cpu-reproduction-summary.json @@ -0,0 +1,851 @@ +{ + "captures": { + "first": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "cold_run": "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "dataset_sha256": "56588f20f9cf055301f83a828fa75fa94c1e26593e64a07c5c6c4e38e9454563", + "generation_sanity_probe": { + "degenerate": false, + "enforced": false, + "entropy_nats": 5.548019647470335, + "expect": null, + "logit_spread": 0.986328125, + "note": "one extra window through the same schedule; its hidden state is discarded and never enters the dataset.", + "prompt": "The capital of France is", + "schema": "malaiwah.generation-sanity-probe.v1", + "status": "recorded", + "top1_id": 113, + "top1_probability": 0.006720104384265371, + "top1_text": "�", + "top_k": [ + { + "id": 113, + "probability": 0.006720104384265371, + "text": "�" + }, + { + "id": 237, + "probability": 0.006412368399474785, + "text": "�" + }, + { + "id": 193, + "probability": 0.006035639491843906, + "text": "\u0001" + }, + { + "id": 236, + "probability": 0.0055386141320063614, + "text": "�" + }, + { + "id": 44, + "probability": 0.0054740873228682424, + "text": "I" + } + ], + "uniform_entropy_nats": 5.560681631015528, + "vocab_size": 260 + }, + "head_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "memory_report": { + "context_length": 64, + "decoder_layers": null, + "device": "cpu", + "hidden_size": 64, + "layer_residency": null, + "model": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "peak_resident_weight_bytes": 555776, + "peak_resident_weight_detail": { + "buffers": 128, + "parameters": 555648, + "total": 555776 + }, + "peak_resident_weight_gb": 0.001, + "peak_rss_bytes": 367374336, + "peak_rss_gb": 0.367, + "resident_weight_note": "the maximum, over the run, of the materialised parameter+buffer bytes. On the CPU path peak_rss_bytes ALSO counts the safetensors mmap page cache, which is evictable and is not held by the schedule; this figure is not confounded by it. On CUDA, peak_cuda_allocated_bytes is the authoritative number because it includes activations and workspace and has no page cache.", + "rss_units_source": "Linux ru_maxrss", + "schedule": "window-outer", + "vocab_size": 260, + "windows": 4 + }, + "path": "first", + "pid": 406991, + "resources": { + "bytes": { + "checkpoint_read": 572479, + "hidden_d2h": 36616, + "weights_h2d": null + }, + "checkpoint_bytes": 572479, + "checkpoint_files": 2, + "device_name": null, + "forward_timing": "wall-clock", + "note": "provenance, not identity: peaks and stage seconds this run measured; forward_sum is device time under cuda-events, wall time otherwise; seal covers head serialisation up to this block's assembly", + "peak_cuda_allocated_bytes": null, + "peak_cuda_reserved_bytes": null, + "peak_resident_weight_bytes": 555776, + "peak_rss_bytes": 367374336, + "rss_units_source": "Linux ru_maxrss", + "seconds": { + "decode_sum": null, + "elapsed": 2.448, + "fill_sum": null, + "forward_sum": 0.126, + "identity": 0.005, + "layer_load_max": null, + "layer_load_sum": null, + "layer_loads": null, + "resident_load": 2.283, + "seal": 0.007 + } + }, + "runtime_versions": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 406991, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd" + }, + "repeat": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "cold_run": "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d", + "dataset_sha256": "c3ff6c32dc57502825d3ca3ac2133ed6a4c31e7bc7602191d595ee044ebe9048", + "generation_sanity_probe": { + "degenerate": false, + "enforced": false, + "entropy_nats": 5.548019647470335, + "expect": null, + "logit_spread": 0.986328125, + "note": "one extra window through the same schedule; its hidden state is discarded and never enters the dataset.", + "prompt": "The capital of France is", + "schema": "malaiwah.generation-sanity-probe.v1", + "status": "recorded", + "top1_id": 113, + "top1_probability": 0.006720104384265371, + "top1_text": "�", + "top_k": [ + { + "id": 113, + "probability": 0.006720104384265371, + "text": "�" + }, + { + "id": 237, + "probability": 0.006412368399474785, + "text": "�" + }, + { + "id": 193, + "probability": 0.006035639491843906, + "text": "\u0001" + }, + { + "id": 236, + "probability": 0.0055386141320063614, + "text": "�" + }, + { + "id": 44, + "probability": 0.0054740873228682424, + "text": "I" + } + ], + "uniform_entropy_nats": 5.560681631015528, + "vocab_size": 260 + }, + "head_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "memory_report": { + "context_length": 64, + "decoder_layers": null, + "device": "cpu", + "hidden_size": 64, + "layer_residency": null, + "model": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "peak_resident_weight_bytes": 555776, + "peak_resident_weight_detail": { + "buffers": 128, + "parameters": 555648, + "total": 555776 + }, + "peak_resident_weight_gb": 0.001, + "peak_rss_bytes": 367198208, + "peak_rss_gb": 0.367, + "resident_weight_note": "the maximum, over the run, of the materialised parameter+buffer bytes. On the CPU path peak_rss_bytes ALSO counts the safetensors mmap page cache, which is evictable and is not held by the schedule; this figure is not confounded by it. On CUDA, peak_cuda_allocated_bytes is the authoritative number because it includes activations and workspace and has no page cache.", + "rss_units_source": "Linux ru_maxrss", + "schedule": "window-outer", + "vocab_size": 260, + "windows": 4 + }, + "path": "repeat", + "pid": 409089, + "resources": { + "bytes": { + "checkpoint_read": 572479, + "hidden_d2h": 36616, + "weights_h2d": null + }, + "checkpoint_bytes": 572479, + "checkpoint_files": 2, + "device_name": null, + "forward_timing": "wall-clock", + "note": "provenance, not identity: peaks and stage seconds this run measured; forward_sum is device time under cuda-events, wall time otherwise; seal covers head serialisation up to this block's assembly", + "peak_cuda_allocated_bytes": null, + "peak_cuda_reserved_bytes": null, + "peak_resident_weight_bytes": 555776, + "peak_rss_bytes": 367198208, + "rss_units_source": "Linux ru_maxrss", + "seconds": { + "decode_sum": null, + "elapsed": 2.619, + "fill_sum": null, + "forward_sum": 0.128, + "identity": 0.004, + "layer_load_max": null, + "layer_load_sum": null, + "layer_loads": null, + "resident_load": 2.453, + "seal": 0.005 + } + }, + "runtime_versions": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 409089, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd" + } + }, + "commands": [ + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--model", + "/tmp/qfs-complete-tiny-fixture/model", + "--weights-repository", + "malaiwah/glm-moe-dsa-tiny-random-bf16", + "--model-revision", + "45563636ef723acfb826755493447dc40c7a0c37", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-complete-tiny-fixture/reproduction/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--role", + "root", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--schedule", + "window-outer", + "--dataset-id", + "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "--dataset-name", + "GLM MoE DSA tiny random CPU root", + "--repository", + "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "--author", + "malaiwah", + "--disclosures", + "[{\"code\":\"random_init_cpu_fixture\",\"severity\":\"info\",\"affects_comparability\":false,\"detail\":\"Complete randomly initialized tiny glm_moe_dsa checkpoint; CPU smoke fixture only, not trained quality evidence or a registry measurement. Lane other denotes CPU, not local-cuda-budget.\"}]", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--run-name", + "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "--cold-run", + "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "--memory-report", + "/tmp/qfs-complete-tiny-fixture/reproduction/first.memory.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 6.485651439987123, + "name": "capture-first", + "pid": 406991, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 406991, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "capture-first.stderr.log", + "stdout": "capture-first.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "verify", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/first.verify.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.575829998124391, + "name": "verify-first", + "pid": 408026, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 408026, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "verify-first.stderr.log", + "stdout": "verify-first.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "validate", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--strict", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/first.strict.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.8252810118719935, + "name": "strict-first", + "pid": 408494, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 408494, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "strict-first.stderr.log", + "stdout": "strict-first.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--model", + "/tmp/qfs-complete-tiny-fixture/model", + "--weights-repository", + "malaiwah/glm-moe-dsa-tiny-random-bf16", + "--model-revision", + "45563636ef723acfb826755493447dc40c7a0c37", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-complete-tiny-fixture/reproduction/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--role", + "root", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--schedule", + "window-outer", + "--dataset-id", + "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "--dataset-name", + "GLM MoE DSA tiny random CPU root", + "--repository", + "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "--author", + "malaiwah", + "--disclosures", + "[{\"code\":\"random_init_cpu_fixture\",\"severity\":\"info\",\"affects_comparability\":false,\"detail\":\"Complete randomly initialized tiny glm_moe_dsa checkpoint; CPU smoke fixture only, not trained quality evidence or a registry measurement. Lane other denotes CPU, not local-cuda-budget.\"}]", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--run-name", + "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d", + "--cold-run", + "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d", + "--memory-report", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat.memory.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 6.431767418049276, + "name": "capture-repeat", + "pid": 409089, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 409089, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "capture-repeat.stderr.log", + "stdout": "capture-repeat.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "verify", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat.verify.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.7754629959817976, + "name": "verify-repeat", + "pid": 409951, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 409951, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "verify-repeat.stderr.log", + "stdout": "verify-repeat.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "validate", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--strict", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat.strict.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.423026765929535, + "name": "strict-repeat", + "pid": 410549, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 410549, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "strict-repeat.stderr.log", + "stdout": "strict-repeat.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "compare", + "--reference", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--candidate", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction/comparison", + "--self-compare", + "--force-compute", + "--device", + "cpu", + "--replay-device", + "numpy", + "--replay-dtype", + "float32", + "--vocab-chunk", + "8192", + "--chunk-positions", + "128", + "--verify-tensors", + "--reference-label", + "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "--candidate-label", + "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.7282893639057875, + "name": "compare", + "pid": 411043, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 411043, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "compare.stderr.log", + "stdout": "compare.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "validate", + "--receipt", + "/tmp/qfs-complete-tiny-fixture/reproduction/comparison/comparison-receipt.json", + "--strict", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/comparison.validate.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.424050308065489, + "name": "validate-comparison", + "pid": 411487, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 411487, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "validate-comparison.stderr.log", + "stdout": "validate-comparison.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + } + ], + "comparison": { + "comparator": { + "accumulation_dtype": "float64", + "bf16_reduced_precision_reduction": false, + "cublas_workspace_config": null, + "deterministic_algorithms": true, + "device": "cpu", + "estimator_backend": "torch:k6_kld_report._token_kld", + "head_applied_candidate_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "head_applied_reference_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "head_applied_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "logprob_dtype": "float64", + "position_block": 128, + "replay_backend": "numpy:cpu:float32", + "replay_env": { + "blas_configuration": "OpenBLAS 0.3.34.106.0 USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell MAX_THREADS=64", + "blas_name": "scipy-openblas", + "blas_threads": 2, + "blas_threads_source": "ctypes:scipy_openblas_get_num_threads64_", + "blas_version": "0.3.34.106.0", + "cpu_model": "Intel(R) Xeon(R) CPU X5570 @ 2.93GHz", + "library": "numpy", + "numpy_version": "2.5.3", + "replay_dtype": "float32" + }, + "replay_peak_device_bytes": null, + "short_circuited": true, + "source_file_hashes_verified": true, + "tensor_content_digests_verified": true, + "tf32": false, + "tool": { + "entrypoint": "bin/fidelity-dataset compare", + "note": "the fp64 estimator is k6_kld_report._token_kld, imported not copied, whenever torch is importable; estimator_backend records which path ran." + }, + "two_pass": true, + "vocab_chunk": 8192 + }, + "comparison_kind": "reproduction_confirmation", + "kl": { + "max": 0.0, + "mean": 0.0, + "median": 0.0, + "p95": 0.0, + "p99": 0.0, + "p99_9": 0.0 + }, + "measurement_scope": { + "contexts": 4, + "covers_full_panel": true, + "position_filter": "all", + "positions_per_context": 63, + "scored_positions": 252, + "subset_detail": null + }, + "metric": { + "direction": "reference_to_candidate", + "direction_label": "KL(reference || candidate)", + "higher_is_better": false, + "name": "mean_tokenwise_kld", + "units": "nats", + "value": 0.0 + }, + "note": "QFS retains its hash-proof result and top-1 value for reproduction confirmations; --force-compute independently runs the estimator and requires its tokenwise KL array to agree exactly. short_circuited=true therefore does not mean replay was skipped.", + "receipt": "comparison/comparison-receipt.json", + "receipt_sha256": "4910833e5cc175ea351055e567c5d896475b4020598359291aedc958d8ada382", + "self_compare": { + "asserted_exact_zero": true, + "capture_content_digest_equal": true, + "expected_tokenwise_bytes": 2144, + "expected_tokenwise_sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d", + "force_compute_agreed": true, + "head_digest_equal": true, + "weights_identity_equal": true + }, + "tokenwise": { + "bytes": 2144, + "path": "tokenwise-kld.npy", + "sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d" + }, + "top1_agreement": 1.0 + }, + "cpu_threads": 2, + "dataset_id": "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "dataset_repository": "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "device": "cpu", + "driver_argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "/tmp/qfs-complete-tiny-fixture/verify_cpu.py", + "--model-dir", + "/tmp/qfs-complete-tiny-fixture/model", + "--model-repository", + "malaiwah/glm-moe-dsa-tiny-random-bf16", + "--model-revision", + "45563636ef723acfb826755493447dc40c7a0c37", + "--panel-dir", + "/tmp/qfs-complete-tiny-fixture/panel", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction", + "--qfs-root", + "/tmp/qfs-explorer-development" + ], + "driver_sha256": "2e507993f0085a72d5236527942a7143fd036d56b82223b26e90889de5cd9f98", + "dtype": "bfloat16", + "elapsed_seconds": 34.85638747992925, + "lane": "other", + "lane_description": "local CPU random-init fixture", + "model_repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "model_revision": "45563636ef723acfb826755493447dc40c7a0c37", + "panel_binding": "panel-binding.json", + "panel_binding_sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "provenance_note": "Local QFS source bytes are hashed; no source commit is asserted. The caller supplies an immutable model pin; QFS hashes the local checkpoint. This script does not independently prove Hub-to-local weight equality.", + "qfs_source_files": { + "bin/fidelity/dscompare.py": "4a53f735e1e3fb8bd739854451b57f34e8369bffa9fd4f7b7fd935fb2e7d52df", + "bin/fidelity/dsvalidate.py": "a9d6cd57e801e3ef044a37635e24518c83dbc6d1ec8a4c0b4b5d1b24483ca8d1", + "bin/fidelity/panel.py": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "bin/fidelity_dataset.py": "ac62b63bbfde67e4d5cacecf9cd417193c50f417a6749cc15ee6f1610c153a4e", + "engines/tools/hf_capture.py": "200ba12ca74fb97531307965cbbaa5c10553a5c26e008e524ea2d8aecb005b95" + }, + "schema": "malaiwah.glm-moe-dsa-tiny-cpu-reproduction.v1", + "scope": "Random-init CPU reproduction only; no quality claim or registry submission.", + "status": "passed" +} diff --git a/raw/candidates/fp8-ue8m0/model/generation_config.json b/raw/candidates/fp8-ue8m0/model/generation_config.json new file mode 100644 index 0000000000000000000000000000000000000000..59bd0680606c94f6570a92e60fa4acd2e2170f70 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/model/generation_config.json @@ -0,0 +1,10 @@ +{ + "_from_model_config": true, + "bos_token_id": 1, + "eos_token_id": 2, + "output_attentions": false, + "output_hidden_states": false, + "pad_token_id": 0, + "transformers_version": "5.16.1", + "use_cache": true +} diff --git a/raw/candidates/fp8-ue8m0/model/hub-checkpoint-verification.json b/raw/candidates/fp8-ue8m0/model/hub-checkpoint-verification.json new file mode 100644 index 0000000000000000000000000000000000000000..b9648c8ae18de0fb86ce18398175c6686afbd7b2 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/model/hub-checkpoint-verification.json @@ -0,0 +1,32 @@ +{ + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "downloaded_from_hub": true, + "files": { + "config.json": { + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "bytes": 1479, + "matches_build": true + }, + "generation_config.json": { + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "bytes": 216, + "matches_build": true + }, + "model.safetensors": { + "sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1", + "bytes": 571000, + "matches_build": true + }, + "tokenizer.json": { + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "bytes": 6763, + "matches_build": true + }, + "tokenizer_config.json": { + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63", + "bytes": 236, + "matches_build": true + } + } +} diff --git a/raw/candidates/fp8-ue8m0/model/loader-verification.json b/raw/candidates/fp8-ue8m0/model/loader-verification.json new file mode 100644 index 0000000000000000000000000000000000000000..871fc889a9d3a025569770a96e83ff5f0a2fb420 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/model/loader-verification.json @@ -0,0 +1,60 @@ +{ + "schema": "malaiwah.tiny-fixture-loader-check.v1", + "checkpoint_sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1", + "runtime": { + "torch": "2.11.0+cpu", + "transformers": "5.16.1", + "device": "cpu", + "threads": 2 + }, + "qfs_load_report": { + "observed": true, + "conversion_errors_visible": true, + "missing_keys": [], + "unexpected_keys": [], + "mismatched_keys": [], + "error_msgs": [], + "conversion_errors": {} + }, + "native_save_reload_tensor_equality": true, + "independent_build_files_byte_equal": true, + "tokenizer_roundtrip_examples": [ + "The CPU fixture carries a complete output head and real sparse attention.", + "Small deterministic tensors make a repeatable pipeline experiment.", + "Unicode roundtrip: caf\u00e9, snow \u96ea, punctuation!", + "The same bytes must survive saving and loading without repair." + ], + "forward_shape": [ + 4, + 64, + 260 + ], + "forward_all_finite": true, + "forward_logit_std": 0.16186420619487762, + "load_seconds": 2.1670503590721637, + "batch_forward_seconds": 0.05775680090300739, + "greedy_generation_seconds": 0.04374621692113578, + "generated_token_ids": [ + 1, + 55, + 75, + 72, + 224, + 38, + 51, + 56, + 224, + 73, + 76, + 91, + 87, + 88, + 85, + 72, + 171, + 105, + 156, + 236 + ], + "peak_process_rss_mib": 351.9296875 +} diff --git a/raw/candidates/fp8-ue8m0/model/model.safetensors b/raw/candidates/fp8-ue8m0/model/model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..e46d8d1ffd266cf14aa72c0a31c1a70d5a4d1121 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/model/model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e26433482b4d0c4e0cf15cd313cfaf140708378cce3e73866bb8badc8298a159 +size 340878 diff --git a/raw/candidates/fp8-ue8m0/model/model.safetensors.index.json b/raw/candidates/fp8-ue8m0/model/model.safetensors.index.json new file mode 100644 index 0000000000000000000000000000000000000000..7591fc8f570ad311a9631f5df8ea3de97c06f916 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/model/model.safetensors.index.json @@ -0,0 +1,256 @@ +{ + "metadata": { + "total_size": 313678 + }, + "weight_map": { + "model.layers.1.mlp.gate.e_score_correction_bias": "model.safetensors", + "model.layers.2.mlp.gate.e_score_correction_bias": "model.safetensors", + "model.layers.3.mlp.gate.e_score_correction_bias": "model.safetensors", + "lm_head.weight": "model.safetensors", + "model.embed_tokens.weight": "model.safetensors", + "model.layers.0.input_layernorm.weight": "model.safetensors", + "model.layers.0.mlp.down_proj.weight": "model.safetensors", + "model.layers.0.mlp.down_proj.scale": "model.safetensors", + "model.layers.0.mlp.gate_proj.weight": "model.safetensors", + "model.layers.0.mlp.gate_proj.scale": "model.safetensors", + "model.layers.0.mlp.up_proj.weight": "model.safetensors", + "model.layers.0.mlp.up_proj.scale": "model.safetensors", + "model.layers.0.post_attention_layernorm.weight": "model.safetensors", + "model.layers.0.self_attn.indexer.k_norm.bias": "model.safetensors", + "model.layers.0.self_attn.indexer.k_norm.weight": "model.safetensors", + "model.layers.0.self_attn.indexer.weights_proj.weight": "model.safetensors", + "model.layers.0.self_attn.indexer.weights_proj.scale": "model.safetensors", + "model.layers.0.self_attn.indexer.wk.weight": "model.safetensors", + "model.layers.0.self_attn.indexer.wk.scale": "model.safetensors", + "model.layers.0.self_attn.indexer.wq_b.weight": "model.safetensors", + "model.layers.0.self_attn.indexer.wq_b.scale": "model.safetensors", + "model.layers.0.self_attn.kv_a_layernorm.weight": "model.safetensors", + "model.layers.0.self_attn.kv_a_proj_with_mqa.weight": "model.safetensors", + "model.layers.0.self_attn.kv_a_proj_with_mqa.scale": "model.safetensors", + "model.layers.0.self_attn.kv_b_proj.weight": "model.safetensors", + "model.layers.0.self_attn.kv_b_proj.scale": "model.safetensors", + "model.layers.0.self_attn.o_proj.weight": "model.safetensors", + "model.layers.0.self_attn.o_proj.scale": "model.safetensors", + "model.layers.0.self_attn.q_a_layernorm.weight": "model.safetensors", + "model.layers.0.self_attn.q_a_proj.weight": "model.safetensors", + "model.layers.0.self_attn.q_a_proj.scale": "model.safetensors", + "model.layers.0.self_attn.q_b_proj.weight": "model.safetensors", + "model.layers.0.self_attn.q_b_proj.scale": "model.safetensors", + "model.layers.1.input_layernorm.weight": "model.safetensors", + "model.layers.1.mlp.experts.0.down_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.0.down_proj.scale": "model.safetensors", + "model.layers.1.mlp.experts.0.gate_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.0.gate_proj.scale": "model.safetensors", + "model.layers.1.mlp.experts.0.up_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.0.up_proj.scale": "model.safetensors", + "model.layers.1.mlp.experts.1.down_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.1.down_proj.scale": "model.safetensors", + "model.layers.1.mlp.experts.1.gate_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.1.gate_proj.scale": "model.safetensors", + "model.layers.1.mlp.experts.1.up_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.1.up_proj.scale": "model.safetensors", + "model.layers.1.mlp.experts.2.down_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.2.down_proj.scale": "model.safetensors", + "model.layers.1.mlp.experts.2.gate_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.2.gate_proj.scale": "model.safetensors", + "model.layers.1.mlp.experts.2.up_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.2.up_proj.scale": "model.safetensors", + "model.layers.1.mlp.experts.3.down_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.3.down_proj.scale": "model.safetensors", + "model.layers.1.mlp.experts.3.gate_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.3.gate_proj.scale": "model.safetensors", + "model.layers.1.mlp.experts.3.up_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.3.up_proj.scale": "model.safetensors", + "model.layers.1.mlp.experts.4.down_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.4.down_proj.scale": "model.safetensors", + "model.layers.1.mlp.experts.4.gate_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.4.gate_proj.scale": "model.safetensors", + "model.layers.1.mlp.experts.4.up_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.4.up_proj.scale": "model.safetensors", + "model.layers.1.mlp.experts.5.down_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.5.down_proj.scale": "model.safetensors", + "model.layers.1.mlp.experts.5.gate_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.5.gate_proj.scale": "model.safetensors", + "model.layers.1.mlp.experts.5.up_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.5.up_proj.scale": "model.safetensors", + "model.layers.1.mlp.experts.6.down_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.6.down_proj.scale": "model.safetensors", + "model.layers.1.mlp.experts.6.gate_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.6.gate_proj.scale": "model.safetensors", + "model.layers.1.mlp.experts.6.up_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.6.up_proj.scale": "model.safetensors", + "model.layers.1.mlp.experts.7.down_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.7.down_proj.scale": "model.safetensors", + "model.layers.1.mlp.experts.7.gate_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.7.gate_proj.scale": "model.safetensors", + "model.layers.1.mlp.experts.7.up_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.7.up_proj.scale": "model.safetensors", + "model.layers.1.mlp.gate.weight": "model.safetensors", + "model.layers.1.mlp.shared_experts.down_proj.weight": "model.safetensors", + "model.layers.1.mlp.shared_experts.down_proj.scale": "model.safetensors", + "model.layers.1.mlp.shared_experts.gate_proj.weight": "model.safetensors", + "model.layers.1.mlp.shared_experts.gate_proj.scale": "model.safetensors", + "model.layers.1.mlp.shared_experts.up_proj.weight": "model.safetensors", + "model.layers.1.mlp.shared_experts.up_proj.scale": "model.safetensors", + "model.layers.1.post_attention_layernorm.weight": "model.safetensors", + "model.layers.1.self_attn.kv_a_layernorm.weight": "model.safetensors", + "model.layers.1.self_attn.kv_a_proj_with_mqa.weight": "model.safetensors", + "model.layers.1.self_attn.kv_a_proj_with_mqa.scale": "model.safetensors", + "model.layers.1.self_attn.kv_b_proj.weight": "model.safetensors", + "model.layers.1.self_attn.kv_b_proj.scale": "model.safetensors", + "model.layers.1.self_attn.o_proj.weight": "model.safetensors", + "model.layers.1.self_attn.o_proj.scale": "model.safetensors", + "model.layers.1.self_attn.q_a_layernorm.weight": "model.safetensors", + "model.layers.1.self_attn.q_a_proj.weight": "model.safetensors", + "model.layers.1.self_attn.q_a_proj.scale": "model.safetensors", + "model.layers.1.self_attn.q_b_proj.weight": "model.safetensors", + "model.layers.1.self_attn.q_b_proj.scale": "model.safetensors", + "model.layers.2.input_layernorm.weight": "model.safetensors", + "model.layers.2.mlp.experts.0.down_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.0.down_proj.scale": "model.safetensors", + "model.layers.2.mlp.experts.0.gate_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.0.gate_proj.scale": "model.safetensors", + "model.layers.2.mlp.experts.0.up_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.0.up_proj.scale": "model.safetensors", + "model.layers.2.mlp.experts.1.down_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.1.down_proj.scale": "model.safetensors", + "model.layers.2.mlp.experts.1.gate_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.1.gate_proj.scale": "model.safetensors", + "model.layers.2.mlp.experts.1.up_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.1.up_proj.scale": "model.safetensors", + "model.layers.2.mlp.experts.2.down_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.2.down_proj.scale": "model.safetensors", + "model.layers.2.mlp.experts.2.gate_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.2.gate_proj.scale": "model.safetensors", + "model.layers.2.mlp.experts.2.up_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.2.up_proj.scale": "model.safetensors", + "model.layers.2.mlp.experts.3.down_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.3.down_proj.scale": "model.safetensors", + "model.layers.2.mlp.experts.3.gate_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.3.gate_proj.scale": "model.safetensors", + "model.layers.2.mlp.experts.3.up_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.3.up_proj.scale": "model.safetensors", + "model.layers.2.mlp.experts.4.down_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.4.down_proj.scale": "model.safetensors", + "model.layers.2.mlp.experts.4.gate_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.4.gate_proj.scale": "model.safetensors", + "model.layers.2.mlp.experts.4.up_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.4.up_proj.scale": "model.safetensors", + "model.layers.2.mlp.experts.5.down_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.5.down_proj.scale": "model.safetensors", + "model.layers.2.mlp.experts.5.gate_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.5.gate_proj.scale": "model.safetensors", + "model.layers.2.mlp.experts.5.up_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.5.up_proj.scale": "model.safetensors", + "model.layers.2.mlp.experts.6.down_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.6.down_proj.scale": "model.safetensors", + "model.layers.2.mlp.experts.6.gate_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.6.gate_proj.scale": "model.safetensors", + "model.layers.2.mlp.experts.6.up_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.6.up_proj.scale": "model.safetensors", + "model.layers.2.mlp.experts.7.down_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.7.down_proj.scale": "model.safetensors", + "model.layers.2.mlp.experts.7.gate_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.7.gate_proj.scale": "model.safetensors", + "model.layers.2.mlp.experts.7.up_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.7.up_proj.scale": "model.safetensors", + "model.layers.2.mlp.gate.weight": "model.safetensors", + "model.layers.2.mlp.shared_experts.down_proj.weight": "model.safetensors", + "model.layers.2.mlp.shared_experts.down_proj.scale": "model.safetensors", + "model.layers.2.mlp.shared_experts.gate_proj.weight": "model.safetensors", + "model.layers.2.mlp.shared_experts.gate_proj.scale": "model.safetensors", + "model.layers.2.mlp.shared_experts.up_proj.weight": "model.safetensors", + "model.layers.2.mlp.shared_experts.up_proj.scale": "model.safetensors", + "model.layers.2.post_attention_layernorm.weight": "model.safetensors", + "model.layers.2.self_attn.indexer.k_norm.bias": "model.safetensors", + "model.layers.2.self_attn.indexer.k_norm.weight": "model.safetensors", + "model.layers.2.self_attn.indexer.weights_proj.weight": "model.safetensors", + "model.layers.2.self_attn.indexer.weights_proj.scale": "model.safetensors", + "model.layers.2.self_attn.indexer.wk.weight": "model.safetensors", + "model.layers.2.self_attn.indexer.wk.scale": "model.safetensors", + "model.layers.2.self_attn.indexer.wq_b.weight": "model.safetensors", + "model.layers.2.self_attn.indexer.wq_b.scale": "model.safetensors", + "model.layers.2.self_attn.kv_a_layernorm.weight": "model.safetensors", + "model.layers.2.self_attn.kv_a_proj_with_mqa.weight": "model.safetensors", + "model.layers.2.self_attn.kv_a_proj_with_mqa.scale": "model.safetensors", + "model.layers.2.self_attn.kv_b_proj.weight": "model.safetensors", + "model.layers.2.self_attn.kv_b_proj.scale": "model.safetensors", + "model.layers.2.self_attn.o_proj.weight": "model.safetensors", + "model.layers.2.self_attn.o_proj.scale": "model.safetensors", + "model.layers.2.self_attn.q_a_layernorm.weight": "model.safetensors", + "model.layers.2.self_attn.q_a_proj.weight": "model.safetensors", + "model.layers.2.self_attn.q_a_proj.scale": "model.safetensors", + "model.layers.2.self_attn.q_b_proj.weight": "model.safetensors", + "model.layers.2.self_attn.q_b_proj.scale": "model.safetensors", + "model.layers.3.input_layernorm.weight": "model.safetensors", + "model.layers.3.mlp.experts.0.down_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.0.down_proj.scale": "model.safetensors", + "model.layers.3.mlp.experts.0.gate_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.0.gate_proj.scale": "model.safetensors", + "model.layers.3.mlp.experts.0.up_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.0.up_proj.scale": "model.safetensors", + "model.layers.3.mlp.experts.1.down_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.1.down_proj.scale": "model.safetensors", + "model.layers.3.mlp.experts.1.gate_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.1.gate_proj.scale": "model.safetensors", + "model.layers.3.mlp.experts.1.up_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.1.up_proj.scale": "model.safetensors", + "model.layers.3.mlp.experts.2.down_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.2.down_proj.scale": "model.safetensors", + "model.layers.3.mlp.experts.2.gate_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.2.gate_proj.scale": "model.safetensors", + "model.layers.3.mlp.experts.2.up_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.2.up_proj.scale": "model.safetensors", + "model.layers.3.mlp.experts.3.down_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.3.down_proj.scale": "model.safetensors", + "model.layers.3.mlp.experts.3.gate_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.3.gate_proj.scale": "model.safetensors", + "model.layers.3.mlp.experts.3.up_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.3.up_proj.scale": "model.safetensors", + "model.layers.3.mlp.experts.4.down_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.4.down_proj.scale": "model.safetensors", + "model.layers.3.mlp.experts.4.gate_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.4.gate_proj.scale": "model.safetensors", + "model.layers.3.mlp.experts.4.up_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.4.up_proj.scale": "model.safetensors", + "model.layers.3.mlp.experts.5.down_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.5.down_proj.scale": "model.safetensors", + "model.layers.3.mlp.experts.5.gate_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.5.gate_proj.scale": "model.safetensors", + "model.layers.3.mlp.experts.5.up_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.5.up_proj.scale": "model.safetensors", + "model.layers.3.mlp.experts.6.down_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.6.down_proj.scale": "model.safetensors", + "model.layers.3.mlp.experts.6.gate_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.6.gate_proj.scale": "model.safetensors", + "model.layers.3.mlp.experts.6.up_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.6.up_proj.scale": "model.safetensors", + "model.layers.3.mlp.experts.7.down_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.7.down_proj.scale": "model.safetensors", + "model.layers.3.mlp.experts.7.gate_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.7.gate_proj.scale": "model.safetensors", + "model.layers.3.mlp.experts.7.up_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.7.up_proj.scale": "model.safetensors", + "model.layers.3.mlp.gate.weight": "model.safetensors", + "model.layers.3.mlp.shared_experts.down_proj.weight": "model.safetensors", + "model.layers.3.mlp.shared_experts.down_proj.scale": "model.safetensors", + "model.layers.3.mlp.shared_experts.gate_proj.weight": "model.safetensors", + "model.layers.3.mlp.shared_experts.gate_proj.scale": "model.safetensors", + "model.layers.3.mlp.shared_experts.up_proj.weight": "model.safetensors", + "model.layers.3.mlp.shared_experts.up_proj.scale": "model.safetensors", + "model.layers.3.post_attention_layernorm.weight": "model.safetensors", + "model.layers.3.self_attn.kv_a_layernorm.weight": "model.safetensors", + "model.layers.3.self_attn.kv_a_proj_with_mqa.weight": "model.safetensors", + "model.layers.3.self_attn.kv_a_proj_with_mqa.scale": "model.safetensors", + "model.layers.3.self_attn.kv_b_proj.weight": "model.safetensors", + "model.layers.3.self_attn.kv_b_proj.scale": "model.safetensors", + "model.layers.3.self_attn.o_proj.weight": "model.safetensors", + "model.layers.3.self_attn.o_proj.scale": "model.safetensors", + "model.layers.3.self_attn.q_a_layernorm.weight": "model.safetensors", + "model.layers.3.self_attn.q_a_proj.weight": "model.safetensors", + "model.layers.3.self_attn.q_a_proj.scale": "model.safetensors", + "model.layers.3.self_attn.q_b_proj.weight": "model.safetensors", + "model.layers.3.self_attn.q_b_proj.scale": "model.safetensors", + "model.norm.weight": "model.safetensors" + } +} diff --git a/raw/candidates/fp8-ue8m0/model/panel.binding.json b/raw/candidates/fp8-ue8m0/model/panel.binding.json new file mode 100644 index 0000000000000000000000000000000000000000..573cea0b332c636bdda89b150f95cda307b89194 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/model/panel.binding.json @@ -0,0 +1,102 @@ +{ + "content": { + "archive": { + "algorithm": "sha256(ustar: sorted regular files; mode=0644; uid=gid=mtime=0)", + "bytes": 20480, + "compression": "none", + "format": "ustar", + "sha256": "389706dfa3335a75ec70a40d079995af1a60c05512334125dbd336790f12702f" + }, + "manifest": [ + { + "bytes": 192, + "path": "arrays/causal-mask-64.npy", + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02" + }, + { + "bytes": 384, + "path": "arrays/final-0000.tokens.npy", + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af" + }, + { + "bytes": 384, + "path": "arrays/final-0001.tokens.npy", + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea" + }, + { + "bytes": 384, + "path": "arrays/final-0002.tokens.npy", + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c" + }, + { + "bytes": 384, + "path": "arrays/final-0003.tokens.npy", + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a" + }, + { + "bytes": 4195, + "path": "panel.json", + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6" + }, + { + "bytes": 7808, + "path": "panel.receipt.json", + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263" + } + ], + "manifest_sha256": "e5f2d6410a6290da1197016c5b57ae522a3570665215ddc23e2a0bd45f912181" + }, + "panel": { + "bytes": 4195, + "context_length": 64, + "contexts": 4, + "file": "panel.json", + "id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "positions_per_context": 63, + "role": "final", + "scored_positions_total": 252, + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6", + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36" + }, + "receipt": { + "bytes": 7808, + "declared_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "file": "panel.receipt.json", + "receipt_file_sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "receipt_seal_mode": "self-blank" + }, + "schema": "malaiwah.resolved-panel.v1", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } +} diff --git a/raw/candidates/fp8-ue8m0/model/panel.sha256.json b/raw/candidates/fp8-ue8m0/model/panel.sha256.json new file mode 100644 index 0000000000000000000000000000000000000000..30e122a1cc6d1937fecc0d31e38e468bceefc9de --- /dev/null +++ b/raw/candidates/fp8-ue8m0/model/panel.sha256.json @@ -0,0 +1,83 @@ +{ + "binding_file": "panel.binding.json", + "binding_sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "context_length": 64, + "contexts": 4, + "model_repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "model_revision": "45563636ef723acfb826755493447dc40c7a0c37", + "panel_archive": { + "algorithm": "sha256(ustar: sorted regular files; mode=0644; uid=gid=mtime=0)", + "bytes": 20480, + "compression": "none", + "format": "ustar", + "sha256": "389706dfa3335a75ec70a40d079995af1a60c05512334125dbd336790f12702f" + }, + "panel_directory": "panel", + "panel_files": [ + { + "bytes": 192, + "path": "arrays/causal-mask-64.npy", + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02" + }, + { + "bytes": 384, + "path": "arrays/final-0000.tokens.npy", + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af" + }, + { + "bytes": 384, + "path": "arrays/final-0001.tokens.npy", + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea" + }, + { + "bytes": 384, + "path": "arrays/final-0002.tokens.npy", + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c" + }, + { + "bytes": 384, + "path": "arrays/final-0003.tokens.npy", + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a" + }, + { + "bytes": 4195, + "path": "panel.json", + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6" + }, + { + "bytes": 7808, + "path": "panel.receipt.json", + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263" + } + ], + "panel_id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "panel_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "purpose": "Synthetic CPU smoke only, not a quality benchmark.", + "revision_verification": "Caller-supplied published commit; local files byte-verified offline.", + "scored_positions_total": 252, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer_files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "tokenizer_files_verified": true, + "tokenizer_identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1" +} diff --git a/raw/candidates/fp8-ue8m0/model/provenance.json b/raw/candidates/fp8-ue8m0/model/provenance.json new file mode 100644 index 0000000000000000000000000000000000000000..daaaa9558a7afdae8b3fe697792d17e5b9aac153 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/model/provenance.json @@ -0,0 +1,269 @@ +{ + "source": { + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "a1a973330e4e912678adbd8ea41e8b86b1c9dccb" + }, + "format": "fp8-ue8m0", + "algorithm": "Build tiny FORMAT fixtures, optionally capture via integrated QFS layer-outer.\n\nNo optimizer-quality claim: deterministic CPU minmax/conservative-scale RTN.\nMXFP4 uses ceil(log2(group_max/6)); this is NOT CT's MX observer or Kimi QAT.\nNVFP4 uses a tensor maximum global, rounded E4M3 group scales, then E2M1\nnearest-even RTN. FP8 uses ceil(log2(block_max/448)) UE8M0 + E4M3 RTN.\nNo calibration, activation quantization, kernel parity, training or model code.\n", + "claim": "FORMAT fixture, not Kimi QAT/ModelOpt calibration/CT observer quality", + "reconstruction_scope": { + "scope": "weights-reconstructed/advisory; activation-not-captured", + "applied_to_weights": false, + "declared": { + "activation_scheme": "dynamic", + "scale_fmt": "ue8m0" + }, + "kv_cache_scheme": null, + "stored_components": [] + }, + "encoded_tensors": { + "model.layers.0.mlp.down_proj.weight": 0.00341796875, + "model.layers.0.mlp.gate_proj.weight": 0.00341796875, + "model.layers.0.mlp.up_proj.weight": 0.00390625, + "model.layers.0.self_attn.indexer.weights_proj.weight": 0.001953125, + "model.layers.0.self_attn.indexer.wk.weight": 0.001953125, + "model.layers.0.self_attn.indexer.wq_b.weight": 0.00390625, + "model.layers.0.self_attn.kv_a_proj_with_mqa.weight": 0.00341796875, + "model.layers.0.self_attn.kv_b_proj.weight": 0.001953125, + "model.layers.0.self_attn.o_proj.weight": 0.00390625, + "model.layers.0.self_attn.q_a_proj.weight": 0.00341796875, + "model.layers.0.self_attn.q_b_proj.weight": 0.00390625, + "model.layers.1.mlp.experts.0.down_proj.weight": 0.00390625, + "model.layers.1.mlp.experts.0.gate_proj.weight": 0.0029296875, + "model.layers.1.mlp.experts.0.up_proj.weight": 0.0029296875, + "model.layers.1.mlp.experts.1.down_proj.weight": 0.00341796875, + "model.layers.1.mlp.experts.1.gate_proj.weight": 0.0029296875, + "model.layers.1.mlp.experts.1.up_proj.weight": 0.0029296875, + "model.layers.1.mlp.experts.2.down_proj.weight": 0.00390625, + "model.layers.1.mlp.experts.2.gate_proj.weight": 0.0029296875, + "model.layers.1.mlp.experts.2.up_proj.weight": 0.0029296875, + "model.layers.1.mlp.experts.3.down_proj.weight": 0.00244140625, + "model.layers.1.mlp.experts.3.gate_proj.weight": 0.00244140625, + "model.layers.1.mlp.experts.3.up_proj.weight": 0.00341796875, + "model.layers.1.mlp.experts.4.down_proj.weight": 0.00244140625, + "model.layers.1.mlp.experts.4.gate_proj.weight": 0.001953125, + "model.layers.1.mlp.experts.4.up_proj.weight": 0.00341796875, + "model.layers.1.mlp.experts.5.down_proj.weight": 0.001953125, + "model.layers.1.mlp.experts.5.gate_proj.weight": 0.00341796875, + "model.layers.1.mlp.experts.5.up_proj.weight": 0.00390625, + "model.layers.1.mlp.experts.6.down_proj.weight": 0.00341796875, + "model.layers.1.mlp.experts.6.gate_proj.weight": 0.001953125, + "model.layers.1.mlp.experts.6.up_proj.weight": 0.00341796875, + "model.layers.1.mlp.experts.7.down_proj.weight": 0.001953125, + "model.layers.1.mlp.experts.7.gate_proj.weight": 0.001953125, + "model.layers.1.mlp.experts.7.up_proj.weight": 0.00390625, + "model.layers.1.mlp.shared_experts.down_proj.weight": 0.001953125, + "model.layers.1.mlp.shared_experts.gate_proj.weight": 0.0029296875, + "model.layers.1.mlp.shared_experts.up_proj.weight": 0.001953125, + "model.layers.1.self_attn.kv_a_proj_with_mqa.weight": 0.00244140625, + "model.layers.1.self_attn.kv_b_proj.weight": 0.0029296875, + "model.layers.1.self_attn.o_proj.weight": 0.00244140625, + "model.layers.1.self_attn.q_a_proj.weight": 0.0029296875, + "model.layers.1.self_attn.q_b_proj.weight": 0.001953125, + "model.layers.2.mlp.experts.0.down_proj.weight": 0.00244140625, + "model.layers.2.mlp.experts.0.gate_proj.weight": 0.00244140625, + "model.layers.2.mlp.experts.0.up_proj.weight": 0.001953125, + "model.layers.2.mlp.experts.1.down_proj.weight": 0.001953125, + "model.layers.2.mlp.experts.1.gate_proj.weight": 0.00244140625, + "model.layers.2.mlp.experts.1.up_proj.weight": 0.00341796875, + "model.layers.2.mlp.experts.2.down_proj.weight": 0.0029296875, + "model.layers.2.mlp.experts.2.gate_proj.weight": 0.00341796875, + "model.layers.2.mlp.experts.2.up_proj.weight": 0.00244140625, + "model.layers.2.mlp.experts.3.down_proj.weight": 0.0029296875, + "model.layers.2.mlp.experts.3.gate_proj.weight": 0.001953125, + "model.layers.2.mlp.experts.3.up_proj.weight": 0.00244140625, + "model.layers.2.mlp.experts.4.down_proj.weight": 0.001953125, + "model.layers.2.mlp.experts.4.gate_proj.weight": 0.001953125, + "model.layers.2.mlp.experts.4.up_proj.weight": 0.001953125, + "model.layers.2.mlp.experts.5.down_proj.weight": 0.001953125, + "model.layers.2.mlp.experts.5.gate_proj.weight": 0.00390625, + "model.layers.2.mlp.experts.5.up_proj.weight": 0.00244140625, + "model.layers.2.mlp.experts.6.down_proj.weight": 0.00341796875, + "model.layers.2.mlp.experts.6.gate_proj.weight": 0.0029296875, + "model.layers.2.mlp.experts.6.up_proj.weight": 0.00341796875, + "model.layers.2.mlp.experts.7.down_proj.weight": 0.0029296875, + "model.layers.2.mlp.experts.7.gate_proj.weight": 0.001953125, + "model.layers.2.mlp.experts.7.up_proj.weight": 0.00341796875, + "model.layers.2.mlp.shared_experts.down_proj.weight": 0.00341796875, + "model.layers.2.mlp.shared_experts.gate_proj.weight": 0.00341796875, + "model.layers.2.mlp.shared_experts.up_proj.weight": 0.001953125, + "model.layers.2.self_attn.indexer.weights_proj.weight": 0.001953125, + "model.layers.2.self_attn.indexer.wk.weight": 0.001953125, + "model.layers.2.self_attn.indexer.wq_b.weight": 0.0029296875, + "model.layers.2.self_attn.kv_a_proj_with_mqa.weight": 0.0029296875, + "model.layers.2.self_attn.kv_b_proj.weight": 0.00341796875, + "model.layers.2.self_attn.o_proj.weight": 0.00390625, + "model.layers.2.self_attn.q_a_proj.weight": 0.00390625, + "model.layers.2.self_attn.q_b_proj.weight": 0.001953125, + "model.layers.3.mlp.experts.0.down_proj.weight": 0.001953125, + "model.layers.3.mlp.experts.0.gate_proj.weight": 0.00390625, + "model.layers.3.mlp.experts.0.up_proj.weight": 0.00390625, + "model.layers.3.mlp.experts.1.down_proj.weight": 0.0029296875, + "model.layers.3.mlp.experts.1.gate_proj.weight": 0.001953125, + "model.layers.3.mlp.experts.1.up_proj.weight": 0.001953125, + "model.layers.3.mlp.experts.2.down_proj.weight": 0.00390625, + "model.layers.3.mlp.experts.2.gate_proj.weight": 0.00390625, + "model.layers.3.mlp.experts.2.up_proj.weight": 0.00341796875, + "model.layers.3.mlp.experts.3.down_proj.weight": 0.00390625, + "model.layers.3.mlp.experts.3.gate_proj.weight": 0.00341796875, + "model.layers.3.mlp.experts.3.up_proj.weight": 0.00341796875, + "model.layers.3.mlp.experts.4.down_proj.weight": 0.00341796875, + "model.layers.3.mlp.experts.4.gate_proj.weight": 0.00244140625, + "model.layers.3.mlp.experts.4.up_proj.weight": 0.001953125, + "model.layers.3.mlp.experts.5.down_proj.weight": 0.001953125, + "model.layers.3.mlp.experts.5.gate_proj.weight": 0.00244140625, + "model.layers.3.mlp.experts.5.up_proj.weight": 0.001953125, + "model.layers.3.mlp.experts.6.down_proj.weight": 0.00390625, + "model.layers.3.mlp.experts.6.gate_proj.weight": 0.00341796875, + "model.layers.3.mlp.experts.6.up_proj.weight": 0.0029296875, + "model.layers.3.mlp.experts.7.down_proj.weight": 0.00341796875, + "model.layers.3.mlp.experts.7.gate_proj.weight": 0.00341796875, + "model.layers.3.mlp.experts.7.up_proj.weight": 0.001953125, + "model.layers.3.mlp.shared_experts.down_proj.weight": 0.001953125, + "model.layers.3.mlp.shared_experts.gate_proj.weight": 0.00341796875, + "model.layers.3.mlp.shared_experts.up_proj.weight": 0.00341796875, + "model.layers.3.self_attn.kv_a_proj_with_mqa.weight": 0.00244140625, + "model.layers.3.self_attn.kv_b_proj.weight": 0.00341796875, + "model.layers.3.self_attn.o_proj.weight": 0.00390625, + "model.layers.3.self_attn.q_a_proj.weight": 0.00244140625, + "model.layers.3.self_attn.q_b_proj.weight": 0.00341796875 + }, + "encoded_formats": { + "model.layers.0.mlp.down_proj.weight": "fp8-ue8m0", + "model.layers.0.mlp.gate_proj.weight": "fp8-ue8m0", + "model.layers.0.mlp.up_proj.weight": "fp8-ue8m0", + "model.layers.0.self_attn.indexer.weights_proj.weight": "fp8-ue8m0", + "model.layers.0.self_attn.indexer.wk.weight": "fp8-ue8m0", + "model.layers.0.self_attn.indexer.wq_b.weight": "fp8-ue8m0", + "model.layers.0.self_attn.kv_a_proj_with_mqa.weight": "fp8-ue8m0", + "model.layers.0.self_attn.kv_b_proj.weight": "fp8-ue8m0", + "model.layers.0.self_attn.o_proj.weight": "fp8-ue8m0", + "model.layers.0.self_attn.q_a_proj.weight": "fp8-ue8m0", + "model.layers.0.self_attn.q_b_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.0.down_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.0.gate_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.0.up_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.1.down_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.1.gate_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.1.up_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.2.down_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.2.gate_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.2.up_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.3.down_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.3.gate_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.3.up_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.4.down_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.4.gate_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.4.up_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.5.down_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.5.gate_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.5.up_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.6.down_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.6.gate_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.6.up_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.7.down_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.7.gate_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.7.up_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.shared_experts.down_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.shared_experts.gate_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.shared_experts.up_proj.weight": "fp8-ue8m0", + "model.layers.1.self_attn.kv_a_proj_with_mqa.weight": "fp8-ue8m0", + "model.layers.1.self_attn.kv_b_proj.weight": "fp8-ue8m0", + "model.layers.1.self_attn.o_proj.weight": "fp8-ue8m0", + "model.layers.1.self_attn.q_a_proj.weight": "fp8-ue8m0", + "model.layers.1.self_attn.q_b_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.0.down_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.0.gate_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.0.up_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.1.down_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.1.gate_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.1.up_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.2.down_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.2.gate_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.2.up_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.3.down_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.3.gate_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.3.up_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.4.down_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.4.gate_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.4.up_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.5.down_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.5.gate_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.5.up_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.6.down_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.6.gate_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.6.up_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.7.down_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.7.gate_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.7.up_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.shared_experts.down_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.shared_experts.gate_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.shared_experts.up_proj.weight": "fp8-ue8m0", + "model.layers.2.self_attn.indexer.weights_proj.weight": "fp8-ue8m0", + "model.layers.2.self_attn.indexer.wk.weight": "fp8-ue8m0", + "model.layers.2.self_attn.indexer.wq_b.weight": "fp8-ue8m0", + "model.layers.2.self_attn.kv_a_proj_with_mqa.weight": "fp8-ue8m0", + "model.layers.2.self_attn.kv_b_proj.weight": "fp8-ue8m0", + "model.layers.2.self_attn.o_proj.weight": "fp8-ue8m0", + "model.layers.2.self_attn.q_a_proj.weight": "fp8-ue8m0", + "model.layers.2.self_attn.q_b_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.0.down_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.0.gate_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.0.up_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.1.down_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.1.gate_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.1.up_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.2.down_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.2.gate_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.2.up_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.3.down_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.3.gate_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.3.up_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.4.down_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.4.gate_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.4.up_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.5.down_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.5.gate_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.5.up_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.6.down_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.6.gate_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.6.up_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.7.down_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.7.gate_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.7.up_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.shared_experts.down_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.shared_experts.gate_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.shared_experts.up_proj.weight": "fp8-ue8m0", + "model.layers.3.self_attn.kv_a_proj_with_mqa.weight": "fp8-ue8m0", + "model.layers.3.self_attn.kv_b_proj.weight": "fp8-ue8m0", + "model.layers.3.self_attn.o_proj.weight": "fp8-ue8m0", + "model.layers.3.self_attn.q_a_proj.weight": "fp8-ue8m0", + "model.layers.3.self_attn.q_b_proj.weight": "fp8-ue8m0" + }, + "source_sha256": { + "config.json": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "model.safetensors": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1" + }, + "output_sha256": { + "scope.json": "b186631b93ad29d8ddd9da74e40c66b67e8376b011524fc3762195bb5f4886b5", + "model.safetensors.index.json": "830192dca5cae29400ba34528a3e334ef274dedd2ea74dac37ebe38b057461e4", + "model.safetensors": "e26433482b4d0c4e0cf15cd313cfaf140708378cce3e73866bb8badc8298a159", + "config.json": "cbf3fcc7cdf78aec98f645c6920345f2fdebde6764223349249f6389606229ec", + "panel.binding.json": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "qfs-source.json": "624fc5b9568aa8bf12b1fc5cb3d54aef94d5e5ad72d73a55bd761dd6ca659cae", + "loader-verification.json": "086b7c5481cfbae5ee958b3bdeb85264128c59142fb005611bd837533fbdf7b0", + "tokenizer.json": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "cpu-reproduction-summary.json": "41f8263ddacbac1379c67637f83fdef2ed843ca4973179817531855939866a55", + "hub-checkpoint-verification.json": "3a4681f9c2876da6ae303592ede176ab17c6abdface107683fa2fe8386de7d36", + "tokenizer_config.json": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63", + "panel.sha256.json": "7fbfbaa8a3b1d7533177e1c2e774f5686e6a3f6b9564be7f2a99d0f66bff92fd", + "build-manifest.json": "57d74b2e6dcc8a789f51f86d251e51b2ec73c6772c329ad56f6132e08626eced", + "generation_config.json": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "cpu-comparison-receipt.json": "fcfcee1383dc0d50b42bbd97c9f2fc5ebe127c97cab791eeac01bf530d06f178", + "LICENSE": "6456969dd395bff476628945088b4cbd9d9c761b01a64e281c07b09daf9f94c3" + }, + "tool_sha256": "9fae546b8cb91df32468bcc7019c0bfbf10e41569526c7f55384f27afafe8699", + "reader_sha256": "588923f0a4700436221923c794a8c112971d9f08e75c746742b0f0ede7921682", + "reference": "compressed-tensors@0.18.0; DeepSeek-V4-Flash@60d8d70770c6776ff598c94bb586a859a38244f1/inference/kernel.py; nvidia/Qwen3.8-Flash-Next-NVFP4@fc694b54fb0174e0913e6adf86691ef85a4ead47/config.json+headers", + "verification": "independent CPU FP32 encoder reconstruction per encoded weight; no GPU parity" +} diff --git a/raw/candidates/fp8-ue8m0/model/qfs-source.json b/raw/candidates/fp8-ue8m0/model/qfs-source.json new file mode 100644 index 0000000000000000000000000000000000000000..3c71d8671dcbe3678b71a2efe59e0ca341bebdc0 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/model/qfs-source.json @@ -0,0 +1,11 @@ +{ + "repository": "https://github.com/malaiwah/quant-fidelity-suite", + "revision": "a903cddb078c2eda8c65d6e6c875a09ac932df49", + "source_files": { + "bin/fidelity/dscompare.py": "4a53f735e1e3fb8bd739854451b57f34e8369bffa9fd4f7b7fd935fb2e7d52df", + "bin/fidelity/dsvalidate.py": "a9d6cd57e801e3ef044a37635e24518c83dbc6d1ec8a4c0b4b5d1b24483ca8d1", + "bin/fidelity/panel.py": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "bin/fidelity_dataset.py": "ac62b63bbfde67e4d5cacecf9cd417193c50f417a6749cc15ee6f1610c153a4e", + "engines/tools/hf_capture.py": "200ba12ca74fb97531307965cbbaa5c10553a5c26e008e524ea2d8aecb005b95" + } +} diff --git a/raw/candidates/fp8-ue8m0/model/scope.json b/raw/candidates/fp8-ue8m0/model/scope.json new file mode 100644 index 0000000000000000000000000000000000000000..84b31406b5e1bf88b70596e00503e4dda54858c9 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/model/scope.json @@ -0,0 +1,105 @@ +{ + "policy": "mixed", + "head_policy": "native", + "kv_cache_dtype": "bf16", + "mtp_included": false, + "activation_quantization": null, + "assignments": [ + { + "tensor_class": "attn.o", + "treatment": "quantized", + "format": "fp8-ue8m0", + "bits_per_weight": 8, + "layer_range": "all", + "note": "4 tensors: model.layers.N.self_attn.o_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "attn.other", + "treatment": "quantized", + "format": "mixed", + "bits_per_weight": null, + "layer_range": "0-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 12 x native:bf16@16 (model.layers.N.self_attn.indexer.k_norm.bias, model.layers.N.self_attn.indexer.k_norm.weight, model.layers.N.self_attn.kv_a_layernorm.weight); 6 x quantized:fp8-ue8m0@8 (model.layers.N.self_attn.indexer.weights_proj.weight, model.layers.N.self_attn.indexer.wk.weight, model.layers.N.self_attn.indexer.wq_b.weight). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "attn.qkv", + "treatment": "quantized", + "format": "fp8-ue8m0", + "bits_per_weight": 8, + "layer_range": "all", + "note": "16 tensors: model.layers.N.self_attn.kv_a_proj_with_mqa.weight, model.layers.N.self_attn.kv_b_proj.weight, model.layers.N.self_attn.q_a_proj.weight, model.layers.N.self_attn.q_b_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "embed_tokens", + "treatment": "native", + "format": "bf16", + "bits_per_weight": 16, + "layer_range": "all", + "note": "1 tensors: model.embed_tokens.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "lm_head", + "treatment": "native", + "format": "bf16", + "bits_per_weight": 16, + "layer_range": "all", + "note": "1 tensors: lm_head.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "mlp.down", + "treatment": "quantized", + "format": "fp8-ue8m0", + "bits_per_weight": 8, + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.down_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "mlp.gate", + "treatment": "quantized", + "format": "fp8-ue8m0", + "bits_per_weight": 8, + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.gate_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "mlp.up", + "treatment": "quantized", + "format": "fp8-ue8m0", + "bits_per_weight": 8, + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "moe.experts", + "treatment": "quantized", + "format": "fp8-ue8m0", + "bits_per_weight": 8, + "layer_range": "all", + "note": "72 tensors: model.layers.N.mlp.experts.E.down_proj.weight, model.layers.N.mlp.experts.E.gate_proj.weight, model.layers.N.mlp.experts.E.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "moe.router", + "treatment": "native", + "format": "mixed", + "bits_per_weight": null, + "layer_range": "1-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 3 x native:bf16@16 (model.layers.N.mlp.gate.weight); 3 x native:fp32@32 (model.layers.N.mlp.gate.e_score_correction_bias). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "moe.shared_expert", + "treatment": "quantized", + "format": "fp8-ue8m0", + "bits_per_weight": 8, + "layer_range": "all", + "note": "9 tensors: model.layers.N.mlp.shared_experts.down_proj.weight, model.layers.N.mlp.shared_experts.gate_proj.weight, model.layers.N.mlp.shared_experts.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "norm", + "treatment": "native", + "format": "bf16", + "bits_per_weight": 16, + "layer_range": "all", + "note": "9 tensors: model.layers.N.input_layernorm.weight, model.layers.N.post_attention_layernorm.weight, model.norm.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + } + ] +} diff --git a/raw/candidates/fp8-ue8m0/model/tokenizer.json b/raw/candidates/fp8-ue8m0/model/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..5ad9cccfc9ab5ed66f1c38db328de07cbe4939a9 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/model/tokenizer.json @@ -0,0 +1,404 @@ +{ + "version": "1.0", + "truncation": null, + "padding": null, + "added_tokens": [ + { + "id": 0, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 1, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 2, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 3, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + } + ], + "normalizer": null, + "pre_tokenizer": { + "type": "ByteLevel", + "add_prefix_space": false, + "trim_offsets": true, + "use_regex": false + }, + "post_processor": { + "type": "TemplateProcessing", + "single": [ + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + }, + { + "Sequence": { + "id": "A", + "type_id": 0 + } + }, + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + } + ], + "pair": [ + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + }, + { + "Sequence": { + "id": "A", + "type_id": 0 + } + }, + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + }, + { + "Sequence": { + "id": "B", + "type_id": 1 + } + }, + { + "SpecialToken": { + "id": "", + "type_id": 1 + } + } + ], + "special_tokens": { + "": { + "id": "", + "ids": [ + 1 + ], + "tokens": [ + "" + ] + }, + "": { + "id": "", + "ids": [ + 2 + ], + "tokens": [ + "" + ] + } + } + }, + "decoder": { + "type": "ByteLevel", + "add_prefix_space": true, + "trim_offsets": true, + "use_regex": true + }, + "model": { + "type": "BPE", + "dropout": null, + "unk_token": "", + "continuing_subword_prefix": null, + "end_of_word_suffix": null, + "fuse_unk": false, + "byte_fallback": false, + "ignore_merges": false, + "vocab": { + "": 0, + "": 1, + "": 2, + "": 3, + "!": 4, + "\"": 5, + "#": 6, + "$": 7, + "%": 8, + "&": 9, + "'": 10, + "(": 11, + ")": 12, + "*": 13, + "+": 14, + ",": 15, + "-": 16, + ".": 17, + "/": 18, + "0": 19, + "1": 20, + "2": 21, + "3": 22, + "4": 23, + "5": 24, + "6": 25, + "7": 26, + "8": 27, + "9": 28, + ":": 29, + ";": 30, + "<": 31, + "=": 32, + ">": 33, + "?": 34, + "@": 35, + "A": 36, + "B": 37, + "C": 38, + "D": 39, + "E": 40, + "F": 41, + "G": 42, + "H": 43, + "I": 44, + "J": 45, + "K": 46, + "L": 47, + "M": 48, + "N": 49, + "O": 50, + "P": 51, + "Q": 52, + "R": 53, + "S": 54, + "T": 55, + "U": 56, + "V": 57, + "W": 58, + "X": 59, + "Y": 60, + "Z": 61, + "[": 62, + "\\": 63, + "]": 64, + "^": 65, + "_": 66, + "`": 67, + "a": 68, + "b": 69, + "c": 70, + "d": 71, + "e": 72, + "f": 73, + "g": 74, + "h": 75, + "i": 76, + "j": 77, + "k": 78, + "l": 79, + "m": 80, + "n": 81, + "o": 82, + "p": 83, + "q": 84, + "r": 85, + "s": 86, + "t": 87, + "u": 88, + "v": 89, + "w": 90, + "x": 91, + "y": 92, + "z": 93, + "{": 94, + "|": 95, + "}": 96, + "~": 97, + "¡": 98, + "¢": 99, + "£": 100, + "¤": 101, + "¥": 102, + "¦": 103, + "§": 104, + "¨": 105, + "©": 106, + "ª": 107, + "«": 108, + "¬": 109, + "®": 110, + "¯": 111, + "°": 112, + "±": 113, + "²": 114, + "³": 115, + "´": 116, + "µ": 117, + "¶": 118, + "·": 119, + "¸": 120, + "¹": 121, + "º": 122, + "»": 123, + "¼": 124, + "½": 125, + "¾": 126, + "¿": 127, + "À": 128, + "Á": 129, + "Â": 130, + "Ã": 131, + "Ä": 132, + "Å": 133, + "Æ": 134, + "Ç": 135, + "È": 136, + "É": 137, + "Ê": 138, + "Ë": 139, + "Ì": 140, + "Í": 141, + "Î": 142, + "Ï": 143, + "Ð": 144, + "Ñ": 145, + "Ò": 146, + "Ó": 147, + "Ô": 148, + "Õ": 149, + "Ö": 150, + "×": 151, + "Ø": 152, + "Ù": 153, + "Ú": 154, + "Û": 155, + "Ü": 156, + "Ý": 157, + "Þ": 158, + "ß": 159, + "à": 160, + "á": 161, + "â": 162, + "ã": 163, + "ä": 164, + "å": 165, + "æ": 166, + "ç": 167, + "è": 168, + "é": 169, + "ê": 170, + "ë": 171, + "ì": 172, + "í": 173, + "î": 174, + "ï": 175, + "ð": 176, + "ñ": 177, + "ò": 178, + "ó": 179, + "ô": 180, + "õ": 181, + "ö": 182, + "÷": 183, + "ø": 184, + "ù": 185, + "ú": 186, + "û": 187, + "ü": 188, + "ý": 189, + "þ": 190, + "ÿ": 191, + "Ā": 192, + "ā": 193, + "Ă": 194, + "ă": 195, + "Ą": 196, + "ą": 197, + "Ć": 198, + "ć": 199, + "Ĉ": 200, + "ĉ": 201, + "Ċ": 202, + "ċ": 203, + "Č": 204, + "č": 205, + "Ď": 206, + "ď": 207, + "Đ": 208, + "đ": 209, + "Ē": 210, + "ē": 211, + "Ĕ": 212, + "ĕ": 213, + "Ė": 214, + "ė": 215, + "Ę": 216, + "ę": 217, + "Ě": 218, + "ě": 219, + "Ĝ": 220, + "ĝ": 221, + "Ğ": 222, + "ğ": 223, + "Ġ": 224, + "ġ": 225, + "Ģ": 226, + "ģ": 227, + "Ĥ": 228, + "ĥ": 229, + "Ħ": 230, + "ħ": 231, + "Ĩ": 232, + "ĩ": 233, + "Ī": 234, + "ī": 235, + "Ĭ": 236, + "ĭ": 237, + "Į": 238, + "į": 239, + "İ": 240, + "ı": 241, + "IJ": 242, + "ij": 243, + "Ĵ": 244, + "ĵ": 245, + "Ķ": 246, + "ķ": 247, + "ĸ": 248, + "Ĺ": 249, + "ĺ": 250, + "Ļ": 251, + "ļ": 252, + "Ľ": 253, + "ľ": 254, + "Ŀ": 255, + "ŀ": 256, + "Ł": 257, + "ł": 258, + "Ń": 259 + }, + "merges": [] + } +} \ No newline at end of file diff --git a/raw/candidates/fp8-ue8m0/model/tokenizer_config.json b/raw/candidates/fp8-ue8m0/model/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..df4d789a0874511220f5e2676081000298ad025d --- /dev/null +++ b/raw/candidates/fp8-ue8m0/model/tokenizer_config.json @@ -0,0 +1,10 @@ +{ + "backend": "tokenizers", + "bos_token": "", + "clean_up_tokenization_spaces": false, + "eos_token": "", + "model_max_length": 256, + "pad_token": "", + "tokenizer_class": "TokenizersBackend", + "unk_token": "" +} diff --git a/raw/candidates/fp8-ue8m0/source-pin-evidence.json b/raw/candidates/fp8-ue8m0/source-pin-evidence.json new file mode 100644 index 0000000000000000000000000000000000000000..daaaa9558a7afdae8b3fe697792d17e5b9aac153 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/source-pin-evidence.json @@ -0,0 +1,269 @@ +{ + "source": { + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "a1a973330e4e912678adbd8ea41e8b86b1c9dccb" + }, + "format": "fp8-ue8m0", + "algorithm": "Build tiny FORMAT fixtures, optionally capture via integrated QFS layer-outer.\n\nNo optimizer-quality claim: deterministic CPU minmax/conservative-scale RTN.\nMXFP4 uses ceil(log2(group_max/6)); this is NOT CT's MX observer or Kimi QAT.\nNVFP4 uses a tensor maximum global, rounded E4M3 group scales, then E2M1\nnearest-even RTN. FP8 uses ceil(log2(block_max/448)) UE8M0 + E4M3 RTN.\nNo calibration, activation quantization, kernel parity, training or model code.\n", + "claim": "FORMAT fixture, not Kimi QAT/ModelOpt calibration/CT observer quality", + "reconstruction_scope": { + "scope": "weights-reconstructed/advisory; activation-not-captured", + "applied_to_weights": false, + "declared": { + "activation_scheme": "dynamic", + "scale_fmt": "ue8m0" + }, + "kv_cache_scheme": null, + "stored_components": [] + }, + "encoded_tensors": { + "model.layers.0.mlp.down_proj.weight": 0.00341796875, + "model.layers.0.mlp.gate_proj.weight": 0.00341796875, + "model.layers.0.mlp.up_proj.weight": 0.00390625, + "model.layers.0.self_attn.indexer.weights_proj.weight": 0.001953125, + "model.layers.0.self_attn.indexer.wk.weight": 0.001953125, + "model.layers.0.self_attn.indexer.wq_b.weight": 0.00390625, + "model.layers.0.self_attn.kv_a_proj_with_mqa.weight": 0.00341796875, + "model.layers.0.self_attn.kv_b_proj.weight": 0.001953125, + "model.layers.0.self_attn.o_proj.weight": 0.00390625, + "model.layers.0.self_attn.q_a_proj.weight": 0.00341796875, + "model.layers.0.self_attn.q_b_proj.weight": 0.00390625, + "model.layers.1.mlp.experts.0.down_proj.weight": 0.00390625, + "model.layers.1.mlp.experts.0.gate_proj.weight": 0.0029296875, + "model.layers.1.mlp.experts.0.up_proj.weight": 0.0029296875, + "model.layers.1.mlp.experts.1.down_proj.weight": 0.00341796875, + "model.layers.1.mlp.experts.1.gate_proj.weight": 0.0029296875, + "model.layers.1.mlp.experts.1.up_proj.weight": 0.0029296875, + "model.layers.1.mlp.experts.2.down_proj.weight": 0.00390625, + "model.layers.1.mlp.experts.2.gate_proj.weight": 0.0029296875, + "model.layers.1.mlp.experts.2.up_proj.weight": 0.0029296875, + "model.layers.1.mlp.experts.3.down_proj.weight": 0.00244140625, + "model.layers.1.mlp.experts.3.gate_proj.weight": 0.00244140625, + "model.layers.1.mlp.experts.3.up_proj.weight": 0.00341796875, + "model.layers.1.mlp.experts.4.down_proj.weight": 0.00244140625, + "model.layers.1.mlp.experts.4.gate_proj.weight": 0.001953125, + "model.layers.1.mlp.experts.4.up_proj.weight": 0.00341796875, + "model.layers.1.mlp.experts.5.down_proj.weight": 0.001953125, + "model.layers.1.mlp.experts.5.gate_proj.weight": 0.00341796875, + "model.layers.1.mlp.experts.5.up_proj.weight": 0.00390625, + "model.layers.1.mlp.experts.6.down_proj.weight": 0.00341796875, + "model.layers.1.mlp.experts.6.gate_proj.weight": 0.001953125, + "model.layers.1.mlp.experts.6.up_proj.weight": 0.00341796875, + "model.layers.1.mlp.experts.7.down_proj.weight": 0.001953125, + "model.layers.1.mlp.experts.7.gate_proj.weight": 0.001953125, + "model.layers.1.mlp.experts.7.up_proj.weight": 0.00390625, + "model.layers.1.mlp.shared_experts.down_proj.weight": 0.001953125, + "model.layers.1.mlp.shared_experts.gate_proj.weight": 0.0029296875, + "model.layers.1.mlp.shared_experts.up_proj.weight": 0.001953125, + "model.layers.1.self_attn.kv_a_proj_with_mqa.weight": 0.00244140625, + "model.layers.1.self_attn.kv_b_proj.weight": 0.0029296875, + "model.layers.1.self_attn.o_proj.weight": 0.00244140625, + "model.layers.1.self_attn.q_a_proj.weight": 0.0029296875, + "model.layers.1.self_attn.q_b_proj.weight": 0.001953125, + "model.layers.2.mlp.experts.0.down_proj.weight": 0.00244140625, + "model.layers.2.mlp.experts.0.gate_proj.weight": 0.00244140625, + "model.layers.2.mlp.experts.0.up_proj.weight": 0.001953125, + "model.layers.2.mlp.experts.1.down_proj.weight": 0.001953125, + "model.layers.2.mlp.experts.1.gate_proj.weight": 0.00244140625, + "model.layers.2.mlp.experts.1.up_proj.weight": 0.00341796875, + "model.layers.2.mlp.experts.2.down_proj.weight": 0.0029296875, + "model.layers.2.mlp.experts.2.gate_proj.weight": 0.00341796875, + "model.layers.2.mlp.experts.2.up_proj.weight": 0.00244140625, + "model.layers.2.mlp.experts.3.down_proj.weight": 0.0029296875, + "model.layers.2.mlp.experts.3.gate_proj.weight": 0.001953125, + "model.layers.2.mlp.experts.3.up_proj.weight": 0.00244140625, + "model.layers.2.mlp.experts.4.down_proj.weight": 0.001953125, + "model.layers.2.mlp.experts.4.gate_proj.weight": 0.001953125, + "model.layers.2.mlp.experts.4.up_proj.weight": 0.001953125, + "model.layers.2.mlp.experts.5.down_proj.weight": 0.001953125, + "model.layers.2.mlp.experts.5.gate_proj.weight": 0.00390625, + "model.layers.2.mlp.experts.5.up_proj.weight": 0.00244140625, + "model.layers.2.mlp.experts.6.down_proj.weight": 0.00341796875, + "model.layers.2.mlp.experts.6.gate_proj.weight": 0.0029296875, + "model.layers.2.mlp.experts.6.up_proj.weight": 0.00341796875, + "model.layers.2.mlp.experts.7.down_proj.weight": 0.0029296875, + "model.layers.2.mlp.experts.7.gate_proj.weight": 0.001953125, + "model.layers.2.mlp.experts.7.up_proj.weight": 0.00341796875, + "model.layers.2.mlp.shared_experts.down_proj.weight": 0.00341796875, + "model.layers.2.mlp.shared_experts.gate_proj.weight": 0.00341796875, + "model.layers.2.mlp.shared_experts.up_proj.weight": 0.001953125, + "model.layers.2.self_attn.indexer.weights_proj.weight": 0.001953125, + "model.layers.2.self_attn.indexer.wk.weight": 0.001953125, + "model.layers.2.self_attn.indexer.wq_b.weight": 0.0029296875, + "model.layers.2.self_attn.kv_a_proj_with_mqa.weight": 0.0029296875, + "model.layers.2.self_attn.kv_b_proj.weight": 0.00341796875, + "model.layers.2.self_attn.o_proj.weight": 0.00390625, + "model.layers.2.self_attn.q_a_proj.weight": 0.00390625, + "model.layers.2.self_attn.q_b_proj.weight": 0.001953125, + "model.layers.3.mlp.experts.0.down_proj.weight": 0.001953125, + "model.layers.3.mlp.experts.0.gate_proj.weight": 0.00390625, + "model.layers.3.mlp.experts.0.up_proj.weight": 0.00390625, + "model.layers.3.mlp.experts.1.down_proj.weight": 0.0029296875, + "model.layers.3.mlp.experts.1.gate_proj.weight": 0.001953125, + "model.layers.3.mlp.experts.1.up_proj.weight": 0.001953125, + "model.layers.3.mlp.experts.2.down_proj.weight": 0.00390625, + "model.layers.3.mlp.experts.2.gate_proj.weight": 0.00390625, + "model.layers.3.mlp.experts.2.up_proj.weight": 0.00341796875, + "model.layers.3.mlp.experts.3.down_proj.weight": 0.00390625, + "model.layers.3.mlp.experts.3.gate_proj.weight": 0.00341796875, + "model.layers.3.mlp.experts.3.up_proj.weight": 0.00341796875, + "model.layers.3.mlp.experts.4.down_proj.weight": 0.00341796875, + "model.layers.3.mlp.experts.4.gate_proj.weight": 0.00244140625, + "model.layers.3.mlp.experts.4.up_proj.weight": 0.001953125, + "model.layers.3.mlp.experts.5.down_proj.weight": 0.001953125, + "model.layers.3.mlp.experts.5.gate_proj.weight": 0.00244140625, + "model.layers.3.mlp.experts.5.up_proj.weight": 0.001953125, + "model.layers.3.mlp.experts.6.down_proj.weight": 0.00390625, + "model.layers.3.mlp.experts.6.gate_proj.weight": 0.00341796875, + "model.layers.3.mlp.experts.6.up_proj.weight": 0.0029296875, + "model.layers.3.mlp.experts.7.down_proj.weight": 0.00341796875, + "model.layers.3.mlp.experts.7.gate_proj.weight": 0.00341796875, + "model.layers.3.mlp.experts.7.up_proj.weight": 0.001953125, + "model.layers.3.mlp.shared_experts.down_proj.weight": 0.001953125, + "model.layers.3.mlp.shared_experts.gate_proj.weight": 0.00341796875, + "model.layers.3.mlp.shared_experts.up_proj.weight": 0.00341796875, + "model.layers.3.self_attn.kv_a_proj_with_mqa.weight": 0.00244140625, + "model.layers.3.self_attn.kv_b_proj.weight": 0.00341796875, + "model.layers.3.self_attn.o_proj.weight": 0.00390625, + "model.layers.3.self_attn.q_a_proj.weight": 0.00244140625, + "model.layers.3.self_attn.q_b_proj.weight": 0.00341796875 + }, + "encoded_formats": { + "model.layers.0.mlp.down_proj.weight": "fp8-ue8m0", + "model.layers.0.mlp.gate_proj.weight": "fp8-ue8m0", + "model.layers.0.mlp.up_proj.weight": "fp8-ue8m0", + "model.layers.0.self_attn.indexer.weights_proj.weight": "fp8-ue8m0", + "model.layers.0.self_attn.indexer.wk.weight": "fp8-ue8m0", + "model.layers.0.self_attn.indexer.wq_b.weight": "fp8-ue8m0", + "model.layers.0.self_attn.kv_a_proj_with_mqa.weight": "fp8-ue8m0", + "model.layers.0.self_attn.kv_b_proj.weight": "fp8-ue8m0", + "model.layers.0.self_attn.o_proj.weight": "fp8-ue8m0", + "model.layers.0.self_attn.q_a_proj.weight": "fp8-ue8m0", + "model.layers.0.self_attn.q_b_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.0.down_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.0.gate_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.0.up_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.1.down_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.1.gate_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.1.up_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.2.down_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.2.gate_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.2.up_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.3.down_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.3.gate_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.3.up_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.4.down_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.4.gate_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.4.up_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.5.down_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.5.gate_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.5.up_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.6.down_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.6.gate_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.6.up_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.7.down_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.7.gate_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.experts.7.up_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.shared_experts.down_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.shared_experts.gate_proj.weight": "fp8-ue8m0", + "model.layers.1.mlp.shared_experts.up_proj.weight": "fp8-ue8m0", + "model.layers.1.self_attn.kv_a_proj_with_mqa.weight": "fp8-ue8m0", + "model.layers.1.self_attn.kv_b_proj.weight": "fp8-ue8m0", + "model.layers.1.self_attn.o_proj.weight": "fp8-ue8m0", + "model.layers.1.self_attn.q_a_proj.weight": "fp8-ue8m0", + "model.layers.1.self_attn.q_b_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.0.down_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.0.gate_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.0.up_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.1.down_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.1.gate_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.1.up_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.2.down_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.2.gate_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.2.up_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.3.down_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.3.gate_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.3.up_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.4.down_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.4.gate_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.4.up_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.5.down_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.5.gate_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.5.up_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.6.down_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.6.gate_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.6.up_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.7.down_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.7.gate_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.experts.7.up_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.shared_experts.down_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.shared_experts.gate_proj.weight": "fp8-ue8m0", + "model.layers.2.mlp.shared_experts.up_proj.weight": "fp8-ue8m0", + "model.layers.2.self_attn.indexer.weights_proj.weight": "fp8-ue8m0", + "model.layers.2.self_attn.indexer.wk.weight": "fp8-ue8m0", + "model.layers.2.self_attn.indexer.wq_b.weight": "fp8-ue8m0", + "model.layers.2.self_attn.kv_a_proj_with_mqa.weight": "fp8-ue8m0", + "model.layers.2.self_attn.kv_b_proj.weight": "fp8-ue8m0", + "model.layers.2.self_attn.o_proj.weight": "fp8-ue8m0", + "model.layers.2.self_attn.q_a_proj.weight": "fp8-ue8m0", + "model.layers.2.self_attn.q_b_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.0.down_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.0.gate_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.0.up_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.1.down_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.1.gate_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.1.up_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.2.down_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.2.gate_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.2.up_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.3.down_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.3.gate_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.3.up_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.4.down_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.4.gate_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.4.up_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.5.down_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.5.gate_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.5.up_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.6.down_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.6.gate_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.6.up_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.7.down_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.7.gate_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.experts.7.up_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.shared_experts.down_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.shared_experts.gate_proj.weight": "fp8-ue8m0", + "model.layers.3.mlp.shared_experts.up_proj.weight": "fp8-ue8m0", + "model.layers.3.self_attn.kv_a_proj_with_mqa.weight": "fp8-ue8m0", + "model.layers.3.self_attn.kv_b_proj.weight": "fp8-ue8m0", + "model.layers.3.self_attn.o_proj.weight": "fp8-ue8m0", + "model.layers.3.self_attn.q_a_proj.weight": "fp8-ue8m0", + "model.layers.3.self_attn.q_b_proj.weight": "fp8-ue8m0" + }, + "source_sha256": { + "config.json": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "model.safetensors": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1" + }, + "output_sha256": { + "scope.json": "b186631b93ad29d8ddd9da74e40c66b67e8376b011524fc3762195bb5f4886b5", + "model.safetensors.index.json": "830192dca5cae29400ba34528a3e334ef274dedd2ea74dac37ebe38b057461e4", + "model.safetensors": "e26433482b4d0c4e0cf15cd313cfaf140708378cce3e73866bb8badc8298a159", + "config.json": "cbf3fcc7cdf78aec98f645c6920345f2fdebde6764223349249f6389606229ec", + "panel.binding.json": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "qfs-source.json": "624fc5b9568aa8bf12b1fc5cb3d54aef94d5e5ad72d73a55bd761dd6ca659cae", + "loader-verification.json": "086b7c5481cfbae5ee958b3bdeb85264128c59142fb005611bd837533fbdf7b0", + "tokenizer.json": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "cpu-reproduction-summary.json": "41f8263ddacbac1379c67637f83fdef2ed843ca4973179817531855939866a55", + "hub-checkpoint-verification.json": "3a4681f9c2876da6ae303592ede176ab17c6abdface107683fa2fe8386de7d36", + "tokenizer_config.json": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63", + "panel.sha256.json": "7fbfbaa8a3b1d7533177e1c2e774f5686e6a3f6b9564be7f2a99d0f66bff92fd", + "build-manifest.json": "57d74b2e6dcc8a789f51f86d251e51b2ec73c6772c329ad56f6132e08626eced", + "generation_config.json": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "cpu-comparison-receipt.json": "fcfcee1383dc0d50b42bbd97c9f2fc5ebe127c97cab791eeac01bf530d06f178", + "LICENSE": "6456969dd395bff476628945088b4cbd9d9c761b01a64e281c07b09daf9f94c3" + }, + "tool_sha256": "9fae546b8cb91df32468bcc7019c0bfbf10e41569526c7f55384f27afafe8699", + "reader_sha256": "588923f0a4700436221923c794a8c112971d9f08e75c746742b0f0ede7921682", + "reference": "compressed-tensors@0.18.0; DeepSeek-V4-Flash@60d8d70770c6776ff598c94bb586a859a38244f1/inference/kernel.py; nvidia/Qwen3.8-Flash-Next-NVFP4@fc694b54fb0174e0913e6adf86691ef85a4ead47/config.json+headers", + "verification": "independent CPU FP32 encoder reconstruction per encoded weight; no GPU parity" +} diff --git a/raw/candidates/fp8-ue8m0/source/LICENSE b/raw/candidates/fp8-ue8m0/source/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..71f32fb2284323cef90b3e784a7655747c8ae683 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/source/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Michel Belleau + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/raw/candidates/fp8-ue8m0/source/README.md b/raw/candidates/fp8-ue8m0/source/README.md new file mode 100644 index 0000000000000000000000000000000000000000..84524ad288d3abdc9da67201d2e6389b3968319b --- /dev/null +++ b/raw/candidates/fp8-ue8m0/source/README.md @@ -0,0 +1,202 @@ +--- +license: mit +library_name: transformers +pipeline_tag: text-generation +tags: + - glm_moe_dsa + - fixture + - testing + - random-initialization + - cpu + - bfloat16 + - reproducibility +datasets: + - malaiwah/glm-moe-dsa-tiny-cpu-repro-v1 +--- + +# Complete tiny GLM MoE DSA fixture — CPU, BF16, reproducible + +**A runnable random-init architecture fixture, not a language model quality claim.** +It is not trained, distilled, or a quantization of GLM/Fruit. Generated text is meaningless. + +This checkpoint is constructed and saved by the native Transformers +`GlmMoeDsaForCausalLM` implementation. It includes the complete MLA attention path, +DSA indexers, dense/MoE weights, router buffers, independent `lm_head`, and a working +byte-level tokenizer. There is no `trust_remote_code` requirement and no missing-weight +or mismatched-size override. + +Inspired by [GLM-5.2-SIQ-Fruit-bf16](https://huggingface.co/malaiwah/GLM-5.2-SIQ-Fruit-bf16)'s +architecture and dense/MoE plus full/shared-indexer schedules. **No Fruit or other GLM +weights were reused.** Fruit is about 10.1 GB; this checkpoint is **571,000 bytes**. + +## Geometry + +| Property | Value | +|---|---:| +| Trainable parameters | 277,824 | +| Additional stored router-buffer elements | 24, FP32 | +| Stored tensors | 139 (native saving expands fused experts into per-expert keys) | +| Decoder layers / hidden width | 4 / 64 | +| Dense/MoE schedule | dense, sparse, sparse, sparse | +| Routed experts / active experts / shared experts | 8 / 2 / 1 | +| Attention heads / key-value heads | 4 / 4 | +| Query LoRA rank / KV LoRA rank | 32 / 16 | +| QK non-RoPE / RoPE / value head dimensions | 8 / 8 / 16 | +| DSA indexer heads / head dimension / token top-k | 4 / 16 / 8 | +| DSA indexer schedule | full, shared, full, shared | +| Vocabulary | 260: 256 byte symbols + pad/BOS/EOS/unknown | +| Maximum context | 256 tokens | +| Output head | Complete, untied, 260 x 64 BF16 | +| Weight dtype | BF16; native router correction buffers retained FP32 | +| MTP | Intentionally absent: zero next-n-prediction layers, no orphan MTP tensors | + +The shared DSA layers correctly reuse the preceding full indexer's selection. +The published artifact is deliberately BF16, matching QFS's lossless BF16 hidden-capture +contract. Initialization starts in FP32 and is rounded during **artifact construction**, +not silently inside a capture labelled lossless. + +## What was actually verified + +Tested on Linux x86-64, Intel Xeon X5570, Python 3.12.14, **two CPU threads**, no CUDA, +with PyTorch **2.11.0+cpu** and Transformers **5.16.1**. The exact package environment is +in [requirements-cpu.txt](requirements-cpu.txt). + +- Native save/reload preserved every in-memory state tensor's value and dtype. +- QFS loading report: **zero missing, unexpected, mismatched, or conversion-error weights**. +- Two independent generator processes produced byte-identical checkpoint/config/tokenizer files. +- Tokenizer roundtrips include ASCII, accented text, and non-Latin UTF-8 text. +- A real four-by-64-token CPU forward produced finite, nonconstant logits of shape `[4,64,260]`. +- Greedy cached generation executed successfully on CPU. +- **Two fresh QFS capture processes** covered four 64-token windows, **252 scored positions**. +- Both complete captures passed QFS tensor verification and strict dataset validation. +- Their checkpoint, head, stack and capture-content digests agree. +- `fidelity-dataset compare --self-compare --force-compute` returned **exactly 0.0 nats**; + the saved tokenwise array contains **252 literal positive float64 zeros**. +- The comparison receipt passed strict validation. Its reported top-1 agreement is **1.0**. + +QFS retains its reproduction hash-proof result (`short_circuited: true`) even when +forced arithmetic runs. **`self_compare.force_compute_agreed: true` proves that the +independently executed numerical KL replay agreed with those zeros.** The receipt's +top-1 value comes from the identity proof, not a separate top-1 benchmark. + +This is a reproduction confirmation, **not registry admission, a qualified production +reference, or evidence of quantization quality**. The comparison receipt's generic +`determinism.run_count` is one comparison and its `identical_across_runs` field remains +null; the separate evidence summary records the two actual fresh capture processes +and equal tensor digests. No registry row was submitted. + +### Measured resource use + +| Operation | Measured result | +|---|---:| +| First fresh QFS capture, including process startup | 6.49 s | +| Second fresh QFS capture, including process startup | 6.43 s | +| Forced comparison command, including process startup | 3.73 s | +| Full two-capture + verification + comparison driver | 34.86 s | +| Peak capture process RSS | 367,374,336 bytes (about 350 MiB) | +| Materialized model parameters + runtime buffers | 555,776 bytes | + +These are local two-thread CPU observations, **not a benchmark of HF CPU Basic** or a +latency guarantee for another machine. They make this fixture a practical candidate +for a bounded CPU-only demo without downloading large GLM weights. + +## Immutable identities and evidence + +Checkpoint/config/tokenizer revision used for the captures: + +```text +45563636ef723acfb826755493447dc40c7a0c37 +``` + +Checkpoint file SHA-256: + +```text +9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1 +``` + +Both independent captures' content digest: + +```text +d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39 +``` + +- [Build manifest and all tensor hashes](build-manifest.json) +- [Clean loader, tokenizer, forward and generation evidence](loader-verification.json) +- [Fresh Hub-download byte verification](hub-checkpoint-verification.json) +- [CPU reproduction summary](cpu-reproduction-summary.json) +- [Forced zero-KL comparison receipt](cpu-comparison-receipt.json) +- [Full capture/replay evidence bundle](https://huggingface.co/datasets/malaiwah/glm-moe-dsa-tiny-cpu-repro-v1) +- [Pinned QFS source identity](qfs-source.json) + +The evidence dataset is a **bundle**: `first/` and `repeat/` are separate conformant +fidelity dataset trees, while `comparison/` contains the computed comparison. Download +the bundle and use these local subdirectories; its repository root is not itself a +single root-format fidelity dataset. Original sealed capture files are not rewritten. + +## Load and run on CPU + +Use a Python 3.12 Linux environment with the recorded CPU packages. At minimum: + +```bash +pip install 'torch==2.11.0+cpu' --index-url https://download.pytorch.org/whl/cpu +pip install 'transformers==5.16.1' 'tokenizers==0.23.2' 'safetensors==0.8.0' +``` + +```python +import torch +from transformers import AutoModelForCausalLM, AutoTokenizer + +repo = "malaiwah/glm-moe-dsa-tiny-random-bf16" +revision = "45563636ef723acfb826755493447dc40c7a0c37" +torch.set_num_threads(2) +tokenizer = AutoTokenizer.from_pretrained(repo, revision=revision, trust_remote_code=False) +model = AutoModelForCausalLM.from_pretrained( + repo, revision=revision, dtype=torch.bfloat16, trust_remote_code=False +).to("cpu").eval() +inputs = tokenizer("A tiny, complete CPU fixture.", return_tensors="pt", + return_token_type_ids=False) +with torch.inference_mode(): + logits = model(**inputs, use_cache=False).logits +print(logits.shape, torch.isfinite(logits).all().item()) +``` + +## Reproduce the full QFS zero-KL check + +In a fresh Python 3.12 Linux environment, install the HF CLI if needed, then: + +```bash +pip install 'huggingface_hub==1.30.0' +hf download malaiwah/glm-moe-dsa-tiny-random-bf16 \ + --revision 45563636ef723acfb826755493447dc40c7a0c37 --local-dir tiny +pip install -r tiny/requirements-cpu.txt + +git clone https://github.com/malaiwah/quant-fidelity-suite.git qfs +git -C qfs checkout a903cddb078c2eda8c65d6e6c875a09ac932df49 + +python tiny/build_panel.py --model-dir tiny \ + --model-repository malaiwah/glm-moe-dsa-tiny-random-bf16 \ + --model-revision 45563636ef723acfb826755493447dc40c7a0c37 \ + --out tiny-panel --qfs-root qfs + +python tiny/verify_cpu.py --model-dir tiny \ + --model-repository malaiwah/glm-moe-dsa-tiny-random-bf16 \ + --model-revision 45563636ef723acfb826755493447dc40c7a0c37 \ + --panel-dir tiny-panel --out cpu-proof --qfs-root qfs +``` + +Both tools refuse existing output directories. No GPU, cloud API, registry changes, +missing-weight exception, or disabled sanity probe is used. The lane is the schema's +`other`, explicitly disclosed as CPU; it is never mislabelled `local-cuda-budget`. +The synthetic panel is independent of the large-vocabulary GLM benchmark panels and +cannot be used to rank real GLM quantizations. + +To regenerate the native checkpoint itself with the recorded build versions: + +```bash +python tiny/build_fixture.py --out regenerated-tiny +``` + +The fixed seed is **20260907**. The generator checks native save/reload equality; +[build-manifest.json](build-manifest.json) provides the expected file/tensor hashes. +Byte-identical generation was measured in this pinned CPU environment, not asserted +across arbitrary future PyTorch releases or hardware architectures. diff --git a/raw/candidates/fp8-ue8m0/source/build-manifest.json b/raw/candidates/fp8-ue8m0/source/build-manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..539ac3c8e8430caad8e5c81ca4d23dce391cac14 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/source/build-manifest.json @@ -0,0 +1,1561 @@ +{ + "architecture_inspiration": "GLM-5.2-SIQ-Fruit-bf16 geometry and dense/MoE plus full/shared DSA schedules; no Fruit or GLM model weights reused.", + "files": { + "config.json": { + "bytes": 1479, + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + "generation_config.json": { + "bytes": 216, + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + "model.safetensors": { + "bytes": 571000, + "sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1" + }, + "tokenizer.json": { + "bytes": 6763, + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + "tokenizer_config.json": { + "bytes": 236, + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + }, + "generation": "Native GlmMoeDsaForCausalLM random initialization in FP32, rounded to the published BF16 artifact; native router correction buffers retained FP32.", + "generator_sha256": "19c3489f1bc7e8e9323cb26afbead562816a6918d6823af252eb6d04dff8e81e", + "limitations": [ + "Random initialization; not trained or distilled.", + "Not a quantization or behavioral approximation of a released GLM model.", + "MTP intentionally absent (zero next-n-prediction layers); no unmatched MTP tensors.", + "This build manifest describes generated bytes, not proof of clean loading or capture; see separately measured verification evidence." + ], + "parameter_count": 277824, + "schema": "malaiwah.glm-moe-dsa-tiny-build.v1", + "seed": 20260907, + "stored_elements": 277848, + "tensor_count": 139, + "tensors": [ + { + "bytes": 33280, + "dtype": "torch.bfloat16", + "elements": 16640, + "name": "lm_head.weight", + "sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "shape": [ + 260, + 64 + ] + }, + { + "bytes": 33280, + "dtype": "torch.bfloat16", + "elements": 16640, + "name": "model.embed_tokens.weight", + "sha256": "18df1b3a5f263a31f5bd4225c3c4629573b75e47b7e28b6e73501586bb47d6f1", + "shape": [ + 260, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.0.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 16384, + "dtype": "torch.bfloat16", + "elements": 8192, + "name": "model.layers.0.mlp.down_proj.weight", + "sha256": "101a9db78e4e21058dcb6f5240e751bcaf3bd662b98696a63a719f86ecabf787", + "shape": [ + 64, + 128 + ] + }, + { + "bytes": 16384, + "dtype": "torch.bfloat16", + "elements": 8192, + "name": "model.layers.0.mlp.gate_proj.weight", + "sha256": "ef5262b354f74dce3a9dc4c3134e4db8cbf63f03ed8a1cd78ebb3e9a05af97cc", + "shape": [ + 128, + 64 + ] + }, + { + "bytes": 16384, + "dtype": "torch.bfloat16", + "elements": 8192, + "name": "model.layers.0.mlp.up_proj.weight", + "sha256": "359b4dac1da3e3956583050af84147aef2f41b8680a85b32083ffd0e1847d997", + "shape": [ + 128, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.0.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.0.self_attn.indexer.k_norm.bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 16 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.0.self_attn.indexer.k_norm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 512, + "dtype": "torch.bfloat16", + "elements": 256, + "name": "model.layers.0.self_attn.indexer.weights_proj.weight", + "sha256": "50ca7a10fe9a0556d8c3ad38bd3f715ee6c6e13084b4cb6b51b2ef78f57c53b2", + "shape": [ + 4, + 64 + ] + }, + { + "bytes": 2048, + "dtype": "torch.bfloat16", + "elements": 1024, + "name": "model.layers.0.self_attn.indexer.wk.weight", + "sha256": "f724d0b2c09ba9ae41cfc3fbe4e458bd7f644e5f0fb8c1446e19b3cf8c650274", + "shape": [ + 16, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.0.self_attn.indexer.wq_b.weight", + "sha256": "048349f93320b7625130fa5abc86dbcc89715b9f02d6853284563e765eb7bc11", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.0.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.0.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "5ad58e7c4515d8c4e84ecf10ecfa7aacb3c39ee1d6a3219307036bd8b59f529d", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.0.self_attn.kv_b_proj.weight", + "sha256": "9a8cfdd6e51c3868d27f147509d24549480e70f278758a8c16adf1ea5c197938", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.0.self_attn.o_proj.weight", + "sha256": "734b1edea5c19958ab29dfba4314ab5a5a25280be3db3de20b82b2e7c78c35ff", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.0.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.0.self_attn.q_a_proj.weight", + "sha256": "6d6e018ec4d4251755a002469f0778accef3b7628062f82a5d292d4130fd4c85", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.0.self_attn.q_b_proj.weight", + "sha256": "28ef2f379f06054843ff97f99d63f515a2f583059dd49fd894a53d04733f0650", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.1.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.0.down_proj.weight", + "sha256": "a0378aa3bb69ed49af25a51d57476ef63ccf5dc98bc4d3008d28660e16f82492", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.0.gate_proj.weight", + "sha256": "e6c7b0ce29c7e6ea16adfd8423cd9a8a27f1be217a2061a635468c9e5603439c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.0.up_proj.weight", + "sha256": "528f777edc3fc406c76dc1e150a648c23009c701134a3a86dcbdeb15f8ddc4bb", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.1.down_proj.weight", + "sha256": "c966c5eed64d8bb32ff5cf25587fc4eb714b7536b6f670725efb136acc6ca26c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.1.gate_proj.weight", + "sha256": "e55ceb89e6891b34fb67fe5c99b529a1cab9729bea2f6ef08be6af7eefcf6c2e", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.1.up_proj.weight", + "sha256": "46b43c2f3a025bab46be05795bb60916e592bb58d4fdf2a18d2e88d37a7a4fb8", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.2.down_proj.weight", + "sha256": "a649be4fd07f95d770fbe14e87561a13f62f155d2053b8a35fa6962b5d5e8c8d", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.2.gate_proj.weight", + "sha256": "5560e590344e57ff54425f4aa6c07edaaade8c73343e32c27199f1c0dc61fe51", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.2.up_proj.weight", + "sha256": "35a639103a8a914203b4dde3f87d197515879ae6ca72557cde8ea9dea6e6e0d2", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.3.down_proj.weight", + "sha256": "0969db499dfe821348b3c06873d36635f7216f1f595968ad43ae984b57565205", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.3.gate_proj.weight", + "sha256": "75c5c77c39a77a4a6dbe7b601a88814bca9cae6fcde0069ff2ca86352e6c13e7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.3.up_proj.weight", + "sha256": "241533cb545cfed7685091b023213c9d530cb54431a712eba7bf3aaebdae3b53", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.4.down_proj.weight", + "sha256": "ca1273d291e431a10b8d8c2170031b29440c2bec8bc1d7f46353990c7fe1a03f", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.4.gate_proj.weight", + "sha256": "69dc9149cbfd65fb10bd6c11f99357d279d471e5874cf19dbef7cfd8ee4d796c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.4.up_proj.weight", + "sha256": "81cb04732e3cc53acb1152c7fc06a6399af18a5f282762cb72abb56b1e6b7c6f", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.5.down_proj.weight", + "sha256": "ebd8e01f9c2daf657e915575afb3ff5ba261a2a83c25c9c50818319dd587a2f2", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.5.gate_proj.weight", + "sha256": "bc70a7d1a5263ca17d00766bb2dc48e1debb815344150741e55dea48af4d75c0", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.5.up_proj.weight", + "sha256": "f84a95d64728067676d4f7b61ac4a589fa11e45226a8996a4719d65f0b018dbf", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.6.down_proj.weight", + "sha256": "00535633e5d98b7a527cc1198d572a9104405e2aff7ee303ae60195654fb24c2", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.6.gate_proj.weight", + "sha256": "2bb299a5e306108c7af11aa5c6114abeb4d06bde9001e6f7644e0d9dca184dc5", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.6.up_proj.weight", + "sha256": "72df8a498b866a242abc9383b16c5b4428feadab02c7f274afa28653e8586107", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.7.down_proj.weight", + "sha256": "90331ab3da1e867c32d3db1aac94c69c86349dbb539400ed9e0c19c148bf5e43", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.7.gate_proj.weight", + "sha256": "576a9df3d1d72f7323e8a8490118821d826f50c9403ca7ecbe196277e62c7730", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.7.up_proj.weight", + "sha256": "3869533066e5bca84402355c6b80b177424f2d79d2b97cbb9cff30eee748135f", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.float32", + "elements": 8, + "name": "model.layers.1.mlp.gate.e_score_correction_bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 8 + ] + }, + { + "bytes": 1024, + "dtype": "torch.bfloat16", + "elements": 512, + "name": "model.layers.1.mlp.gate.weight", + "sha256": "7d1dbc5cc90900cdc1f9d4a241c8b62d0ad50de09231f9f036cce33982cfdfe7", + "shape": [ + 8, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.shared_experts.down_proj.weight", + "sha256": "eb5297f619dfdfb40419b3330406e8ff43cb0fe35797911f2de6ebff4b95690a", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.shared_experts.gate_proj.weight", + "sha256": "eeeff2280eef91eac1215b28717f2b7fdee09fdbfd484ff44855e7e7cdd11718", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.shared_experts.up_proj.weight", + "sha256": "dab5aeab83d842104e1c5557b9b6d6cb5fe519284b909e8c0c975c752dc92d41", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.1.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.1.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.1.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "bff5998ab14190d56392c70e92927904d84a2b9d04ee222967d774a5bb5eecc4", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.1.self_attn.kv_b_proj.weight", + "sha256": "876302ef3f8bba74a997f973913ca4b802aa488d27b46747c470062c9a7ebee5", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.1.self_attn.o_proj.weight", + "sha256": "ecda88672dc8fbc3bac348fa6118010e51b170d8fe3596a811bc9aa95f71915c", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.1.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.self_attn.q_a_proj.weight", + "sha256": "29fc979642704e621b0b6b59a24c13d6900782bfa9655ea9a3311c1d4c69770a", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.self_attn.q_b_proj.weight", + "sha256": "01bae246d61c4d08e751e42e6a03315b55266ae46bd15b34bd343f606a538349", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.2.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.0.down_proj.weight", + "sha256": "8c1c19d08541dc9251736b480f53cfefd21bfbcb0b4e9f725dc66e6c52d7705c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.0.gate_proj.weight", + "sha256": "8c326913b2ef159b507b584c1ae018619573a09b6f41ab687df629d3685884c4", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.0.up_proj.weight", + "sha256": "8611bc004f735fbc1c14a9c9c23f4150c7e754127e44926a44efd0b767a653ed", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.1.down_proj.weight", + "sha256": "1d4d668c4c8183e5991eefe780a138eda70578a4740c07df5b386f233cb4e5c3", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.1.gate_proj.weight", + "sha256": "21224f6173f4785ff6252dd0c1f7a6937b36bbd5bc1c20d25feecc85d6d25f3e", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.1.up_proj.weight", + "sha256": "05542672d0174f9ddfee4bd385b56455c004532da88bf34363b1e543948bf899", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.2.down_proj.weight", + "sha256": "7330dee9a6a416e9922f61d10ee0507584e007cbdd349131471b43a745b6fed8", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.2.gate_proj.weight", + "sha256": "eca5904e6634e97ca89e7dfb1f12774f78adb33b78256136e7e8ee522af92d96", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.2.up_proj.weight", + "sha256": "5a90748752e46844a0cf0efd84c16ec2db25315ffa7a13b9c4bff2697d00bbf6", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.3.down_proj.weight", + "sha256": "a42569462225d60158dfaf24406463f135b632fe258e66ae2e521efed502a37c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.3.gate_proj.weight", + "sha256": "8cf448df350984fe0429a1ca3b2081315b594e50ce85fbc2e9f63eafb8a896b7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.3.up_proj.weight", + "sha256": "54a1269ba638d42c7d6d3926826b04d52310c82804fddcd73c253680a4270032", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.4.down_proj.weight", + "sha256": "5a236edfdc8fc79f687cec866d13724515b8f26465dca2ffde051d0870d5d0ac", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.4.gate_proj.weight", + "sha256": "6c18140a11c9986f99b7c269da01a8f69f1b5215c41be1801d6900eb511bdc76", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.4.up_proj.weight", + "sha256": "7b964f5c207a6bbeaa589a6c07f9665967aca4e7c57148190ed6a6f12e0ca572", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.5.down_proj.weight", + "sha256": "74c2633e7d3b0bf844d3e3812533774fc09b6552435e778e68b442ad161c0985", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.5.gate_proj.weight", + "sha256": "6177166c1bc51e03fde63b60d85347f5a5412446df5b4dd893817d18fcf0d56c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.5.up_proj.weight", + "sha256": "7bb8e1f65a918589a1593926dc93bf3fa1329f5d31f16266c3ad6fe0fd390d47", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.6.down_proj.weight", + "sha256": "af74e303b86b1aec96fd69b64d39848d7d08f255822739cf7d5f4456de67f010", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.6.gate_proj.weight", + "sha256": "c4fc94863e17270bf8cb5a18d3a125bea82d04bfb38457fd27896a00ddeea056", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.6.up_proj.weight", + "sha256": "4e92bebe11c518a225d75d4d7de7b85f9a82baad7a961ac090dd7343a612b577", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.7.down_proj.weight", + "sha256": "8971d6a869ba59445fe28163bd73c74c8338e0b8b675f008277b5a8973967bb2", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.7.gate_proj.weight", + "sha256": "3f90ff90c18d50349a50d11c472d48c6b297496ba5bedfe4ff0da257e1e2fdef", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.7.up_proj.weight", + "sha256": "5a2fcecdbb84a9138b4dd32da15793393aeaee1d00da95ed3d55803b1f45cc86", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.float32", + "elements": 8, + "name": "model.layers.2.mlp.gate.e_score_correction_bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 8 + ] + }, + { + "bytes": 1024, + "dtype": "torch.bfloat16", + "elements": 512, + "name": "model.layers.2.mlp.gate.weight", + "sha256": "aa35eb60ee6dd8e32728c95210b15016120675b111542f36ee1b1cca64668f9d", + "shape": [ + 8, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.shared_experts.down_proj.weight", + "sha256": "e8a1e6e8db3b1996aad9cd457ae20aa5aaac876d400fd6e8d764f543ff7833b9", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.shared_experts.gate_proj.weight", + "sha256": "c5b456aab9a02d3828987060b24d24c07e7b611d3036f0d5c28662c922d1238d", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.shared_experts.up_proj.weight", + "sha256": "6a84e814bd21fcc17878151b94508853dd70099787ef5303cdc06f90b6cd7092", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.2.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.2.self_attn.indexer.k_norm.bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 16 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.2.self_attn.indexer.k_norm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 512, + "dtype": "torch.bfloat16", + "elements": 256, + "name": "model.layers.2.self_attn.indexer.weights_proj.weight", + "sha256": "d65c6e5c3f34fcad47b7137c46dd3bcd6d5cf24ce508df7fad9d20788d3a18b8", + "shape": [ + 4, + 64 + ] + }, + { + "bytes": 2048, + "dtype": "torch.bfloat16", + "elements": 1024, + "name": "model.layers.2.self_attn.indexer.wk.weight", + "sha256": "917ff454cb253fa0e5d3d68bf15e716401bb928fbd7cd260a348afec25b1b2c8", + "shape": [ + 16, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.self_attn.indexer.wq_b.weight", + "sha256": "3fe5b407fe2d74a0dda78b6cb7ae3f65066a781fd5f81971b83be600fc911d14", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.2.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.2.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "26cecf47e8fb14a837f760549a9b9dd8589c37dc76870f8b115d4ab634b853ab", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.2.self_attn.kv_b_proj.weight", + "sha256": "23447f5f72c55b0cd7acd571ff1317c16c8097e9f0de4cc9b66101b51f7988c1", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.2.self_attn.o_proj.weight", + "sha256": "a1a0c84b3214c9b7b00c438754280833964cdc719aadeff64358b3d09b2063d8", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.2.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.self_attn.q_a_proj.weight", + "sha256": "3eda4fc6a047b282d63ad2884d870ee8150a99f3c71d21031ea71e749cf39815", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.self_attn.q_b_proj.weight", + "sha256": "58ecb919757c3c93d6a43b9344236d9abd32870e68907f37cb8db779d2c93fff", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.3.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.0.down_proj.weight", + "sha256": "e8c77c987baa36019ce1adf05e02e2a31395286e584428b2049e06331848c216", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.0.gate_proj.weight", + "sha256": "69871151865d8a23e2cc39b9fe5da60eb4f41cb6c053520f29d7c7b58e6fa5e0", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.0.up_proj.weight", + "sha256": "12df1ea42b96e959785c09427c3ca3bcdc53aa7942d15187c7b1e19bdd66d08a", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.1.down_proj.weight", + "sha256": "5feaa5de7da59348b465458b8aff5373b11dae8b5150f8e7bb8015acc172e3ff", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.1.gate_proj.weight", + "sha256": "e907e6e36b7266d56e190c1e56551e0a40d64741ce668328d898c17b488ec6c9", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.1.up_proj.weight", + "sha256": "c0062ef6004073cbabf3098703b5f565f0e973e094d90c3eba36c7be471f947e", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.2.down_proj.weight", + "sha256": "efec1e8a6a5e12a6db226699e10a6d346fa95c453009f148fe304d378567f5fe", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.2.gate_proj.weight", + "sha256": "7722cc87a7696f53e7f1e0d741230a7db18d2c324f7faec742a9621c75189cb7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.2.up_proj.weight", + "sha256": "5917df5932d0ce4854458ce357a8a2c3384bc463531996875d1c68c6ea17734c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.3.down_proj.weight", + "sha256": "fd331dc77911f8d80ddfdee938993a08b3715d06767901879c5a55700dbb8961", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.3.gate_proj.weight", + "sha256": "1e8aa3749cdc3d21baf7108c47bb69ad4a532c1f41c0556ca8d68ca2c226a7a8", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.3.up_proj.weight", + "sha256": "858e72360951a5073d117a75b2cd759bc3503c6c270388b30fe73d7554f54dae", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.4.down_proj.weight", + "sha256": "b80cf998a1db7569ca4600388bbe4c6d20bd7fe7209c4e37b5de015041d01423", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.4.gate_proj.weight", + "sha256": "b39a0f5b9cd6f9175e7fa29b342772476caf8a76dad1c34d88075988c1894853", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.4.up_proj.weight", + "sha256": "cef4d7b5fb77e750e91c17cae1622a6362ba204b1b30bf5ed7b65f9e6ed15ff1", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.5.down_proj.weight", + "sha256": "65a04840ec88842630cc6f120899a3bfa6151990d7411bfe44839727648e4d03", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.5.gate_proj.weight", + "sha256": "101836900c549af917f8392a6b1428e2f14e4e1f1ef0fdd9b04e79b98c1c3d02", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.5.up_proj.weight", + "sha256": "4fc8edda4b1a92a43be268a8b249274dd5f4370fd6ea6a3134b8c2c4cf730d95", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.6.down_proj.weight", + "sha256": "fd3a10e1464c20bf5e575c105f39882bcbddcab892ef36f24e5a852d597ee7ef", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.6.gate_proj.weight", + "sha256": "8211aaeed6f1ea2711aa1865309d2d36742c0b41021eea1e00fcac45dc353b4b", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.6.up_proj.weight", + "sha256": "ec4f5d1acc5d045de6ae4106bc8f52d17d64ac355c910f12fac8b1b0b573296d", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.7.down_proj.weight", + "sha256": "03c257936ec78df3f941fe0ca4ce5aad636654cf2a351b64515ac07ad8871cae", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.7.gate_proj.weight", + "sha256": "67c1e28fd0a028104b9c76279a3c473f50452633c8a4feabda637e5f5b71f797", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.7.up_proj.weight", + "sha256": "1b18f8b452b71ca57fec09892a48df2ee2108067f97f62b76a3817c9bea91708", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.float32", + "elements": 8, + "name": "model.layers.3.mlp.gate.e_score_correction_bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 8 + ] + }, + { + "bytes": 1024, + "dtype": "torch.bfloat16", + "elements": 512, + "name": "model.layers.3.mlp.gate.weight", + "sha256": "7e86bda3f7704f19dc2a3f6a0ca22b0df554723adf0cf3add837a1e497ad4d3a", + "shape": [ + 8, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.shared_experts.down_proj.weight", + "sha256": "110ad4d8dd59a5ec2b0d4c2e0a79d022bcdba240a4998ff84ad2590dd32fce2c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.shared_experts.gate_proj.weight", + "sha256": "cca5d02ac9eccab3ee8be47f55ef4d59750dd311800e25c22cc3f22b437ffd8b", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.shared_experts.up_proj.weight", + "sha256": "c8fe3987299d1526946a87facc4d3f99300fafbac552471ed826454c41ed31e5", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.3.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.3.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.3.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "5c230cafd4add95096f53702bab8ef1673993cca9433de8c874638958a61995a", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.3.self_attn.kv_b_proj.weight", + "sha256": "ff432280fe1fbbc2a5b7fee7fb18f6de59d675d2d7d0eec0d769a5fd012699a9", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.3.self_attn.o_proj.weight", + "sha256": "59e2e2ee8f9cba29e9cf3e6098539ddca5811d35d3df3c860488f348d6be9584", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.3.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.self_attn.q_a_proj.weight", + "sha256": "172aae8ff1a79376bf65182f5e92c06da2f9b307c15f214a20597491729aa0d7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.self_attn.q_b_proj.weight", + "sha256": "5d917d8c510906982c609808f1eb0d16da467976550e3a063637f1fde013cbdb", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.norm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + } + ], + "tokenizer": { + "kind": "byte-level BPE without merges", + "special_token_ids": { + "": 1, + "": 2, + "": 0, + "": 3 + }, + "vocab_size": 260 + }, + "versions": { + "safetensors": "0.8.0", + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "transformers": "5.16.1" + } +} diff --git a/raw/candidates/fp8-ue8m0/source/build_fixture.py b/raw/candidates/fp8-ue8m0/source/build_fixture.py new file mode 100644 index 0000000000000000000000000000000000000000..c86f3466f6c2ac6df7f31bb4ac5ca8bbcaeebf2c --- /dev/null +++ b/raw/candidates/fp8-ue8m0/source/build_fixture.py @@ -0,0 +1,145 @@ +#!/usr/bin/env python3 +"""Build a complete, untrained GLM MoE DSA checkpoint for CPU pipeline checks. + +No source model weights, remote Python code, training data or paid compute are used. +Reproducibility is asserted only for the recorded dependency versions on CPU. +""" +from __future__ import annotations + +import argparse +import hashlib +import json +from pathlib import Path +import shutil + +SEED = 20260907 +SPECIAL_TOKENS = ["", "", "", ""] +VERSIONS = {"torch": "2.11.0+cpu", "transformers": "5.16.1", "tokenizers": "0.23.2", "safetensors": "0.8.0"} + + +def write_json(path, value): + path.write_text(json.dumps(value, sort_keys=True, indent=2, ensure_ascii=False, allow_nan=False) + "\n", encoding="utf-8") + + +def build(destination): + import torch + import transformers + import tokenizers + import safetensors + from tokenizers import Tokenizer, decoders, models, pre_tokenizers, processors + from transformers import GlmMoeDsaConfig, GlmMoeDsaForCausalLM, PreTrainedTokenizerFast + + observed = {"torch": torch.__version__, "transformers": transformers.__version__, + "tokenizers": tokenizers.__version__, "safetensors": safetensors.__version__} + if observed != VERSIONS: + raise ValueError("Use the recorded CPU build environment: expected %s; observed %s" % (VERSIONS, observed)) + if destination.exists(): + raise ValueError("Refusing to overwrite an existing destination: %s" % destination) + destination.mkdir(parents=True) + torch.set_num_threads(2) + torch.set_num_interop_threads(1) + torch.manual_seed(SEED) + torch.use_deterministic_algorithms(True) + + alphabet = sorted(pre_tokenizers.ByteLevel.alphabet()) + if len(alphabet) != 256: + raise ValueError("The byte alphabet must contain exactly 256 symbols") + vocabulary = {token: index for index, token in enumerate(SPECIAL_TOKENS + alphabet)} + backend = Tokenizer(models.BPE(vocab=vocabulary, merges=[], unk_token="")) + backend.pre_tokenizer = pre_tokenizers.ByteLevel(add_prefix_space=False, use_regex=False) + backend.decoder = decoders.ByteLevel() + backend.post_processor = processors.TemplateProcessing( + single=" $A ", pair=" $A $B:1 :1", + special_tokens=[("", 1), ("", 2)]) + tokenizer = PreTrainedTokenizerFast( + tokenizer_object=backend, pad_token="", bos_token="", + eos_token="", unk_token="", model_max_length=256, + clean_up_tokenization_spaces=False) + tokenizer.save_pretrained(destination) + + config = GlmMoeDsaConfig( + vocab_size=len(tokenizer), hidden_size=64, intermediate_size=128, + moe_intermediate_size=32, num_hidden_layers=4, + num_attention_heads=4, num_key_value_heads=4, + n_shared_experts=1, n_routed_experts=8, num_experts_per_tok=2, + n_group=1, topk_group=1, norm_topk_prob=True, routed_scaling_factor=2.5, + q_lora_rank=32, kv_lora_rank=16, qk_nope_head_dim=8, + qk_rope_head_dim=8, v_head_dim=16, + index_n_heads=4, index_head_dim=16, index_topk=8, + indexer_types=["full", "shared", "full", "shared"], + first_k_dense_replace=1, mlp_layer_types=["dense", "sparse", "sparse", "sparse"], + num_nextn_predict_layers=0, max_position_embeddings=256, + rope_parameters={"rope_type": "default", "rope_theta": 10000.0}, + pad_token_id=0, bos_token_id=1, eos_token_id=2, tie_word_embeddings=False, + attention_bias=False, attention_dropout=0.0, mlp_bias=False, + initializer_range=0.02, rms_norm_eps=1e-5, dtype="bfloat16", + ) + # Construct the native class, never hand-author a subset of state_dict keys. + # Initialize in FP32, then deliberately define the published artifact in BF16. + model = GlmMoeDsaForCausalLM(config).to(device="cpu", dtype=torch.bfloat16).eval() + # The native BF16 loader strictly retains router correction buffers in FP32. + # Store that exception explicitly; the rest reloads without dtype changes. + for module in model.modules(): + if hasattr(module, "e_score_correction_bias"): + module.e_score_correction_bias = module.e_score_correction_bias.float() + if model.get_output_embeddings().weight.data_ptr() == model.get_input_embeddings().weight.data_ptr(): + raise ValueError("Fixture must contain a complete, independent output head") + for name, tensor in model.state_dict().items(): + if tensor.is_floating_point() and not torch.isfinite(tensor).all(): + raise ValueError("Non-finite initialized tensor: " + name) + model.save_pretrained(destination, safe_serialization=True, max_shard_size="10MB") + + from safetensors import safe_open + tensors = [] + with safe_open(destination / "model.safetensors", framework="pt", device="cpu") as saved: + for name in sorted(saved.keys()): + tensor = saved.get_tensor(name) + raw = tensor.contiguous().view(torch.uint8).numpy().tobytes() + tensors.append({"name": name, "shape": list(tensor.shape), "dtype": str(tensor.dtype), + "elements": tensor.numel(), "bytes": len(raw), + "sha256": hashlib.sha256(raw).hexdigest()}) + # Native saving expands fused expert tensors into canonical per-expert + # checkpoint keys. Verify their semantic roundtrip, not name equality between + # the storage representation and the in-memory fused representation. + reloaded = transformers.AutoModelForCausalLM.from_pretrained( + destination, dtype=torch.bfloat16, local_files_only=True, trust_remote_code=False) + expected_state, observed_state = model.state_dict(), reloaded.state_dict() + if expected_state.keys() != observed_state.keys(): + raise ValueError("Native state keys changed across save/reload") + for name, tensor in expected_state.items(): + if tensor.dtype != observed_state[name].dtype or not torch.equal(tensor, observed_state[name]): + raise ValueError("Tensor changed across native save/reload: " + name) + files = {} + for name in ("config.json", "generation_config.json", "model.safetensors", "tokenizer.json", "tokenizer_config.json"): + raw = (destination / name).read_bytes() + files[name] = {"bytes": len(raw), "sha256": hashlib.sha256(raw).hexdigest()} + manifest = { + "schema": "malaiwah.glm-moe-dsa-tiny-build.v1", + "seed": SEED, "versions": observed, + "generator_sha256": hashlib.sha256(Path(__file__).read_bytes()).hexdigest(), + "generation": "Native GlmMoeDsaForCausalLM random initialization in FP32, rounded to the published BF16 artifact; native router correction buffers retained FP32.", + "parameter_count": sum(p.numel() for p in model.parameters()), + "tensor_count": len(tensors), "stored_elements": sum(t["elements"] for t in tensors), + "files": files, "tensors": tensors, + "tokenizer": {"kind": "byte-level BPE without merges", "vocab_size": len(tokenizer), + "special_token_ids": {token: tokenizer.convert_tokens_to_ids(token) for token in SPECIAL_TOKENS}}, + "architecture_inspiration": "GLM-5.2-SIQ-Fruit-bf16 geometry and dense/MoE plus full/shared DSA schedules; no Fruit or GLM model weights reused.", + "limitations": ["Random initialization; not trained or distilled.", "Not a quantization or behavioral approximation of a released GLM model.", + "MTP intentionally absent (zero next-n-prediction layers); no unmatched MTP tensors.", + "This build manifest describes generated bytes, not proof of clean loading or capture; see separately measured verification evidence."], + } + write_json(destination / "build-manifest.json", manifest) + shutil.copyfile(__file__, destination / "build_fixture.py") + print(json.dumps({"destination": str(destination), "parameter_count": manifest["parameter_count"], + "tensor_count": len(tensors), "weight_file": files["model.safetensors"]}, indent=2)) + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--out", required=True, type=Path) + args = parser.parse_args() + build(args.out) + + +if __name__ == "__main__": + main() diff --git a/raw/candidates/fp8-ue8m0/source/build_panel.py b/raw/candidates/fp8-ue8m0/source/build_panel.py new file mode 100644 index 0000000000000000000000000000000000000000..258be1a623b3009940fb0b1417c5be9ea02904be --- /dev/null +++ b/raw/candidates/fp8-ue8m0/source/build_panel.py @@ -0,0 +1,232 @@ +#!/usr/bin/env python3 +"""Build the tiny GLM-MoE-DSA synthetic CPU smoke panel, not a benchmark. + +The QFS panel directory has an exact sealed file closure. Its resolved binding +and SHA report are therefore written beside --out, never inside it. The caller +must supply the genuine published model commit; this offline builder verifies +local bytes, not their remote availability at that commit. +""" +from __future__ import annotations + +import argparse +import importlib.util +import json +from pathlib import Path +import re +import sys + + +PANEL_ID = "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1" +PANEL_NAME = "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)" +CONTEXT_LENGTH = 64 +VOCAB_SIZE = 260 +ARTIFACT_EPOCH = "2026-09-07T00:00:00Z" +# Authored synthetic inputs, embedded verbatim in the receipt for reconstruction. +TEXTS = ( + ("garden", "The small garden has red flowers, green leaves, and a stone path. " + "A gentle breeze moves the branches while a robin sings near the gate."), + ("arithmetic", "A shelf holds three blue boxes and five red boxes. There are eight " + "boxes in total. Move two boxes to the desk and count the six boxes remaining."), + ("code", "def add_values(left, right):\n return left + right\n\n" + "result = add_values(7, 9)\nprint(result)\n" + "# This readable snippet is synthetic input, not a coding benchmark.\n"), + ("instructions", "First place a clean cup on the table. Next pour cool water into " + "the cup. Finally put the bottle away and write a short note about the steps."), +) +TOKENIZER_FILES = ( + "config.json", "generation_config.json", "tokenizer.json", "tokenizer_config.json", + "special_tokens_map.json", "added_tokens.json", "vocab.json", "merges.txt", + "tokenizer.model", "spiece.model", "sentencepiece.bpe.model", "chat_template.jinja", +) + + +def write_json(path: Path, value: object) -> None: + with path.open("x", encoding="utf-8", newline="\n") as handle: + handle.write(json.dumps(value, indent=2, sort_keys=True, + ensure_ascii=False, allow_nan=False) + "\n") + + +def main(argv: list[str] | None = None) -> int: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--model-dir", required=True, type=Path) + parser.add_argument("--model-repository", required=True) + parser.add_argument("--model-revision", required=True, + help="genuine immutable published model commit (40 lowercase hex)") + parser.add_argument("--out", required=True, type=Path, + help="new sealed panel directory; binding/report are sibling files") + parser.add_argument("--qfs-root", required=True, type=Path, + help="QFS checkout containing bin/fidelity and engines/tools") + args = parser.parse_args(argv) + if re.fullmatch(r"[0-9a-f]{40}", args.model_revision) is None: + parser.error("--model-revision must be an immutable 40-character lowercase hex commit") + if re.fullmatch(r"[A-Za-z0-9][A-Za-z0-9._-]*/[A-Za-z0-9][A-Za-z0-9._-]*", + args.model_repository) is None: + parser.error("--model-repository must be a Hugging Face owner/repository ID") + model_dir = args.model_dir.resolve() + qfs_root = args.qfs_root.resolve() + out = args.out.resolve() + binding_path = out.with_name(out.name + ".binding.json") + report_path = out.with_name(out.name + ".sha256.json") + if not model_dir.is_dir(): + parser.error("--model-dir must already contain the saved model and native tokenizer") + for destination in (out, binding_path, report_path): + if destination.exists() or destination.is_symlink(): + parser.error("refusing to overwrite %s" % destination) + if destination.is_relative_to(model_dir) or destination.is_relative_to(qfs_root): + parser.error("output must be outside the model directory and QFS checkout") + builder_path = qfs_root / "engines/tools/build_token_panel.py" + resolver_path = qfs_root / "bin/fidelity/panel.py" + if not builder_path.is_file() or not resolver_path.is_file(): + parser.error("--qfs-root lacks the existing token-panel builder or resolver") + + # Reuse the existing format's seal and token preimages. Its CLI cannot meet + # this contract: it hardcodes add_special_tokens=False and not local-only. + spec = importlib.util.spec_from_file_location("qfs_token_panel_builder", builder_path) + if spec is None or spec.loader is None: + raise RuntimeError("cannot import the QFS token-panel builder") + builder = importlib.util.module_from_spec(spec) + spec.loader.exec_module(builder) + sys.path.insert(0, str(qfs_root / "bin")) + from fidelity import panel as panel_contract + import numpy as np + import tokenizers + import transformers + from transformers import AutoTokenizer + + for name in ("config.json", "tokenizer.json", "tokenizer_config.json"): + if not (model_dir / name).is_file(): + raise ValueError("required native tokenizer/model file missing: " + name) + config = json.loads((model_dir / "config.json").read_text(encoding="utf-8")) + if config.get("model_type") != "glm_moe_dsa" or config.get("vocab_size") != VOCAB_SIZE: + raise ValueError("expected glm_moe_dsa model with vocabulary size 260") + if config.get("max_position_embeddings", 0) < CONTEXT_LENGTH: + raise ValueError("model context limit cannot accommodate 64-token windows") + file_hashes = {name: builder.sha256_file(model_dir / name) + for name in sorted(TOKENIZER_FILES) if (model_dir / name).is_file()} + tokenizer = AutoTokenizer.from_pretrained( + model_dir, local_files_only=True, trust_remote_code=False) + if len(tokenizer) != VOCAB_SIZE or tokenizer.vocab_size != VOCAB_SIZE: + raise ValueError("expected exactly 260 native tokenizer entries, including special tokens") + if set(tokenizer.get_vocab().values()) != set(range(VOCAB_SIZE)): + raise ValueError("tokenizer IDs must cover the contiguous interval [0,260)") + expected_specials = {"pad_token_id": 0, "bos_token_id": 1, + "eos_token_id": 2, "unk_token_id": 3} + for name, expected in expected_specials.items(): + if getattr(tokenizer, name, None) != expected: + raise ValueError("unexpected tokenizer special ID for " + name) + + encoded_windows = [] + sources = [] + for index, (domain, text) in enumerate(TEXTS): + encoded = tokenizer(text, add_special_tokens=True, truncation=True, + max_length=CONTEXT_LENGTH, padding=False, + return_attention_mask=True, return_special_tokens_mask=True) + ids = encoded["input_ids"] + mask = encoded["attention_mask"] + special_mask = encoded["special_tokens_mask"] + if (len(ids) != CONTEXT_LENGTH or len(mask) != CONTEXT_LENGTH + or len(special_mask) != CONTEXT_LENGTH + or any(type(value) is not int or not 0 <= value < VOCAB_SIZE for value in ids) + or mask != [1] * CONTEXT_LENGTH): + raise ValueError("tokenizer produced invalid token IDs or 64-token/mask shape") + if (any(value not in (0, 1) for value in special_mask) + or not any(special_mask) + or not all(ids[pos] in tokenizer.all_special_ids + for pos, marked in enumerate(special_mask) if marked)): + raise ValueError("native tokenizer did not apply a valid special-token template") + window_id = "final-%04d" % index + encoded_windows.append((window_id, domain, ids)) + raw = text.encode("utf-8") + sources.append({"stratum": domain, "document": domain + ".txt", + "document_sha256": builder.sha256_bytes(raw), "bytes": len(raw), + "text_utf8": text, "selected": True, "window_id": window_id, + "tokens_total": len(tokenizer(text, add_special_tokens=True)["input_ids"]), + "num_tokens": len(ids), "special_tokens_mask": special_mask}) + + arrays = out / "arrays" + arrays.mkdir(parents=True, exist_ok=False) + mask_path = arrays / "causal-mask-64.npy" + np.save(mask_path, np.ones(CONTEXT_LENGTH, dtype=np.uint8), allow_pickle=False) + mask_sha = builder.sha256_file(mask_path) + windows = [] + for window_id, domain, ids in encoded_windows: + token_path = arrays / (window_id + ".tokens.npy") + np.save(token_path, np.asarray(ids, dtype=" same_stack", + "overridden_by": null, + "passed": true + } + }, + "high_kld_contexts": [ + { + "allocation_stratum": null, + "domain": "garden", + "index": 0, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0000" + }, + { + "allocation_stratum": null, + "domain": "arithmetic", + "index": 1, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0001" + }, + { + "allocation_stratum": null, + "domain": "code", + "index": 2, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0002" + }, + { + "allocation_stratum": null, + "domain": "instructions", + "index": 3, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0003" + } + ], + "kl": { + "max": 0.0, + "mean": 0.0, + "median": 0.0, + "p95": 0.0, + "p99": 0.0, + "p99_9": 0.0 + }, + "kl_macro_stratum_mean": null, + "kl_micro_token_mean": 0.0, + "measurement_scope": { + "contexts": 4, + "covers_full_panel": true, + "position_filter": "all", + "positions_per_context": 63, + "scored_positions": 252, + "subset_detail": null + }, + "metric": { + "direction": "reference_to_candidate", + "direction_label": "KL(reference || candidate)", + "higher_is_better": false, + "name": "mean_tokenwise_kld", + "units": "nats", + "value": 0.0 + }, + "panel": { + "context_length": 64, + "contexts": 4, + "panel_id": "panel--panel", + "panel_token_sha256_legacy": "3c9467c85be43d238926f6d18bf825c2e4748814c95b8b0e8b8f1420546c3089", + "scored_positions": 252, + "scoring_window": { + "dropped_positions_total": 0, + "min_left_context_tokens": 1, + "policy": "every causal prediction position of every window is scored; nothing is dropped", + "score_from": 0, + "windowed": false + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + }, + "tokenizer_candidate": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + }, + "tokenizer_identity_equal": true, + "tokenizer_reference": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } + }, + "per_context": [ + { + "allocation_stratum": null, + "domain": "garden", + "index": 0, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0000" + }, + { + "allocation_stratum": null, + "domain": "arithmetic", + "index": 1, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0001" + }, + { + "allocation_stratum": null, + "domain": "code", + "index": 2, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0002" + }, + { + "allocation_stratum": null, + "domain": "instructions", + "index": 3, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0003" + } + ], + "per_domain": null, + "per_stratum": null, + "receipt_sha256": "4910833e5cc175ea351055e567c5d896475b4020598359291aedc958d8ada382", + "reference": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "dataset_id": "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "dataset_sha256": "56588f20f9cf055301f83a828fa75fa94c1e26593e64a07c5c6c4e38e9454563", + "form": "hidden", + "head": { + "bits": 16, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510" + }, + "label": "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "lane": "other", + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "repository": "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "revision": null, + "role": "root", + "scope_digest": "attn.o=native:bf16@16|attn.qkv=native:bf16@16|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=native:bf16@16|mlp.gate=native:bf16@16|mlp.up=native:bf16@16|moe.experts=native:bf16@16|norm=native:bf16@16|head=native|kv=bf16", + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd", + "weights": { + "artifact_ref": null, + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "codec": null, + "config_sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "declared_bits": null, + "declared_head_bits": 16, + "index_sha256": null, + "model_ref": null, + "model_revision": "45563636ef723acfb826755493447dc40c7a0c37", + "quantized": false, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37" + } + }, + "schema": "malaiwah.fidelity-comparison-receipt.v1", + "self_compare": { + "asserted_exact_zero": true, + "capture_content_digest_equal": true, + "expected_tokenwise_bytes": 2144, + "expected_tokenwise_sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d", + "force_compute_agreed": true, + "head_digest_equal": true, + "weights_identity_equal": true + }, + "submission": { + "emitted": false, + "path": null, + "receipt_sha256": null, + "refusal": "comparison_kind is reproduction_confirmation, not measurement; bin/fidelity/receipt.py::_scan_for_unsubmittable is the second, independent refusal axis.", + "submission_schema": null + }, + "tokenwise": { + "bytes": 2144, + "path": "tokenwise-kld.npy", + "sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d" + }, + "top1_agreement": 1.0, + "top1_discordant_contexts": [], + "uncertainty": { + "ci95_high": null, + "ci95_low": null, + "cluster_unit": null, + "clusters": null, + "method": "none", + "samples": null, + "seed": null + } +} diff --git a/raw/candidates/fp8-ue8m0/source/cpu-reproduction-summary.json b/raw/candidates/fp8-ue8m0/source/cpu-reproduction-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..7fe4e433fbfabcad4ab3781b796fbd3439d5db17 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/source/cpu-reproduction-summary.json @@ -0,0 +1,851 @@ +{ + "captures": { + "first": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "cold_run": "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "dataset_sha256": "56588f20f9cf055301f83a828fa75fa94c1e26593e64a07c5c6c4e38e9454563", + "generation_sanity_probe": { + "degenerate": false, + "enforced": false, + "entropy_nats": 5.548019647470335, + "expect": null, + "logit_spread": 0.986328125, + "note": "one extra window through the same schedule; its hidden state is discarded and never enters the dataset.", + "prompt": "The capital of France is", + "schema": "malaiwah.generation-sanity-probe.v1", + "status": "recorded", + "top1_id": 113, + "top1_probability": 0.006720104384265371, + "top1_text": "�", + "top_k": [ + { + "id": 113, + "probability": 0.006720104384265371, + "text": "�" + }, + { + "id": 237, + "probability": 0.006412368399474785, + "text": "�" + }, + { + "id": 193, + "probability": 0.006035639491843906, + "text": "\u0001" + }, + { + "id": 236, + "probability": 0.0055386141320063614, + "text": "�" + }, + { + "id": 44, + "probability": 0.0054740873228682424, + "text": "I" + } + ], + "uniform_entropy_nats": 5.560681631015528, + "vocab_size": 260 + }, + "head_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "memory_report": { + "context_length": 64, + "decoder_layers": null, + "device": "cpu", + "hidden_size": 64, + "layer_residency": null, + "model": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "peak_resident_weight_bytes": 555776, + "peak_resident_weight_detail": { + "buffers": 128, + "parameters": 555648, + "total": 555776 + }, + "peak_resident_weight_gb": 0.001, + "peak_rss_bytes": 367374336, + "peak_rss_gb": 0.367, + "resident_weight_note": "the maximum, over the run, of the materialised parameter+buffer bytes. On the CPU path peak_rss_bytes ALSO counts the safetensors mmap page cache, which is evictable and is not held by the schedule; this figure is not confounded by it. On CUDA, peak_cuda_allocated_bytes is the authoritative number because it includes activations and workspace and has no page cache.", + "rss_units_source": "Linux ru_maxrss", + "schedule": "window-outer", + "vocab_size": 260, + "windows": 4 + }, + "path": "first", + "pid": 406991, + "resources": { + "bytes": { + "checkpoint_read": 572479, + "hidden_d2h": 36616, + "weights_h2d": null + }, + "checkpoint_bytes": 572479, + "checkpoint_files": 2, + "device_name": null, + "forward_timing": "wall-clock", + "note": "provenance, not identity: peaks and stage seconds this run measured; forward_sum is device time under cuda-events, wall time otherwise; seal covers head serialisation up to this block's assembly", + "peak_cuda_allocated_bytes": null, + "peak_cuda_reserved_bytes": null, + "peak_resident_weight_bytes": 555776, + "peak_rss_bytes": 367374336, + "rss_units_source": "Linux ru_maxrss", + "seconds": { + "decode_sum": null, + "elapsed": 2.448, + "fill_sum": null, + "forward_sum": 0.126, + "identity": 0.005, + "layer_load_max": null, + "layer_load_sum": null, + "layer_loads": null, + "resident_load": 2.283, + "seal": 0.007 + } + }, + "runtime_versions": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 406991, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd" + }, + "repeat": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "cold_run": "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d", + "dataset_sha256": "c3ff6c32dc57502825d3ca3ac2133ed6a4c31e7bc7602191d595ee044ebe9048", + "generation_sanity_probe": { + "degenerate": false, + "enforced": false, + "entropy_nats": 5.548019647470335, + "expect": null, + "logit_spread": 0.986328125, + "note": "one extra window through the same schedule; its hidden state is discarded and never enters the dataset.", + "prompt": "The capital of France is", + "schema": "malaiwah.generation-sanity-probe.v1", + "status": "recorded", + "top1_id": 113, + "top1_probability": 0.006720104384265371, + "top1_text": "�", + "top_k": [ + { + "id": 113, + "probability": 0.006720104384265371, + "text": "�" + }, + { + "id": 237, + "probability": 0.006412368399474785, + "text": "�" + }, + { + "id": 193, + "probability": 0.006035639491843906, + "text": "\u0001" + }, + { + "id": 236, + "probability": 0.0055386141320063614, + "text": "�" + }, + { + "id": 44, + "probability": 0.0054740873228682424, + "text": "I" + } + ], + "uniform_entropy_nats": 5.560681631015528, + "vocab_size": 260 + }, + "head_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "memory_report": { + "context_length": 64, + "decoder_layers": null, + "device": "cpu", + "hidden_size": 64, + "layer_residency": null, + "model": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "peak_resident_weight_bytes": 555776, + "peak_resident_weight_detail": { + "buffers": 128, + "parameters": 555648, + "total": 555776 + }, + "peak_resident_weight_gb": 0.001, + "peak_rss_bytes": 367198208, + "peak_rss_gb": 0.367, + "resident_weight_note": "the maximum, over the run, of the materialised parameter+buffer bytes. On the CPU path peak_rss_bytes ALSO counts the safetensors mmap page cache, which is evictable and is not held by the schedule; this figure is not confounded by it. On CUDA, peak_cuda_allocated_bytes is the authoritative number because it includes activations and workspace and has no page cache.", + "rss_units_source": "Linux ru_maxrss", + "schedule": "window-outer", + "vocab_size": 260, + "windows": 4 + }, + "path": "repeat", + "pid": 409089, + "resources": { + "bytes": { + "checkpoint_read": 572479, + "hidden_d2h": 36616, + "weights_h2d": null + }, + "checkpoint_bytes": 572479, + "checkpoint_files": 2, + "device_name": null, + "forward_timing": "wall-clock", + "note": "provenance, not identity: peaks and stage seconds this run measured; forward_sum is device time under cuda-events, wall time otherwise; seal covers head serialisation up to this block's assembly", + "peak_cuda_allocated_bytes": null, + "peak_cuda_reserved_bytes": null, + "peak_resident_weight_bytes": 555776, + "peak_rss_bytes": 367198208, + "rss_units_source": "Linux ru_maxrss", + "seconds": { + "decode_sum": null, + "elapsed": 2.619, + "fill_sum": null, + "forward_sum": 0.128, + "identity": 0.004, + "layer_load_max": null, + "layer_load_sum": null, + "layer_loads": null, + "resident_load": 2.453, + "seal": 0.005 + } + }, + "runtime_versions": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 409089, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd" + } + }, + "commands": [ + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--model", + "/tmp/qfs-complete-tiny-fixture/model", + "--weights-repository", + "malaiwah/glm-moe-dsa-tiny-random-bf16", + "--model-revision", + "45563636ef723acfb826755493447dc40c7a0c37", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-complete-tiny-fixture/reproduction/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--role", + "root", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--schedule", + "window-outer", + "--dataset-id", + "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "--dataset-name", + "GLM MoE DSA tiny random CPU root", + "--repository", + "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "--author", + "malaiwah", + "--disclosures", + "[{\"code\":\"random_init_cpu_fixture\",\"severity\":\"info\",\"affects_comparability\":false,\"detail\":\"Complete randomly initialized tiny glm_moe_dsa checkpoint; CPU smoke fixture only, not trained quality evidence or a registry measurement. Lane other denotes CPU, not local-cuda-budget.\"}]", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--run-name", + "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "--cold-run", + "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "--memory-report", + "/tmp/qfs-complete-tiny-fixture/reproduction/first.memory.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 6.485651439987123, + "name": "capture-first", + "pid": 406991, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 406991, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "capture-first.stderr.log", + "stdout": "capture-first.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "verify", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/first.verify.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.575829998124391, + "name": "verify-first", + "pid": 408026, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 408026, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "verify-first.stderr.log", + "stdout": "verify-first.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "validate", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--strict", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/first.strict.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.8252810118719935, + "name": "strict-first", + "pid": 408494, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 408494, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "strict-first.stderr.log", + "stdout": "strict-first.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--model", + "/tmp/qfs-complete-tiny-fixture/model", + "--weights-repository", + "malaiwah/glm-moe-dsa-tiny-random-bf16", + "--model-revision", + "45563636ef723acfb826755493447dc40c7a0c37", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-complete-tiny-fixture/reproduction/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--role", + "root", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--schedule", + "window-outer", + "--dataset-id", + "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "--dataset-name", + "GLM MoE DSA tiny random CPU root", + "--repository", + "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "--author", + "malaiwah", + "--disclosures", + "[{\"code\":\"random_init_cpu_fixture\",\"severity\":\"info\",\"affects_comparability\":false,\"detail\":\"Complete randomly initialized tiny glm_moe_dsa checkpoint; CPU smoke fixture only, not trained quality evidence or a registry measurement. Lane other denotes CPU, not local-cuda-budget.\"}]", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--run-name", + "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d", + "--cold-run", + "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d", + "--memory-report", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat.memory.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 6.431767418049276, + "name": "capture-repeat", + "pid": 409089, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 409089, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "capture-repeat.stderr.log", + "stdout": "capture-repeat.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "verify", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat.verify.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.7754629959817976, + "name": "verify-repeat", + "pid": 409951, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 409951, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "verify-repeat.stderr.log", + "stdout": "verify-repeat.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "validate", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--strict", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat.strict.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.423026765929535, + "name": "strict-repeat", + "pid": 410549, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 410549, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "strict-repeat.stderr.log", + "stdout": "strict-repeat.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "compare", + "--reference", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--candidate", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction/comparison", + "--self-compare", + "--force-compute", + "--device", + "cpu", + "--replay-device", + "numpy", + "--replay-dtype", + "float32", + "--vocab-chunk", + "8192", + "--chunk-positions", + "128", + "--verify-tensors", + "--reference-label", + "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "--candidate-label", + "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.7282893639057875, + "name": "compare", + "pid": 411043, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 411043, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "compare.stderr.log", + "stdout": "compare.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "validate", + "--receipt", + "/tmp/qfs-complete-tiny-fixture/reproduction/comparison/comparison-receipt.json", + "--strict", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/comparison.validate.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.424050308065489, + "name": "validate-comparison", + "pid": 411487, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 411487, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "validate-comparison.stderr.log", + "stdout": "validate-comparison.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + } + ], + "comparison": { + "comparator": { + "accumulation_dtype": "float64", + "bf16_reduced_precision_reduction": false, + "cublas_workspace_config": null, + "deterministic_algorithms": true, + "device": "cpu", + "estimator_backend": "torch:k6_kld_report._token_kld", + "head_applied_candidate_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "head_applied_reference_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "head_applied_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "logprob_dtype": "float64", + "position_block": 128, + "replay_backend": "numpy:cpu:float32", + "replay_env": { + "blas_configuration": "OpenBLAS 0.3.34.106.0 USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell MAX_THREADS=64", + "blas_name": "scipy-openblas", + "blas_threads": 2, + "blas_threads_source": "ctypes:scipy_openblas_get_num_threads64_", + "blas_version": "0.3.34.106.0", + "cpu_model": "Intel(R) Xeon(R) CPU X5570 @ 2.93GHz", + "library": "numpy", + "numpy_version": "2.5.3", + "replay_dtype": "float32" + }, + "replay_peak_device_bytes": null, + "short_circuited": true, + "source_file_hashes_verified": true, + "tensor_content_digests_verified": true, + "tf32": false, + "tool": { + "entrypoint": "bin/fidelity-dataset compare", + "note": "the fp64 estimator is k6_kld_report._token_kld, imported not copied, whenever torch is importable; estimator_backend records which path ran." + }, + "two_pass": true, + "vocab_chunk": 8192 + }, + "comparison_kind": "reproduction_confirmation", + "kl": { + "max": 0.0, + "mean": 0.0, + "median": 0.0, + "p95": 0.0, + "p99": 0.0, + "p99_9": 0.0 + }, + "measurement_scope": { + "contexts": 4, + "covers_full_panel": true, + "position_filter": "all", + "positions_per_context": 63, + "scored_positions": 252, + "subset_detail": null + }, + "metric": { + "direction": "reference_to_candidate", + "direction_label": "KL(reference || candidate)", + "higher_is_better": false, + "name": "mean_tokenwise_kld", + "units": "nats", + "value": 0.0 + }, + "note": "QFS retains its hash-proof result and top-1 value for reproduction confirmations; --force-compute independently runs the estimator and requires its tokenwise KL array to agree exactly. short_circuited=true therefore does not mean replay was skipped.", + "receipt": "comparison/comparison-receipt.json", + "receipt_sha256": "4910833e5cc175ea351055e567c5d896475b4020598359291aedc958d8ada382", + "self_compare": { + "asserted_exact_zero": true, + "capture_content_digest_equal": true, + "expected_tokenwise_bytes": 2144, + "expected_tokenwise_sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d", + "force_compute_agreed": true, + "head_digest_equal": true, + "weights_identity_equal": true + }, + "tokenwise": { + "bytes": 2144, + "path": "tokenwise-kld.npy", + "sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d" + }, + "top1_agreement": 1.0 + }, + "cpu_threads": 2, + "dataset_id": "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "dataset_repository": "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "device": "cpu", + "driver_argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "/tmp/qfs-complete-tiny-fixture/verify_cpu.py", + "--model-dir", + "/tmp/qfs-complete-tiny-fixture/model", + "--model-repository", + "malaiwah/glm-moe-dsa-tiny-random-bf16", + "--model-revision", + "45563636ef723acfb826755493447dc40c7a0c37", + "--panel-dir", + "/tmp/qfs-complete-tiny-fixture/panel", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction", + "--qfs-root", + "/tmp/qfs-explorer-development" + ], + "driver_sha256": "2e507993f0085a72d5236527942a7143fd036d56b82223b26e90889de5cd9f98", + "dtype": "bfloat16", + "elapsed_seconds": 34.85638747992925, + "lane": "other", + "lane_description": "local CPU random-init fixture", + "model_repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "model_revision": "45563636ef723acfb826755493447dc40c7a0c37", + "panel_binding": "panel-binding.json", + "panel_binding_sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "provenance_note": "Local QFS source bytes are hashed; no source commit is asserted. The caller supplies an immutable model pin; QFS hashes the local checkpoint. This script does not independently prove Hub-to-local weight equality.", + "qfs_source_files": { + "bin/fidelity/dscompare.py": "4a53f735e1e3fb8bd739854451b57f34e8369bffa9fd4f7b7fd935fb2e7d52df", + "bin/fidelity/dsvalidate.py": "a9d6cd57e801e3ef044a37635e24518c83dbc6d1ec8a4c0b4b5d1b24483ca8d1", + "bin/fidelity/panel.py": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "bin/fidelity_dataset.py": "ac62b63bbfde67e4d5cacecf9cd417193c50f417a6749cc15ee6f1610c153a4e", + "engines/tools/hf_capture.py": "200ba12ca74fb97531307965cbbaa5c10553a5c26e008e524ea2d8aecb005b95" + }, + "schema": "malaiwah.glm-moe-dsa-tiny-cpu-reproduction.v1", + "scope": "Random-init CPU reproduction only; no quality claim or registry submission.", + "status": "passed" +} diff --git a/raw/candidates/fp8-ue8m0/source/generation_config.json b/raw/candidates/fp8-ue8m0/source/generation_config.json new file mode 100644 index 0000000000000000000000000000000000000000..59bd0680606c94f6570a92e60fa4acd2e2170f70 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/source/generation_config.json @@ -0,0 +1,10 @@ +{ + "_from_model_config": true, + "bos_token_id": 1, + "eos_token_id": 2, + "output_attentions": false, + "output_hidden_states": false, + "pad_token_id": 0, + "transformers_version": "5.16.1", + "use_cache": true +} diff --git a/raw/candidates/fp8-ue8m0/source/hub-checkpoint-verification.json b/raw/candidates/fp8-ue8m0/source/hub-checkpoint-verification.json new file mode 100644 index 0000000000000000000000000000000000000000..b9648c8ae18de0fb86ce18398175c6686afbd7b2 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/source/hub-checkpoint-verification.json @@ -0,0 +1,32 @@ +{ + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "downloaded_from_hub": true, + "files": { + "config.json": { + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "bytes": 1479, + "matches_build": true + }, + "generation_config.json": { + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "bytes": 216, + "matches_build": true + }, + "model.safetensors": { + "sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1", + "bytes": 571000, + "matches_build": true + }, + "tokenizer.json": { + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "bytes": 6763, + "matches_build": true + }, + "tokenizer_config.json": { + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63", + "bytes": 236, + "matches_build": true + } + } +} diff --git a/raw/candidates/fp8-ue8m0/source/loader-verification.json b/raw/candidates/fp8-ue8m0/source/loader-verification.json new file mode 100644 index 0000000000000000000000000000000000000000..871fc889a9d3a025569770a96e83ff5f0a2fb420 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/source/loader-verification.json @@ -0,0 +1,60 @@ +{ + "schema": "malaiwah.tiny-fixture-loader-check.v1", + "checkpoint_sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1", + "runtime": { + "torch": "2.11.0+cpu", + "transformers": "5.16.1", + "device": "cpu", + "threads": 2 + }, + "qfs_load_report": { + "observed": true, + "conversion_errors_visible": true, + "missing_keys": [], + "unexpected_keys": [], + "mismatched_keys": [], + "error_msgs": [], + "conversion_errors": {} + }, + "native_save_reload_tensor_equality": true, + "independent_build_files_byte_equal": true, + "tokenizer_roundtrip_examples": [ + "The CPU fixture carries a complete output head and real sparse attention.", + "Small deterministic tensors make a repeatable pipeline experiment.", + "Unicode roundtrip: caf\u00e9, snow \u96ea, punctuation!", + "The same bytes must survive saving and loading without repair." + ], + "forward_shape": [ + 4, + 64, + 260 + ], + "forward_all_finite": true, + "forward_logit_std": 0.16186420619487762, + "load_seconds": 2.1670503590721637, + "batch_forward_seconds": 0.05775680090300739, + "greedy_generation_seconds": 0.04374621692113578, + "generated_token_ids": [ + 1, + 55, + 75, + 72, + 224, + 38, + 51, + 56, + 224, + 73, + 76, + 91, + 87, + 88, + 85, + 72, + 171, + 105, + 156, + 236 + ], + "peak_process_rss_mib": 351.9296875 +} diff --git a/raw/candidates/fp8-ue8m0/source/model.safetensors b/raw/candidates/fp8-ue8m0/source/model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..4fb280ef48135a3788c03440ffe9075628c12dfd --- /dev/null +++ b/raw/candidates/fp8-ue8m0/source/model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1 +size 571000 diff --git a/raw/candidates/fp8-ue8m0/source/panel.binding.json b/raw/candidates/fp8-ue8m0/source/panel.binding.json new file mode 100644 index 0000000000000000000000000000000000000000..573cea0b332c636bdda89b150f95cda307b89194 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/source/panel.binding.json @@ -0,0 +1,102 @@ +{ + "content": { + "archive": { + "algorithm": "sha256(ustar: sorted regular files; mode=0644; uid=gid=mtime=0)", + "bytes": 20480, + "compression": "none", + "format": "ustar", + "sha256": "389706dfa3335a75ec70a40d079995af1a60c05512334125dbd336790f12702f" + }, + "manifest": [ + { + "bytes": 192, + "path": "arrays/causal-mask-64.npy", + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02" + }, + { + "bytes": 384, + "path": "arrays/final-0000.tokens.npy", + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af" + }, + { + "bytes": 384, + "path": "arrays/final-0001.tokens.npy", + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea" + }, + { + "bytes": 384, + "path": "arrays/final-0002.tokens.npy", + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c" + }, + { + "bytes": 384, + "path": "arrays/final-0003.tokens.npy", + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a" + }, + { + "bytes": 4195, + "path": "panel.json", + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6" + }, + { + "bytes": 7808, + "path": "panel.receipt.json", + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263" + } + ], + "manifest_sha256": "e5f2d6410a6290da1197016c5b57ae522a3570665215ddc23e2a0bd45f912181" + }, + "panel": { + "bytes": 4195, + "context_length": 64, + "contexts": 4, + "file": "panel.json", + "id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "positions_per_context": 63, + "role": "final", + "scored_positions_total": 252, + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6", + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36" + }, + "receipt": { + "bytes": 7808, + "declared_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "file": "panel.receipt.json", + "receipt_file_sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "receipt_seal_mode": "self-blank" + }, + "schema": "malaiwah.resolved-panel.v1", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } +} diff --git a/raw/candidates/fp8-ue8m0/source/panel.sha256.json b/raw/candidates/fp8-ue8m0/source/panel.sha256.json new file mode 100644 index 0000000000000000000000000000000000000000..30e122a1cc6d1937fecc0d31e38e468bceefc9de --- /dev/null +++ b/raw/candidates/fp8-ue8m0/source/panel.sha256.json @@ -0,0 +1,83 @@ +{ + "binding_file": "panel.binding.json", + "binding_sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "context_length": 64, + "contexts": 4, + "model_repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "model_revision": "45563636ef723acfb826755493447dc40c7a0c37", + "panel_archive": { + "algorithm": "sha256(ustar: sorted regular files; mode=0644; uid=gid=mtime=0)", + "bytes": 20480, + "compression": "none", + "format": "ustar", + "sha256": "389706dfa3335a75ec70a40d079995af1a60c05512334125dbd336790f12702f" + }, + "panel_directory": "panel", + "panel_files": [ + { + "bytes": 192, + "path": "arrays/causal-mask-64.npy", + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02" + }, + { + "bytes": 384, + "path": "arrays/final-0000.tokens.npy", + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af" + }, + { + "bytes": 384, + "path": "arrays/final-0001.tokens.npy", + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea" + }, + { + "bytes": 384, + "path": "arrays/final-0002.tokens.npy", + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c" + }, + { + "bytes": 384, + "path": "arrays/final-0003.tokens.npy", + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a" + }, + { + "bytes": 4195, + "path": "panel.json", + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6" + }, + { + "bytes": 7808, + "path": "panel.receipt.json", + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263" + } + ], + "panel_id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "panel_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "purpose": "Synthetic CPU smoke only, not a quality benchmark.", + "revision_verification": "Caller-supplied published commit; local files byte-verified offline.", + "scored_positions_total": 252, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer_files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "tokenizer_files_verified": true, + "tokenizer_identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1" +} diff --git a/raw/candidates/fp8-ue8m0/source/panel/arrays/causal-mask-64.npy b/raw/candidates/fp8-ue8m0/source/panel/arrays/causal-mask-64.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/source/panel/arrays/causal-mask-64.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/fp8-ue8m0/source/panel/arrays/final-0000.tokens.npy b/raw/candidates/fp8-ue8m0/source/panel/arrays/final-0000.tokens.npy new file mode 100644 index 0000000000000000000000000000000000000000..b53a3cc1093c0363db45470d868194d867ed93cf --- /dev/null +++ b/raw/candidates/fp8-ue8m0/source/panel/arrays/final-0000.tokens.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af +size 384 diff --git a/raw/candidates/fp8-ue8m0/source/panel/arrays/final-0001.tokens.npy b/raw/candidates/fp8-ue8m0/source/panel/arrays/final-0001.tokens.npy new file mode 100644 index 0000000000000000000000000000000000000000..54551046d9609a29e60c1b1460b4927e45b9d785 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/source/panel/arrays/final-0001.tokens.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea +size 384 diff --git a/raw/candidates/fp8-ue8m0/source/panel/arrays/final-0002.tokens.npy b/raw/candidates/fp8-ue8m0/source/panel/arrays/final-0002.tokens.npy new file mode 100644 index 0000000000000000000000000000000000000000..557330708fb66b049bf4bb046038e98fafced952 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/source/panel/arrays/final-0002.tokens.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c +size 384 diff --git a/raw/candidates/fp8-ue8m0/source/panel/arrays/final-0003.tokens.npy b/raw/candidates/fp8-ue8m0/source/panel/arrays/final-0003.tokens.npy new file mode 100644 index 0000000000000000000000000000000000000000..88ac7b071317640a2ac3432c2cc17a46a2741688 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/source/panel/arrays/final-0003.tokens.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a +size 384 diff --git a/raw/candidates/fp8-ue8m0/source/panel/panel.json b/raw/candidates/fp8-ue8m0/source/panel/panel.json new file mode 100644 index 0000000000000000000000000000000000000000..bc0b51f795d2ba81d472c21c88dc52cad9910a41 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/source/panel/panel.json @@ -0,0 +1,197 @@ +{ + "name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "panel_id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "schema": "quant-pipeline.glm53-token-panel.v1", + "sealed_corpus_sha256": null, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "windows": [ + { + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "document_id": "embedded-synthetic/garden.txt", + "domain": "garden", + "num_tokens": 64, + "prediction_positions": 63, + "role": "final", + "token_ids_first16": [ + 1, + 55, + 75, + 72, + 224, + 86, + 80, + 68, + 79, + 79, + 224, + 74, + 68, + 85, + 71, + 72 + ], + "token_ids_json_sha256": "08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315", + "token_ids_last16": [ + 224, + 68, + 81, + 71, + 224, + 68, + 224, + 86, + 87, + 82, + 81, + 72, + 224, + 83, + 68, + 2 + ], + "token_ids_sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af", + "window_id": "final-0000" + }, + { + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "document_id": "embedded-synthetic/arithmetic.txt", + "domain": "arithmetic", + "num_tokens": 64, + "prediction_positions": 63, + "role": "final", + "token_ids_first16": [ + 1, + 36, + 224, + 86, + 75, + 72, + 79, + 73, + 224, + 75, + 82, + 79, + 71, + 86, + 224, + 87 + ], + "token_ids_json_sha256": "5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46", + "token_ids_last16": [ + 72, + 86, + 17, + 224, + 55, + 75, + 72, + 85, + 72, + 224, + 68, + 85, + 72, + 224, + 72, + 2 + ], + "token_ids_sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea", + "window_id": "final-0001" + }, + { + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "document_id": "embedded-synthetic/code.txt", + "domain": "code", + "num_tokens": 64, + "prediction_positions": 63, + "role": "final", + "token_ids_first16": [ + 1, + 71, + 72, + 73, + 224, + 68, + 71, + 71, + 66, + 89, + 68, + 79, + 88, + 72, + 86, + 11 + ], + "token_ids_json_sha256": "51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07", + "token_ids_last16": [ + 85, + 76, + 74, + 75, + 87, + 202, + 202, + 85, + 72, + 86, + 88, + 79, + 87, + 224, + 32, + 2 + ], + "token_ids_sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c", + "window_id": "final-0002" + }, + { + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "document_id": "embedded-synthetic/instructions.txt", + "domain": "instructions", + "num_tokens": 64, + "prediction_positions": 63, + "role": "final", + "token_ids_first16": [ + 1, + 41, + 76, + 85, + 86, + 87, + 224, + 83, + 79, + 68, + 70, + 72, + 224, + 68, + 224, + 70 + ], + "token_ids_json_sha256": "8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d", + "token_ids_last16": [ + 224, + 70, + 82, + 82, + 79, + 224, + 90, + 68, + 87, + 72, + 85, + 224, + 76, + 81, + 87, + 2 + ], + "token_ids_sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a", + "window_id": "final-0003" + } + ] +} diff --git a/raw/candidates/fp8-ue8m0/source/panel/panel.receipt.json b/raw/candidates/fp8-ue8m0/source/panel/panel.receipt.json new file mode 100644 index 0000000000000000000000000000000000000000..fbc2ce3e8e9602a492d83ae681817e0fa02e4173 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/source/panel/panel.receipt.json @@ -0,0 +1,376 @@ +{ + "corpus": { + "documents_considered": 4, + "documents_selected": 4, + "path_prefix": "embedded-synthetic/", + "repository": null, + "revision": null, + "source": "Synthetic texts embedded verbatim in this sealed receipt and builder." + }, + "created_utc": "2026-09-07T00:00:00Z", + "created_utc_policy": "Fixed artifact epoch for deterministic bytes; not an execution timestamp.", + "documents": [ + { + "bytes": 135, + "document": "garden.txt", + "document_sha256": "2aca14290cd4753c3b15d8a20aaa7a6963d2cb48d78e8538a4ce34d4665dcb94", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "garden", + "text_utf8": "The small garden has red flowers, green leaves, and a stone path. A gentle breeze moves the branches while a robin sings near the gate.", + "tokens_total": 137, + "window_id": "final-0000" + }, + { + "bytes": 144, + "document": "arithmetic.txt", + "document_sha256": "b867a2e8cbe81cc8d5781bfe6718a43e171fb5c7c138b9ed6ac86bebc24bca83", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "arithmetic", + "text_utf8": "A shelf holds three blue boxes and five red boxes. There are eight boxes in total. Move two boxes to the desk and count the six boxes remaining.", + "tokens_total": 146, + "window_id": "final-0001" + }, + { + "bytes": 162, + "document": "code.txt", + "document_sha256": "08c8f75f45899cbc9656a7a3fcdbf3092abfa7bc97fe353957b08d7e9660240b", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "code", + "text_utf8": "def add_values(left, right):\n return left + right\n\nresult = add_values(7, 9)\nprint(result)\n# This readable snippet is synthetic input, not a coding benchmark.\n", + "tokens_total": 164, + "window_id": "final-0002" + }, + { + "bytes": 140, + "document": "instructions.txt", + "document_sha256": "1dba5052b28929f94f322ad9e8c0b238bcbd653d6fae54ebaea8e5e3f6073378", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "instructions", + "text_utf8": "First place a clean cup on the table. Next pour cool water into the cup. Finally put the bottle away and write a short note about the steps.", + "tokens_total": 142, + "window_id": "final-0003" + } + ], + "environment": { + "numpy": "2.5.3", + "tokenizers": "0.23.2", + "transformers": "5.16.1" + }, + "format_builder": "engines/tools/build_token_panel.py", + "format_builder_sha256": "30eb4d4d7e465aaa8d9ef2d947a0ac7fd42ec45388f20c8b6db242c88dc2d851", + "format_version": 1, + "panel_id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "panel_name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "parameters": { + "context_length": 64, + "generation_seed": null, + "generation_seed_policy": "No RNG is used.", + "prediction_positions_per_window": 63, + "scored_positions_total": 252, + "strata": [ + "garden", + "arithmetic", + "code", + "instructions" + ], + "windows_per_stratum": 1, + "windows_total": 4 + }, + "receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "resolver_sha256": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "schema": "malaiwah.token-panel-build-receipt.v1", + "selection_rule": "Four embedded readable synthetic documents in declared order; native tokenizer with add_special_tokens=True, truncation=True, max_length=64, padding=False; each encoded window must be exactly 64 tokens; no chat template; all 63 shifted next-token positions scored; no RNG.", + "separation": { + "checked": false, + "method": "No contamination scan or benchmark selection.", + "note": "Authored synthetic CPU smoke inputs for a random-init model; not a benchmark, held-out quality claim, or registry-row submission." + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "add_special_tokens": true, + "chat_template_applied": false, + "class": "TokenizersBackend", + "files_sha256": { + "config.json": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "generation_config.json": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "tokenizer.json": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "tokenizer_config.json": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + }, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "local_files_only": true, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "trust_remote_code": false, + "vocab_size": 260 + }, + "tool": "build_panel.py", + "tool_sha256": "f17b17262816676d6ededcc969756ac07ff991eab73117040ec41005f6ff63f3" +} diff --git a/raw/candidates/fp8-ue8m0/source/qfs-source.json b/raw/candidates/fp8-ue8m0/source/qfs-source.json new file mode 100644 index 0000000000000000000000000000000000000000..3c71d8671dcbe3678b71a2efe59e0ca341bebdc0 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/source/qfs-source.json @@ -0,0 +1,11 @@ +{ + "repository": "https://github.com/malaiwah/quant-fidelity-suite", + "revision": "a903cddb078c2eda8c65d6e6c875a09ac932df49", + "source_files": { + "bin/fidelity/dscompare.py": "4a53f735e1e3fb8bd739854451b57f34e8369bffa9fd4f7b7fd935fb2e7d52df", + "bin/fidelity/dsvalidate.py": "a9d6cd57e801e3ef044a37635e24518c83dbc6d1ec8a4c0b4b5d1b24483ca8d1", + "bin/fidelity/panel.py": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "bin/fidelity_dataset.py": "ac62b63bbfde67e4d5cacecf9cd417193c50f417a6749cc15ee6f1610c153a4e", + "engines/tools/hf_capture.py": "200ba12ca74fb97531307965cbbaa5c10553a5c26e008e524ea2d8aecb005b95" + } +} diff --git a/raw/candidates/fp8-ue8m0/source/requirements-cpu.txt b/raw/candidates/fp8-ue8m0/source/requirements-cpu.txt new file mode 100644 index 0000000000000000000000000000000000000000..5d504ef63dffa9df18b1e01a3492065235acbe48 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/source/requirements-cpu.txt @@ -0,0 +1,38 @@ +# Tested Linux CPU environment, Python 3.12.14. +--extra-index-url https://download.pytorch.org/whl/cpu +accelerate==1.14.0 +annotated-doc==0.0.5 +anyio==4.15.1 +certifi==2026.7.22 +click==8.5.0 +filelock==3.32.5 +fsspec==2026.7.0 +h11==0.16.0 +hf-xet==1.6.0 +httpcore==1.0.9 +httpx==0.28.1 +huggingface-hub==1.30.0 +idna==3.19 +jinja2==3.1.6 +markdown-it-py==4.2.0 +markupsafe==3.0.3 +mdurl==0.1.2 +mpmath==1.3.0 +networkx==3.6.1 +numpy==2.5.3 +packaging==26.3 +psutil==7.2.2 +pygments==2.21.0 +pyyaml==6.0.3 +regex==2026.9.3 +rich==15.0.0 +safetensors==0.8.0 +setuptools==81.0.0 +shellingham==1.5.4 +sympy==1.14.0 +tokenizers==0.23.2 +torch==2.11.0+cpu +tqdm==4.70.0 +transformers==5.16.1 +typer==0.27.2 +typing-extensions==4.16.0 diff --git a/raw/candidates/fp8-ue8m0/source/tokenizer.json b/raw/candidates/fp8-ue8m0/source/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..5ad9cccfc9ab5ed66f1c38db328de07cbe4939a9 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/source/tokenizer.json @@ -0,0 +1,404 @@ +{ + "version": "1.0", + "truncation": null, + "padding": null, + "added_tokens": [ + { + "id": 0, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 1, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 2, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 3, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + } + ], + "normalizer": null, + "pre_tokenizer": { + "type": "ByteLevel", + "add_prefix_space": false, + "trim_offsets": true, + "use_regex": false + }, + "post_processor": { + "type": "TemplateProcessing", + "single": [ + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + }, + { + "Sequence": { + "id": "A", + "type_id": 0 + } + }, + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + } + ], + "pair": [ + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + }, + { + "Sequence": { + "id": "A", + "type_id": 0 + } + }, + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + }, + { + "Sequence": { + "id": "B", + "type_id": 1 + } + }, + { + "SpecialToken": { + "id": "", + "type_id": 1 + } + } + ], + "special_tokens": { + "": { + "id": "", + "ids": [ + 1 + ], + "tokens": [ + "" + ] + }, + "": { + "id": "", + "ids": [ + 2 + ], + "tokens": [ + "" + ] + } + } + }, + "decoder": { + "type": "ByteLevel", + "add_prefix_space": true, + "trim_offsets": true, + "use_regex": true + }, + "model": { + "type": "BPE", + "dropout": null, + "unk_token": "", + "continuing_subword_prefix": null, + "end_of_word_suffix": null, + "fuse_unk": false, + "byte_fallback": false, + "ignore_merges": false, + "vocab": { + "": 0, + "": 1, + "": 2, + "": 3, + "!": 4, + "\"": 5, + "#": 6, + "$": 7, + "%": 8, + "&": 9, + "'": 10, + "(": 11, + ")": 12, + "*": 13, + "+": 14, + ",": 15, + "-": 16, + ".": 17, + "/": 18, + "0": 19, + "1": 20, + "2": 21, + "3": 22, + "4": 23, + "5": 24, + "6": 25, + "7": 26, + "8": 27, + "9": 28, + ":": 29, + ";": 30, + "<": 31, + "=": 32, + ">": 33, + "?": 34, + "@": 35, + "A": 36, + "B": 37, + "C": 38, + "D": 39, + "E": 40, + "F": 41, + "G": 42, + "H": 43, + "I": 44, + "J": 45, + "K": 46, + "L": 47, + "M": 48, + "N": 49, + "O": 50, + "P": 51, + "Q": 52, + "R": 53, + "S": 54, + "T": 55, + "U": 56, + "V": 57, + "W": 58, + "X": 59, + "Y": 60, + "Z": 61, + "[": 62, + "\\": 63, + "]": 64, + "^": 65, + "_": 66, + "`": 67, + "a": 68, + "b": 69, + "c": 70, + "d": 71, + "e": 72, + "f": 73, + "g": 74, + "h": 75, + "i": 76, + "j": 77, + "k": 78, + "l": 79, + "m": 80, + "n": 81, + "o": 82, + "p": 83, + "q": 84, + "r": 85, + "s": 86, + "t": 87, + "u": 88, + "v": 89, + "w": 90, + "x": 91, + "y": 92, + "z": 93, + "{": 94, + "|": 95, + "}": 96, + "~": 97, + "¡": 98, + "¢": 99, + "£": 100, + "¤": 101, + "¥": 102, + "¦": 103, + "§": 104, + "¨": 105, + "©": 106, + "ª": 107, + "«": 108, + "¬": 109, + "®": 110, + "¯": 111, + "°": 112, + "±": 113, + "²": 114, + "³": 115, + "´": 116, + "µ": 117, + "¶": 118, + "·": 119, + "¸": 120, + "¹": 121, + "º": 122, + "»": 123, + "¼": 124, + "½": 125, + "¾": 126, + "¿": 127, + "À": 128, + "Á": 129, + "Â": 130, + "Ã": 131, + "Ä": 132, + "Å": 133, + "Æ": 134, + "Ç": 135, + "È": 136, + "É": 137, + "Ê": 138, + "Ë": 139, + "Ì": 140, + "Í": 141, + "Î": 142, + "Ï": 143, + "Ð": 144, + "Ñ": 145, + "Ò": 146, + "Ó": 147, + "Ô": 148, + "Õ": 149, + "Ö": 150, + "×": 151, + "Ø": 152, + "Ù": 153, + "Ú": 154, + "Û": 155, + "Ü": 156, + "Ý": 157, + "Þ": 158, + "ß": 159, + "à": 160, + "á": 161, + "â": 162, + "ã": 163, + "ä": 164, + "å": 165, + "æ": 166, + "ç": 167, + "è": 168, + "é": 169, + "ê": 170, + "ë": 171, + "ì": 172, + "í": 173, + "î": 174, + "ï": 175, + "ð": 176, + "ñ": 177, + "ò": 178, + "ó": 179, + "ô": 180, + "õ": 181, + "ö": 182, + "÷": 183, + "ø": 184, + "ù": 185, + "ú": 186, + "û": 187, + "ü": 188, + "ý": 189, + "þ": 190, + "ÿ": 191, + "Ā": 192, + "ā": 193, + "Ă": 194, + "ă": 195, + "Ą": 196, + "ą": 197, + "Ć": 198, + "ć": 199, + "Ĉ": 200, + "ĉ": 201, + "Ċ": 202, + "ċ": 203, + "Č": 204, + "č": 205, + "Ď": 206, + "ď": 207, + "Đ": 208, + "đ": 209, + "Ē": 210, + "ē": 211, + "Ĕ": 212, + "ĕ": 213, + "Ė": 214, + "ė": 215, + "Ę": 216, + "ę": 217, + "Ě": 218, + "ě": 219, + "Ĝ": 220, + "ĝ": 221, + "Ğ": 222, + "ğ": 223, + "Ġ": 224, + "ġ": 225, + "Ģ": 226, + "ģ": 227, + "Ĥ": 228, + "ĥ": 229, + "Ħ": 230, + "ħ": 231, + "Ĩ": 232, + "ĩ": 233, + "Ī": 234, + "ī": 235, + "Ĭ": 236, + "ĭ": 237, + "Į": 238, + "į": 239, + "İ": 240, + "ı": 241, + "IJ": 242, + "ij": 243, + "Ĵ": 244, + "ĵ": 245, + "Ķ": 246, + "ķ": 247, + "ĸ": 248, + "Ĺ": 249, + "ĺ": 250, + "Ļ": 251, + "ļ": 252, + "Ľ": 253, + "ľ": 254, + "Ŀ": 255, + "ŀ": 256, + "Ł": 257, + "ł": 258, + "Ń": 259 + }, + "merges": [] + } +} \ No newline at end of file diff --git a/raw/candidates/fp8-ue8m0/source/tokenizer_config.json b/raw/candidates/fp8-ue8m0/source/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..df4d789a0874511220f5e2676081000298ad025d --- /dev/null +++ b/raw/candidates/fp8-ue8m0/source/tokenizer_config.json @@ -0,0 +1,10 @@ +{ + "backend": "tokenizers", + "bos_token": "", + "clean_up_tokenization_spaces": false, + "eos_token": "", + "model_max_length": 256, + "pad_token": "", + "tokenizer_class": "TokenizersBackend", + "unk_token": "" +} diff --git a/raw/candidates/fp8-ue8m0/source/verify_cpu.py b/raw/candidates/fp8-ue8m0/source/verify_cpu.py new file mode 100644 index 0000000000000000000000000000000000000000..9081677f6d92ed81eec78043634f56eec3e193f5 --- /dev/null +++ b/raw/candidates/fp8-ue8m0/source/verify_cpu.py @@ -0,0 +1,320 @@ +#!/usr/bin/env python3 +"""Two cold QFS CPU captures, strict verification, and forced numerical replay.""" +from __future__ import annotations + +import argparse +import hashlib +import json +import math +import os +from pathlib import Path +import re +import signal +import subprocess +import sys +import time +import traceback +import uuid + +DATASET_ID = "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1" +DATASET_REPOSITORY = "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1" +PANEL_ID = "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1" +TIMEOUT_SECONDS = 300 + +# Execute the real entrypoint without changing its implementation. Set thread +# counts before any model work, and record the observed counts in every child. +CHILD_BOOTSTRAP = r''' +import json, os, platform, runpy, sys +import numpy, torch, transformers, safetensors, tokenizers +import huggingface_hub +torch.set_num_threads(2) +torch.set_num_interop_threads(2) +print(json.dumps({"stage": "fixture_child_runtime", "pid": os.getpid(), + "python": sys.version, "executable": sys.executable, + "platform": platform.platform(), "machine": platform.machine(), + "torch": torch.__version__, "transformers": transformers.__version__, + "numpy": numpy.__version__, "safetensors": safetensors.__version__, + "tokenizers": tokenizers.__version__, "huggingface_hub": huggingface_hub.__version__, + "torch_num_threads": torch.get_num_threads(), + "torch_num_interop_threads": torch.get_num_interop_threads(), + "cuda_runtime": torch.version.cuda, + "thread_environment": {k: os.environ.get(k) for k in + ("OMP_NUM_THREADS", "MKL_NUM_THREADS", "OPENBLAS_NUM_THREADS", + "NUMEXPR_NUM_THREADS", "VECLIB_MAXIMUM_THREADS")}}, sort_keys=True), flush=True) +sys.argv = sys.argv[1:] +runpy.run_path(sys.argv[0], run_name="__main__") +''' + + +def require(condition, message): + if not condition: + raise RuntimeError(message) + + +def read_json(path): + def reject_constant(value): + raise ValueError("Non-finite JSON constant: " + value) + return json.loads(Path(path).read_text(encoding="utf-8"), parse_constant=reject_constant) + + +def write_json(path, value): + Path(path).write_text(json.dumps(value, sort_keys=True, indent=2, + ensure_ascii=False, allow_nan=False) + "\n", + encoding="utf-8") + + +def sha256(path): + with Path(path).open("rb") as stream: + return hashlib.file_digest(stream, "sha256").hexdigest() + + +def positive_zero(value): + return type(value) is float and value == 0.0 and math.copysign(1.0, value) == 1.0 + + +def run_command(name, entrypoint, arguments, *, out, qfs_root, summary): + argv = [sys.executable, "-c", CHILD_BOOTSTRAP, str(entrypoint), *map(str, arguments)] + stdout_path, stderr_path = out / (name + ".stdout.log"), out / (name + ".stderr.log") + environment = os.environ.copy() + environment.update({key: "2" for key in ( + "OMP_NUM_THREADS", "MKL_NUM_THREADS", "OPENBLAS_NUM_THREADS", + "NUMEXPR_NUM_THREADS", "VECLIB_MAXIMUM_THREADS")}) + environment.update({"HF_HUB_OFFLINE": "1", "TRANSFORMERS_OFFLINE": "1", + "TOKENIZERS_PARALLELISM": "false", "PYTHONUNBUFFERED": "1"}) + record = {"name": name, "argv": argv, "cwd": str(qfs_root), + "stdout": stdout_path.name, "stderr": stderr_path.name, + "timeout_seconds": TIMEOUT_SECONDS, "returncode": None, + "timed_out": False} + summary["commands"].append(record) + started = time.monotonic() + try: + with stdout_path.open("xb") as stdout, stderr_path.open("xb") as stderr: + process = subprocess.Popen(argv, cwd=qfs_root, env=environment, + stdout=stdout, stderr=stderr, start_new_session=True) + record["pid"] = process.pid + try: + record["returncode"] = process.wait(timeout=TIMEOUT_SECONDS) + except subprocess.TimeoutExpired: + record["timed_out"] = True + os.killpg(process.pid, signal.SIGKILL) + record["returncode"] = process.wait() + finally: + record["elapsed_seconds"] = time.monotonic() - started + write_json(out / "evidence-summary.json", summary) + # Capture children produce JSONL mixed with human-readable engine output. + with stdout_path.open(encoding="utf-8", errors="replace") as stdout: + for line in stdout: + if not line.startswith("{"): + continue + try: + item = json.loads(line) + except ValueError: + continue + if isinstance(item, dict) and item.get("stage") == "fixture_child_runtime": + record["runtime"] = item + break + require(not record["timed_out"], f"{name} exceeded {TIMEOUT_SECONDS}s; logs preserved") + require(record["returncode"] == 0, + f"{name} exited {record['returncode']}; see {stderr_path.name} and {stdout_path.name}") + require(record.get("runtime", {}).get("torch_num_threads") == 2, + f"{name} did not report two observed CPU threads") + return record + + +def check_report(path): + report = read_json(path) + require(report["structural_status"] == "sealed" and report["error_count"] == 0 + and report["warning_count"] == 0, f"Strict QFS verification failed: {path}") + return report + + +def reproduce(args, out, summary): + qfs_root, model_dir, panel_dir = (Path(value).resolve(strict=True) + for value in (args.qfs_root, args.model_dir, args.panel_dir)) + require(all(path.is_dir() for path in (qfs_root, model_dir, panel_dir)), + "--qfs-root, --model-dir and --panel-dir must be directories") + capture_tool = qfs_root / "engines/tools/hf_capture.py" + dataset_tool = qfs_root / "bin/fidelity_dataset.py" + require(capture_tool.is_file() and dataset_tool.is_file(), "QFS entrypoints not found") + sys.path.insert(0, str(qfs_root / "bin")) + from fidelity import dsformat as F + from fidelity import panel + + binding = panel.resolve_panel(panel_dir, role="final", tokenizer_root=model_dir).to_dict() + tokenizer, dimensions = binding["tokenizer"], binding["panel"] + require(tokenizer["files_verified"] is True, "Panel tokenizer bytes were not verified") + require(tokenizer["repository"] == args.model_repository + and tokenizer["revision"] == args.model_revision, + "Panel tokenizer repository/revision differs from the explicit model pin") + require(tokenizer["vocab_size"] == 260, "Expected byte-level vocabulary of 260 tokens") + require(dimensions["id"] == PANEL_ID and dimensions["role"] == "final" + and dimensions["contexts"] == 4 and dimensions["context_length"] == 64 + and dimensions["positions_per_context"] == 63 + and dimensions["scored_positions_total"] == 252, + "Expected the complete four-window, 64-token, 252-position fixture panel") + require("other" in F.LANES, "QFS no longer permits the honest CPU lane 'other'") + binding_path = out / "panel-binding.json" + write_json(binding_path, binding) + binding_sha = sha256(binding_path) + summary.update({"panel_binding": binding_path.name, "panel_binding_sha256": binding_sha, + "model_repository": args.model_repository, "model_revision": args.model_revision, + "dataset_id": DATASET_ID, "dataset_repository": DATASET_REPOSITORY, + "lane": "other", "lane_description": "local CPU random-init fixture", + "device": "cpu", "dtype": "bfloat16", "cpu_threads": 2, + "qfs_source_files": {str(path.relative_to(qfs_root)): sha256(path) + for path in (capture_tool, dataset_tool, qfs_root / "bin/fidelity/panel.py", + qfs_root / "bin/fidelity/dscompare.py", + qfs_root / "bin/fidelity/dsvalidate.py")}, + "provenance_note": "Local QFS source bytes are hashed; no source commit is asserted. " + "The caller supplies an immutable model pin; QFS hashes the local checkpoint. " + "This script does not independently prove Hub-to-local weight equality.", + "captures": {}}) + disclosure = [{"code": "random_init_cpu_fixture", "severity": "info", + "affects_comparability": False, + "detail": "Complete randomly initialized tiny glm_moe_dsa checkpoint; CPU smoke " + "fixture only, not trained quality evidence or a registry measurement. " + "Lane other denotes CPU, not local-cuda-budget."}] + common = ["--model", model_dir, "--weights-repository", args.model_repository, + "--model-revision", args.model_revision, "--panel", panel_dir, + "--panel-role", "final", "--panel-binding", binding_path, + "--panel-binding-sha256", binding_sha, "--panel-tokenizer-root", model_dir, + "--role", "root", "--lane", "other", "--device", "cpu", + "--dtype", "bfloat16", "--schedule", "window-outer", + "--dataset-id", DATASET_ID, "--dataset-name", "GLM MoE DSA tiny random CPU root", + "--repository", DATASET_REPOSITORY, "--author", "malaiwah", + "--disclosures", json.dumps(disclosure, separators=(",", ":"))] + run = lambda name, tool, argv: run_command(name, tool, argv, out=out, + qfs_root=qfs_root, summary=summary) + cold_labels = {side: f"cpu-{side}-{uuid.uuid4().hex}" for side in ("first", "repeat")} + for side in ("first", "repeat"): + root = out / side + memory_path = out / (side + ".memory.json") + command = run("capture-" + side, capture_tool, + [*common, "--out", root, "--run-name", cold_labels[side], + "--cold-run", cold_labels[side], "--memory-report", memory_path]) + verify_path, strict_path = out / (side + ".verify.json"), out / (side + ".strict.json") + run("verify-" + side, dataset_tool, + ["verify", root, "--verify-tensors", "--json", verify_path]) + run("strict-" + side, dataset_tool, + ["validate", root, "--strict", "--verify-tensors", "--json", strict_path]) + check_report(verify_path) + check_report(strict_path) + manifest = F.load_manifest(str(root)) + runtime = read_json(root / manifest["runtime"]["file"]) + probe = manifest["generation_sanity_probe"] + require(probe["status"] == "recorded" and probe["degenerate"] is False + and probe["expect"] is None and probe["logit_spread"] > 0, + f"{side}: default nondegenerate generation sanity probe did not run") + require(runtime["runtime_environment"]["cold_run"] == cold_labels[side], + f"{side}: cold-run label not recorded") + require(runtime["stack_fingerprint"]["device"] == "cpu" + and manifest["runtime"]["lane"] == "other", f"{side}: not an honest CPU capture") + require(manifest["dataset"]["id"] == DATASET_ID and manifest["dataset"]["role"] == "root" + and manifest["weights"]["revision"] == args.model_revision + and manifest["weights"]["repository"] == args.model_repository, + f"{side}: model/dataset identity mismatch") + require(runtime["capture_tool"]["resolved_panel_binding"]["binding"] == binding, + f"{side}: captured panel binding differs") + require(manifest["capture"]["records_count"] == 4 + and manifest["capture"]["scored_rows_total"] == 252 + and manifest["capture"]["dtype"] == "BF16", f"{side}: incomplete BF16 capture") + summary["captures"][side] = { + "path": side, "cold_run": cold_labels[side], "pid": command["pid"], + "dataset_sha256": manifest[F.SEAL_FIELD], + "capture_content_digest": manifest["capture"]["capture_content_digest"], + "head_tensor_content_sha256": manifest["head"]["tensor_content_sha256"], + "checkpoint_identity_sha256": manifest["weights"]["checkpoint_identity_sha256"], + "stack_fingerprint_sha256": manifest["runtime"]["stack_fingerprint_sha256"], + "resources": runtime["resources"], "memory_report": read_json(memory_path), + "generation_sanity_probe": probe, "runtime_versions": command["runtime"]} + write_json(out / "evidence-summary.json", summary) + + first, repeat = (summary["captures"][side] for side in ("first", "repeat")) + for key in ("capture_content_digest", "head_tensor_content_sha256", + "checkpoint_identity_sha256", "stack_fingerprint_sha256"): + require(first[key] == repeat[key], f"Cold captures disagree: {key}") + comparison_dir = out / "comparison" + run("compare", dataset_tool, + ["compare", "--reference", out / "first", "--candidate", out / "repeat", + "--out", comparison_dir, "--self-compare", "--force-compute", "--device", "cpu", + "--replay-device", "numpy", "--replay-dtype", "float32", "--vocab-chunk", "8192", + "--chunk-positions", "128", "--verify-tensors", + "--reference-label", cold_labels["first"], "--candidate-label", cold_labels["repeat"]]) + receipt_path = comparison_dir / "comparison-receipt.json" + receipt_report = out / "comparison.validate.json" + run("validate-comparison", dataset_tool, + ["validate", "--receipt", receipt_path, "--strict", "--json", receipt_report]) + check_report(receipt_report) + receipt = read_json(receipt_path) + require(receipt["comparison_kind"] == "reproduction_confirmation" + and receipt["comparability"]["class"] == "strict", "Not a strict reproduction") + require(receipt["self_compare"]["force_compute_agreed"] is True + and receipt["self_compare"]["capture_content_digest_equal"] is True, + "Forced numerical replay did not agree with the content hash proof") + require(positive_zero(receipt["metric"]["value"]) + and all(positive_zero(value) for value in receipt["kl"].values()) + and type(receipt["top1_agreement"]) is float and receipt["top1_agreement"] == 1.0, + "Comparison did not report literal +0.0 KL and 1.0 top-1 agreement") + require(receipt["comparator"]["replay_backend"] == "numpy:cpu:float32" + and receipt["comparator"]["tensor_content_digests_verified"] is True + and receipt["measurement_scope"]["scored_positions"] == 252 + and receipt["measurement_scope"]["contexts"] == 4 + and receipt["measurement_scope"]["covers_full_panel"] is True, + "Replay backend, verification, or panel coverage differs") + import numpy as np + tokenwise_path = comparison_dir / receipt["tokenwise"]["path"] + require(sha256(tokenwise_path) == receipt["tokenwise"]["sha256"], "Tokenwise file hash differs") + values = np.load(tokenwise_path, allow_pickle=False) + require(values.dtype == np.dtype("float64") and values.shape == (252,) + and bool(np.all(values == 0.0)) and not bool(np.any(np.signbit(values))), + "Tokenwise artifact is not exactly 252 positive float64 zeros") + summary["comparison"] = { + "receipt": str(receipt_path.relative_to(out)), "receipt_sha256": receipt["receipt_sha256"], + "comparison_kind": receipt["comparison_kind"], "metric": receipt["metric"], + "kl": receipt["kl"], "top1_agreement": receipt["top1_agreement"], + "comparator": receipt["comparator"], "self_compare": receipt["self_compare"], + "tokenwise": receipt["tokenwise"], "measurement_scope": receipt["measurement_scope"], + "note": "QFS retains its hash-proof result and top-1 value for reproduction confirmations; " + "--force-compute independently runs the estimator and requires its tokenwise KL " + "array to agree exactly. short_circuited=true therefore does not mean replay was skipped."} + + +def main(argv=None): + parser = argparse.ArgumentParser(description=__doc__) + for flag in ("model-dir", "model-repository", "model-revision", "panel-dir", "out", "qfs-root"): + parser.add_argument("--" + flag, required=True) + args = parser.parse_args(argv) + if not re.fullmatch(r"[0-9a-f]{40}", args.model_revision): + parser.error("--model-revision must be an actual immutable lowercase 40-hex Hub commit") + if not re.fullmatch(r"[A-Za-z0-9][A-Za-z0-9._-]*/[A-Za-z0-9][A-Za-z0-9._-]*", args.model_repository): + parser.error("--model-repository must be an owner/repository Hub identity") + out = Path(args.out).absolute() + try: + out.mkdir(parents=True, exist_ok=False) + except OSError as exc: + parser.error(f"Refusing output directory {out}: {exc}") + started = time.monotonic() + summary = {"schema": "malaiwah.glm-moe-dsa-tiny-cpu-reproduction.v1", "status": "running", + "commands": [], "driver_argv": [sys.executable, str(Path(__file__).resolve()), + *(sys.argv[1:] if argv is None else argv)], + "driver_sha256": sha256(__file__), + "scope": "Random-init CPU reproduction only; no quality claim or registry submission."} + try: + reproduce(args, out, summary) + summary["status"] = "passed" + code = 0 + except Exception as exc: + summary.update({"status": "failed", "error": f"{type(exc).__name__}: {exc}"}) + (out / "failure.traceback.log").write_text(traceback.format_exc(), encoding="utf-8") + print(summary["error"], file=sys.stderr) + code = 1 + finally: + summary["elapsed_seconds"] = time.monotonic() - started + write_json(out / "evidence-summary.json", summary) + print(json.dumps({"status": summary["status"], "evidence": str(out / "evidence-summary.json")}, + sort_keys=True)) + return code + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/raw/candidates/modelopt-mixed/evidence/candidate/README.md b/raw/candidates/modelopt-mixed/evidence/candidate/README.md new file mode 100644 index 0000000000000000000000000000000000000000..f515b910f3d1c4feb1dd2e6248d91f7ba15e8134 --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/candidate/README.md @@ -0,0 +1,95 @@ +--- +license: mit +tags: +- fidelity +- kl-divergence +- fidelity-provenance +- fidelity-dataset +- fidelity-quant +x_fidelity: + spec: https://github.com/malaiwah/quant-fidelity-suite/blob/main/docs/FIDELITY-DATASET-SPEC.md + spec_version: fidelity-provenance/v1 + role: fidelity-dataset + captured_model: + repository: /tmp/qfs-quant-microfloat-release/stage-main/modelopt-mixed + revision: null + role: quant + form: hidden + lane: other + panel: + panel_id: panel--panel + suite_token_hash_sha256: 525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36 + contexts: 4 + scored_positions: 252 + repository: null + revision: null + head: + policy: native + quantized: false + bits: 16 + lm_head_tensor_content_sha256: 2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510 + lm_head_file_sha256: 07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913 + final_norm_tensor_content_sha256: null + final_norm_file_sha256: null + equality_receipt: null + replay_permitted: true + scope_digest: attn.o=quantized:modelopt-fp8-block@8|attn.o=quantized:modelopt-fp8-tensor@8|attn.o=quantized:modelopt-nvfp4@4|attn.other=quantized:mixed|attn.qkv=quantized:mixed|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=quantized:modelopt-nvfp4@4|mlp.gate=quantized:modelopt-fp8-tensor@8|mlp.up=quantized:modelopt-fp8-block@8|moe.experts=quantized:mixed|moe.router=native:mixed|moe.shared_expert=quantized:mixed|norm=native:bf16@16|head=native|kv=bf16 + seal: + manifest: fidelity-dataset.json + dataset_sha256: null + checksums: checksums.txt + checksums_sha256: '0000000000000000000000000000000000000000000000000000000000000000' + note: 'written before the seal: dataset_sha256 and checksums_sha256 are digests of the tree this file + is inside, so they cannot appear in it. Read them from fidelity-dataset.json.' + interop: + compatible_with: + - kimi-k3-distribution-fidelity/1 + k3_compat_emitted: false + registry: + dataset: malaiwah/quant-fidelity-registry + schema_version: quant-fidelity-registry/v1 + artifact_id: null + measurement_ids: [] + snapshot: null + fidelity_dataset: + repository: null + revision: null + dataset_sha256: null + capture_content_digest: 7c69d7e6d3cf75e007b7b9e06535cde3f1a897d8b9a2f6e7099b721ea2565ddb + form: hidden + role: quant + measurements: [] +--- +# Local quant integration candidate + +A **quant** fidelity dataset in **hidden form**, produced by `engines/tools/hf_capture.py` from `/tmp/qfs-quant-microfloat-release/stage-main/modelopt-mixed`. + +## The cut + +the final hidden state handed to lm_head -- after the text model's final norm and immediately before the head matmul -- captured as the head module's input via torch.nn.Module.register_forward_pre_hook; replay applies the head ONLY (no final norm at replay time: the capture already sits after it). Same cut as engines/tools/hidden_replay.py and as Festr's kimi-k3 hidden-replay qualification. + +## What is here + +| | | +|---|---| +| records | 4 | +| scored positions | 252 | +| context length | 64 | +| hidden width | 64 | +| vocab size | 260 | +| capture bytes (hidden form) | 33348 | +| the same capture in logit form would be | 262080 bytes (8x) | +| scope policy | mixed | +| lane | other | + +## Does the model still generate sensibly + +`The capital of France is` -> `�` (p=0.0068, entropy 5.548 of a possible 5.561 nats). Recorded, not enforced. One extra window through the same schedule; its hidden state was discarded and is not part of this dataset. + +## How to check it + +``` +bin/fidelity-dataset verify +``` + +Full specification: diff --git a/raw/candidates/modelopt-mixed/evidence/candidate/capture/hidden_0000.safetensors b/raw/candidates/modelopt-mixed/evidence/candidate/capture/hidden_0000.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..3a794056a2e13e91041985357b35722d9fc29bb0 --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/candidate/capture/hidden_0000.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d58e6020d49e8ebc9ec37adef717eced6bcfbb7839b6e78760d190f76d5532ac +size 8337 diff --git a/raw/candidates/modelopt-mixed/evidence/candidate/capture/hidden_0001.safetensors b/raw/candidates/modelopt-mixed/evidence/candidate/capture/hidden_0001.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..d7c02d853eeb703521bc6c1745c54fcf4cc690e6 --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/candidate/capture/hidden_0001.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c82073ece4ff765650d14a750f155cf825a1211382501182cceb86c6ac4e2972 +size 8337 diff --git a/raw/candidates/modelopt-mixed/evidence/candidate/capture/hidden_0002.safetensors b/raw/candidates/modelopt-mixed/evidence/candidate/capture/hidden_0002.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..95c2172c77a9d53e8e196c1e2877f64787f46ae4 --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/candidate/capture/hidden_0002.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bb1e18fd435c3f563fb0e87f3a30415cb71bd617b2524dace39342a15d5f23c6 +size 8337 diff --git a/raw/candidates/modelopt-mixed/evidence/candidate/capture/hidden_0003.safetensors b/raw/candidates/modelopt-mixed/evidence/candidate/capture/hidden_0003.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..c7f402c47e26a256404ebbdac5373eaddbbbb497 --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/candidate/capture/hidden_0003.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a0c5e35132c06bad5ae2fa3c3285406309fe8649c097b75860c98bc69d2d2160 +size 8337 diff --git a/raw/candidates/modelopt-mixed/evidence/candidate/capture/manifest.json b/raw/candidates/modelopt-mixed/evidence/candidate/capture/manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..38dc84ccc4aef2f62beb7330e8970cd7847886bd --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/candidate/capture/manifest.json @@ -0,0 +1,159 @@ +{ + "capture_content_digest": "7c69d7e6d3cf75e007b7b9e06535cde3f1a897d8b9a2f6e7099b721ea2565ddb", + "context_length": 64, + "coverage": { + "complete": true, + "declared_records": 4, + "index_range": [ + 0, + 3 + ], + "missing_indices_sample": [], + "present_records": 4, + "shard_of": null, + "subset_detail": null + }, + "created_utc": "2026-09-07T16:53:11Z", + "dtype": "BF16", + "dtype_lossless": true, + "form": "hidden", + "format_version": 1, + "hidden_width": 64, + "receipt_sha256": "6aa99c297cb7b10c00266606e148be8c20ef5580bb3a4df93693f315bd96d105", + "records": [ + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 0, + "document_id": "embedded-synthetic/garden.txt", + "domain": "garden", + "dtype": "BF16", + "elapsed_seconds": 0.03, + "file": "hidden_0000.safetensors", + "index": 0, + "key": "hidden_states", + "payload_sha256": "7c75f849709e918319ce9749a6903e0b30441b94c8cc650a8092d37bf9a9eb32", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "d58e6020d49e8ebc9ec37adef717eced6bcfbb7839b6e78760d190f76d5532ac", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "7c75f849709e918319ce9749a6903e0b30441b94c8cc650a8092d37bf9a9eb32", + "token_ids_json_sha256": "08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315", + "token_ids_sha256_legacy": "9d5378f0316be57e37f80d2bae7895ba4a1140c302c87ff8cce2fbd9afc83b77", + "window_id": "final-0000", + "window_index": 0 + }, + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 1, + "document_id": "embedded-synthetic/arithmetic.txt", + "domain": "arithmetic", + "dtype": "BF16", + "elapsed_seconds": 0.036, + "file": "hidden_0001.safetensors", + "index": 1, + "key": "hidden_states", + "payload_sha256": "2c78d610b9f01a21f6d5cbc98875ee86ba3c4846e72425802f25fec01cd956c2", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "c82073ece4ff765650d14a750f155cf825a1211382501182cceb86c6ac4e2972", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "2c78d610b9f01a21f6d5cbc98875ee86ba3c4846e72425802f25fec01cd956c2", + "token_ids_json_sha256": "5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46", + "token_ids_sha256_legacy": "e0f95114b71a46cb489539dc38909fb67fb378f25fafbb513e32690cc7f11b37", + "window_id": "final-0001", + "window_index": 1 + }, + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 2, + "document_id": "embedded-synthetic/code.txt", + "domain": "code", + "dtype": "BF16", + "elapsed_seconds": 0.029, + "file": "hidden_0002.safetensors", + "index": 2, + "key": "hidden_states", + "payload_sha256": "cd3112defd516bd0f934407ab18200f588f4b469f042d4db2e0c9c03f740e62c", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "bb1e18fd435c3f563fb0e87f3a30415cb71bd617b2524dace39342a15d5f23c6", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "cd3112defd516bd0f934407ab18200f588f4b469f042d4db2e0c9c03f740e62c", + "token_ids_json_sha256": "51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07", + "token_ids_sha256_legacy": "482b890c7b0e2f7400257c43680093b7f2b90d6df5361c6de3ae97ddfdd2504e", + "window_id": "final-0002", + "window_index": 2 + }, + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 3, + "document_id": "embedded-synthetic/instructions.txt", + "domain": "instructions", + "dtype": "BF16", + "elapsed_seconds": 0.027, + "file": "hidden_0003.safetensors", + "index": 3, + "key": "hidden_states", + "payload_sha256": "55cd6720c35aada0fb704970c0277016d96ad71f13942b71145dcabd4509ef5c", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "a0c5e35132c06bad5ae2fa3c3285406309fe8649c097b75860c98bc69d2d2160", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "55cd6720c35aada0fb704970c0277016d96ad71f13942b71145dcabd4509ef5c", + "token_ids_json_sha256": "8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d", + "token_ids_sha256_legacy": "12e01edd3900ff2ca82621feb5504f24b003a53c0afe98a9ee0b490eb93141d4", + "window_id": "final-0003", + "window_index": 3 + } + ], + "run_name": "hf-capture", + "runtime_manifest": "../runtime/capture-runtime.json", + "runtime_manifest_sha256": "4ce6318c2063b8cc18b8b0b4f0301b71ab82b0961c25c31779e1d13b78b94cd9", + "schema": "malaiwah.fidelity-capture-manifest.v1", + "scored_rows_per_context": 63, + "semantic_point": "after_final_rmsnorm_before_lm_head", + "tensor_key": "hidden_states", + "total_scored_rows": 252, + "total_size_bytes": 33348, + "vocab_size": 260 +} diff --git a/raw/candidates/modelopt-mixed/evidence/candidate/checksums.txt b/raw/candidates/modelopt-mixed/evidence/candidate/checksums.txt new file mode 100644 index 0000000000000000000000000000000000000000..b2e95815941e33437b13c1567e9c1c3351b8cf17 --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/candidate/checksums.txt @@ -0,0 +1,20 @@ +d2910fb80cfd368eec5a13873e256ef31bc32473b6c904ed63500e03b95d5e36 README.md +d58e6020d49e8ebc9ec37adef717eced6bcfbb7839b6e78760d190f76d5532ac capture/hidden_0000.safetensors +c82073ece4ff765650d14a750f155cf825a1211382501182cceb86c6ac4e2972 capture/hidden_0001.safetensors +bb1e18fd435c3f563fb0e87f3a30415cb71bd617b2524dace39342a15d5f23c6 capture/hidden_0002.safetensors +a0c5e35132c06bad5ae2fa3c3285406309fe8649c097b75860c98bc69d2d2160 capture/hidden_0003.safetensors +95b6648a9c17d9fb70058995a7c09d326a3b6b8db1908e356fd16a8dd1167515 capture/manifest.json +777b038f747bed25d1f5db8adbfd2a78c7762fb5c870ff8c3c785a984d48a168 head/head.json +07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913 head/weight.safetensors +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0000.npy +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0001.npy +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0002.npy +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0003.npy +b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263 panel/panel-receipt.json +68efa258ea3c5d4ba759c3c15aadd6e8c984711831bea3f335903109345cdcef panel/panel.json +08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315 panel/tokens/context-0000.json +5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46 panel/tokens/context-0001.json +51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07 panel/tokens/context-0002.json +8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d panel/tokens/context-0003.json +4ce6318c2063b8cc18b8b0b4f0301b71ab82b0961c25c31779e1d13b78b94cd9 runtime/capture-runtime.json +d3024ee8845d123018358b9c98a844bcdc3c985fbbc92d9e1b8565b121fe8a45 validation/structural-validation.json diff --git a/raw/candidates/modelopt-mixed/evidence/candidate/fidelity-dataset.json b/raw/candidates/modelopt-mixed/evidence/candidate/fidelity-dataset.json new file mode 100644 index 0000000000000000000000000000000000000000..4f8c0d0469fe1aad13ed35faf1e0d6564f18620e --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/candidate/fidelity-dataset.json @@ -0,0 +1,438 @@ +{ + "capture": { + "capture_content_digest": "7c69d7e6d3cf75e007b7b9e06535cde3f1a897d8b9a2f6e7099b721ea2565ddb", + "dtype": "BF16", + "dtype_lossless": true, + "form": "hidden", + "head_not_separable_reason": null, + "head_separable": true, + "hidden_width": 64, + "lossy_codec": null, + "manifest_file": "capture/manifest.json", + "manifest_file_sha256": "95b6648a9c17d9fb70058995a7c09d326a3b6b8db1908e356fd16a8dd1167515", + "records_count": 4, + "scored_rows_total": 252, + "semantic_point": "after_final_rmsnorm_before_lm_head", + "tensor_key": "hidden_states", + "total_size_bytes": 33348, + "vocab_size": 260 + }, + "coverage": { + "complete": true, + "declared_records": 4, + "index_range": [ + 0, + 3 + ], + "missing_indices_sample": [], + "present_records": 4, + "shard_of": null, + "subset_detail": null + }, + "created_utc": "2026-09-07T16:53:11Z", + "dataset": { + "author": { + "handle": null, + "is_registry_maintainer": false, + "name": "malaiwah", + "role": "capture-author", + "url": null + }, + "base_capture": null, + "id": "fidelity--quant-integration.candidate", + "license": "mit", + "name": "Local quant integration candidate", + "qualification": null, + "repository": null, + "revision": null, + "role": "quant", + "structural_status": "sealed" + }, + "dataset_sha256": "92b477e543243ae8209f397b5b4b6267d8035ab50fcc3df4bd4c6aeb8e858823", + "determinism": { + "cold_start_per_run": true, + "distinct_evidence_hash_count": 1, + "evidence_hashes": [ + "7c69d7e6d3cf75e007b7b9e06535cde3f1a897d8b9a2f6e7099b721ea2565ddb" + ], + "evidence_kind": "hidden_state_tensor_sha256", + "identical_across_runs": null, + "note": "a single cold capture; cross-run determinism is NOT asserted here. Capture a second cold run and run `fidelity-dataset compare --self-compare` -- an exactly 0.0 result is the SC-1 reproduction confirmation.", + "repeat_noise": null, + "repeats": [], + "run_count": 1 + }, + "disclosures": [ + { + "affects_comparability": false, + "code": "rtn_format_fixture", + "detail": "Local RTN-format fixture; optimizer-not-run; no model-quality or serving-kernel equivalence claim.", + "severity": "info" + }, + { + "affects_comparability": false, + "code": "reduced_run_count", + "detail": "this dataset is ONE cold capture (run_count 1, the DET-D4 floor is 5). Cross-run determinism is not asserted by the dataset; it is established by a second cold capture plus `fidelity-dataset compare --self-compare`, whose exactly-0.0 result is the SC-1 reproduction confirmation.", + "severity": "caveat" + } + ], + "format_version": 1, + "generation_sanity_probe": { + "degenerate": false, + "enforced": false, + "entropy_nats": 5.548353428529598, + "expect": null, + "logit_spread": 0.990234375, + "note": "one extra window through the same schedule; its hidden state is discarded and never enters the dataset.", + "prompt": "The capital of France is", + "schema": "malaiwah.generation-sanity-probe.v1", + "status": "recorded", + "top1_id": 113, + "top1_probability": 0.006806732697806272, + "top1_text": "�", + "top_k": [ + { + "id": 113, + "probability": 0.006806732697806272, + "text": "�" + }, + { + "id": 237, + "probability": 0.006394333611398823, + "text": "�" + }, + { + "id": 193, + "probability": 0.006006920522535322, + "text": "\u0001" + }, + { + "id": 225, + "probability": 0.005566354492398915, + "text": "" + }, + { + "id": 236, + "probability": 0.005533834500499174, + "text": "�" + } + ], + "uniform_entropy_nats": 5.560681631015528, + "vocab_size": 260 + }, + "head": { + "applied_in_capture": false, + "bias": null, + "bits": 16, + "compat_tensor_key": "weight", + "dtype": "BF16", + "equality_receipt": null, + "file": "head/weight.safetensors", + "file_sha256": "07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913", + "final_norm": { + "applied_at_replay": false, + "applied_in_capture": true, + "dtype": null, + "file": null, + "file_sha256": null, + "shape": null, + "tensor_content_sha256": null, + "tensor_key": null + }, + "head_json": "head/head.json", + "present": true, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "shape": [ + 260, + 64 + ], + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "tensor_key": "lm_head.weight" + }, + "interop": { + "adapted_from": null, + "compatible_with": [ + "kimi-k3-distribution-fidelity/1" + ], + "divergences": [ + { + "field": "head", + "id": "D-1", + "reason": "every capture declares its OWN head identity by tensor content digest; the comparator refuses a hidden-form comparison across differing heads." + }, + { + "field": "runtime.lane", + "id": "D-2", + "reason": "lane is required and gated at compare time so registry BIAS-006 is checked before a number exists, not at submission." + }, + { + "field": "panel.scoring_window", + "id": "D-3", + "reason": "scoring_window is part of panel identity, not a comparator flag: a score_from=1024 number is a different panel, not a variant." + }, + { + "field": "comparison_kind", + "id": "D-4", + "reason": "self-compare is a first-class mode asserting exactly 0.0." + }, + { + "field": "estimator.accumulation_dtype", + "id": "D-5", + "reason": "required, fp64 default; an fp32 estimator lands in a different comparability class on the same data and that must be visible." + }, + { + "field": "coverage", + "id": "D-6", + "reason": "declared vs present record counts with shard_of; fixes our own manifest that claimed 5,120 captures in a 512-file repository." + }, + { + "field": "panel", + "id": "D-7", + "reason": "the panel is a separately referenceable object, which is what makes a candidate capture publishable standalone." + }, + { + "field": "capture.lossy_codec", + "id": "D-8", + "reason": "lets a llama.cpp .kld be ingested without laundering a lossy capture as exact." + }, + { + "field": "capture.records[].attention_mask_sha256", + "id": "D-9", + "reason": "our packed and streaming lanes vary mask construction; a single-request capture path makes it invariant and has no equivalent field." + }, + { + "field": "capture.head_separable", + "id": "D-10", + "reason": "hidden form is the default; logit form must declare head_separable:false with a reason." + } + ], + "k3_compat_emitted": false, + "note": null + }, + "panel": { + "contamination": { + "checked": false, + "hits": null, + "method": "not established", + "receipt": null + }, + "context_length": 64, + "contexts": 4, + "panel_file": "panel/panel.json", + "panel_file_sha256": "68efa258ea3c5d4ba759c3c15aadd6e8c984711831bea3f335903109345cdcef", + "panel_id": "panel--panel", + "panel_receipt_file": "panel/panel-receipt.json", + "panel_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "panel_token_sha256_legacy": "3c9467c85be43d238926f6d18bf825c2e4748814c95b8b0e8b8f1420546c3089", + "remap_file": null, + "repository": null, + "revision": null, + "scored_positions_total": 252, + "scoring_window": { + "dropped_positions_total": 0, + "min_left_context_tokens": 1, + "policy": "every causal prediction position of every window is scored; nothing is dropped", + "score_from": 0, + "windowed": false + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } + }, + "runtime": { + "backend_identity_sha256": null, + "file": "runtime/capture-runtime.json", + "file_sha256": "4ce6318c2063b8cc18b8b0b4f0301b71ab82b0961c25c31779e1d13b78b94cd9", + "lane": "other", + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "lane_inferred": false, + "runtime_reader_sha256": null, + "source": "native", + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd" + }, + "schema": "malaiwah.fidelity-dataset.v1", + "scope": { + "assignments": [ + { + "bits_per_weight": 8, + "format": "modelopt-fp8-block", + "layer_range": "0,3", + "note": "2 tensors: model.layers.N.self_attn.o_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "attn.o", + "treatment": "quantized" + }, + { + "bits_per_weight": 8, + "format": "modelopt-fp8-tensor", + "layer_range": "1", + "note": "1 tensors: model.layers.N.self_attn.o_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "attn.o", + "treatment": "quantized" + }, + { + "bits_per_weight": 4, + "format": "modelopt-nvfp4", + "layer_range": "2", + "note": "1 tensors: model.layers.N.self_attn.o_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "attn.o", + "treatment": "quantized" + }, + { + "bits_per_weight": null, + "format": "mixed", + "layer_range": "0-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 12 x native:bf16@16 (model.layers.N.self_attn.indexer.k_norm.bias, model.layers.N.self_attn.indexer.k_norm.weight, model.layers.N.self_attn.kv_a_layernorm.weight); 2 x quantized:modelopt-fp8-block@8 (model.layers.N.self_attn.indexer.wk.weight, model.layers.N.self_attn.indexer.wq_b.weight); 2 x quantized:modelopt-fp8-tensor@8 (model.layers.N.self_attn.indexer.weights_proj.weight, model.layers.N.self_attn.indexer.wk.weight); 2 x quantized:modelopt-nvfp4@4 (model.layers.N.self_attn.indexer.weights_proj.weight, model.layers.N.self_attn.indexer.wq_b.weight). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "attn.other", + "treatment": "quantized" + }, + { + "bits_per_weight": null, + "format": "mixed", + "layer_range": "0-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 4 x quantized:modelopt-fp8-block@8 (model.layers.N.self_attn.kv_a_proj_with_mqa.weight, model.layers.N.self_attn.kv_b_proj.weight, model.layers.N.self_attn.q_a_proj.weight); 6 x quantized:modelopt-fp8-tensor@8 (model.layers.N.self_attn.kv_a_proj_with_mqa.weight, model.layers.N.self_attn.kv_b_proj.weight, model.layers.N.self_attn.q_a_proj.weight); 6 x quantized:modelopt-nvfp4@4 (model.layers.N.self_attn.kv_a_proj_with_mqa.weight, model.layers.N.self_attn.kv_b_proj.weight, model.layers.N.self_attn.q_a_proj.weight). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "attn.qkv", + "treatment": "quantized" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": "all", + "note": "1 tensors: model.embed_tokens.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "embed_tokens", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": "all", + "note": "1 tensors: lm_head.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "lm_head", + "treatment": "native" + }, + { + "bits_per_weight": 4, + "format": "modelopt-nvfp4", + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.down_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "mlp.down", + "treatment": "quantized" + }, + { + "bits_per_weight": 8, + "format": "modelopt-fp8-tensor", + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.gate_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "mlp.gate", + "treatment": "quantized" + }, + { + "bits_per_weight": 8, + "format": "modelopt-fp8-block", + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "mlp.up", + "treatment": "quantized" + }, + { + "bits_per_weight": null, + "format": "mixed", + "layer_range": "1-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 24 x quantized:modelopt-fp8-block@8 (model.layers.N.mlp.experts.E.down_proj.weight, model.layers.N.mlp.experts.E.gate_proj.weight, model.layers.N.mlp.experts.E.up_proj.weight); 24 x quantized:modelopt-fp8-tensor@8 (model.layers.N.mlp.experts.E.down_proj.weight, model.layers.N.mlp.experts.E.gate_proj.weight, model.layers.N.mlp.experts.E.up_proj.weight); 24 x quantized:modelopt-nvfp4@4 (model.layers.N.mlp.experts.E.down_proj.weight, model.layers.N.mlp.experts.E.gate_proj.weight, model.layers.N.mlp.experts.E.up_proj.weight). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "moe.experts", + "treatment": "quantized" + }, + { + "bits_per_weight": null, + "format": "mixed", + "layer_range": "1-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 3 x native:bf16@16 (model.layers.N.mlp.gate.weight); 3 x native:fp32@32 (model.layers.N.mlp.gate.e_score_correction_bias). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "moe.router", + "treatment": "native" + }, + { + "bits_per_weight": null, + "format": "mixed", + "layer_range": "1-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 3 x quantized:modelopt-fp8-block@8 (model.layers.N.mlp.shared_experts.down_proj.weight, model.layers.N.mlp.shared_experts.gate_proj.weight, model.layers.N.mlp.shared_experts.up_proj.weight); 3 x quantized:modelopt-fp8-tensor@8 (model.layers.N.mlp.shared_experts.down_proj.weight, model.layers.N.mlp.shared_experts.gate_proj.weight, model.layers.N.mlp.shared_experts.up_proj.weight); 3 x quantized:modelopt-nvfp4@4 (model.layers.N.mlp.shared_experts.down_proj.weight, model.layers.N.mlp.shared_experts.gate_proj.weight, model.layers.N.mlp.shared_experts.up_proj.weight). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "moe.shared_expert", + "treatment": "quantized" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": "all", + "note": "9 tensors: model.layers.N.input_layernorm.weight, model.layers.N.post_attention_layernorm.weight, model.norm.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "norm", + "treatment": "native" + } + ], + "head_policy": "native", + "kv_cache_dtype": "bf16", + "policy": "mixed", + "scope_digest": "attn.o=quantized:modelopt-fp8-block@8|attn.o=quantized:modelopt-fp8-tensor@8|attn.o=quantized:modelopt-nvfp4@4|attn.other=quantized:mixed|attn.qkv=quantized:mixed|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=quantized:modelopt-nvfp4@4|mlp.gate=quantized:modelopt-fp8-tensor@8|mlp.up=quantized:modelopt-fp8-block@8|moe.experts=quantized:mixed|moe.router=native:mixed|moe.shared_expert=quantized:mixed|norm=native:bf16@16|head=native|kv=bf16" + }, + "seal": { + "checksums_file": "checksums.txt", + "checksums_format": "sha256sum", + "checksums_sha256": "2cdec1c75b050f6cabeb443c993c1afa3ffded31997a23d03f99a5c68a06783a", + "covers": [ + "every published file except checksums.txt and fidelity-dataset.json, via checksums.txt", + "fidelity-dataset.json itself, via the self-blanked seal", + "every capture tensor a second time by CONTENT, via capture.capture_content_digest" + ], + "excludes": [ + "checksums.txt", + "fidelity-dataset.json" + ], + "external_anchor": null, + "method": "self_blanked_canonical_json_sha256", + "seal_field": "dataset_sha256" + }, + "upstream_receipts": [], + "weights": { + "artifact_ref": null, + "checkpoint_identity_sha256": "822ca7cc58e9909f2832e980051622ccb4a4a4ce1472c618a45e3f4863beb013", + "codec": "mixed", + "config_sha256": "33f139cf6a6c6de8e40791cff02405adc77c4447419863d9ce801642a484e958", + "declared_bits": 4.0, + "declared_head_bits": 16, + "index_sha256": null, + "model_ref": null, + "model_revision": null, + "quantized": true, + "repository": "/tmp/qfs-quant-microfloat-release/stage-main/modelopt-mixed", + "revision": null + } +} diff --git a/raw/candidates/modelopt-mixed/evidence/candidate/head/head.json b/raw/candidates/modelopt-mixed/evidence/candidate/head/head.json new file mode 100644 index 0000000000000000000000000000000000000000..cfb1d748d203487673352f1ad645cb98a49c4002 --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/candidate/head/head.json @@ -0,0 +1,34 @@ +{ + "applied_in_capture": false, + "bias": null, + "bits": 16, + "compat_tensor_key": "weight", + "dtype": "BF16", + "equality_receipt": null, + "file": "head/weight.safetensors", + "file_sha256": "07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913", + "final_norm": { + "applied_at_replay": false, + "applied_in_capture": true, + "dtype": null, + "file": null, + "file_sha256": null, + "shape": null, + "tensor_content_sha256": null, + "tensor_key": null + }, + "format_version": 1, + "note": "the head is shipped verbatim from the checkpoint so a third party can replay logits = hidden @ head^T without the weights", + "present": true, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "receipt_sha256": "2da3cfbfc607296b3bb32eb6fec1f122e4ce30fe9ea96653e5bb1b4ebab6514f", + "schema": "malaiwah.fidelity-head-identity.v1", + "shape": [ + 260, + 64 + ], + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "tensor_key": "lm_head.weight" +} diff --git a/raw/candidates/modelopt-mixed/evidence/candidate/head/weight.safetensors b/raw/candidates/modelopt-mixed/evidence/candidate/head/weight.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..abe6e7c215a73bc88e85042067923bf943118086 --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/candidate/head/weight.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913 +size 33365 diff --git a/raw/candidates/modelopt-mixed/evidence/candidate/panel/masks/context-0000.npy b/raw/candidates/modelopt-mixed/evidence/candidate/panel/masks/context-0000.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/candidate/panel/masks/context-0000.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/modelopt-mixed/evidence/candidate/panel/masks/context-0001.npy b/raw/candidates/modelopt-mixed/evidence/candidate/panel/masks/context-0001.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/candidate/panel/masks/context-0001.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/modelopt-mixed/evidence/candidate/panel/masks/context-0002.npy b/raw/candidates/modelopt-mixed/evidence/candidate/panel/masks/context-0002.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/candidate/panel/masks/context-0002.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/modelopt-mixed/evidence/candidate/panel/masks/context-0003.npy b/raw/candidates/modelopt-mixed/evidence/candidate/panel/masks/context-0003.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/candidate/panel/masks/context-0003.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/modelopt-mixed/evidence/candidate/panel/panel-receipt.json b/raw/candidates/modelopt-mixed/evidence/candidate/panel/panel-receipt.json new file mode 100644 index 0000000000000000000000000000000000000000..fbc2ce3e8e9602a492d83ae681817e0fa02e4173 --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/candidate/panel/panel-receipt.json @@ -0,0 +1,376 @@ +{ + "corpus": { + "documents_considered": 4, + "documents_selected": 4, + "path_prefix": "embedded-synthetic/", + "repository": null, + "revision": null, + "source": "Synthetic texts embedded verbatim in this sealed receipt and builder." + }, + "created_utc": "2026-09-07T00:00:00Z", + "created_utc_policy": "Fixed artifact epoch for deterministic bytes; not an execution timestamp.", + "documents": [ + { + "bytes": 135, + "document": "garden.txt", + "document_sha256": "2aca14290cd4753c3b15d8a20aaa7a6963d2cb48d78e8538a4ce34d4665dcb94", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "garden", + "text_utf8": "The small garden has red flowers, green leaves, and a stone path. A gentle breeze moves the branches while a robin sings near the gate.", + "tokens_total": 137, + "window_id": "final-0000" + }, + { + "bytes": 144, + "document": "arithmetic.txt", + "document_sha256": "b867a2e8cbe81cc8d5781bfe6718a43e171fb5c7c138b9ed6ac86bebc24bca83", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "arithmetic", + "text_utf8": "A shelf holds three blue boxes and five red boxes. There are eight boxes in total. Move two boxes to the desk and count the six boxes remaining.", + "tokens_total": 146, + "window_id": "final-0001" + }, + { + "bytes": 162, + "document": "code.txt", + "document_sha256": "08c8f75f45899cbc9656a7a3fcdbf3092abfa7bc97fe353957b08d7e9660240b", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "code", + "text_utf8": "def add_values(left, right):\n return left + right\n\nresult = add_values(7, 9)\nprint(result)\n# This readable snippet is synthetic input, not a coding benchmark.\n", + "tokens_total": 164, + "window_id": "final-0002" + }, + { + "bytes": 140, + "document": "instructions.txt", + "document_sha256": "1dba5052b28929f94f322ad9e8c0b238bcbd653d6fae54ebaea8e5e3f6073378", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "instructions", + "text_utf8": "First place a clean cup on the table. Next pour cool water into the cup. Finally put the bottle away and write a short note about the steps.", + "tokens_total": 142, + "window_id": "final-0003" + } + ], + "environment": { + "numpy": "2.5.3", + "tokenizers": "0.23.2", + "transformers": "5.16.1" + }, + "format_builder": "engines/tools/build_token_panel.py", + "format_builder_sha256": "30eb4d4d7e465aaa8d9ef2d947a0ac7fd42ec45388f20c8b6db242c88dc2d851", + "format_version": 1, + "panel_id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "panel_name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "parameters": { + "context_length": 64, + "generation_seed": null, + "generation_seed_policy": "No RNG is used.", + "prediction_positions_per_window": 63, + "scored_positions_total": 252, + "strata": [ + "garden", + "arithmetic", + "code", + "instructions" + ], + "windows_per_stratum": 1, + "windows_total": 4 + }, + "receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "resolver_sha256": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "schema": "malaiwah.token-panel-build-receipt.v1", + "selection_rule": "Four embedded readable synthetic documents in declared order; native tokenizer with add_special_tokens=True, truncation=True, max_length=64, padding=False; each encoded window must be exactly 64 tokens; no chat template; all 63 shifted next-token positions scored; no RNG.", + "separation": { + "checked": false, + "method": "No contamination scan or benchmark selection.", + "note": "Authored synthetic CPU smoke inputs for a random-init model; not a benchmark, held-out quality claim, or registry-row submission." + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "add_special_tokens": true, + "chat_template_applied": false, + "class": "TokenizersBackend", + "files_sha256": { + "config.json": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "generation_config.json": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "tokenizer.json": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "tokenizer_config.json": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + }, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "local_files_only": true, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "trust_remote_code": false, + "vocab_size": 260 + }, + "tool": "build_panel.py", + "tool_sha256": "f17b17262816676d6ededcc969756ac07ff991eab73117040ec41005f6ff63f3" +} diff --git a/raw/candidates/modelopt-mixed/evidence/candidate/panel/panel.json b/raw/candidates/modelopt-mixed/evidence/candidate/panel/panel.json new file mode 100644 index 0000000000000000000000000000000000000000..cedb9d5e3c635860791c55451fde6dc9e37cddb9 --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/candidate/panel/panel.json @@ -0,0 +1,298 @@ +{ + "contamination": { + "checked": false, + "hits": null, + "method": "not established", + "receipt": null + }, + "context_length": 64, + "contexts": 4, + "format_version": 1, + "name": "token panel panel--panel", + "panel_id": "panel--panel", + "panel_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "panel_token_sha256_legacy": "3c9467c85be43d238926f6d18bf825c2e4748814c95b8b0e8b8f1420546c3089", + "positions_per_context": 63, + "receipt_sha256": "8a4e27a74ca6ce39569b78c3d972077ab7966f6da118110b3b08adca1e284c6f", + "records": [ + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0000.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 0, + "document_id": "embedded-synthetic/garden.txt", + "domain": "garden", + "index": 0, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0000.json", + "token_ids_first16": [ + 1, + 55, + 75, + 72, + 224, + 86, + 80, + 68, + 79, + 79, + 224, + 74, + 68, + 85, + 71, + 72 + ], + "token_ids_json_sha256": "08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315", + "token_ids_last16": [ + 224, + 68, + 81, + 71, + 224, + 68, + 224, + 86, + 87, + 82, + 81, + 72, + 224, + 83, + 68, + 2 + ], + "token_ids_sha256_legacy": "9d5378f0316be57e37f80d2bae7895ba4a1140c302c87ff8cce2fbd9afc83b77", + "window_id": "final-0000", + "window_index": 0 + }, + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0001.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 1, + "document_id": "embedded-synthetic/arithmetic.txt", + "domain": "arithmetic", + "index": 1, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0001.json", + "token_ids_first16": [ + 1, + 36, + 224, + 86, + 75, + 72, + 79, + 73, + 224, + 75, + 82, + 79, + 71, + 86, + 224, + 87 + ], + "token_ids_json_sha256": "5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46", + "token_ids_last16": [ + 72, + 86, + 17, + 224, + 55, + 75, + 72, + 85, + 72, + 224, + 68, + 85, + 72, + 224, + 72, + 2 + ], + "token_ids_sha256_legacy": "e0f95114b71a46cb489539dc38909fb67fb378f25fafbb513e32690cc7f11b37", + "window_id": "final-0001", + "window_index": 1 + }, + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0002.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 2, + "document_id": "embedded-synthetic/code.txt", + "domain": "code", + "index": 2, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0002.json", + "token_ids_first16": [ + 1, + 71, + 72, + 73, + 224, + 68, + 71, + 71, + 66, + 89, + 68, + 79, + 88, + 72, + 86, + 11 + ], + "token_ids_json_sha256": "51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07", + "token_ids_last16": [ + 85, + 76, + 74, + 75, + 87, + 202, + 202, + 85, + 72, + 86, + 88, + 79, + 87, + 224, + 32, + 2 + ], + "token_ids_sha256_legacy": "482b890c7b0e2f7400257c43680093b7f2b90d6df5361c6de3ae97ddfdd2504e", + "window_id": "final-0002", + "window_index": 2 + }, + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0003.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 3, + "document_id": "embedded-synthetic/instructions.txt", + "domain": "instructions", + "index": 3, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0003.json", + "token_ids_first16": [ + 1, + 41, + 76, + 85, + 86, + 87, + 224, + 83, + 79, + 68, + 70, + 72, + 224, + 68, + 224, + 70 + ], + "token_ids_json_sha256": "8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d", + "token_ids_last16": [ + 224, + 70, + 82, + 82, + 79, + 224, + 90, + 68, + 87, + 72, + 85, + 224, + 76, + 81, + 87, + 2 + ], + "token_ids_sha256_legacy": "12e01edd3900ff2ca82621feb5504f24b003a53c0afe98a9ee0b490eb93141d4", + "window_id": "final-0003", + "window_index": 3 + } + ], + "repository": null, + "revision": null, + "schema": "malaiwah.fidelity-panel-binding.v1", + "scored_positions_total": 252, + "scoring_window": { + "dropped_positions_total": 0, + "min_left_context_tokens": 1, + "policy": "every causal prediction position of every window is scored; nothing is dropped", + "score_from": 0, + "windowed": false + }, + "strata": {}, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "token_digest_algorithm": { + "aggregate": "sha256('\\n'.join(per_record_hex).encode('ascii'))", + "legacy_aggregate": "sha256(''.join(per_record_hex).encode('utf-8'))", + "legacy_per_record": "sha256(json.dumps(ids).encode('utf-8'))", + "per_record": "sha256(json.dumps(ids, separators=(',',':')).encode('utf-8'))" + }, + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } +} diff --git a/raw/candidates/modelopt-mixed/evidence/candidate/panel/tokens/context-0000.json b/raw/candidates/modelopt-mixed/evidence/candidate/panel/tokens/context-0000.json new file mode 100644 index 0000000000000000000000000000000000000000..c55b788f77dcb26a8c56fe6a7593353d57abb70f --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/candidate/panel/tokens/context-0000.json @@ -0,0 +1 @@ +[1,55,75,72,224,86,80,68,79,79,224,74,68,85,71,72,81,224,75,68,86,224,85,72,71,224,73,79,82,90,72,85,86,15,224,74,85,72,72,81,224,79,72,68,89,72,86,15,224,68,81,71,224,68,224,86,87,82,81,72,224,83,68,2] \ No newline at end of file diff --git a/raw/candidates/modelopt-mixed/evidence/candidate/panel/tokens/context-0001.json b/raw/candidates/modelopt-mixed/evidence/candidate/panel/tokens/context-0001.json new file mode 100644 index 0000000000000000000000000000000000000000..8304be93e5387811e155f869e175c0bfca57ca76 --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/candidate/panel/tokens/context-0001.json @@ -0,0 +1 @@ +[1,36,224,86,75,72,79,73,224,75,82,79,71,86,224,87,75,85,72,72,224,69,79,88,72,224,69,82,91,72,86,224,68,81,71,224,73,76,89,72,224,85,72,71,224,69,82,91,72,86,17,224,55,75,72,85,72,224,68,85,72,224,72,2] \ No newline at end of file diff --git a/raw/candidates/modelopt-mixed/evidence/candidate/panel/tokens/context-0002.json b/raw/candidates/modelopt-mixed/evidence/candidate/panel/tokens/context-0002.json new file mode 100644 index 0000000000000000000000000000000000000000..2a1413e634823a039c4ede6b463b549207c4c8fb --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/candidate/panel/tokens/context-0002.json @@ -0,0 +1 @@ +[1,71,72,73,224,68,71,71,66,89,68,79,88,72,86,11,79,72,73,87,15,224,85,76,74,75,87,12,29,202,224,224,224,224,85,72,87,88,85,81,224,79,72,73,87,224,14,224,85,76,74,75,87,202,202,85,72,86,88,79,87,224,32,2] \ No newline at end of file diff --git a/raw/candidates/modelopt-mixed/evidence/candidate/panel/tokens/context-0003.json b/raw/candidates/modelopt-mixed/evidence/candidate/panel/tokens/context-0003.json new file mode 100644 index 0000000000000000000000000000000000000000..7978732d7bf3bfc5fed35c837bc69d9d66371c4f --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/candidate/panel/tokens/context-0003.json @@ -0,0 +1 @@ +[1,41,76,85,86,87,224,83,79,68,70,72,224,68,224,70,79,72,68,81,224,70,88,83,224,82,81,224,87,75,72,224,87,68,69,79,72,17,224,49,72,91,87,224,83,82,88,85,224,70,82,82,79,224,90,68,87,72,85,224,76,81,87,2] \ No newline at end of file diff --git a/raw/candidates/modelopt-mixed/evidence/candidate/runtime/capture-runtime.json b/raw/candidates/modelopt-mixed/evidence/candidate/runtime/capture-runtime.json new file mode 100644 index 0000000000000000000000000000000000000000..5f1d578c4f1d616d690fbce34884d406901cb06d --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/candidate/runtime/capture-runtime.json @@ -0,0 +1,688 @@ +{ + "capture_tool": { + "expert_fill": { + "bytes_filled": 294912, + "declined": {}, + "decoded_slices": 72, + "identity": "a byte copy into the fused parameter's slice; bin/selftest_layer_outer.py L4/L6 assert equality with from_pretrained and with the converter path", + "layers_filled": 3, + "mode": "direct", + "reference": "transformers.core_model_loading.MergeModulelist(dim=0) + Concatenate(dim=1)", + "slices_filled": 72, + "staged_slices": 0, + "staging": "pageable", + "targets_filled": 6 + }, + "file": "engines/tools/hf_capture.py", + "head_module_path": "lm_head", + "head_resolution": "lm_head", + "layer_residency": "stream", + "mechanism": "transformers forward pass, layer-outer/window-inner schedule: for each decoder layer the model's own forward is run once per window with the layers below replaying their memoised output and the layers above suspending, so each layer's weights are materialised once for the whole panel. Windows are pushed through sequentially, never batched. Forward pre-hook on model.get_output_embeddings(), fired by the model's own epilogue after the last layer", + "model_view": null, + "parallel_plan_dropped": false, + "resolved_classes": { + "config": "transformers.models.glm_moe_dsa.configuration_glm_moe_dsa.GlmMoeDsaConfig", + "model": "transformers.models.glm_moe_dsa.modeling_glm_moe_dsa.GlmMoeDsaForCausalLM" + }, + "resolved_panel_binding": { + "binding": { + "content": { + "archive": { + "algorithm": "sha256(ustar: sorted regular files; mode=0644; uid=gid=mtime=0)", + "bytes": 20480, + "compression": "none", + "format": "ustar", + "sha256": "389706dfa3335a75ec70a40d079995af1a60c05512334125dbd336790f12702f" + }, + "manifest": [ + { + "bytes": 192, + "path": "arrays/causal-mask-64.npy", + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02" + }, + { + "bytes": 384, + "path": "arrays/final-0000.tokens.npy", + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af" + }, + { + "bytes": 384, + "path": "arrays/final-0001.tokens.npy", + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea" + }, + { + "bytes": 384, + "path": "arrays/final-0002.tokens.npy", + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c" + }, + { + "bytes": 384, + "path": "arrays/final-0003.tokens.npy", + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a" + }, + { + "bytes": 4195, + "path": "panel.json", + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6" + }, + { + "bytes": 7808, + "path": "panel.receipt.json", + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263" + } + ], + "manifest_sha256": "e5f2d6410a6290da1197016c5b57ae522a3570665215ddc23e2a0bd45f912181" + }, + "panel": { + "bytes": 4195, + "context_length": 64, + "contexts": 4, + "file": "panel.json", + "id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "positions_per_context": 63, + "role": "final", + "scored_positions_total": 252, + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6", + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36" + }, + "receipt": { + "bytes": 7808, + "declared_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "file": "panel.receipt.json", + "receipt_file_sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "receipt_seal_mode": "self-blank" + }, + "schema": "malaiwah.resolved-panel.v1", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } + }, + "binding_file": "panel-binding.json", + "binding_file_sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "tokenizer_equivalences": [] + }, + "schedule": "layer-outer", + "sha256": "44afcdac9f7c9cb26a35a2b7d9c1aed562344b76c8045a753651d2f2dbae99d0", + "unexpected_tensor_allowlist": null, + "verified_code": null, + "version": "hf_capture/1", + "weights_decode": { + "activation_quantization": null, + "checkpoint_bytes_read": 207190, + "comparison_class": "advisory", + "components_consumed": 257, + "components_not_consumed": [], + "components_planned": 257, + "formats_decoded": { + "modelopt-fp8-block": 36, + "modelopt-fp8-tensor": 37, + "modelopt-nvfp4": 37 + }, + "method": "microfloat-weight-reconstruction", + "modules_decoded": 110, + "modules_not_decoded": [], + "modules_planned": 110, + "output_dtype": "bfloat16", + "quantization_config": { + "quant_algo": "MIXED_PRECISION", + "quant_method": "modelopt", + "quantized_layers": { + "model.layers.0.mlp.down_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.0.mlp.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.0.mlp.up_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.0.self_attn.indexer.weights_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.0.self_attn.indexer.wk": { + "quant_algo": "FP8" + }, + "model.layers.0.self_attn.indexer.wq_b": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.0.self_attn.kv_a_proj_with_mqa": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.0.self_attn.kv_b_proj": { + "quant_algo": "FP8" + }, + "model.layers.0.self_attn.o_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.0.self_attn.q_a_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.0.self_attn.q_b_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.experts.0.down_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.1.mlp.experts.0.gate_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.1.mlp.experts.0.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.experts.1.down_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.1.mlp.experts.1.gate_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.1.mlp.experts.1.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.experts.2.down_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.1.mlp.experts.2.gate_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.1.mlp.experts.2.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.experts.3.down_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.1.mlp.experts.3.gate_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.1.mlp.experts.3.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.experts.4.down_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.1.mlp.experts.4.gate_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.1.mlp.experts.4.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.experts.5.down_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.1.mlp.experts.5.gate_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.1.mlp.experts.5.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.experts.6.down_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.1.mlp.experts.6.gate_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.1.mlp.experts.6.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.experts.7.down_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.1.mlp.experts.7.gate_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.1.mlp.experts.7.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.shared_experts.down_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.1.mlp.shared_experts.gate_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.1.mlp.shared_experts.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.self_attn.kv_a_proj_with_mqa": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.1.self_attn.kv_b_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.1.self_attn.o_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.self_attn.q_a_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.1.self_attn.q_b_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.mlp.experts.0.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.experts.0.gate_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.2.mlp.experts.0.up_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.mlp.experts.1.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.experts.1.gate_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.2.mlp.experts.1.up_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.mlp.experts.2.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.experts.2.gate_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.2.mlp.experts.2.up_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.mlp.experts.3.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.experts.3.gate_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.2.mlp.experts.3.up_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.mlp.experts.4.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.experts.4.gate_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.2.mlp.experts.4.up_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.mlp.experts.5.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.experts.5.gate_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.2.mlp.experts.5.up_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.mlp.experts.6.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.experts.6.gate_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.2.mlp.experts.6.up_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.mlp.experts.7.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.experts.7.gate_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.2.mlp.experts.7.up_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.mlp.shared_experts.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.shared_experts.gate_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.2.mlp.shared_experts.up_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.self_attn.indexer.weights_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.self_attn.indexer.wk": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.2.self_attn.indexer.wq_b": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.self_attn.kv_a_proj_with_mqa": { + "quant_algo": "FP8" + }, + "model.layers.2.self_attn.kv_b_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.2.self_attn.o_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.self_attn.q_a_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.self_attn.q_b_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.3.mlp.experts.0.down_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.3.mlp.experts.0.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.experts.0.up_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.3.mlp.experts.1.down_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.3.mlp.experts.1.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.experts.1.up_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.3.mlp.experts.2.down_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.3.mlp.experts.2.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.experts.2.up_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.3.mlp.experts.3.down_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.3.mlp.experts.3.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.experts.3.up_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.3.mlp.experts.4.down_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.3.mlp.experts.4.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.experts.4.up_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.3.mlp.experts.5.down_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.3.mlp.experts.5.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.experts.5.up_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.3.mlp.experts.6.down_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.3.mlp.experts.6.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.experts.6.up_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.3.mlp.experts.7.down_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.3.mlp.experts.7.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.experts.7.up_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.3.mlp.shared_experts.down_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.3.mlp.shared_experts.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.shared_experts.up_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.3.self_attn.kv_a_proj_with_mqa": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.3.self_attn.kv_b_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.self_attn.o_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.3.self_attn.q_a_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.3.self_attn.q_b_proj": { + "quant_algo": "FP8" + } + } + }, + "reader_evidence": { + "decode_plan_sha256": "de7e9aa33267002a2ab5284d6438d4e3dff7617b953904356ff486590972f79f", + "gate_header_barrier": false, + "source_files": { + "engines/tools/affine_surface.py": "37e7074797d53ae836e0af12fdbd2dc36c88778098aa44c72c1cd936d2b4c053", + "engines/tools/microscale_surface.py": "588923f0a4700436221923c794a8c112971d9f08e75c746742b0f0ede7921682", + "engines/tools/nvfp4_surface.py": "044b6fd2ee22d58512476e96060f7fa09030212a33736da1393c0103eb73e0c8", + "engines/tools/quant_stream.py": "7c6cc4cbe399d066eaff80ccf1e3d3190185f194644f738a404d3c537ad8e1ab" + } + }, + "reference": "compressed-tensors@0.18.0; DeepSeek-V4-Flash@60d8d70770c6776ff598c94bb586a859a38244f1/inference/kernel.py; nvidia/Qwen3.8-Flash-Next-NVFP4@fc694b54fb0174e0913e6adf86691ef85a4ead47/config.json+headers", + "scientific_disclosure": "Stored-weight reconstruction only; no native quantized GEMM, activation arithmetic, or quantizer optimization quality claim.", + "scope": "weights_reconstructed" + }, + "weights_license": null, + "wraps": [] + }, + "container": { + "image_digest": null, + "image_reference": null, + "image_repository_digest": null + }, + "format_version": 1, + "lane": "other", + "lane_identity_inputs": [ + "torch_version", + "cuda_runtime_version", + "device_name", + "grouped_mm_kernel", + "numeric_policy", + "attention_backend", + "experts_implementation", + "parallelism", + "ep_emulate", + "reduce_order" + ], + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "lane_inferred": false, + "receipt_sha256": "4d26f38d2e0ad2e42335345848f69d47abb638749be75d836be4f6fe4b987282", + "resources": { + "bytes": { + "checkpoint_read": 278582, + "hidden_d2h": 36616, + "weights_h2d": null + }, + "checkpoint_bytes": 323928, + "checkpoint_files": 2, + "device_name": null, + "forward_timing": "wall-clock", + "note": "provenance, not identity: peaks and stage seconds this run measured; forward_sum is device time under cuda-events, wall time otherwise; seal covers head serialisation up to this block's assembly", + "peak_cuda_allocated_bytes": null, + "peak_cuda_reserved_bytes": null, + "peak_resident_weight_bytes": 208032, + "peak_rss_bytes": 368246784, + "rss_units_source": "Linux ru_maxrss", + "seconds": { + "decode_sum": 0.072, + "elapsed": 4.603, + "fill_sum": 0.0, + "forward_sum": 0.14, + "identity": 0.005, + "layer_load_max": 0.032, + "layer_load_sum": 0.111, + "layer_loads": 4, + "resident_load": 3.642, + "seal": 0.009 + } + }, + "runtime_environment": { + "cold_run": "20260907T165306Z-2066445", + "numeric_policy_observed": { + "NVIDIA_TF32_OVERRIDE": null, + "allow_tf32_cudnn": true, + "allow_tf32_matmul": false, + "deviates_from_default": false, + "float32_matmul_precision": "highest", + "observed_at": "seal time, after the forward" + }, + "python": "3.12.14" + }, + "schema": "malaiwah.fidelity-capture-runtime.v1", + "source_files": { + "bin/fidelity/codepin.py": "ce2a2c04d64adf7a268978a7ffe163c7d4cb5b675d5dc8e156f8a26a3b7bb5fd", + "bin/fidelity/panel.py": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "engines/tools/affine_surface.py": "37e7074797d53ae836e0af12fdbd2dc36c88778098aa44c72c1cd936d2b4c053", + "engines/tools/hf_capture.py": "44afcdac9f7c9cb26a35a2b7d9c1aed562344b76c8045a753651d2f2dbae99d0", + "engines/tools/layer_outer.py": "e3ea5715112663b1b60cf596eeffc2140e49b399809ece89a174bce41a969274", + "engines/tools/microscale_surface.py": "588923f0a4700436221923c794a8c112971d9f08e75c746742b0f0ede7921682", + "engines/tools/nvfp4_surface.py": "044b6fd2ee22d58512476e96060f7fa09030212a33736da1393c0103eb73e0c8", + "engines/tools/quant_stream.py": "7c6cc4cbe399d066eaff80ccf1e3d3190185f194644f738a404d3c537ad8e1ab" + }, + "stack_fingerprint": { + "attention_backend": "model default", + "cuda_runtime_version": null, + "device": "cpu", + "device_name": null, + "engine": "transformers-eager", + "numeric_policy": "default torch matmul precision; no TF32 override applied", + "schema": "malaiwah.stack-fingerprint.v1", + "torch_version": "2.11.0+cpu", + "transformers_version": "5.16.1" + }, + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd", + "upstream_receipts": [], + "weights": { + "checkpoint_files": [ + { + "name": "config.json", + "sha256": "33f139cf6a6c6de8e40791cff02405adc77c4447419863d9ce801642a484e958", + "size": 13306 + }, + { + "name": "model.safetensors", + "sha256": "9a5c06dffc5c8c08aa0cb0109c87274d044d8297db132405828d914762370199", + "size": 310622 + } + ], + "checkpoint_identity_algorithm": "sha256 over the canonical JSON {\"algorithm\": , \"files\": [{\"name\", \"size\", \"sha256\"}, ...]} of every *.safetensors shard plus config.json in the checkpoint directory, sorted by name; for a llama.cpp GGUF tree the shards are every *.gguf of the one build directory (name = /) and config.json is the official release's copy beside it", + "checkpoint_identity_sha256": "822ca7cc58e9909f2832e980051622ccb4a4a4ce1472c618a45e3f4863beb013", + "model_revision": null, + "repository": "/tmp/qfs-quant-microfloat-release/stage-main/modelopt-mixed", + "revision": null + } +} diff --git a/raw/candidates/modelopt-mixed/evidence/candidate/validation/structural-validation.json b/raw/candidates/modelopt-mixed/evidence/candidate/validation/structural-validation.json new file mode 100644 index 0000000000000000000000000000000000000000..5ee8ffba0107cb5416cba5d6184f9ed9b330943d --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/candidate/validation/structural-validation.json @@ -0,0 +1,14 @@ +{ + "checks_run": [ + "pre-seal" + ], + "error_count": 0, + "errors": [], + "format_version": 1, + "receipt_sha256": "df49786fa6ab7b99b4ccb964492beb1dfda015c837b9483c9f730bf69e82513c", + "schema": "malaiwah.fidelity-structural-validation.v1", + "structural_status": "sealed", + "subject": "dataset:fidelity--quant-integration.candidate", + "warning_count": 0, + "warnings": [] +} diff --git a/raw/candidates/modelopt-mixed/evidence/capture-candidate.stderr.log b/raw/candidates/modelopt-mixed/evidence/capture-candidate.stderr.log new file mode 100644 index 0000000000000000000000000000000000000000..de0ec0c401b9bb1aaf890a527369f9ed4ca044ed --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/capture-candidate.stderr.log @@ -0,0 +1,15 @@ + +Loading weights: 0%| | 0/6 [00:00 same_stack", + "overridden_by": null, + "passed": true + } + }, + "high_kld_contexts": [ + { + "allocation_stratum": null, + "domain": "arithmetic", + "index": 1, + "max": 0.003775040910423427, + "mean": 0.0006350407604620873, + "scored_rows": 63, + "window_id": "final-0001" + }, + { + "allocation_stratum": null, + "domain": "code", + "index": 2, + "max": 0.004422976368217894, + "mean": 0.000521911233217184, + "scored_rows": 63, + "window_id": "final-0002" + }, + { + "allocation_stratum": null, + "domain": "garden", + "index": 0, + "max": 0.002277848726943699, + "mean": 0.00047716645627991934, + "scored_rows": 63, + "window_id": "final-0000" + }, + { + "allocation_stratum": null, + "domain": "instructions", + "index": 3, + "max": 0.004159915111876051, + "mean": 0.00047059278200722193, + "scored_rows": 63, + "window_id": "final-0003" + } + ], + "kl": { + "max": 0.004422976368217894, + "mean": 0.0005261778079916031, + "median": 0.00031940008357881706, + "p95": 0.0015845916762748844, + "p99": 0.0037142782273028832, + "p99_9": 0.00435694799287609 + }, + "kl_macro_stratum_mean": null, + "kl_micro_token_mean": 0.0005261778079916031, + "measurement_scope": { + "contexts": 4, + "covers_full_panel": true, + "position_filter": "all", + "positions_per_context": 63, + "scored_positions": 252, + "subset_detail": null + }, + "metric": { + "direction": "reference_to_candidate", + "direction_label": "KL(reference || candidate)", + "higher_is_better": false, + "name": "mean_tokenwise_kld", + "units": "nats", + "value": 0.0005261778079916031 + }, + "panel": { + "context_length": 64, + "contexts": 4, + "panel_id": "panel--panel", + "panel_token_sha256_legacy": "3c9467c85be43d238926f6d18bf825c2e4748814c95b8b0e8b8f1420546c3089", + "scored_positions": 252, + "scoring_window": { + "dropped_positions_total": 0, + "min_left_context_tokens": 1, + "policy": "every causal prediction position of every window is scored; nothing is dropped", + "score_from": 0, + "windowed": false + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + }, + "tokenizer_candidate": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + }, + "tokenizer_identity_equal": true, + "tokenizer_reference": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } + }, + "per_context": [ + { + "allocation_stratum": null, + "domain": "garden", + "index": 0, + "max": 0.002277848726943699, + "mean": 0.00047716645627991934, + "scored_rows": 63, + "window_id": "final-0000" + }, + { + "allocation_stratum": null, + "domain": "arithmetic", + "index": 1, + "max": 0.003775040910423427, + "mean": 0.0006350407604620873, + "scored_rows": 63, + "window_id": "final-0001" + }, + { + "allocation_stratum": null, + "domain": "code", + "index": 2, + "max": 0.004422976368217894, + "mean": 0.000521911233217184, + "scored_rows": 63, + "window_id": "final-0002" + }, + { + "allocation_stratum": null, + "domain": "instructions", + "index": 3, + "max": 0.004159915111876051, + "mean": 0.00047059278200722193, + "scored_rows": 63, + "window_id": "final-0003" + } + ], + "per_domain": { + "arithmetic": 0.0006350407604620873, + "code": 0.000521911233217184, + "garden": 0.00047716645627991934, + "instructions": 0.00047059278200722193 + }, + "per_stratum": null, + "receipt_sha256": "25d25ac69b7f0492b408f56c37815b4c65eb1d0575106dcdecfd7c7f213183a8", + "reference": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "dataset_id": "fidelity--quant-integration.root", + "dataset_sha256": "7b7582fe85f308439ae7bbac7f6ed15ae890be9e3db8f53fa87bd1605bf0144a", + "form": "hidden", + "head": { + "bits": 16, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510" + }, + "label": "reference", + "lane": "other", + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "repository": null, + "revision": null, + "role": "root", + "scope_digest": "attn.o=native:bf16@16|attn.qkv=native:bf16@16|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=native:bf16@16|mlp.gate=native:bf16@16|mlp.up=native:bf16@16|moe.experts=native:bf16@16|norm=native:bf16@16|head=native|kv=bf16", + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd", + "weights": { + "artifact_ref": null, + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "codec": null, + "config_sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "declared_bits": null, + "declared_head_bits": 16, + "index_sha256": null, + "model_ref": null, + "model_revision": null, + "quantized": false, + "repository": "/tmp/qfs-complete-tiny-fixture/model", + "revision": null + } + }, + "schema": "malaiwah.fidelity-comparison-receipt.v1", + "self_compare": null, + "submission": { + "emitted": false, + "path": null, + "receipt_sha256": null, + "refusal": null, + "submission_schema": null + }, + "tokenwise": { + "bytes": 2144, + "path": "tokenwise-kld.npy", + "sha256": "4da6ba6e82e5e379d03634af43735c735aea683eaeafb942f215e32dc27ad92b" + }, + "top1_agreement": 0.7182539682539683, + "top1_discordant_contexts": [], + "uncertainty": { + "ci95_high": null, + "ci95_low": null, + "cluster_unit": null, + "clusters": null, + "method": "none", + "samples": null, + "seed": null + } +} diff --git a/raw/candidates/modelopt-mixed/evidence/comparison/tokenwise-kld.npy b/raw/candidates/modelopt-mixed/evidence/comparison/tokenwise-kld.npy new file mode 100644 index 0000000000000000000000000000000000000000..82e7f46438f69137564f978a973f771573515ebe --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/comparison/tokenwise-kld.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4da6ba6e82e5e379d03634af43735c735aea683eaeafb942f215e32dc27ad92b +size 2144 diff --git a/raw/candidates/modelopt-mixed/evidence/panel-binding.json b/raw/candidates/modelopt-mixed/evidence/panel-binding.json new file mode 100644 index 0000000000000000000000000000000000000000..573cea0b332c636bdda89b150f95cda307b89194 --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/panel-binding.json @@ -0,0 +1,102 @@ +{ + "content": { + "archive": { + "algorithm": "sha256(ustar: sorted regular files; mode=0644; uid=gid=mtime=0)", + "bytes": 20480, + "compression": "none", + "format": "ustar", + "sha256": "389706dfa3335a75ec70a40d079995af1a60c05512334125dbd336790f12702f" + }, + "manifest": [ + { + "bytes": 192, + "path": "arrays/causal-mask-64.npy", + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02" + }, + { + "bytes": 384, + "path": "arrays/final-0000.tokens.npy", + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af" + }, + { + "bytes": 384, + "path": "arrays/final-0001.tokens.npy", + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea" + }, + { + "bytes": 384, + "path": "arrays/final-0002.tokens.npy", + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c" + }, + { + "bytes": 384, + "path": "arrays/final-0003.tokens.npy", + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a" + }, + { + "bytes": 4195, + "path": "panel.json", + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6" + }, + { + "bytes": 7808, + "path": "panel.receipt.json", + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263" + } + ], + "manifest_sha256": "e5f2d6410a6290da1197016c5b57ae522a3570665215ddc23e2a0bd45f912181" + }, + "panel": { + "bytes": 4195, + "context_length": 64, + "contexts": 4, + "file": "panel.json", + "id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "positions_per_context": 63, + "role": "final", + "scored_positions_total": 252, + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6", + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36" + }, + "receipt": { + "bytes": 7808, + "declared_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "file": "panel.receipt.json", + "receipt_file_sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "receipt_seal_mode": "self-blank" + }, + "schema": "malaiwah.resolved-panel.v1", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } +} diff --git a/raw/candidates/modelopt-mixed/evidence/root/README.md b/raw/candidates/modelopt-mixed/evidence/root/README.md new file mode 100644 index 0000000000000000000000000000000000000000..710dc82d0a53fe4dd29dbf797a459cab544ac9ed --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/root/README.md @@ -0,0 +1,95 @@ +--- +license: mit +tags: +- fidelity +- kl-divergence +- fidelity-provenance +- fidelity-dataset +- fidelity-root +x_fidelity: + spec: https://github.com/malaiwah/quant-fidelity-suite/blob/main/docs/FIDELITY-DATASET-SPEC.md + spec_version: fidelity-provenance/v1 + role: fidelity-dataset + captured_model: + repository: /tmp/qfs-complete-tiny-fixture/model + revision: null + role: root + form: hidden + lane: other + panel: + panel_id: panel--panel + suite_token_hash_sha256: 525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36 + contexts: 4 + scored_positions: 252 + repository: null + revision: null + head: + policy: native + quantized: false + bits: 16 + lm_head_tensor_content_sha256: 2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510 + lm_head_file_sha256: 07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913 + final_norm_tensor_content_sha256: null + final_norm_file_sha256: null + equality_receipt: null + replay_permitted: true + scope_digest: attn.o=native:bf16@16|attn.qkv=native:bf16@16|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=native:bf16@16|mlp.gate=native:bf16@16|mlp.up=native:bf16@16|moe.experts=native:bf16@16|norm=native:bf16@16|head=native|kv=bf16 + seal: + manifest: fidelity-dataset.json + dataset_sha256: null + checksums: checksums.txt + checksums_sha256: '0000000000000000000000000000000000000000000000000000000000000000' + note: 'written before the seal: dataset_sha256 and checksums_sha256 are digests of the tree this file + is inside, so they cannot appear in it. Read them from fidelity-dataset.json.' + interop: + compatible_with: + - kimi-k3-distribution-fidelity/1 + k3_compat_emitted: false + registry: + dataset: malaiwah/quant-fidelity-registry + schema_version: quant-fidelity-registry/v1 + artifact_id: null + measurement_ids: [] + snapshot: null + fidelity_dataset: + repository: null + revision: null + dataset_sha256: null + capture_content_digest: d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39 + form: hidden + role: root + measurements: [] +--- +# Local quant integration root + +A **root** fidelity dataset in **hidden form**, produced by `engines/tools/hf_capture.py` from `/tmp/qfs-complete-tiny-fixture/model`. + +## The cut + +the final hidden state handed to lm_head -- after the text model's final norm and immediately before the head matmul -- captured as the head module's input via torch.nn.Module.register_forward_pre_hook; replay applies the head ONLY (no final norm at replay time: the capture already sits after it). Same cut as engines/tools/hidden_replay.py and as Festr's kimi-k3 hidden-replay qualification. + +## What is here + +| | | +|---|---| +| records | 4 | +| scored positions | 252 | +| context length | 64 | +| hidden width | 64 | +| vocab size | 260 | +| capture bytes (hidden form) | 33348 | +| the same capture in logit form would be | 262080 bytes (8x) | +| scope policy | native | +| lane | other | + +## Does the model still generate sensibly + +`The capital of France is` -> `�` (p=0.0067, entropy 5.548 of a possible 5.561 nats). Recorded, not enforced. One extra window through the same schedule; its hidden state was discarded and is not part of this dataset. + +## How to check it + +``` +bin/fidelity-dataset verify +``` + +Full specification: diff --git a/raw/candidates/modelopt-mixed/evidence/root/capture/hidden_0000.safetensors b/raw/candidates/modelopt-mixed/evidence/root/capture/hidden_0000.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..43090785cbc18381f3866a48e8f44cedcd5b6d42 --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/root/capture/hidden_0000.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ac2eb5f48b52d80e5f52d1ebb32fa3961ed7043785b4d767e9d01695b74e9af +size 8337 diff --git a/raw/candidates/modelopt-mixed/evidence/root/capture/hidden_0001.safetensors b/raw/candidates/modelopt-mixed/evidence/root/capture/hidden_0001.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..97c8541015b53d5e0dcf671017a03153ecdc730a --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/root/capture/hidden_0001.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:59aa229dbba96d170d23416d9afe7f4b4fd10b632f465ea6dda5f06104d239ff +size 8337 diff --git a/raw/candidates/modelopt-mixed/evidence/root/capture/hidden_0002.safetensors b/raw/candidates/modelopt-mixed/evidence/root/capture/hidden_0002.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..cf4e871dc6dcf5cfac47ffc287dce03d55d294e1 --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/root/capture/hidden_0002.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5fb0d3cf1816d189372d0071c8280eafa16ff6c246fa0edf1e3b8929c205be78 +size 8337 diff --git a/raw/candidates/modelopt-mixed/evidence/root/capture/hidden_0003.safetensors b/raw/candidates/modelopt-mixed/evidence/root/capture/hidden_0003.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..bbf01f87f00a981a99b0d60a43954bb5a799ae4b --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/root/capture/hidden_0003.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b87f9bb8817af51eceb4de7e683517e09da1526dc2030907591533abf0649728 +size 8337 diff --git a/raw/candidates/modelopt-mixed/evidence/root/capture/manifest.json b/raw/candidates/modelopt-mixed/evidence/root/capture/manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..cb29829b7cd281b30f74dacebce9a37a31d76745 --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/root/capture/manifest.json @@ -0,0 +1,159 @@ +{ + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "context_length": 64, + "coverage": { + "complete": true, + "declared_records": 4, + "index_range": [ + 0, + 3 + ], + "missing_indices_sample": [], + "present_records": 4, + "shard_of": null, + "subset_detail": null + }, + "created_utc": "2026-09-07T16:53:03Z", + "dtype": "BF16", + "dtype_lossless": true, + "form": "hidden", + "format_version": 1, + "hidden_width": 64, + "receipt_sha256": "778232a1410e75fbd55118a160ace6eddaa0635a08d902da91e7eadc671e63cd", + "records": [ + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 0, + "document_id": "embedded-synthetic/garden.txt", + "domain": "garden", + "dtype": "BF16", + "elapsed_seconds": 0.053, + "file": "hidden_0000.safetensors", + "index": 0, + "key": "hidden_states", + "payload_sha256": "80897a67cfdc22f410255f2463193e7d765de5500d62da2c13aacbd3b9507083", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "6ac2eb5f48b52d80e5f52d1ebb32fa3961ed7043785b4d767e9d01695b74e9af", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "80897a67cfdc22f410255f2463193e7d765de5500d62da2c13aacbd3b9507083", + "token_ids_json_sha256": "08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315", + "token_ids_sha256_legacy": "9d5378f0316be57e37f80d2bae7895ba4a1140c302c87ff8cce2fbd9afc83b77", + "window_id": "final-0000", + "window_index": 0 + }, + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 1, + "document_id": "embedded-synthetic/arithmetic.txt", + "domain": "arithmetic", + "dtype": "BF16", + "elapsed_seconds": 0.033, + "file": "hidden_0001.safetensors", + "index": 1, + "key": "hidden_states", + "payload_sha256": "1fc13aaf069c53d5592198daeacfc5f652abf5b9ba552213859596c32e7c4046", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "59aa229dbba96d170d23416d9afe7f4b4fd10b632f465ea6dda5f06104d239ff", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "1fc13aaf069c53d5592198daeacfc5f652abf5b9ba552213859596c32e7c4046", + "token_ids_json_sha256": "5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46", + "token_ids_sha256_legacy": "e0f95114b71a46cb489539dc38909fb67fb378f25fafbb513e32690cc7f11b37", + "window_id": "final-0001", + "window_index": 1 + }, + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 2, + "document_id": "embedded-synthetic/code.txt", + "domain": "code", + "dtype": "BF16", + "elapsed_seconds": 0.032, + "file": "hidden_0002.safetensors", + "index": 2, + "key": "hidden_states", + "payload_sha256": "98b8d9e1ccb196898fda27cb5f625f348aa0046121c39484a4af7cb042e1be92", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "5fb0d3cf1816d189372d0071c8280eafa16ff6c246fa0edf1e3b8929c205be78", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "98b8d9e1ccb196898fda27cb5f625f348aa0046121c39484a4af7cb042e1be92", + "token_ids_json_sha256": "51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07", + "token_ids_sha256_legacy": "482b890c7b0e2f7400257c43680093b7f2b90d6df5361c6de3ae97ddfdd2504e", + "window_id": "final-0002", + "window_index": 2 + }, + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 3, + "document_id": "embedded-synthetic/instructions.txt", + "domain": "instructions", + "dtype": "BF16", + "elapsed_seconds": 0.032, + "file": "hidden_0003.safetensors", + "index": 3, + "key": "hidden_states", + "payload_sha256": "01646a47a79cc47760fc0645c30bc9e37a930c26ac84cd3d1a1d5077a2f48df8", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "b87f9bb8817af51eceb4de7e683517e09da1526dc2030907591533abf0649728", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "01646a47a79cc47760fc0645c30bc9e37a930c26ac84cd3d1a1d5077a2f48df8", + "token_ids_json_sha256": "8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d", + "token_ids_sha256_legacy": "12e01edd3900ff2ca82621feb5504f24b003a53c0afe98a9ee0b490eb93141d4", + "window_id": "final-0003", + "window_index": 3 + } + ], + "run_name": "hf-capture", + "runtime_manifest": "../runtime/capture-runtime.json", + "runtime_manifest_sha256": "05ac0a428495ffb0cc9d663169d5fe5b3fb903a1dcb2cc507227b5e643671b2b", + "schema": "malaiwah.fidelity-capture-manifest.v1", + "scored_rows_per_context": 63, + "semantic_point": "after_final_rmsnorm_before_lm_head", + "tensor_key": "hidden_states", + "total_scored_rows": 252, + "total_size_bytes": 33348, + "vocab_size": 260 +} diff --git a/raw/candidates/modelopt-mixed/evidence/root/checksums.txt b/raw/candidates/modelopt-mixed/evidence/root/checksums.txt new file mode 100644 index 0000000000000000000000000000000000000000..581ff7a113b91091f434eb0ca3884b7465793a2c --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/root/checksums.txt @@ -0,0 +1,20 @@ +df28a18b7e9c0d39ac079235136da25818038cc09314a890063058e94bf1c226 README.md +6ac2eb5f48b52d80e5f52d1ebb32fa3961ed7043785b4d767e9d01695b74e9af capture/hidden_0000.safetensors +59aa229dbba96d170d23416d9afe7f4b4fd10b632f465ea6dda5f06104d239ff capture/hidden_0001.safetensors +5fb0d3cf1816d189372d0071c8280eafa16ff6c246fa0edf1e3b8929c205be78 capture/hidden_0002.safetensors +b87f9bb8817af51eceb4de7e683517e09da1526dc2030907591533abf0649728 capture/hidden_0003.safetensors +eb91e840c7ccef44af187b89afe7732868e9a081e8af9e1f39228c79c22e8b5e capture/manifest.json +777b038f747bed25d1f5db8adbfd2a78c7762fb5c870ff8c3c785a984d48a168 head/head.json +07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913 head/weight.safetensors +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0000.npy +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0001.npy +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0002.npy +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0003.npy +b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263 panel/panel-receipt.json +68efa258ea3c5d4ba759c3c15aadd6e8c984711831bea3f335903109345cdcef panel/panel.json +08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315 panel/tokens/context-0000.json +5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46 panel/tokens/context-0001.json +51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07 panel/tokens/context-0002.json +8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d panel/tokens/context-0003.json +05ac0a428495ffb0cc9d663169d5fe5b3fb903a1dcb2cc507227b5e643671b2b runtime/capture-runtime.json +769c103cf430360bf1b79a4d027f5bd073ce3f61204d9da77adf3ad494c27e73 validation/structural-validation.json diff --git a/raw/candidates/modelopt-mixed/evidence/root/fidelity-dataset.json b/raw/candidates/modelopt-mixed/evidence/root/fidelity-dataset.json new file mode 100644 index 0000000000000000000000000000000000000000..5823d8518df5d4965a77cb9d8edc6c5311454d6c --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/root/fidelity-dataset.json @@ -0,0 +1,389 @@ +{ + "capture": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "dtype": "BF16", + "dtype_lossless": true, + "form": "hidden", + "head_not_separable_reason": null, + "head_separable": true, + "hidden_width": 64, + "lossy_codec": null, + "manifest_file": "capture/manifest.json", + "manifest_file_sha256": "eb91e840c7ccef44af187b89afe7732868e9a081e8af9e1f39228c79c22e8b5e", + "records_count": 4, + "scored_rows_total": 252, + "semantic_point": "after_final_rmsnorm_before_lm_head", + "tensor_key": "hidden_states", + "total_size_bytes": 33348, + "vocab_size": 260 + }, + "coverage": { + "complete": true, + "declared_records": 4, + "index_range": [ + 0, + 3 + ], + "missing_indices_sample": [], + "present_records": 4, + "shard_of": null, + "subset_detail": null + }, + "created_utc": "2026-09-07T16:53:03Z", + "dataset": { + "author": { + "handle": null, + "is_registry_maintainer": false, + "name": "malaiwah", + "role": "capture-author", + "url": null + }, + "base_capture": null, + "id": "fidelity--quant-integration.root", + "license": "mit", + "name": "Local quant integration root", + "qualification": null, + "repository": null, + "revision": null, + "role": "root", + "structural_status": "sealed" + }, + "dataset_sha256": "7b7582fe85f308439ae7bbac7f6ed15ae890be9e3db8f53fa87bd1605bf0144a", + "determinism": { + "cold_start_per_run": true, + "distinct_evidence_hash_count": 1, + "evidence_hashes": [ + "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39" + ], + "evidence_kind": "hidden_state_tensor_sha256", + "identical_across_runs": null, + "note": "a single cold capture; cross-run determinism is NOT asserted here. Capture a second cold run and run `fidelity-dataset compare --self-compare` -- an exactly 0.0 result is the SC-1 reproduction confirmation.", + "repeat_noise": null, + "repeats": [], + "run_count": 1 + }, + "disclosures": [ + { + "affects_comparability": false, + "code": "rtn_format_fixture", + "detail": "Local RTN-format fixture; optimizer-not-run; no model-quality or serving-kernel equivalence claim.", + "severity": "info" + }, + { + "affects_comparability": false, + "code": "reduced_run_count", + "detail": "this dataset is ONE cold capture (run_count 1, the DET-D4 floor is 5). Cross-run determinism is not asserted by the dataset; it is established by a second cold capture plus `fidelity-dataset compare --self-compare`, whose exactly-0.0 result is the SC-1 reproduction confirmation.", + "severity": "caveat" + } + ], + "format_version": 1, + "generation_sanity_probe": { + "degenerate": false, + "enforced": false, + "entropy_nats": 5.548019647470335, + "expect": null, + "logit_spread": 0.986328125, + "note": "one extra window through the same schedule; its hidden state is discarded and never enters the dataset.", + "prompt": "The capital of France is", + "schema": "malaiwah.generation-sanity-probe.v1", + "status": "recorded", + "top1_id": 113, + "top1_probability": 0.006720104384265371, + "top1_text": "�", + "top_k": [ + { + "id": 113, + "probability": 0.006720104384265371, + "text": "�" + }, + { + "id": 237, + "probability": 0.006412368399474785, + "text": "�" + }, + { + "id": 193, + "probability": 0.006035639491843906, + "text": "\u0001" + }, + { + "id": 236, + "probability": 0.0055386141320063614, + "text": "�" + }, + { + "id": 44, + "probability": 0.0054740873228682424, + "text": "I" + } + ], + "uniform_entropy_nats": 5.560681631015528, + "vocab_size": 260 + }, + "head": { + "applied_in_capture": false, + "bias": null, + "bits": 16, + "compat_tensor_key": "weight", + "dtype": "BF16", + "equality_receipt": null, + "file": "head/weight.safetensors", + "file_sha256": "07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913", + "final_norm": { + "applied_at_replay": false, + "applied_in_capture": true, + "dtype": null, + "file": null, + "file_sha256": null, + "shape": null, + "tensor_content_sha256": null, + "tensor_key": null + }, + "head_json": "head/head.json", + "present": true, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "shape": [ + 260, + 64 + ], + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "tensor_key": "lm_head.weight" + }, + "interop": { + "adapted_from": null, + "compatible_with": [ + "kimi-k3-distribution-fidelity/1" + ], + "divergences": [ + { + "field": "head", + "id": "D-1", + "reason": "every capture declares its OWN head identity by tensor content digest; the comparator refuses a hidden-form comparison across differing heads." + }, + { + "field": "runtime.lane", + "id": "D-2", + "reason": "lane is required and gated at compare time so registry BIAS-006 is checked before a number exists, not at submission." + }, + { + "field": "panel.scoring_window", + "id": "D-3", + "reason": "scoring_window is part of panel identity, not a comparator flag: a score_from=1024 number is a different panel, not a variant." + }, + { + "field": "comparison_kind", + "id": "D-4", + "reason": "self-compare is a first-class mode asserting exactly 0.0." + }, + { + "field": "estimator.accumulation_dtype", + "id": "D-5", + "reason": "required, fp64 default; an fp32 estimator lands in a different comparability class on the same data and that must be visible." + }, + { + "field": "coverage", + "id": "D-6", + "reason": "declared vs present record counts with shard_of; fixes our own manifest that claimed 5,120 captures in a 512-file repository." + }, + { + "field": "panel", + "id": "D-7", + "reason": "the panel is a separately referenceable object, which is what makes a candidate capture publishable standalone." + }, + { + "field": "capture.lossy_codec", + "id": "D-8", + "reason": "lets a llama.cpp .kld be ingested without laundering a lossy capture as exact." + }, + { + "field": "capture.records[].attention_mask_sha256", + "id": "D-9", + "reason": "our packed and streaming lanes vary mask construction; a single-request capture path makes it invariant and has no equivalent field." + }, + { + "field": "capture.head_separable", + "id": "D-10", + "reason": "hidden form is the default; logit form must declare head_separable:false with a reason." + } + ], + "k3_compat_emitted": false, + "note": null + }, + "panel": { + "contamination": { + "checked": false, + "hits": null, + "method": "not established", + "receipt": null + }, + "context_length": 64, + "contexts": 4, + "panel_file": "panel/panel.json", + "panel_file_sha256": "68efa258ea3c5d4ba759c3c15aadd6e8c984711831bea3f335903109345cdcef", + "panel_id": "panel--panel", + "panel_receipt_file": "panel/panel-receipt.json", + "panel_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "panel_token_sha256_legacy": "3c9467c85be43d238926f6d18bf825c2e4748814c95b8b0e8b8f1420546c3089", + "remap_file": null, + "repository": null, + "revision": null, + "scored_positions_total": 252, + "scoring_window": { + "dropped_positions_total": 0, + "min_left_context_tokens": 1, + "policy": "every causal prediction position of every window is scored; nothing is dropped", + "score_from": 0, + "windowed": false + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } + }, + "runtime": { + "backend_identity_sha256": null, + "file": "runtime/capture-runtime.json", + "file_sha256": "05ac0a428495ffb0cc9d663169d5fe5b3fb903a1dcb2cc507227b5e643671b2b", + "lane": "other", + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "lane_inferred": false, + "runtime_reader_sha256": null, + "source": "native", + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd" + }, + "schema": "malaiwah.fidelity-dataset.v1", + "scope": { + "assignments": [ + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "embed_tokens", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "attn.qkv", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "attn.o", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "mlp.gate", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "mlp.up", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "mlp.down", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "moe.experts", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "norm", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "lm_head", + "treatment": "native" + } + ], + "head_policy": "native", + "kv_cache_dtype": "bf16", + "policy": "native", + "scope_digest": "attn.o=native:bf16@16|attn.qkv=native:bf16@16|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=native:bf16@16|mlp.gate=native:bf16@16|mlp.up=native:bf16@16|moe.experts=native:bf16@16|norm=native:bf16@16|head=native|kv=bf16" + }, + "seal": { + "checksums_file": "checksums.txt", + "checksums_format": "sha256sum", + "checksums_sha256": "618f195db5212d6e8199a65a456cb74aa6574a96f2e0eb388c385a255ba3f35e", + "covers": [ + "every published file except checksums.txt and fidelity-dataset.json, via checksums.txt", + "fidelity-dataset.json itself, via the self-blanked seal", + "every capture tensor a second time by CONTENT, via capture.capture_content_digest" + ], + "excludes": [ + "checksums.txt", + "fidelity-dataset.json" + ], + "external_anchor": null, + "method": "self_blanked_canonical_json_sha256", + "seal_field": "dataset_sha256" + }, + "upstream_receipts": [], + "weights": { + "artifact_ref": null, + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "codec": null, + "config_sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "declared_bits": null, + "declared_head_bits": 16, + "index_sha256": null, + "model_ref": null, + "model_revision": null, + "quantized": false, + "repository": "/tmp/qfs-complete-tiny-fixture/model", + "revision": null + } +} diff --git a/raw/candidates/modelopt-mixed/evidence/root/head/head.json b/raw/candidates/modelopt-mixed/evidence/root/head/head.json new file mode 100644 index 0000000000000000000000000000000000000000..cfb1d748d203487673352f1ad645cb98a49c4002 --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/root/head/head.json @@ -0,0 +1,34 @@ +{ + "applied_in_capture": false, + "bias": null, + "bits": 16, + "compat_tensor_key": "weight", + "dtype": "BF16", + "equality_receipt": null, + "file": "head/weight.safetensors", + "file_sha256": "07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913", + "final_norm": { + "applied_at_replay": false, + "applied_in_capture": true, + "dtype": null, + "file": null, + "file_sha256": null, + "shape": null, + "tensor_content_sha256": null, + "tensor_key": null + }, + "format_version": 1, + "note": "the head is shipped verbatim from the checkpoint so a third party can replay logits = hidden @ head^T without the weights", + "present": true, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "receipt_sha256": "2da3cfbfc607296b3bb32eb6fec1f122e4ce30fe9ea96653e5bb1b4ebab6514f", + "schema": "malaiwah.fidelity-head-identity.v1", + "shape": [ + 260, + 64 + ], + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "tensor_key": "lm_head.weight" +} diff --git a/raw/candidates/modelopt-mixed/evidence/root/head/weight.safetensors b/raw/candidates/modelopt-mixed/evidence/root/head/weight.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..abe6e7c215a73bc88e85042067923bf943118086 --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/root/head/weight.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913 +size 33365 diff --git a/raw/candidates/modelopt-mixed/evidence/root/panel/masks/context-0000.npy b/raw/candidates/modelopt-mixed/evidence/root/panel/masks/context-0000.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/root/panel/masks/context-0000.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/modelopt-mixed/evidence/root/panel/masks/context-0001.npy b/raw/candidates/modelopt-mixed/evidence/root/panel/masks/context-0001.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/root/panel/masks/context-0001.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/modelopt-mixed/evidence/root/panel/masks/context-0002.npy b/raw/candidates/modelopt-mixed/evidence/root/panel/masks/context-0002.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/root/panel/masks/context-0002.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/modelopt-mixed/evidence/root/panel/masks/context-0003.npy b/raw/candidates/modelopt-mixed/evidence/root/panel/masks/context-0003.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/root/panel/masks/context-0003.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/modelopt-mixed/evidence/root/panel/panel-receipt.json b/raw/candidates/modelopt-mixed/evidence/root/panel/panel-receipt.json new file mode 100644 index 0000000000000000000000000000000000000000..fbc2ce3e8e9602a492d83ae681817e0fa02e4173 --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/root/panel/panel-receipt.json @@ -0,0 +1,376 @@ +{ + "corpus": { + "documents_considered": 4, + "documents_selected": 4, + "path_prefix": "embedded-synthetic/", + "repository": null, + "revision": null, + "source": "Synthetic texts embedded verbatim in this sealed receipt and builder." + }, + "created_utc": "2026-09-07T00:00:00Z", + "created_utc_policy": "Fixed artifact epoch for deterministic bytes; not an execution timestamp.", + "documents": [ + { + "bytes": 135, + "document": "garden.txt", + "document_sha256": "2aca14290cd4753c3b15d8a20aaa7a6963d2cb48d78e8538a4ce34d4665dcb94", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "garden", + "text_utf8": "The small garden has red flowers, green leaves, and a stone path. A gentle breeze moves the branches while a robin sings near the gate.", + "tokens_total": 137, + "window_id": "final-0000" + }, + { + "bytes": 144, + "document": "arithmetic.txt", + "document_sha256": "b867a2e8cbe81cc8d5781bfe6718a43e171fb5c7c138b9ed6ac86bebc24bca83", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "arithmetic", + "text_utf8": "A shelf holds three blue boxes and five red boxes. There are eight boxes in total. Move two boxes to the desk and count the six boxes remaining.", + "tokens_total": 146, + "window_id": "final-0001" + }, + { + "bytes": 162, + "document": "code.txt", + "document_sha256": "08c8f75f45899cbc9656a7a3fcdbf3092abfa7bc97fe353957b08d7e9660240b", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "code", + "text_utf8": "def add_values(left, right):\n return left + right\n\nresult = add_values(7, 9)\nprint(result)\n# This readable snippet is synthetic input, not a coding benchmark.\n", + "tokens_total": 164, + "window_id": "final-0002" + }, + { + "bytes": 140, + "document": "instructions.txt", + "document_sha256": "1dba5052b28929f94f322ad9e8c0b238bcbd653d6fae54ebaea8e5e3f6073378", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "instructions", + "text_utf8": "First place a clean cup on the table. Next pour cool water into the cup. Finally put the bottle away and write a short note about the steps.", + "tokens_total": 142, + "window_id": "final-0003" + } + ], + "environment": { + "numpy": "2.5.3", + "tokenizers": "0.23.2", + "transformers": "5.16.1" + }, + "format_builder": "engines/tools/build_token_panel.py", + "format_builder_sha256": "30eb4d4d7e465aaa8d9ef2d947a0ac7fd42ec45388f20c8b6db242c88dc2d851", + "format_version": 1, + "panel_id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "panel_name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "parameters": { + "context_length": 64, + "generation_seed": null, + "generation_seed_policy": "No RNG is used.", + "prediction_positions_per_window": 63, + "scored_positions_total": 252, + "strata": [ + "garden", + "arithmetic", + "code", + "instructions" + ], + "windows_per_stratum": 1, + "windows_total": 4 + }, + "receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "resolver_sha256": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "schema": "malaiwah.token-panel-build-receipt.v1", + "selection_rule": "Four embedded readable synthetic documents in declared order; native tokenizer with add_special_tokens=True, truncation=True, max_length=64, padding=False; each encoded window must be exactly 64 tokens; no chat template; all 63 shifted next-token positions scored; no RNG.", + "separation": { + "checked": false, + "method": "No contamination scan or benchmark selection.", + "note": "Authored synthetic CPU smoke inputs for a random-init model; not a benchmark, held-out quality claim, or registry-row submission." + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "add_special_tokens": true, + "chat_template_applied": false, + "class": "TokenizersBackend", + "files_sha256": { + "config.json": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "generation_config.json": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "tokenizer.json": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "tokenizer_config.json": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + }, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "local_files_only": true, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "trust_remote_code": false, + "vocab_size": 260 + }, + "tool": "build_panel.py", + "tool_sha256": "f17b17262816676d6ededcc969756ac07ff991eab73117040ec41005f6ff63f3" +} diff --git a/raw/candidates/modelopt-mixed/evidence/root/panel/panel.json b/raw/candidates/modelopt-mixed/evidence/root/panel/panel.json new file mode 100644 index 0000000000000000000000000000000000000000..cedb9d5e3c635860791c55451fde6dc9e37cddb9 --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/root/panel/panel.json @@ -0,0 +1,298 @@ +{ + "contamination": { + "checked": false, + "hits": null, + "method": "not established", + "receipt": null + }, + "context_length": 64, + "contexts": 4, + "format_version": 1, + "name": "token panel panel--panel", + "panel_id": "panel--panel", + "panel_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "panel_token_sha256_legacy": "3c9467c85be43d238926f6d18bf825c2e4748814c95b8b0e8b8f1420546c3089", + "positions_per_context": 63, + "receipt_sha256": "8a4e27a74ca6ce39569b78c3d972077ab7966f6da118110b3b08adca1e284c6f", + "records": [ + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0000.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 0, + "document_id": "embedded-synthetic/garden.txt", + "domain": "garden", + "index": 0, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0000.json", + "token_ids_first16": [ + 1, + 55, + 75, + 72, + 224, + 86, + 80, + 68, + 79, + 79, + 224, + 74, + 68, + 85, + 71, + 72 + ], + "token_ids_json_sha256": "08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315", + "token_ids_last16": [ + 224, + 68, + 81, + 71, + 224, + 68, + 224, + 86, + 87, + 82, + 81, + 72, + 224, + 83, + 68, + 2 + ], + "token_ids_sha256_legacy": "9d5378f0316be57e37f80d2bae7895ba4a1140c302c87ff8cce2fbd9afc83b77", + "window_id": "final-0000", + "window_index": 0 + }, + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0001.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 1, + "document_id": "embedded-synthetic/arithmetic.txt", + "domain": "arithmetic", + "index": 1, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0001.json", + "token_ids_first16": [ + 1, + 36, + 224, + 86, + 75, + 72, + 79, + 73, + 224, + 75, + 82, + 79, + 71, + 86, + 224, + 87 + ], + "token_ids_json_sha256": "5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46", + "token_ids_last16": [ + 72, + 86, + 17, + 224, + 55, + 75, + 72, + 85, + 72, + 224, + 68, + 85, + 72, + 224, + 72, + 2 + ], + "token_ids_sha256_legacy": "e0f95114b71a46cb489539dc38909fb67fb378f25fafbb513e32690cc7f11b37", + "window_id": "final-0001", + "window_index": 1 + }, + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0002.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 2, + "document_id": "embedded-synthetic/code.txt", + "domain": "code", + "index": 2, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0002.json", + "token_ids_first16": [ + 1, + 71, + 72, + 73, + 224, + 68, + 71, + 71, + 66, + 89, + 68, + 79, + 88, + 72, + 86, + 11 + ], + "token_ids_json_sha256": "51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07", + "token_ids_last16": [ + 85, + 76, + 74, + 75, + 87, + 202, + 202, + 85, + 72, + 86, + 88, + 79, + 87, + 224, + 32, + 2 + ], + "token_ids_sha256_legacy": "482b890c7b0e2f7400257c43680093b7f2b90d6df5361c6de3ae97ddfdd2504e", + "window_id": "final-0002", + "window_index": 2 + }, + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0003.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 3, + "document_id": "embedded-synthetic/instructions.txt", + "domain": "instructions", + "index": 3, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0003.json", + "token_ids_first16": [ + 1, + 41, + 76, + 85, + 86, + 87, + 224, + 83, + 79, + 68, + 70, + 72, + 224, + 68, + 224, + 70 + ], + "token_ids_json_sha256": "8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d", + "token_ids_last16": [ + 224, + 70, + 82, + 82, + 79, + 224, + 90, + 68, + 87, + 72, + 85, + 224, + 76, + 81, + 87, + 2 + ], + "token_ids_sha256_legacy": "12e01edd3900ff2ca82621feb5504f24b003a53c0afe98a9ee0b490eb93141d4", + "window_id": "final-0003", + "window_index": 3 + } + ], + "repository": null, + "revision": null, + "schema": "malaiwah.fidelity-panel-binding.v1", + "scored_positions_total": 252, + "scoring_window": { + "dropped_positions_total": 0, + "min_left_context_tokens": 1, + "policy": "every causal prediction position of every window is scored; nothing is dropped", + "score_from": 0, + "windowed": false + }, + "strata": {}, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "token_digest_algorithm": { + "aggregate": "sha256('\\n'.join(per_record_hex).encode('ascii'))", + "legacy_aggregate": "sha256(''.join(per_record_hex).encode('utf-8'))", + "legacy_per_record": "sha256(json.dumps(ids).encode('utf-8'))", + "per_record": "sha256(json.dumps(ids, separators=(',',':')).encode('utf-8'))" + }, + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } +} diff --git a/raw/candidates/modelopt-mixed/evidence/root/panel/tokens/context-0000.json b/raw/candidates/modelopt-mixed/evidence/root/panel/tokens/context-0000.json new file mode 100644 index 0000000000000000000000000000000000000000..c55b788f77dcb26a8c56fe6a7593353d57abb70f --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/root/panel/tokens/context-0000.json @@ -0,0 +1 @@ +[1,55,75,72,224,86,80,68,79,79,224,74,68,85,71,72,81,224,75,68,86,224,85,72,71,224,73,79,82,90,72,85,86,15,224,74,85,72,72,81,224,79,72,68,89,72,86,15,224,68,81,71,224,68,224,86,87,82,81,72,224,83,68,2] \ No newline at end of file diff --git a/raw/candidates/modelopt-mixed/evidence/root/panel/tokens/context-0001.json b/raw/candidates/modelopt-mixed/evidence/root/panel/tokens/context-0001.json new file mode 100644 index 0000000000000000000000000000000000000000..8304be93e5387811e155f869e175c0bfca57ca76 --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/root/panel/tokens/context-0001.json @@ -0,0 +1 @@ +[1,36,224,86,75,72,79,73,224,75,82,79,71,86,224,87,75,85,72,72,224,69,79,88,72,224,69,82,91,72,86,224,68,81,71,224,73,76,89,72,224,85,72,71,224,69,82,91,72,86,17,224,55,75,72,85,72,224,68,85,72,224,72,2] \ No newline at end of file diff --git a/raw/candidates/modelopt-mixed/evidence/root/panel/tokens/context-0002.json b/raw/candidates/modelopt-mixed/evidence/root/panel/tokens/context-0002.json new file mode 100644 index 0000000000000000000000000000000000000000..2a1413e634823a039c4ede6b463b549207c4c8fb --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/root/panel/tokens/context-0002.json @@ -0,0 +1 @@ +[1,71,72,73,224,68,71,71,66,89,68,79,88,72,86,11,79,72,73,87,15,224,85,76,74,75,87,12,29,202,224,224,224,224,85,72,87,88,85,81,224,79,72,73,87,224,14,224,85,76,74,75,87,202,202,85,72,86,88,79,87,224,32,2] \ No newline at end of file diff --git a/raw/candidates/modelopt-mixed/evidence/root/panel/tokens/context-0003.json b/raw/candidates/modelopt-mixed/evidence/root/panel/tokens/context-0003.json new file mode 100644 index 0000000000000000000000000000000000000000..7978732d7bf3bfc5fed35c837bc69d9d66371c4f --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/root/panel/tokens/context-0003.json @@ -0,0 +1 @@ +[1,41,76,85,86,87,224,83,79,68,70,72,224,68,224,70,79,72,68,81,224,70,88,83,224,82,81,224,87,75,72,224,87,68,69,79,72,17,224,49,72,91,87,224,83,82,88,85,224,70,82,82,79,224,90,68,87,72,85,224,76,81,87,2] \ No newline at end of file diff --git a/raw/candidates/modelopt-mixed/evidence/root/runtime/capture-runtime.json b/raw/candidates/modelopt-mixed/evidence/root/runtime/capture-runtime.json new file mode 100644 index 0000000000000000000000000000000000000000..3e301aa346858aa8f33b0fd1107d844bbee4aab1 --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/root/runtime/capture-runtime.json @@ -0,0 +1,245 @@ +{ + "capture_tool": { + "expert_fill": { + "bytes_filled": 294912, + "declined": {}, + "decoded_slices": 0, + "identity": "a byte copy into the fused parameter's slice; bin/selftest_layer_outer.py L4/L6 assert equality with from_pretrained and with the converter path", + "layers_filled": 3, + "mode": "direct", + "reference": "transformers.core_model_loading.MergeModulelist(dim=0) + Concatenate(dim=1)", + "slices_filled": 72, + "staged_slices": 72, + "staging": "pageable", + "targets_filled": 6 + }, + "file": "engines/tools/hf_capture.py", + "head_module_path": "lm_head", + "head_resolution": "lm_head", + "layer_residency": "stream", + "mechanism": "transformers forward pass, layer-outer/window-inner schedule: for each decoder layer the model's own forward is run once per window with the layers below replaying their memoised output and the layers above suspending, so each layer's weights are materialised once for the whole panel. Windows are pushed through sequentially, never batched. Forward pre-hook on model.get_output_embeddings(), fired by the model's own epilogue after the last layer", + "model_view": null, + "parallel_plan_dropped": false, + "resolved_classes": { + "config": "transformers.models.glm_moe_dsa.configuration_glm_moe_dsa.GlmMoeDsaConfig", + "model": "transformers.models.glm_moe_dsa.modeling_glm_moe_dsa.GlmMoeDsaForCausalLM" + }, + "resolved_panel_binding": { + "binding": { + "content": { + "archive": { + "algorithm": "sha256(ustar: sorted regular files; mode=0644; uid=gid=mtime=0)", + "bytes": 20480, + "compression": "none", + "format": "ustar", + "sha256": "389706dfa3335a75ec70a40d079995af1a60c05512334125dbd336790f12702f" + }, + "manifest": [ + { + "bytes": 192, + "path": "arrays/causal-mask-64.npy", + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02" + }, + { + "bytes": 384, + "path": "arrays/final-0000.tokens.npy", + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af" + }, + { + "bytes": 384, + "path": "arrays/final-0001.tokens.npy", + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea" + }, + { + "bytes": 384, + "path": "arrays/final-0002.tokens.npy", + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c" + }, + { + "bytes": 384, + "path": "arrays/final-0003.tokens.npy", + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a" + }, + { + "bytes": 4195, + "path": "panel.json", + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6" + }, + { + "bytes": 7808, + "path": "panel.receipt.json", + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263" + } + ], + "manifest_sha256": "e5f2d6410a6290da1197016c5b57ae522a3570665215ddc23e2a0bd45f912181" + }, + "panel": { + "bytes": 4195, + "context_length": 64, + "contexts": 4, + "file": "panel.json", + "id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "positions_per_context": 63, + "role": "final", + "scored_positions_total": 252, + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6", + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36" + }, + "receipt": { + "bytes": 7808, + "declared_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "file": "panel.receipt.json", + "receipt_file_sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "receipt_seal_mode": "self-blank" + }, + "schema": "malaiwah.resolved-panel.v1", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } + }, + "binding_file": "panel-binding.json", + "binding_file_sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "tokenizer_equivalences": [] + }, + "schedule": "layer-outer", + "sha256": "44afcdac9f7c9cb26a35a2b7d9c1aed562344b76c8045a753651d2f2dbae99d0", + "unexpected_tensor_allowlist": null, + "verified_code": null, + "version": "hf_capture/1", + "weights_decode": null, + "weights_license": null, + "wraps": [] + }, + "container": { + "image_digest": null, + "image_reference": null, + "image_repository_digest": null + }, + "format_version": 1, + "lane": "other", + "lane_identity_inputs": [ + "torch_version", + "cuda_runtime_version", + "device_name", + "grouped_mm_kernel", + "numeric_policy", + "attention_backend", + "experts_implementation", + "parallelism", + "ep_emulate", + "reduce_order" + ], + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "lane_inferred": false, + "receipt_sha256": "99f4a331323bdf99e305927f44cd27240daa1d879dacb92f0c02ee99bb8755c4", + "resources": { + "bytes": { + "checkpoint_read": 555744, + "hidden_d2h": 36616, + "weights_h2d": null + }, + "checkpoint_bytes": 572479, + "checkpoint_files": 2, + "device_name": null, + "forward_timing": "wall-clock", + "note": "provenance, not identity: peaks and stage seconds this run measured; forward_sum is device time under cuda-events, wall time otherwise; seal covers head serialisation up to this block's assembly", + "peak_cuda_allocated_bytes": null, + "peak_cuda_reserved_bytes": null, + "peak_resident_weight_bytes": 208032, + "peak_rss_bytes": 366313472, + "rss_units_source": "Linux ru_maxrss", + "seconds": { + "decode_sum": null, + "elapsed": 4.678, + "fill_sum": 0.008, + "forward_sum": 0.169, + "identity": 0.005, + "layer_load_max": 0.02, + "layer_load_sum": 0.058, + "layer_loads": 4, + "resident_load": 3.686, + "seal": 0.006 + } + }, + "runtime_environment": { + "cold_run": "20260907T165258Z-2065449", + "numeric_policy_observed": { + "NVIDIA_TF32_OVERRIDE": null, + "allow_tf32_cudnn": true, + "allow_tf32_matmul": false, + "deviates_from_default": false, + "float32_matmul_precision": "highest", + "observed_at": "seal time, after the forward" + }, + "python": "3.12.14" + }, + "schema": "malaiwah.fidelity-capture-runtime.v1", + "source_files": { + "bin/fidelity/codepin.py": "ce2a2c04d64adf7a268978a7ffe163c7d4cb5b675d5dc8e156f8a26a3b7bb5fd", + "bin/fidelity/panel.py": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "engines/tools/hf_capture.py": "44afcdac9f7c9cb26a35a2b7d9c1aed562344b76c8045a753651d2f2dbae99d0", + "engines/tools/layer_outer.py": "e3ea5715112663b1b60cf596eeffc2140e49b399809ece89a174bce41a969274" + }, + "stack_fingerprint": { + "attention_backend": "model default", + "cuda_runtime_version": null, + "device": "cpu", + "device_name": null, + "engine": "transformers-eager", + "numeric_policy": "default torch matmul precision; no TF32 override applied", + "schema": "malaiwah.stack-fingerprint.v1", + "torch_version": "2.11.0+cpu", + "transformers_version": "5.16.1" + }, + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd", + "upstream_receipts": [], + "weights": { + "checkpoint_files": [ + { + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "size": 1479 + }, + { + "name": "model.safetensors", + "sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1", + "size": 571000 + } + ], + "checkpoint_identity_algorithm": "sha256 over the canonical JSON {\"algorithm\": , \"files\": [{\"name\", \"size\", \"sha256\"}, ...]} of every *.safetensors shard plus config.json in the checkpoint directory, sorted by name; for a llama.cpp GGUF tree the shards are every *.gguf of the one build directory (name = /) and config.json is the official release's copy beside it", + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "model_revision": null, + "repository": "/tmp/qfs-complete-tiny-fixture/model", + "revision": null + } +} diff --git a/raw/candidates/modelopt-mixed/evidence/root/validation/structural-validation.json b/raw/candidates/modelopt-mixed/evidence/root/validation/structural-validation.json new file mode 100644 index 0000000000000000000000000000000000000000..fc9e935fa9555c9e78a2d9c830d09603008aea2a --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/root/validation/structural-validation.json @@ -0,0 +1,14 @@ +{ + "checks_run": [ + "pre-seal" + ], + "error_count": 0, + "errors": [], + "format_version": 1, + "receipt_sha256": "e119c65652612ff67b867992ad3c228bc641ef07313779c4f7fb572e2d4603f4", + "schema": "malaiwah.fidelity-structural-validation.v1", + "structural_status": "sealed", + "subject": "dataset:fidelity--quant-integration.root", + "warning_count": 0, + "warnings": [] +} diff --git a/raw/candidates/modelopt-mixed/evidence/smoke-evidence.json b/raw/candidates/modelopt-mixed/evidence/smoke-evidence.json new file mode 100644 index 0000000000000000000000000000000000000000..83f9564b5eac06847e16290463e931063cf7a773 --- /dev/null +++ b/raw/candidates/modelopt-mixed/evidence/smoke-evidence.json @@ -0,0 +1,444 @@ +{ + "kld_nats": 0.0005261778079916031, + "decode": { + "activation_quantization": null, + "checkpoint_bytes_read": 207190, + "comparison_class": "advisory", + "components_consumed": 257, + "components_not_consumed": [], + "components_planned": 257, + "formats_decoded": { + "modelopt-fp8-block": 36, + "modelopt-fp8-tensor": 37, + "modelopt-nvfp4": 37 + }, + "method": "microfloat-weight-reconstruction", + "modules_decoded": 110, + "modules_not_decoded": [], + "modules_planned": 110, + "output_dtype": "bfloat16", + "quantization_config": { + "quant_algo": "MIXED_PRECISION", + "quant_method": "modelopt", + "quantized_layers": { + "model.layers.0.mlp.down_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.0.mlp.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.0.mlp.up_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.0.self_attn.indexer.weights_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.0.self_attn.indexer.wk": { + "quant_algo": "FP8" + }, + "model.layers.0.self_attn.indexer.wq_b": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.0.self_attn.kv_a_proj_with_mqa": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.0.self_attn.kv_b_proj": { + "quant_algo": "FP8" + }, + "model.layers.0.self_attn.o_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.0.self_attn.q_a_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.0.self_attn.q_b_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.experts.0.down_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.1.mlp.experts.0.gate_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.1.mlp.experts.0.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.experts.1.down_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.1.mlp.experts.1.gate_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.1.mlp.experts.1.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.experts.2.down_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.1.mlp.experts.2.gate_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.1.mlp.experts.2.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.experts.3.down_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.1.mlp.experts.3.gate_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.1.mlp.experts.3.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.experts.4.down_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.1.mlp.experts.4.gate_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.1.mlp.experts.4.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.experts.5.down_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.1.mlp.experts.5.gate_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.1.mlp.experts.5.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.experts.6.down_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.1.mlp.experts.6.gate_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.1.mlp.experts.6.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.experts.7.down_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.1.mlp.experts.7.gate_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.1.mlp.experts.7.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.shared_experts.down_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.1.mlp.shared_experts.gate_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.1.mlp.shared_experts.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.self_attn.kv_a_proj_with_mqa": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.1.self_attn.kv_b_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.1.self_attn.o_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.self_attn.q_a_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.1.self_attn.q_b_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.mlp.experts.0.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.experts.0.gate_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.2.mlp.experts.0.up_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.mlp.experts.1.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.experts.1.gate_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.2.mlp.experts.1.up_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.mlp.experts.2.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.experts.2.gate_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.2.mlp.experts.2.up_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.mlp.experts.3.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.experts.3.gate_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.2.mlp.experts.3.up_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.mlp.experts.4.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.experts.4.gate_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.2.mlp.experts.4.up_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.mlp.experts.5.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.experts.5.gate_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.2.mlp.experts.5.up_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.mlp.experts.6.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.experts.6.gate_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.2.mlp.experts.6.up_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.mlp.experts.7.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.experts.7.gate_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.2.mlp.experts.7.up_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.mlp.shared_experts.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.shared_experts.gate_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.2.mlp.shared_experts.up_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.self_attn.indexer.weights_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.self_attn.indexer.wk": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.2.self_attn.indexer.wq_b": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.self_attn.kv_a_proj_with_mqa": { + "quant_algo": "FP8" + }, + "model.layers.2.self_attn.kv_b_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.2.self_attn.o_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.2.self_attn.q_a_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.self_attn.q_b_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.3.mlp.experts.0.down_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.3.mlp.experts.0.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.experts.0.up_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.3.mlp.experts.1.down_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.3.mlp.experts.1.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.experts.1.up_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.3.mlp.experts.2.down_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.3.mlp.experts.2.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.experts.2.up_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.3.mlp.experts.3.down_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.3.mlp.experts.3.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.experts.3.up_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.3.mlp.experts.4.down_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.3.mlp.experts.4.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.experts.4.up_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.3.mlp.experts.5.down_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.3.mlp.experts.5.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.experts.5.up_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.3.mlp.experts.6.down_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.3.mlp.experts.6.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.experts.6.up_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.3.mlp.experts.7.down_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.3.mlp.experts.7.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.experts.7.up_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.3.mlp.shared_experts.down_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.3.mlp.shared_experts.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.shared_experts.up_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.3.self_attn.kv_a_proj_with_mqa": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.3.self_attn.kv_b_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.self_attn.o_proj": { + "group_size": 128, + "quant_algo": "FP8_PB_WO" + }, + "model.layers.3.self_attn.q_a_proj": { + "group_size": 16, + "quant_algo": "NVFP4" + }, + "model.layers.3.self_attn.q_b_proj": { + "quant_algo": "FP8" + } + } + }, + "reader_evidence": { + "decode_plan_sha256": "de7e9aa33267002a2ab5284d6438d4e3dff7617b953904356ff486590972f79f", + "gate_header_barrier": false, + "source_files": { + "engines/tools/affine_surface.py": "37e7074797d53ae836e0af12fdbd2dc36c88778098aa44c72c1cd936d2b4c053", + "engines/tools/microscale_surface.py": "588923f0a4700436221923c794a8c112971d9f08e75c746742b0f0ede7921682", + "engines/tools/nvfp4_surface.py": "044b6fd2ee22d58512476e96060f7fa09030212a33736da1393c0103eb73e0c8", + "engines/tools/quant_stream.py": "7c6cc4cbe399d066eaff80ccf1e3d3190185f194644f738a404d3c537ad8e1ab" + } + }, + "reference": "compressed-tensors@0.18.0; DeepSeek-V4-Flash@60d8d70770c6776ff598c94bb586a859a38244f1/inference/kernel.py; nvidia/Qwen3.8-Flash-Next-NVFP4@fc694b54fb0174e0913e6adf86691ef85a4ead47/config.json+headers", + "scientific_disclosure": "Stored-weight reconstruction only; no native quantized GEMM, activation arithmetic, or quantizer optimization quality claim.", + "scope": "weights_reconstructed" + }, + "comparison_class": "advisory" +} diff --git a/raw/candidates/modelopt-mixed/model/LICENSE b/raw/candidates/modelopt-mixed/model/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..71f32fb2284323cef90b3e784a7655747c8ae683 --- /dev/null +++ b/raw/candidates/modelopt-mixed/model/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Michel Belleau + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/raw/candidates/modelopt-mixed/model/build-manifest.json b/raw/candidates/modelopt-mixed/model/build-manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..539ac3c8e8430caad8e5c81ca4d23dce391cac14 --- /dev/null +++ b/raw/candidates/modelopt-mixed/model/build-manifest.json @@ -0,0 +1,1561 @@ +{ + "architecture_inspiration": "GLM-5.2-SIQ-Fruit-bf16 geometry and dense/MoE plus full/shared DSA schedules; no Fruit or GLM model weights reused.", + "files": { + "config.json": { + "bytes": 1479, + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + "generation_config.json": { + "bytes": 216, + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + "model.safetensors": { + "bytes": 571000, + "sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1" + }, + "tokenizer.json": { + "bytes": 6763, + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + "tokenizer_config.json": { + "bytes": 236, + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + }, + "generation": "Native GlmMoeDsaForCausalLM random initialization in FP32, rounded to the published BF16 artifact; native router correction buffers retained FP32.", + "generator_sha256": "19c3489f1bc7e8e9323cb26afbead562816a6918d6823af252eb6d04dff8e81e", + "limitations": [ + "Random initialization; not trained or distilled.", + "Not a quantization or behavioral approximation of a released GLM model.", + "MTP intentionally absent (zero next-n-prediction layers); no unmatched MTP tensors.", + "This build manifest describes generated bytes, not proof of clean loading or capture; see separately measured verification evidence." + ], + "parameter_count": 277824, + "schema": "malaiwah.glm-moe-dsa-tiny-build.v1", + "seed": 20260907, + "stored_elements": 277848, + "tensor_count": 139, + "tensors": [ + { + "bytes": 33280, + "dtype": "torch.bfloat16", + "elements": 16640, + "name": "lm_head.weight", + "sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "shape": [ + 260, + 64 + ] + }, + { + "bytes": 33280, + "dtype": "torch.bfloat16", + "elements": 16640, + "name": "model.embed_tokens.weight", + "sha256": "18df1b3a5f263a31f5bd4225c3c4629573b75e47b7e28b6e73501586bb47d6f1", + "shape": [ + 260, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.0.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 16384, + "dtype": "torch.bfloat16", + "elements": 8192, + "name": "model.layers.0.mlp.down_proj.weight", + "sha256": "101a9db78e4e21058dcb6f5240e751bcaf3bd662b98696a63a719f86ecabf787", + "shape": [ + 64, + 128 + ] + }, + { + "bytes": 16384, + "dtype": "torch.bfloat16", + "elements": 8192, + "name": "model.layers.0.mlp.gate_proj.weight", + "sha256": "ef5262b354f74dce3a9dc4c3134e4db8cbf63f03ed8a1cd78ebb3e9a05af97cc", + "shape": [ + 128, + 64 + ] + }, + { + "bytes": 16384, + "dtype": "torch.bfloat16", + "elements": 8192, + "name": "model.layers.0.mlp.up_proj.weight", + "sha256": "359b4dac1da3e3956583050af84147aef2f41b8680a85b32083ffd0e1847d997", + "shape": [ + 128, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.0.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.0.self_attn.indexer.k_norm.bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 16 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.0.self_attn.indexer.k_norm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 512, + "dtype": "torch.bfloat16", + "elements": 256, + "name": "model.layers.0.self_attn.indexer.weights_proj.weight", + "sha256": "50ca7a10fe9a0556d8c3ad38bd3f715ee6c6e13084b4cb6b51b2ef78f57c53b2", + "shape": [ + 4, + 64 + ] + }, + { + "bytes": 2048, + "dtype": "torch.bfloat16", + "elements": 1024, + "name": "model.layers.0.self_attn.indexer.wk.weight", + "sha256": "f724d0b2c09ba9ae41cfc3fbe4e458bd7f644e5f0fb8c1446e19b3cf8c650274", + "shape": [ + 16, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.0.self_attn.indexer.wq_b.weight", + "sha256": "048349f93320b7625130fa5abc86dbcc89715b9f02d6853284563e765eb7bc11", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.0.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.0.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "5ad58e7c4515d8c4e84ecf10ecfa7aacb3c39ee1d6a3219307036bd8b59f529d", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.0.self_attn.kv_b_proj.weight", + "sha256": "9a8cfdd6e51c3868d27f147509d24549480e70f278758a8c16adf1ea5c197938", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.0.self_attn.o_proj.weight", + "sha256": "734b1edea5c19958ab29dfba4314ab5a5a25280be3db3de20b82b2e7c78c35ff", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.0.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.0.self_attn.q_a_proj.weight", + "sha256": "6d6e018ec4d4251755a002469f0778accef3b7628062f82a5d292d4130fd4c85", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.0.self_attn.q_b_proj.weight", + "sha256": "28ef2f379f06054843ff97f99d63f515a2f583059dd49fd894a53d04733f0650", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.1.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.0.down_proj.weight", + "sha256": "a0378aa3bb69ed49af25a51d57476ef63ccf5dc98bc4d3008d28660e16f82492", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.0.gate_proj.weight", + "sha256": "e6c7b0ce29c7e6ea16adfd8423cd9a8a27f1be217a2061a635468c9e5603439c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.0.up_proj.weight", + "sha256": "528f777edc3fc406c76dc1e150a648c23009c701134a3a86dcbdeb15f8ddc4bb", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.1.down_proj.weight", + "sha256": "c966c5eed64d8bb32ff5cf25587fc4eb714b7536b6f670725efb136acc6ca26c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.1.gate_proj.weight", + "sha256": "e55ceb89e6891b34fb67fe5c99b529a1cab9729bea2f6ef08be6af7eefcf6c2e", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.1.up_proj.weight", + "sha256": "46b43c2f3a025bab46be05795bb60916e592bb58d4fdf2a18d2e88d37a7a4fb8", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.2.down_proj.weight", + "sha256": "a649be4fd07f95d770fbe14e87561a13f62f155d2053b8a35fa6962b5d5e8c8d", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.2.gate_proj.weight", + "sha256": "5560e590344e57ff54425f4aa6c07edaaade8c73343e32c27199f1c0dc61fe51", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.2.up_proj.weight", + "sha256": "35a639103a8a914203b4dde3f87d197515879ae6ca72557cde8ea9dea6e6e0d2", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.3.down_proj.weight", + "sha256": "0969db499dfe821348b3c06873d36635f7216f1f595968ad43ae984b57565205", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.3.gate_proj.weight", + "sha256": "75c5c77c39a77a4a6dbe7b601a88814bca9cae6fcde0069ff2ca86352e6c13e7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.3.up_proj.weight", + "sha256": "241533cb545cfed7685091b023213c9d530cb54431a712eba7bf3aaebdae3b53", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.4.down_proj.weight", + "sha256": "ca1273d291e431a10b8d8c2170031b29440c2bec8bc1d7f46353990c7fe1a03f", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.4.gate_proj.weight", + "sha256": "69dc9149cbfd65fb10bd6c11f99357d279d471e5874cf19dbef7cfd8ee4d796c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.4.up_proj.weight", + "sha256": "81cb04732e3cc53acb1152c7fc06a6399af18a5f282762cb72abb56b1e6b7c6f", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.5.down_proj.weight", + "sha256": "ebd8e01f9c2daf657e915575afb3ff5ba261a2a83c25c9c50818319dd587a2f2", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.5.gate_proj.weight", + "sha256": "bc70a7d1a5263ca17d00766bb2dc48e1debb815344150741e55dea48af4d75c0", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.5.up_proj.weight", + "sha256": "f84a95d64728067676d4f7b61ac4a589fa11e45226a8996a4719d65f0b018dbf", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.6.down_proj.weight", + "sha256": "00535633e5d98b7a527cc1198d572a9104405e2aff7ee303ae60195654fb24c2", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.6.gate_proj.weight", + "sha256": "2bb299a5e306108c7af11aa5c6114abeb4d06bde9001e6f7644e0d9dca184dc5", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.6.up_proj.weight", + "sha256": "72df8a498b866a242abc9383b16c5b4428feadab02c7f274afa28653e8586107", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.7.down_proj.weight", + "sha256": "90331ab3da1e867c32d3db1aac94c69c86349dbb539400ed9e0c19c148bf5e43", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.7.gate_proj.weight", + "sha256": "576a9df3d1d72f7323e8a8490118821d826f50c9403ca7ecbe196277e62c7730", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.7.up_proj.weight", + "sha256": "3869533066e5bca84402355c6b80b177424f2d79d2b97cbb9cff30eee748135f", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.float32", + "elements": 8, + "name": "model.layers.1.mlp.gate.e_score_correction_bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 8 + ] + }, + { + "bytes": 1024, + "dtype": "torch.bfloat16", + "elements": 512, + "name": "model.layers.1.mlp.gate.weight", + "sha256": "7d1dbc5cc90900cdc1f9d4a241c8b62d0ad50de09231f9f036cce33982cfdfe7", + "shape": [ + 8, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.shared_experts.down_proj.weight", + "sha256": "eb5297f619dfdfb40419b3330406e8ff43cb0fe35797911f2de6ebff4b95690a", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.shared_experts.gate_proj.weight", + "sha256": "eeeff2280eef91eac1215b28717f2b7fdee09fdbfd484ff44855e7e7cdd11718", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.shared_experts.up_proj.weight", + "sha256": "dab5aeab83d842104e1c5557b9b6d6cb5fe519284b909e8c0c975c752dc92d41", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.1.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.1.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.1.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "bff5998ab14190d56392c70e92927904d84a2b9d04ee222967d774a5bb5eecc4", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.1.self_attn.kv_b_proj.weight", + "sha256": "876302ef3f8bba74a997f973913ca4b802aa488d27b46747c470062c9a7ebee5", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.1.self_attn.o_proj.weight", + "sha256": "ecda88672dc8fbc3bac348fa6118010e51b170d8fe3596a811bc9aa95f71915c", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.1.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.self_attn.q_a_proj.weight", + "sha256": "29fc979642704e621b0b6b59a24c13d6900782bfa9655ea9a3311c1d4c69770a", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.self_attn.q_b_proj.weight", + "sha256": "01bae246d61c4d08e751e42e6a03315b55266ae46bd15b34bd343f606a538349", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.2.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.0.down_proj.weight", + "sha256": "8c1c19d08541dc9251736b480f53cfefd21bfbcb0b4e9f725dc66e6c52d7705c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.0.gate_proj.weight", + "sha256": "8c326913b2ef159b507b584c1ae018619573a09b6f41ab687df629d3685884c4", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.0.up_proj.weight", + "sha256": "8611bc004f735fbc1c14a9c9c23f4150c7e754127e44926a44efd0b767a653ed", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.1.down_proj.weight", + "sha256": "1d4d668c4c8183e5991eefe780a138eda70578a4740c07df5b386f233cb4e5c3", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.1.gate_proj.weight", + "sha256": "21224f6173f4785ff6252dd0c1f7a6937b36bbd5bc1c20d25feecc85d6d25f3e", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.1.up_proj.weight", + "sha256": "05542672d0174f9ddfee4bd385b56455c004532da88bf34363b1e543948bf899", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.2.down_proj.weight", + "sha256": "7330dee9a6a416e9922f61d10ee0507584e007cbdd349131471b43a745b6fed8", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.2.gate_proj.weight", + "sha256": "eca5904e6634e97ca89e7dfb1f12774f78adb33b78256136e7e8ee522af92d96", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.2.up_proj.weight", + "sha256": "5a90748752e46844a0cf0efd84c16ec2db25315ffa7a13b9c4bff2697d00bbf6", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.3.down_proj.weight", + "sha256": "a42569462225d60158dfaf24406463f135b632fe258e66ae2e521efed502a37c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.3.gate_proj.weight", + "sha256": "8cf448df350984fe0429a1ca3b2081315b594e50ce85fbc2e9f63eafb8a896b7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.3.up_proj.weight", + "sha256": "54a1269ba638d42c7d6d3926826b04d52310c82804fddcd73c253680a4270032", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.4.down_proj.weight", + "sha256": "5a236edfdc8fc79f687cec866d13724515b8f26465dca2ffde051d0870d5d0ac", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.4.gate_proj.weight", + "sha256": "6c18140a11c9986f99b7c269da01a8f69f1b5215c41be1801d6900eb511bdc76", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.4.up_proj.weight", + "sha256": "7b964f5c207a6bbeaa589a6c07f9665967aca4e7c57148190ed6a6f12e0ca572", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.5.down_proj.weight", + "sha256": "74c2633e7d3b0bf844d3e3812533774fc09b6552435e778e68b442ad161c0985", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.5.gate_proj.weight", + "sha256": "6177166c1bc51e03fde63b60d85347f5a5412446df5b4dd893817d18fcf0d56c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.5.up_proj.weight", + "sha256": "7bb8e1f65a918589a1593926dc93bf3fa1329f5d31f16266c3ad6fe0fd390d47", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.6.down_proj.weight", + "sha256": "af74e303b86b1aec96fd69b64d39848d7d08f255822739cf7d5f4456de67f010", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.6.gate_proj.weight", + "sha256": "c4fc94863e17270bf8cb5a18d3a125bea82d04bfb38457fd27896a00ddeea056", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.6.up_proj.weight", + "sha256": "4e92bebe11c518a225d75d4d7de7b85f9a82baad7a961ac090dd7343a612b577", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.7.down_proj.weight", + "sha256": "8971d6a869ba59445fe28163bd73c74c8338e0b8b675f008277b5a8973967bb2", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.7.gate_proj.weight", + "sha256": "3f90ff90c18d50349a50d11c472d48c6b297496ba5bedfe4ff0da257e1e2fdef", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.7.up_proj.weight", + "sha256": "5a2fcecdbb84a9138b4dd32da15793393aeaee1d00da95ed3d55803b1f45cc86", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.float32", + "elements": 8, + "name": "model.layers.2.mlp.gate.e_score_correction_bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 8 + ] + }, + { + "bytes": 1024, + "dtype": "torch.bfloat16", + "elements": 512, + "name": "model.layers.2.mlp.gate.weight", + "sha256": "aa35eb60ee6dd8e32728c95210b15016120675b111542f36ee1b1cca64668f9d", + "shape": [ + 8, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.shared_experts.down_proj.weight", + "sha256": "e8a1e6e8db3b1996aad9cd457ae20aa5aaac876d400fd6e8d764f543ff7833b9", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.shared_experts.gate_proj.weight", + "sha256": "c5b456aab9a02d3828987060b24d24c07e7b611d3036f0d5c28662c922d1238d", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.shared_experts.up_proj.weight", + "sha256": "6a84e814bd21fcc17878151b94508853dd70099787ef5303cdc06f90b6cd7092", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.2.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.2.self_attn.indexer.k_norm.bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 16 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.2.self_attn.indexer.k_norm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 512, + "dtype": "torch.bfloat16", + "elements": 256, + "name": "model.layers.2.self_attn.indexer.weights_proj.weight", + "sha256": "d65c6e5c3f34fcad47b7137c46dd3bcd6d5cf24ce508df7fad9d20788d3a18b8", + "shape": [ + 4, + 64 + ] + }, + { + "bytes": 2048, + "dtype": "torch.bfloat16", + "elements": 1024, + "name": "model.layers.2.self_attn.indexer.wk.weight", + "sha256": "917ff454cb253fa0e5d3d68bf15e716401bb928fbd7cd260a348afec25b1b2c8", + "shape": [ + 16, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.self_attn.indexer.wq_b.weight", + "sha256": "3fe5b407fe2d74a0dda78b6cb7ae3f65066a781fd5f81971b83be600fc911d14", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.2.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.2.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "26cecf47e8fb14a837f760549a9b9dd8589c37dc76870f8b115d4ab634b853ab", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.2.self_attn.kv_b_proj.weight", + "sha256": "23447f5f72c55b0cd7acd571ff1317c16c8097e9f0de4cc9b66101b51f7988c1", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.2.self_attn.o_proj.weight", + "sha256": "a1a0c84b3214c9b7b00c438754280833964cdc719aadeff64358b3d09b2063d8", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.2.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.self_attn.q_a_proj.weight", + "sha256": "3eda4fc6a047b282d63ad2884d870ee8150a99f3c71d21031ea71e749cf39815", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.self_attn.q_b_proj.weight", + "sha256": "58ecb919757c3c93d6a43b9344236d9abd32870e68907f37cb8db779d2c93fff", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.3.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.0.down_proj.weight", + "sha256": "e8c77c987baa36019ce1adf05e02e2a31395286e584428b2049e06331848c216", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.0.gate_proj.weight", + "sha256": "69871151865d8a23e2cc39b9fe5da60eb4f41cb6c053520f29d7c7b58e6fa5e0", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.0.up_proj.weight", + "sha256": "12df1ea42b96e959785c09427c3ca3bcdc53aa7942d15187c7b1e19bdd66d08a", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.1.down_proj.weight", + "sha256": "5feaa5de7da59348b465458b8aff5373b11dae8b5150f8e7bb8015acc172e3ff", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.1.gate_proj.weight", + "sha256": "e907e6e36b7266d56e190c1e56551e0a40d64741ce668328d898c17b488ec6c9", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.1.up_proj.weight", + "sha256": "c0062ef6004073cbabf3098703b5f565f0e973e094d90c3eba36c7be471f947e", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.2.down_proj.weight", + "sha256": "efec1e8a6a5e12a6db226699e10a6d346fa95c453009f148fe304d378567f5fe", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.2.gate_proj.weight", + "sha256": "7722cc87a7696f53e7f1e0d741230a7db18d2c324f7faec742a9621c75189cb7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.2.up_proj.weight", + "sha256": "5917df5932d0ce4854458ce357a8a2c3384bc463531996875d1c68c6ea17734c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.3.down_proj.weight", + "sha256": "fd331dc77911f8d80ddfdee938993a08b3715d06767901879c5a55700dbb8961", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.3.gate_proj.weight", + "sha256": "1e8aa3749cdc3d21baf7108c47bb69ad4a532c1f41c0556ca8d68ca2c226a7a8", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.3.up_proj.weight", + "sha256": "858e72360951a5073d117a75b2cd759bc3503c6c270388b30fe73d7554f54dae", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.4.down_proj.weight", + "sha256": "b80cf998a1db7569ca4600388bbe4c6d20bd7fe7209c4e37b5de015041d01423", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.4.gate_proj.weight", + "sha256": "b39a0f5b9cd6f9175e7fa29b342772476caf8a76dad1c34d88075988c1894853", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.4.up_proj.weight", + "sha256": "cef4d7b5fb77e750e91c17cae1622a6362ba204b1b30bf5ed7b65f9e6ed15ff1", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.5.down_proj.weight", + "sha256": "65a04840ec88842630cc6f120899a3bfa6151990d7411bfe44839727648e4d03", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.5.gate_proj.weight", + "sha256": "101836900c549af917f8392a6b1428e2f14e4e1f1ef0fdd9b04e79b98c1c3d02", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.5.up_proj.weight", + "sha256": "4fc8edda4b1a92a43be268a8b249274dd5f4370fd6ea6a3134b8c2c4cf730d95", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.6.down_proj.weight", + "sha256": "fd3a10e1464c20bf5e575c105f39882bcbddcab892ef36f24e5a852d597ee7ef", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.6.gate_proj.weight", + "sha256": "8211aaeed6f1ea2711aa1865309d2d36742c0b41021eea1e00fcac45dc353b4b", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.6.up_proj.weight", + "sha256": "ec4f5d1acc5d045de6ae4106bc8f52d17d64ac355c910f12fac8b1b0b573296d", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.7.down_proj.weight", + "sha256": "03c257936ec78df3f941fe0ca4ce5aad636654cf2a351b64515ac07ad8871cae", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.7.gate_proj.weight", + "sha256": "67c1e28fd0a028104b9c76279a3c473f50452633c8a4feabda637e5f5b71f797", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.7.up_proj.weight", + "sha256": "1b18f8b452b71ca57fec09892a48df2ee2108067f97f62b76a3817c9bea91708", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.float32", + "elements": 8, + "name": "model.layers.3.mlp.gate.e_score_correction_bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 8 + ] + }, + { + "bytes": 1024, + "dtype": "torch.bfloat16", + "elements": 512, + "name": "model.layers.3.mlp.gate.weight", + "sha256": "7e86bda3f7704f19dc2a3f6a0ca22b0df554723adf0cf3add837a1e497ad4d3a", + "shape": [ + 8, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.shared_experts.down_proj.weight", + "sha256": "110ad4d8dd59a5ec2b0d4c2e0a79d022bcdba240a4998ff84ad2590dd32fce2c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.shared_experts.gate_proj.weight", + "sha256": "cca5d02ac9eccab3ee8be47f55ef4d59750dd311800e25c22cc3f22b437ffd8b", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.shared_experts.up_proj.weight", + "sha256": "c8fe3987299d1526946a87facc4d3f99300fafbac552471ed826454c41ed31e5", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.3.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.3.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.3.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "5c230cafd4add95096f53702bab8ef1673993cca9433de8c874638958a61995a", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.3.self_attn.kv_b_proj.weight", + "sha256": "ff432280fe1fbbc2a5b7fee7fb18f6de59d675d2d7d0eec0d769a5fd012699a9", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.3.self_attn.o_proj.weight", + "sha256": "59e2e2ee8f9cba29e9cf3e6098539ddca5811d35d3df3c860488f348d6be9584", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.3.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.self_attn.q_a_proj.weight", + "sha256": "172aae8ff1a79376bf65182f5e92c06da2f9b307c15f214a20597491729aa0d7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.self_attn.q_b_proj.weight", + "sha256": "5d917d8c510906982c609808f1eb0d16da467976550e3a063637f1fde013cbdb", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.norm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + } + ], + "tokenizer": { + "kind": "byte-level BPE without merges", + "special_token_ids": { + "": 1, + "": 2, + "": 0, + "": 3 + }, + "vocab_size": 260 + }, + "versions": { + "safetensors": "0.8.0", + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "transformers": "5.16.1" + } +} diff --git a/raw/candidates/modelopt-mixed/model/config.json b/raw/candidates/modelopt-mixed/model/config.json new file mode 100644 index 0000000000000000000000000000000000000000..098be28a819c34c30b77f51711939409a6017456 --- /dev/null +++ b/raw/candidates/modelopt-mixed/model/config.json @@ -0,0 +1,477 @@ +{ + "architectures": [ + "GlmMoeDsaForCausalLM" + ], + "attention_bias": false, + "attention_dropout": 0.0, + "bos_token_id": 1, + "dtype": "bfloat16", + "eos_token_id": 2, + "first_k_dense_replace": 1, + "head_dim": 8, + "hidden_act": "silu", + "hidden_size": 64, + "index_head_dim": 16, + "index_n_heads": 4, + "index_topk": 8, + "indexer_types": [ + "full", + "shared", + "full", + "shared" + ], + "initializer_range": 0.02, + "intermediate_size": 128, + "kv_lora_rank": 16, + "layer_types": [ + "deepseek_sparse_attention", + "deepseek_sparse_attention", + "deepseek_sparse_attention", + "deepseek_sparse_attention" + ], + "max_position_embeddings": 256, + "mlp_bias": false, + "mlp_layer_types": [ + "dense", + "sparse", + "sparse", + "sparse" + ], + "model_type": "glm_moe_dsa", + "moe_intermediate_size": 32, + "n_group": 1, + "n_routed_experts": 8, + "n_shared_experts": 1, + "norm_topk_prob": true, + "num_attention_heads": 4, + "num_experts_per_tok": 2, + "num_hidden_layers": 4, + "num_key_value_heads": 4, + "num_nextn_predict_layers": 0, + "pad_token_id": 0, + "q_lora_rank": 32, + "qk_head_dim": 16, + "qk_nope_head_dim": 8, + "qk_rope_head_dim": 8, + "rms_norm_eps": 1e-05, + "rope_parameters": { + "rope_theta": 10000.0, + "rope_type": "default" + }, + "routed_scaling_factor": 2.5, + "tie_word_embeddings": false, + "topk_group": 1, + "transformers_version": "5.16.1", + "use_cache": true, + "v_head_dim": 16, + "vocab_size": 260, + "quantization_config": { + "quant_method": "modelopt", + "quant_algo": "MIXED_PRECISION", + "quantized_layers": { + "model.layers.0.mlp.down_proj": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.0.mlp.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.0.mlp.up_proj": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.0.self_attn.indexer.weights_proj": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.0.self_attn.indexer.wk": { + "quant_algo": "FP8" + }, + "model.layers.0.self_attn.indexer.wq_b": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.0.self_attn.kv_a_proj_with_mqa": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.0.self_attn.kv_b_proj": { + "quant_algo": "FP8" + }, + "model.layers.0.self_attn.o_proj": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.0.self_attn.q_a_proj": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.0.self_attn.q_b_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.experts.0.down_proj": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.1.mlp.experts.0.gate_proj": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.1.mlp.experts.0.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.experts.1.down_proj": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.1.mlp.experts.1.gate_proj": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.1.mlp.experts.1.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.experts.2.down_proj": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.1.mlp.experts.2.gate_proj": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.1.mlp.experts.2.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.experts.3.down_proj": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.1.mlp.experts.3.gate_proj": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.1.mlp.experts.3.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.experts.4.down_proj": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.1.mlp.experts.4.gate_proj": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.1.mlp.experts.4.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.experts.5.down_proj": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.1.mlp.experts.5.gate_proj": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.1.mlp.experts.5.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.experts.6.down_proj": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.1.mlp.experts.6.gate_proj": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.1.mlp.experts.6.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.experts.7.down_proj": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.1.mlp.experts.7.gate_proj": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.1.mlp.experts.7.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.mlp.shared_experts.down_proj": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.1.mlp.shared_experts.gate_proj": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.1.mlp.shared_experts.up_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.self_attn.kv_a_proj_with_mqa": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.1.self_attn.kv_b_proj": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.1.self_attn.o_proj": { + "quant_algo": "FP8" + }, + "model.layers.1.self_attn.q_a_proj": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.1.self_attn.q_b_proj": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.2.mlp.experts.0.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.experts.0.gate_proj": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.2.mlp.experts.0.up_proj": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.2.mlp.experts.1.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.experts.1.gate_proj": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.2.mlp.experts.1.up_proj": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.2.mlp.experts.2.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.experts.2.gate_proj": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.2.mlp.experts.2.up_proj": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.2.mlp.experts.3.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.experts.3.gate_proj": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.2.mlp.experts.3.up_proj": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.2.mlp.experts.4.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.experts.4.gate_proj": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.2.mlp.experts.4.up_proj": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.2.mlp.experts.5.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.experts.5.gate_proj": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.2.mlp.experts.5.up_proj": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.2.mlp.experts.6.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.experts.6.gate_proj": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.2.mlp.experts.6.up_proj": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.2.mlp.experts.7.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.experts.7.gate_proj": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.2.mlp.experts.7.up_proj": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.2.mlp.shared_experts.down_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.mlp.shared_experts.gate_proj": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.2.mlp.shared_experts.up_proj": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.2.self_attn.indexer.weights_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.self_attn.indexer.wk": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.2.self_attn.indexer.wq_b": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.2.self_attn.kv_a_proj_with_mqa": { + "quant_algo": "FP8" + }, + "model.layers.2.self_attn.kv_b_proj": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.2.self_attn.o_proj": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.2.self_attn.q_a_proj": { + "quant_algo": "FP8" + }, + "model.layers.2.self_attn.q_b_proj": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.3.mlp.experts.0.down_proj": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.3.mlp.experts.0.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.experts.0.up_proj": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.3.mlp.experts.1.down_proj": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.3.mlp.experts.1.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.experts.1.up_proj": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.3.mlp.experts.2.down_proj": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.3.mlp.experts.2.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.experts.2.up_proj": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.3.mlp.experts.3.down_proj": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.3.mlp.experts.3.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.experts.3.up_proj": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.3.mlp.experts.4.down_proj": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.3.mlp.experts.4.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.experts.4.up_proj": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.3.mlp.experts.5.down_proj": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.3.mlp.experts.5.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.experts.5.up_proj": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.3.mlp.experts.6.down_proj": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.3.mlp.experts.6.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.experts.6.up_proj": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.3.mlp.experts.7.down_proj": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.3.mlp.experts.7.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.experts.7.up_proj": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.3.mlp.shared_experts.down_proj": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.3.mlp.shared_experts.gate_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.mlp.shared_experts.up_proj": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.3.self_attn.kv_a_proj_with_mqa": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.3.self_attn.kv_b_proj": { + "quant_algo": "FP8" + }, + "model.layers.3.self_attn.o_proj": { + "quant_algo": "FP8_PB_WO", + "group_size": 128 + }, + "model.layers.3.self_attn.q_a_proj": { + "quant_algo": "NVFP4", + "group_size": 16 + }, + "model.layers.3.self_attn.q_b_proj": { + "quant_algo": "FP8" + } + } + } +} diff --git a/raw/candidates/modelopt-mixed/model/cpu-comparison-receipt.json b/raw/candidates/modelopt-mixed/model/cpu-comparison-receipt.json new file mode 100644 index 0000000000000000000000000000000000000000..f0585d9ad8ac65ceca940a79603f522a1f534f5c --- /dev/null +++ b/raw/candidates/modelopt-mixed/model/cpu-comparison-receipt.json @@ -0,0 +1,458 @@ +{ + "candidate": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "dataset_id": "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "dataset_sha256": "c3ff6c32dc57502825d3ca3ac2133ed6a4c31e7bc7602191d595ee044ebe9048", + "form": "hidden", + "head": { + "bits": 16, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510" + }, + "label": "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d", + "lane": "other", + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "repository": "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "revision": null, + "role": "root", + "scope_digest": "attn.o=native:bf16@16|attn.qkv=native:bf16@16|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=native:bf16@16|mlp.gate=native:bf16@16|mlp.up=native:bf16@16|moe.experts=native:bf16@16|norm=native:bf16@16|head=native|kv=bf16", + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd", + "weights": { + "artifact_ref": null, + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "codec": null, + "config_sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "declared_bits": null, + "declared_head_bits": 16, + "index_sha256": null, + "model_ref": null, + "model_revision": "45563636ef723acfb826755493447dc40c7a0c37", + "quantized": false, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37" + } + }, + "comparability": { + "bias": null, + "class": "strict", + "key": null, + "key_inputs": null, + "same_lane": true, + "usable_as_floor": true + }, + "comparator": { + "accumulation_dtype": "float64", + "bf16_reduced_precision_reduction": false, + "cublas_workspace_config": null, + "deterministic_algorithms": true, + "device": "cpu", + "estimator_backend": "torch:k6_kld_report._token_kld", + "head_applied_candidate_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "head_applied_reference_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "head_applied_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "logprob_dtype": "float64", + "position_block": 128, + "replay_backend": "numpy:cpu:float32", + "replay_env": { + "blas_configuration": "OpenBLAS 0.3.34.106.0 USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell MAX_THREADS=64", + "blas_name": "scipy-openblas", + "blas_threads": 2, + "blas_threads_source": "ctypes:scipy_openblas_get_num_threads64_", + "blas_version": "0.3.34.106.0", + "cpu_model": "Intel(R) Xeon(R) CPU X5570 @ 2.93GHz", + "library": "numpy", + "numpy_version": "2.5.3", + "replay_dtype": "float32" + }, + "replay_peak_device_bytes": null, + "short_circuited": true, + "source_file_hashes_verified": true, + "tensor_content_digests_verified": true, + "tf32": false, + "tool": { + "entrypoint": "bin/fidelity-dataset compare", + "note": "the fp64 estimator is k6_kld_report._token_kld, imported not copied, whenever torch is importable; estimator_backend records which path ran." + }, + "two_pass": true, + "vocab_chunk": 8192 + }, + "comparison_kind": "reproduction_confirmation", + "context_depth_buckets": null, + "created_utc": "2026-09-07T12:39:47Z", + "determinism": { + "cold_start_per_run": null, + "distinct_evidence_hash_count": 1, + "evidence_hashes": [ + "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39" + ], + "evidence_kind": "hidden_state_tensor_sha256", + "identical_across_runs": null, + "max_run_mean": 0.0, + "min_run_mean": 0.0, + "note": "one comparison of two sealed captures. identical_across_runs is null, not true: that claim needs two independently produced captures of the SAME weights (SC-2), which is a different receipt.", + "population_stddev_of_run_means": 0.0, + "run_count": 1, + "run_means": [ + 0.0 + ] + }, + "disclosures": [ + { + "affects_comparability": false, + "code": "shared_reference_head", + "detail": "HEAD-1a: both captures declare the same lm_head tensor content digest (2364995d4009); one head applied to both sides is a shared APPLICATION of identical WEIGHTS.", + "severity": "info" + } + ], + "estimator": { + "accumulation_dtype": "float64", + "head_policy": "shared_reference_head", + "hidden_dtype": "bf16", + "logits_dtype": "float32", + "softmax_note": "full vocabulary, torch.log_softmax in float64; no truncation, no top-k, no clamp. A non-finite intermediate is a hard refusal.", + "stack_relation": "same_stack", + "two_pass": true, + "vocab_chunk": 8192, + "zero_handling": "exact zero asserted, not rounded" + }, + "format_version": 1, + "gates": { + "coverage": { + "detail": "4 of 4/4 declared records shared", + "overridden_by": null, + "passed": true + }, + "decode": { + "detail": "self-compare: both sides are the same artifact; the weights-decode caveats apply to a measurement against a reference, not to SC-1", + "overridden_by": null, + "passed": true + }, + "form": { + "detail": "hidden vs hidden", + "overridden_by": null, + "passed": true + }, + "geometry": { + "detail": "vocab_size 260 equal; hidden_width 64", + "overridden_by": null, + "passed": true + }, + "head": { + "detail": "HEAD-1a: identical head content digest on both sides", + "overridden_by": null, + "passed": true + }, + "lane": { + "detail": "lane=other vs other", + "overridden_by": null, + "passed": true + }, + "lossy": { + "detail": "lossy_codec null on both sides", + "overridden_by": null, + "passed": true + }, + "panel": { + "detail": "suite_token_hash_sha256 equal; 4 shared records; per-record token and mask digests equal; scoring_window equal", + "overridden_by": null, + "passed": true + }, + "seal": { + "detail": "both manifests self-seal and checksums.txt verified; every tensor_content_sha256 recomputed", + "overridden_by": null, + "passed": true + }, + "stack": { + "detail": "lane_identity equal / stack_fingerprint equal -> same_stack", + "overridden_by": null, + "passed": true + } + }, + "high_kld_contexts": [ + { + "allocation_stratum": null, + "domain": "garden", + "index": 0, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0000" + }, + { + "allocation_stratum": null, + "domain": "arithmetic", + "index": 1, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0001" + }, + { + "allocation_stratum": null, + "domain": "code", + "index": 2, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0002" + }, + { + "allocation_stratum": null, + "domain": "instructions", + "index": 3, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0003" + } + ], + "kl": { + "max": 0.0, + "mean": 0.0, + "median": 0.0, + "p95": 0.0, + "p99": 0.0, + "p99_9": 0.0 + }, + "kl_macro_stratum_mean": null, + "kl_micro_token_mean": 0.0, + "measurement_scope": { + "contexts": 4, + "covers_full_panel": true, + "position_filter": "all", + "positions_per_context": 63, + "scored_positions": 252, + "subset_detail": null + }, + "metric": { + "direction": "reference_to_candidate", + "direction_label": "KL(reference || candidate)", + "higher_is_better": false, + "name": "mean_tokenwise_kld", + "units": "nats", + "value": 0.0 + }, + "panel": { + "context_length": 64, + "contexts": 4, + "panel_id": "panel--panel", + "panel_token_sha256_legacy": "3c9467c85be43d238926f6d18bf825c2e4748814c95b8b0e8b8f1420546c3089", + "scored_positions": 252, + "scoring_window": { + "dropped_positions_total": 0, + "min_left_context_tokens": 1, + "policy": "every causal prediction position of every window is scored; nothing is dropped", + "score_from": 0, + "windowed": false + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + }, + "tokenizer_candidate": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + }, + "tokenizer_identity_equal": true, + "tokenizer_reference": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } + }, + "per_context": [ + { + "allocation_stratum": null, + "domain": "garden", + "index": 0, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0000" + }, + { + "allocation_stratum": null, + "domain": "arithmetic", + "index": 1, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0001" + }, + { + "allocation_stratum": null, + "domain": "code", + "index": 2, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0002" + }, + { + "allocation_stratum": null, + "domain": "instructions", + "index": 3, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0003" + } + ], + "per_domain": null, + "per_stratum": null, + "receipt_sha256": "4910833e5cc175ea351055e567c5d896475b4020598359291aedc958d8ada382", + "reference": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "dataset_id": "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "dataset_sha256": "56588f20f9cf055301f83a828fa75fa94c1e26593e64a07c5c6c4e38e9454563", + "form": "hidden", + "head": { + "bits": 16, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510" + }, + "label": "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "lane": "other", + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "repository": "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "revision": null, + "role": "root", + "scope_digest": "attn.o=native:bf16@16|attn.qkv=native:bf16@16|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=native:bf16@16|mlp.gate=native:bf16@16|mlp.up=native:bf16@16|moe.experts=native:bf16@16|norm=native:bf16@16|head=native|kv=bf16", + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd", + "weights": { + "artifact_ref": null, + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "codec": null, + "config_sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "declared_bits": null, + "declared_head_bits": 16, + "index_sha256": null, + "model_ref": null, + "model_revision": "45563636ef723acfb826755493447dc40c7a0c37", + "quantized": false, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37" + } + }, + "schema": "malaiwah.fidelity-comparison-receipt.v1", + "self_compare": { + "asserted_exact_zero": true, + "capture_content_digest_equal": true, + "expected_tokenwise_bytes": 2144, + "expected_tokenwise_sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d", + "force_compute_agreed": true, + "head_digest_equal": true, + "weights_identity_equal": true + }, + "submission": { + "emitted": false, + "path": null, + "receipt_sha256": null, + "refusal": "comparison_kind is reproduction_confirmation, not measurement; bin/fidelity/receipt.py::_scan_for_unsubmittable is the second, independent refusal axis.", + "submission_schema": null + }, + "tokenwise": { + "bytes": 2144, + "path": "tokenwise-kld.npy", + "sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d" + }, + "top1_agreement": 1.0, + "top1_discordant_contexts": [], + "uncertainty": { + "ci95_high": null, + "ci95_low": null, + "cluster_unit": null, + "clusters": null, + "method": "none", + "samples": null, + "seed": null + } +} diff --git a/raw/candidates/modelopt-mixed/model/cpu-reproduction-summary.json b/raw/candidates/modelopt-mixed/model/cpu-reproduction-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..7fe4e433fbfabcad4ab3781b796fbd3439d5db17 --- /dev/null +++ b/raw/candidates/modelopt-mixed/model/cpu-reproduction-summary.json @@ -0,0 +1,851 @@ +{ + "captures": { + "first": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "cold_run": "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "dataset_sha256": "56588f20f9cf055301f83a828fa75fa94c1e26593e64a07c5c6c4e38e9454563", + "generation_sanity_probe": { + "degenerate": false, + "enforced": false, + "entropy_nats": 5.548019647470335, + "expect": null, + "logit_spread": 0.986328125, + "note": "one extra window through the same schedule; its hidden state is discarded and never enters the dataset.", + "prompt": "The capital of France is", + "schema": "malaiwah.generation-sanity-probe.v1", + "status": "recorded", + "top1_id": 113, + "top1_probability": 0.006720104384265371, + "top1_text": "�", + "top_k": [ + { + "id": 113, + "probability": 0.006720104384265371, + "text": "�" + }, + { + "id": 237, + "probability": 0.006412368399474785, + "text": "�" + }, + { + "id": 193, + "probability": 0.006035639491843906, + "text": "\u0001" + }, + { + "id": 236, + "probability": 0.0055386141320063614, + "text": "�" + }, + { + "id": 44, + "probability": 0.0054740873228682424, + "text": "I" + } + ], + "uniform_entropy_nats": 5.560681631015528, + "vocab_size": 260 + }, + "head_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "memory_report": { + "context_length": 64, + "decoder_layers": null, + "device": "cpu", + "hidden_size": 64, + "layer_residency": null, + "model": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "peak_resident_weight_bytes": 555776, + "peak_resident_weight_detail": { + "buffers": 128, + "parameters": 555648, + "total": 555776 + }, + "peak_resident_weight_gb": 0.001, + "peak_rss_bytes": 367374336, + "peak_rss_gb": 0.367, + "resident_weight_note": "the maximum, over the run, of the materialised parameter+buffer bytes. On the CPU path peak_rss_bytes ALSO counts the safetensors mmap page cache, which is evictable and is not held by the schedule; this figure is not confounded by it. On CUDA, peak_cuda_allocated_bytes is the authoritative number because it includes activations and workspace and has no page cache.", + "rss_units_source": "Linux ru_maxrss", + "schedule": "window-outer", + "vocab_size": 260, + "windows": 4 + }, + "path": "first", + "pid": 406991, + "resources": { + "bytes": { + "checkpoint_read": 572479, + "hidden_d2h": 36616, + "weights_h2d": null + }, + "checkpoint_bytes": 572479, + "checkpoint_files": 2, + "device_name": null, + "forward_timing": "wall-clock", + "note": "provenance, not identity: peaks and stage seconds this run measured; forward_sum is device time under cuda-events, wall time otherwise; seal covers head serialisation up to this block's assembly", + "peak_cuda_allocated_bytes": null, + "peak_cuda_reserved_bytes": null, + "peak_resident_weight_bytes": 555776, + "peak_rss_bytes": 367374336, + "rss_units_source": "Linux ru_maxrss", + "seconds": { + "decode_sum": null, + "elapsed": 2.448, + "fill_sum": null, + "forward_sum": 0.126, + "identity": 0.005, + "layer_load_max": null, + "layer_load_sum": null, + "layer_loads": null, + "resident_load": 2.283, + "seal": 0.007 + } + }, + "runtime_versions": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 406991, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd" + }, + "repeat": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "cold_run": "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d", + "dataset_sha256": "c3ff6c32dc57502825d3ca3ac2133ed6a4c31e7bc7602191d595ee044ebe9048", + "generation_sanity_probe": { + "degenerate": false, + "enforced": false, + "entropy_nats": 5.548019647470335, + "expect": null, + "logit_spread": 0.986328125, + "note": "one extra window through the same schedule; its hidden state is discarded and never enters the dataset.", + "prompt": "The capital of France is", + "schema": "malaiwah.generation-sanity-probe.v1", + "status": "recorded", + "top1_id": 113, + "top1_probability": 0.006720104384265371, + "top1_text": "�", + "top_k": [ + { + "id": 113, + "probability": 0.006720104384265371, + "text": "�" + }, + { + "id": 237, + "probability": 0.006412368399474785, + "text": "�" + }, + { + "id": 193, + "probability": 0.006035639491843906, + "text": "\u0001" + }, + { + "id": 236, + "probability": 0.0055386141320063614, + "text": "�" + }, + { + "id": 44, + "probability": 0.0054740873228682424, + "text": "I" + } + ], + "uniform_entropy_nats": 5.560681631015528, + "vocab_size": 260 + }, + "head_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "memory_report": { + "context_length": 64, + "decoder_layers": null, + "device": "cpu", + "hidden_size": 64, + "layer_residency": null, + "model": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "peak_resident_weight_bytes": 555776, + "peak_resident_weight_detail": { + "buffers": 128, + "parameters": 555648, + "total": 555776 + }, + "peak_resident_weight_gb": 0.001, + "peak_rss_bytes": 367198208, + "peak_rss_gb": 0.367, + "resident_weight_note": "the maximum, over the run, of the materialised parameter+buffer bytes. On the CPU path peak_rss_bytes ALSO counts the safetensors mmap page cache, which is evictable and is not held by the schedule; this figure is not confounded by it. On CUDA, peak_cuda_allocated_bytes is the authoritative number because it includes activations and workspace and has no page cache.", + "rss_units_source": "Linux ru_maxrss", + "schedule": "window-outer", + "vocab_size": 260, + "windows": 4 + }, + "path": "repeat", + "pid": 409089, + "resources": { + "bytes": { + "checkpoint_read": 572479, + "hidden_d2h": 36616, + "weights_h2d": null + }, + "checkpoint_bytes": 572479, + "checkpoint_files": 2, + "device_name": null, + "forward_timing": "wall-clock", + "note": "provenance, not identity: peaks and stage seconds this run measured; forward_sum is device time under cuda-events, wall time otherwise; seal covers head serialisation up to this block's assembly", + "peak_cuda_allocated_bytes": null, + "peak_cuda_reserved_bytes": null, + "peak_resident_weight_bytes": 555776, + "peak_rss_bytes": 367198208, + "rss_units_source": "Linux ru_maxrss", + "seconds": { + "decode_sum": null, + "elapsed": 2.619, + "fill_sum": null, + "forward_sum": 0.128, + "identity": 0.004, + "layer_load_max": null, + "layer_load_sum": null, + "layer_loads": null, + "resident_load": 2.453, + "seal": 0.005 + } + }, + "runtime_versions": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 409089, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd" + } + }, + "commands": [ + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--model", + "/tmp/qfs-complete-tiny-fixture/model", + "--weights-repository", + "malaiwah/glm-moe-dsa-tiny-random-bf16", + "--model-revision", + "45563636ef723acfb826755493447dc40c7a0c37", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-complete-tiny-fixture/reproduction/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--role", + "root", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--schedule", + "window-outer", + "--dataset-id", + "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "--dataset-name", + "GLM MoE DSA tiny random CPU root", + "--repository", + "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "--author", + "malaiwah", + "--disclosures", + "[{\"code\":\"random_init_cpu_fixture\",\"severity\":\"info\",\"affects_comparability\":false,\"detail\":\"Complete randomly initialized tiny glm_moe_dsa checkpoint; CPU smoke fixture only, not trained quality evidence or a registry measurement. Lane other denotes CPU, not local-cuda-budget.\"}]", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--run-name", + "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "--cold-run", + "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "--memory-report", + "/tmp/qfs-complete-tiny-fixture/reproduction/first.memory.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 6.485651439987123, + "name": "capture-first", + "pid": 406991, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 406991, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "capture-first.stderr.log", + "stdout": "capture-first.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "verify", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/first.verify.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.575829998124391, + "name": "verify-first", + "pid": 408026, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 408026, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "verify-first.stderr.log", + "stdout": "verify-first.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "validate", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--strict", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/first.strict.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.8252810118719935, + "name": "strict-first", + "pid": 408494, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 408494, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "strict-first.stderr.log", + "stdout": "strict-first.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--model", + "/tmp/qfs-complete-tiny-fixture/model", + "--weights-repository", + "malaiwah/glm-moe-dsa-tiny-random-bf16", + "--model-revision", + "45563636ef723acfb826755493447dc40c7a0c37", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-complete-tiny-fixture/reproduction/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--role", + "root", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--schedule", + "window-outer", + "--dataset-id", + "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "--dataset-name", + "GLM MoE DSA tiny random CPU root", + "--repository", + "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "--author", + "malaiwah", + "--disclosures", + "[{\"code\":\"random_init_cpu_fixture\",\"severity\":\"info\",\"affects_comparability\":false,\"detail\":\"Complete randomly initialized tiny glm_moe_dsa checkpoint; CPU smoke fixture only, not trained quality evidence or a registry measurement. Lane other denotes CPU, not local-cuda-budget.\"}]", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--run-name", + "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d", + "--cold-run", + "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d", + "--memory-report", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat.memory.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 6.431767418049276, + "name": "capture-repeat", + "pid": 409089, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 409089, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "capture-repeat.stderr.log", + "stdout": "capture-repeat.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "verify", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat.verify.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.7754629959817976, + "name": "verify-repeat", + "pid": 409951, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 409951, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "verify-repeat.stderr.log", + "stdout": "verify-repeat.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "validate", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--strict", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat.strict.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.423026765929535, + "name": "strict-repeat", + "pid": 410549, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 410549, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "strict-repeat.stderr.log", + "stdout": "strict-repeat.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "compare", + "--reference", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--candidate", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction/comparison", + "--self-compare", + "--force-compute", + "--device", + "cpu", + "--replay-device", + "numpy", + "--replay-dtype", + "float32", + "--vocab-chunk", + "8192", + "--chunk-positions", + "128", + "--verify-tensors", + "--reference-label", + "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "--candidate-label", + "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.7282893639057875, + "name": "compare", + "pid": 411043, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 411043, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "compare.stderr.log", + "stdout": "compare.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "validate", + "--receipt", + "/tmp/qfs-complete-tiny-fixture/reproduction/comparison/comparison-receipt.json", + "--strict", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/comparison.validate.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.424050308065489, + "name": "validate-comparison", + "pid": 411487, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 411487, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "validate-comparison.stderr.log", + "stdout": "validate-comparison.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + } + ], + "comparison": { + "comparator": { + "accumulation_dtype": "float64", + "bf16_reduced_precision_reduction": false, + "cublas_workspace_config": null, + "deterministic_algorithms": true, + "device": "cpu", + "estimator_backend": "torch:k6_kld_report._token_kld", + "head_applied_candidate_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "head_applied_reference_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "head_applied_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "logprob_dtype": "float64", + "position_block": 128, + "replay_backend": "numpy:cpu:float32", + "replay_env": { + "blas_configuration": "OpenBLAS 0.3.34.106.0 USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell MAX_THREADS=64", + "blas_name": "scipy-openblas", + "blas_threads": 2, + "blas_threads_source": "ctypes:scipy_openblas_get_num_threads64_", + "blas_version": "0.3.34.106.0", + "cpu_model": "Intel(R) Xeon(R) CPU X5570 @ 2.93GHz", + "library": "numpy", + "numpy_version": "2.5.3", + "replay_dtype": "float32" + }, + "replay_peak_device_bytes": null, + "short_circuited": true, + "source_file_hashes_verified": true, + "tensor_content_digests_verified": true, + "tf32": false, + "tool": { + "entrypoint": "bin/fidelity-dataset compare", + "note": "the fp64 estimator is k6_kld_report._token_kld, imported not copied, whenever torch is importable; estimator_backend records which path ran." + }, + "two_pass": true, + "vocab_chunk": 8192 + }, + "comparison_kind": "reproduction_confirmation", + "kl": { + "max": 0.0, + "mean": 0.0, + "median": 0.0, + "p95": 0.0, + "p99": 0.0, + "p99_9": 0.0 + }, + "measurement_scope": { + "contexts": 4, + "covers_full_panel": true, + "position_filter": "all", + "positions_per_context": 63, + "scored_positions": 252, + "subset_detail": null + }, + "metric": { + "direction": "reference_to_candidate", + "direction_label": "KL(reference || candidate)", + "higher_is_better": false, + "name": "mean_tokenwise_kld", + "units": "nats", + "value": 0.0 + }, + "note": "QFS retains its hash-proof result and top-1 value for reproduction confirmations; --force-compute independently runs the estimator and requires its tokenwise KL array to agree exactly. short_circuited=true therefore does not mean replay was skipped.", + "receipt": "comparison/comparison-receipt.json", + "receipt_sha256": "4910833e5cc175ea351055e567c5d896475b4020598359291aedc958d8ada382", + "self_compare": { + "asserted_exact_zero": true, + "capture_content_digest_equal": true, + "expected_tokenwise_bytes": 2144, + "expected_tokenwise_sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d", + "force_compute_agreed": true, + "head_digest_equal": true, + "weights_identity_equal": true + }, + "tokenwise": { + "bytes": 2144, + "path": "tokenwise-kld.npy", + "sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d" + }, + "top1_agreement": 1.0 + }, + "cpu_threads": 2, + "dataset_id": "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "dataset_repository": "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "device": "cpu", + "driver_argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "/tmp/qfs-complete-tiny-fixture/verify_cpu.py", + "--model-dir", + "/tmp/qfs-complete-tiny-fixture/model", + "--model-repository", + "malaiwah/glm-moe-dsa-tiny-random-bf16", + "--model-revision", + "45563636ef723acfb826755493447dc40c7a0c37", + "--panel-dir", + "/tmp/qfs-complete-tiny-fixture/panel", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction", + "--qfs-root", + "/tmp/qfs-explorer-development" + ], + "driver_sha256": "2e507993f0085a72d5236527942a7143fd036d56b82223b26e90889de5cd9f98", + "dtype": "bfloat16", + "elapsed_seconds": 34.85638747992925, + "lane": "other", + "lane_description": "local CPU random-init fixture", + "model_repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "model_revision": "45563636ef723acfb826755493447dc40c7a0c37", + "panel_binding": "panel-binding.json", + "panel_binding_sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "provenance_note": "Local QFS source bytes are hashed; no source commit is asserted. The caller supplies an immutable model pin; QFS hashes the local checkpoint. This script does not independently prove Hub-to-local weight equality.", + "qfs_source_files": { + "bin/fidelity/dscompare.py": "4a53f735e1e3fb8bd739854451b57f34e8369bffa9fd4f7b7fd935fb2e7d52df", + "bin/fidelity/dsvalidate.py": "a9d6cd57e801e3ef044a37635e24518c83dbc6d1ec8a4c0b4b5d1b24483ca8d1", + "bin/fidelity/panel.py": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "bin/fidelity_dataset.py": "ac62b63bbfde67e4d5cacecf9cd417193c50f417a6749cc15ee6f1610c153a4e", + "engines/tools/hf_capture.py": "200ba12ca74fb97531307965cbbaa5c10553a5c26e008e524ea2d8aecb005b95" + }, + "schema": "malaiwah.glm-moe-dsa-tiny-cpu-reproduction.v1", + "scope": "Random-init CPU reproduction only; no quality claim or registry submission.", + "status": "passed" +} diff --git a/raw/candidates/modelopt-mixed/model/generation_config.json b/raw/candidates/modelopt-mixed/model/generation_config.json new file mode 100644 index 0000000000000000000000000000000000000000..59bd0680606c94f6570a92e60fa4acd2e2170f70 --- /dev/null +++ b/raw/candidates/modelopt-mixed/model/generation_config.json @@ -0,0 +1,10 @@ +{ + "_from_model_config": true, + "bos_token_id": 1, + "eos_token_id": 2, + "output_attentions": false, + "output_hidden_states": false, + "pad_token_id": 0, + "transformers_version": "5.16.1", + "use_cache": true +} diff --git a/raw/candidates/modelopt-mixed/model/hub-checkpoint-verification.json b/raw/candidates/modelopt-mixed/model/hub-checkpoint-verification.json new file mode 100644 index 0000000000000000000000000000000000000000..b9648c8ae18de0fb86ce18398175c6686afbd7b2 --- /dev/null +++ b/raw/candidates/modelopt-mixed/model/hub-checkpoint-verification.json @@ -0,0 +1,32 @@ +{ + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "downloaded_from_hub": true, + "files": { + "config.json": { + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "bytes": 1479, + "matches_build": true + }, + "generation_config.json": { + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "bytes": 216, + "matches_build": true + }, + "model.safetensors": { + "sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1", + "bytes": 571000, + "matches_build": true + }, + "tokenizer.json": { + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "bytes": 6763, + "matches_build": true + }, + "tokenizer_config.json": { + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63", + "bytes": 236, + "matches_build": true + } + } +} diff --git a/raw/candidates/modelopt-mixed/model/loader-verification.json b/raw/candidates/modelopt-mixed/model/loader-verification.json new file mode 100644 index 0000000000000000000000000000000000000000..871fc889a9d3a025569770a96e83ff5f0a2fb420 --- /dev/null +++ b/raw/candidates/modelopt-mixed/model/loader-verification.json @@ -0,0 +1,60 @@ +{ + "schema": "malaiwah.tiny-fixture-loader-check.v1", + "checkpoint_sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1", + "runtime": { + "torch": "2.11.0+cpu", + "transformers": "5.16.1", + "device": "cpu", + "threads": 2 + }, + "qfs_load_report": { + "observed": true, + "conversion_errors_visible": true, + "missing_keys": [], + "unexpected_keys": [], + "mismatched_keys": [], + "error_msgs": [], + "conversion_errors": {} + }, + "native_save_reload_tensor_equality": true, + "independent_build_files_byte_equal": true, + "tokenizer_roundtrip_examples": [ + "The CPU fixture carries a complete output head and real sparse attention.", + "Small deterministic tensors make a repeatable pipeline experiment.", + "Unicode roundtrip: caf\u00e9, snow \u96ea, punctuation!", + "The same bytes must survive saving and loading without repair." + ], + "forward_shape": [ + 4, + 64, + 260 + ], + "forward_all_finite": true, + "forward_logit_std": 0.16186420619487762, + "load_seconds": 2.1670503590721637, + "batch_forward_seconds": 0.05775680090300739, + "greedy_generation_seconds": 0.04374621692113578, + "generated_token_ids": [ + 1, + 55, + 75, + 72, + 224, + 38, + 51, + 56, + 224, + 73, + 76, + 91, + 87, + 88, + 85, + 72, + 171, + 105, + 156, + 236 + ], + "peak_process_rss_mib": 351.9296875 +} diff --git a/raw/candidates/modelopt-mixed/model/model.safetensors b/raw/candidates/modelopt-mixed/model/model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..34bc885ab14aebc030bea908a6c7b0049293e409 --- /dev/null +++ b/raw/candidates/modelopt-mixed/model/model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9a5c06dffc5c8c08aa0cb0109c87274d044d8297db132405828d914762370199 +size 310622 diff --git a/raw/candidates/modelopt-mixed/model/model.safetensors.index.json b/raw/candidates/modelopt-mixed/model/model.safetensors.index.json new file mode 100644 index 0000000000000000000000000000000000000000..5486bba2aa8efecc6ce49f9103428a056b994e14 --- /dev/null +++ b/raw/candidates/modelopt-mixed/model/model.safetensors.index.json @@ -0,0 +1,293 @@ +{ + "metadata": { + "total_size": 278582 + }, + "weight_map": { + "model.layers.1.mlp.gate.e_score_correction_bias": "model.safetensors", + "model.layers.2.mlp.gate.e_score_correction_bias": "model.safetensors", + "model.layers.3.mlp.gate.e_score_correction_bias": "model.safetensors", + "lm_head.weight": "model.safetensors", + "model.embed_tokens.weight": "model.safetensors", + "model.layers.0.input_layernorm.weight": "model.safetensors", + "model.layers.0.mlp.down_proj.weight": "model.safetensors", + "model.layers.0.mlp.down_proj.weight_scale": "model.safetensors", + "model.layers.0.mlp.down_proj.weight_scale_2": "model.safetensors", + "model.layers.0.mlp.gate_proj.weight": "model.safetensors", + "model.layers.0.mlp.gate_proj.weight_scale": "model.safetensors", + "model.layers.0.mlp.up_proj.weight": "model.safetensors", + "model.layers.0.mlp.up_proj.weight_scale_inv": "model.safetensors", + "model.layers.0.post_attention_layernorm.weight": "model.safetensors", + "model.layers.0.self_attn.indexer.k_norm.bias": "model.safetensors", + "model.layers.0.self_attn.indexer.k_norm.weight": "model.safetensors", + "model.layers.0.self_attn.indexer.weights_proj.weight": "model.safetensors", + "model.layers.0.self_attn.indexer.weights_proj.weight_scale": "model.safetensors", + "model.layers.0.self_attn.indexer.weights_proj.weight_scale_2": "model.safetensors", + "model.layers.0.self_attn.indexer.wk.weight": "model.safetensors", + "model.layers.0.self_attn.indexer.wk.weight_scale": "model.safetensors", + "model.layers.0.self_attn.indexer.wq_b.weight": "model.safetensors", + "model.layers.0.self_attn.indexer.wq_b.weight_scale_inv": "model.safetensors", + "model.layers.0.self_attn.kv_a_layernorm.weight": "model.safetensors", + "model.layers.0.self_attn.kv_a_proj_with_mqa.weight": "model.safetensors", + "model.layers.0.self_attn.kv_a_proj_with_mqa.weight_scale": "model.safetensors", + "model.layers.0.self_attn.kv_a_proj_with_mqa.weight_scale_2": "model.safetensors", + "model.layers.0.self_attn.kv_b_proj.weight": "model.safetensors", + "model.layers.0.self_attn.kv_b_proj.weight_scale": "model.safetensors", + "model.layers.0.self_attn.o_proj.weight": "model.safetensors", + "model.layers.0.self_attn.o_proj.weight_scale_inv": "model.safetensors", + "model.layers.0.self_attn.q_a_layernorm.weight": "model.safetensors", + "model.layers.0.self_attn.q_a_proj.weight": "model.safetensors", + "model.layers.0.self_attn.q_a_proj.weight_scale": "model.safetensors", + "model.layers.0.self_attn.q_a_proj.weight_scale_2": "model.safetensors", + "model.layers.0.self_attn.q_b_proj.weight": "model.safetensors", + "model.layers.0.self_attn.q_b_proj.weight_scale": "model.safetensors", + "model.layers.1.input_layernorm.weight": "model.safetensors", + "model.layers.1.mlp.experts.0.down_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.0.down_proj.weight_scale_inv": "model.safetensors", + "model.layers.1.mlp.experts.0.gate_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.0.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.0.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.1.mlp.experts.0.up_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.0.up_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.1.down_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.1.down_proj.weight_scale_inv": "model.safetensors", + "model.layers.1.mlp.experts.1.gate_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.1.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.1.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.1.mlp.experts.1.up_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.1.up_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.2.down_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.2.down_proj.weight_scale_inv": "model.safetensors", + "model.layers.1.mlp.experts.2.gate_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.2.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.2.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.1.mlp.experts.2.up_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.2.up_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.3.down_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.3.down_proj.weight_scale_inv": "model.safetensors", + "model.layers.1.mlp.experts.3.gate_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.3.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.3.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.1.mlp.experts.3.up_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.3.up_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.4.down_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.4.down_proj.weight_scale_inv": "model.safetensors", + "model.layers.1.mlp.experts.4.gate_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.4.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.4.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.1.mlp.experts.4.up_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.4.up_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.5.down_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.5.down_proj.weight_scale_inv": "model.safetensors", + "model.layers.1.mlp.experts.5.gate_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.5.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.5.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.1.mlp.experts.5.up_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.5.up_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.6.down_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.6.down_proj.weight_scale_inv": "model.safetensors", + "model.layers.1.mlp.experts.6.gate_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.6.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.6.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.1.mlp.experts.6.up_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.6.up_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.7.down_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.7.down_proj.weight_scale_inv": "model.safetensors", + "model.layers.1.mlp.experts.7.gate_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.7.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.7.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.1.mlp.experts.7.up_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.7.up_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.gate.weight": "model.safetensors", + "model.layers.1.mlp.shared_experts.down_proj.weight": "model.safetensors", + "model.layers.1.mlp.shared_experts.down_proj.weight_scale_inv": "model.safetensors", + "model.layers.1.mlp.shared_experts.gate_proj.weight": "model.safetensors", + "model.layers.1.mlp.shared_experts.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.shared_experts.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.1.mlp.shared_experts.up_proj.weight": "model.safetensors", + "model.layers.1.mlp.shared_experts.up_proj.weight_scale": "model.safetensors", + "model.layers.1.post_attention_layernorm.weight": "model.safetensors", + "model.layers.1.self_attn.kv_a_layernorm.weight": "model.safetensors", + "model.layers.1.self_attn.kv_a_proj_with_mqa.weight": "model.safetensors", + "model.layers.1.self_attn.kv_a_proj_with_mqa.weight_scale_inv": "model.safetensors", + "model.layers.1.self_attn.kv_b_proj.weight": "model.safetensors", + "model.layers.1.self_attn.kv_b_proj.weight_scale": "model.safetensors", + "model.layers.1.self_attn.kv_b_proj.weight_scale_2": "model.safetensors", + "model.layers.1.self_attn.o_proj.weight": "model.safetensors", + "model.layers.1.self_attn.o_proj.weight_scale": "model.safetensors", + "model.layers.1.self_attn.q_a_layernorm.weight": "model.safetensors", + "model.layers.1.self_attn.q_a_proj.weight": "model.safetensors", + "model.layers.1.self_attn.q_a_proj.weight_scale_inv": "model.safetensors", + "model.layers.1.self_attn.q_b_proj.weight": "model.safetensors", + "model.layers.1.self_attn.q_b_proj.weight_scale": "model.safetensors", + "model.layers.1.self_attn.q_b_proj.weight_scale_2": "model.safetensors", + "model.layers.2.input_layernorm.weight": "model.safetensors", + "model.layers.2.mlp.experts.0.down_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.0.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.0.gate_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.0.gate_proj.weight_scale_inv": "model.safetensors", + "model.layers.2.mlp.experts.0.up_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.0.up_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.0.up_proj.weight_scale_2": "model.safetensors", + "model.layers.2.mlp.experts.1.down_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.1.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.1.gate_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.1.gate_proj.weight_scale_inv": "model.safetensors", + "model.layers.2.mlp.experts.1.up_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.1.up_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.1.up_proj.weight_scale_2": "model.safetensors", + "model.layers.2.mlp.experts.2.down_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.2.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.2.gate_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.2.gate_proj.weight_scale_inv": "model.safetensors", + "model.layers.2.mlp.experts.2.up_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.2.up_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.2.up_proj.weight_scale_2": "model.safetensors", + "model.layers.2.mlp.experts.3.down_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.3.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.3.gate_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.3.gate_proj.weight_scale_inv": "model.safetensors", + "model.layers.2.mlp.experts.3.up_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.3.up_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.3.up_proj.weight_scale_2": "model.safetensors", + "model.layers.2.mlp.experts.4.down_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.4.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.4.gate_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.4.gate_proj.weight_scale_inv": "model.safetensors", + "model.layers.2.mlp.experts.4.up_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.4.up_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.4.up_proj.weight_scale_2": "model.safetensors", + "model.layers.2.mlp.experts.5.down_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.5.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.5.gate_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.5.gate_proj.weight_scale_inv": "model.safetensors", + "model.layers.2.mlp.experts.5.up_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.5.up_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.5.up_proj.weight_scale_2": "model.safetensors", + "model.layers.2.mlp.experts.6.down_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.6.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.6.gate_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.6.gate_proj.weight_scale_inv": "model.safetensors", + "model.layers.2.mlp.experts.6.up_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.6.up_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.6.up_proj.weight_scale_2": "model.safetensors", + "model.layers.2.mlp.experts.7.down_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.7.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.7.gate_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.7.gate_proj.weight_scale_inv": "model.safetensors", + "model.layers.2.mlp.experts.7.up_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.7.up_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.7.up_proj.weight_scale_2": "model.safetensors", + "model.layers.2.mlp.gate.weight": "model.safetensors", + "model.layers.2.mlp.shared_experts.down_proj.weight": "model.safetensors", + "model.layers.2.mlp.shared_experts.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.shared_experts.gate_proj.weight": "model.safetensors", + "model.layers.2.mlp.shared_experts.gate_proj.weight_scale_inv": "model.safetensors", + "model.layers.2.mlp.shared_experts.up_proj.weight": "model.safetensors", + "model.layers.2.mlp.shared_experts.up_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.shared_experts.up_proj.weight_scale_2": "model.safetensors", + "model.layers.2.post_attention_layernorm.weight": "model.safetensors", + "model.layers.2.self_attn.indexer.k_norm.bias": "model.safetensors", + "model.layers.2.self_attn.indexer.k_norm.weight": "model.safetensors", + "model.layers.2.self_attn.indexer.weights_proj.weight": "model.safetensors", + "model.layers.2.self_attn.indexer.weights_proj.weight_scale": "model.safetensors", + "model.layers.2.self_attn.indexer.wk.weight": "model.safetensors", + "model.layers.2.self_attn.indexer.wk.weight_scale_inv": "model.safetensors", + "model.layers.2.self_attn.indexer.wq_b.weight": "model.safetensors", + "model.layers.2.self_attn.indexer.wq_b.weight_scale": "model.safetensors", + "model.layers.2.self_attn.indexer.wq_b.weight_scale_2": "model.safetensors", + "model.layers.2.self_attn.kv_a_layernorm.weight": "model.safetensors", + "model.layers.2.self_attn.kv_a_proj_with_mqa.weight": "model.safetensors", + "model.layers.2.self_attn.kv_a_proj_with_mqa.weight_scale": "model.safetensors", + "model.layers.2.self_attn.kv_b_proj.weight": "model.safetensors", + "model.layers.2.self_attn.kv_b_proj.weight_scale_inv": "model.safetensors", + "model.layers.2.self_attn.o_proj.weight": "model.safetensors", + "model.layers.2.self_attn.o_proj.weight_scale": "model.safetensors", + "model.layers.2.self_attn.o_proj.weight_scale_2": "model.safetensors", + "model.layers.2.self_attn.q_a_layernorm.weight": "model.safetensors", + "model.layers.2.self_attn.q_a_proj.weight": "model.safetensors", + "model.layers.2.self_attn.q_a_proj.weight_scale": "model.safetensors", + "model.layers.2.self_attn.q_b_proj.weight": "model.safetensors", + "model.layers.2.self_attn.q_b_proj.weight_scale_inv": "model.safetensors", + "model.layers.3.input_layernorm.weight": "model.safetensors", + "model.layers.3.mlp.experts.0.down_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.0.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.0.down_proj.weight_scale_2": "model.safetensors", + "model.layers.3.mlp.experts.0.gate_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.0.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.0.up_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.0.up_proj.weight_scale_inv": "model.safetensors", + "model.layers.3.mlp.experts.1.down_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.1.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.1.down_proj.weight_scale_2": "model.safetensors", + "model.layers.3.mlp.experts.1.gate_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.1.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.1.up_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.1.up_proj.weight_scale_inv": "model.safetensors", + "model.layers.3.mlp.experts.2.down_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.2.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.2.down_proj.weight_scale_2": "model.safetensors", + "model.layers.3.mlp.experts.2.gate_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.2.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.2.up_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.2.up_proj.weight_scale_inv": "model.safetensors", + "model.layers.3.mlp.experts.3.down_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.3.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.3.down_proj.weight_scale_2": "model.safetensors", + "model.layers.3.mlp.experts.3.gate_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.3.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.3.up_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.3.up_proj.weight_scale_inv": "model.safetensors", + "model.layers.3.mlp.experts.4.down_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.4.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.4.down_proj.weight_scale_2": "model.safetensors", + "model.layers.3.mlp.experts.4.gate_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.4.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.4.up_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.4.up_proj.weight_scale_inv": "model.safetensors", + "model.layers.3.mlp.experts.5.down_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.5.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.5.down_proj.weight_scale_2": "model.safetensors", + "model.layers.3.mlp.experts.5.gate_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.5.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.5.up_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.5.up_proj.weight_scale_inv": "model.safetensors", + "model.layers.3.mlp.experts.6.down_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.6.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.6.down_proj.weight_scale_2": "model.safetensors", + "model.layers.3.mlp.experts.6.gate_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.6.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.6.up_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.6.up_proj.weight_scale_inv": "model.safetensors", + "model.layers.3.mlp.experts.7.down_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.7.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.7.down_proj.weight_scale_2": "model.safetensors", + "model.layers.3.mlp.experts.7.gate_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.7.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.7.up_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.7.up_proj.weight_scale_inv": "model.safetensors", + "model.layers.3.mlp.gate.weight": "model.safetensors", + "model.layers.3.mlp.shared_experts.down_proj.weight": "model.safetensors", + "model.layers.3.mlp.shared_experts.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.shared_experts.down_proj.weight_scale_2": "model.safetensors", + "model.layers.3.mlp.shared_experts.gate_proj.weight": "model.safetensors", + "model.layers.3.mlp.shared_experts.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.shared_experts.up_proj.weight": "model.safetensors", + "model.layers.3.mlp.shared_experts.up_proj.weight_scale_inv": "model.safetensors", + "model.layers.3.post_attention_layernorm.weight": "model.safetensors", + "model.layers.3.self_attn.kv_a_layernorm.weight": "model.safetensors", + "model.layers.3.self_attn.kv_a_proj_with_mqa.weight": "model.safetensors", + "model.layers.3.self_attn.kv_a_proj_with_mqa.weight_scale": "model.safetensors", + "model.layers.3.self_attn.kv_a_proj_with_mqa.weight_scale_2": "model.safetensors", + "model.layers.3.self_attn.kv_b_proj.weight": "model.safetensors", + "model.layers.3.self_attn.kv_b_proj.weight_scale": "model.safetensors", + "model.layers.3.self_attn.o_proj.weight": "model.safetensors", + "model.layers.3.self_attn.o_proj.weight_scale_inv": "model.safetensors", + "model.layers.3.self_attn.q_a_layernorm.weight": "model.safetensors", + "model.layers.3.self_attn.q_a_proj.weight": "model.safetensors", + "model.layers.3.self_attn.q_a_proj.weight_scale": "model.safetensors", + "model.layers.3.self_attn.q_a_proj.weight_scale_2": "model.safetensors", + "model.layers.3.self_attn.q_b_proj.weight": "model.safetensors", + "model.layers.3.self_attn.q_b_proj.weight_scale": "model.safetensors", + "model.norm.weight": "model.safetensors" + } +} diff --git a/raw/candidates/modelopt-mixed/model/panel.binding.json b/raw/candidates/modelopt-mixed/model/panel.binding.json new file mode 100644 index 0000000000000000000000000000000000000000..573cea0b332c636bdda89b150f95cda307b89194 --- /dev/null +++ b/raw/candidates/modelopt-mixed/model/panel.binding.json @@ -0,0 +1,102 @@ +{ + "content": { + "archive": { + "algorithm": "sha256(ustar: sorted regular files; mode=0644; uid=gid=mtime=0)", + "bytes": 20480, + "compression": "none", + "format": "ustar", + "sha256": "389706dfa3335a75ec70a40d079995af1a60c05512334125dbd336790f12702f" + }, + "manifest": [ + { + "bytes": 192, + "path": "arrays/causal-mask-64.npy", + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02" + }, + { + "bytes": 384, + "path": "arrays/final-0000.tokens.npy", + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af" + }, + { + "bytes": 384, + "path": "arrays/final-0001.tokens.npy", + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea" + }, + { + "bytes": 384, + "path": "arrays/final-0002.tokens.npy", + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c" + }, + { + "bytes": 384, + "path": "arrays/final-0003.tokens.npy", + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a" + }, + { + "bytes": 4195, + "path": "panel.json", + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6" + }, + { + "bytes": 7808, + "path": "panel.receipt.json", + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263" + } + ], + "manifest_sha256": "e5f2d6410a6290da1197016c5b57ae522a3570665215ddc23e2a0bd45f912181" + }, + "panel": { + "bytes": 4195, + "context_length": 64, + "contexts": 4, + "file": "panel.json", + "id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "positions_per_context": 63, + "role": "final", + "scored_positions_total": 252, + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6", + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36" + }, + "receipt": { + "bytes": 7808, + "declared_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "file": "panel.receipt.json", + "receipt_file_sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "receipt_seal_mode": "self-blank" + }, + "schema": "malaiwah.resolved-panel.v1", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } +} diff --git a/raw/candidates/modelopt-mixed/model/panel.sha256.json b/raw/candidates/modelopt-mixed/model/panel.sha256.json new file mode 100644 index 0000000000000000000000000000000000000000..30e122a1cc6d1937fecc0d31e38e468bceefc9de --- /dev/null +++ b/raw/candidates/modelopt-mixed/model/panel.sha256.json @@ -0,0 +1,83 @@ +{ + "binding_file": "panel.binding.json", + "binding_sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "context_length": 64, + "contexts": 4, + "model_repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "model_revision": "45563636ef723acfb826755493447dc40c7a0c37", + "panel_archive": { + "algorithm": "sha256(ustar: sorted regular files; mode=0644; uid=gid=mtime=0)", + "bytes": 20480, + "compression": "none", + "format": "ustar", + "sha256": "389706dfa3335a75ec70a40d079995af1a60c05512334125dbd336790f12702f" + }, + "panel_directory": "panel", + "panel_files": [ + { + "bytes": 192, + "path": "arrays/causal-mask-64.npy", + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02" + }, + { + "bytes": 384, + "path": "arrays/final-0000.tokens.npy", + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af" + }, + { + "bytes": 384, + "path": "arrays/final-0001.tokens.npy", + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea" + }, + { + "bytes": 384, + "path": "arrays/final-0002.tokens.npy", + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c" + }, + { + "bytes": 384, + "path": "arrays/final-0003.tokens.npy", + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a" + }, + { + "bytes": 4195, + "path": "panel.json", + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6" + }, + { + "bytes": 7808, + "path": "panel.receipt.json", + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263" + } + ], + "panel_id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "panel_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "purpose": "Synthetic CPU smoke only, not a quality benchmark.", + "revision_verification": "Caller-supplied published commit; local files byte-verified offline.", + "scored_positions_total": 252, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer_files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "tokenizer_files_verified": true, + "tokenizer_identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1" +} diff --git a/raw/candidates/modelopt-mixed/model/provenance.json b/raw/candidates/modelopt-mixed/model/provenance.json new file mode 100644 index 0000000000000000000000000000000000000000..a945fcd41be2d8dfe6c70658cf10f77281b14fa8 --- /dev/null +++ b/raw/candidates/modelopt-mixed/model/provenance.json @@ -0,0 +1,266 @@ +{ + "source": { + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "a1a973330e4e912678adbd8ea41e8b86b1c9dccb" + }, + "format": "modelopt-mixed", + "algorithm": "Build tiny FORMAT fixtures, optionally capture via integrated QFS layer-outer.\n\nNo optimizer-quality claim: deterministic CPU minmax/conservative-scale RTN.\nMXFP4 uses ceil(log2(group_max/6)); this is NOT CT's MX observer or Kimi QAT.\nNVFP4 uses a tensor maximum global, rounded E4M3 group scales, then E2M1\nnearest-even RTN. FP8 uses ceil(log2(block_max/448)) UE8M0 + E4M3 RTN.\nNo calibration, activation quantization, kernel parity, training or model code.\n", + "claim": "FORMAT fixture, not Kimi QAT/ModelOpt calibration/CT observer quality", + "reconstruction_scope": { + "scope": "weights-reconstructed/advisory; activation-not-captured", + "applied_to_weights": false, + "declared": {}, + "kv_cache_scheme": null, + "stored_components": [] + }, + "encoded_tensors": { + "model.layers.0.mlp.down_proj.weight": 0.010242283344268799, + "model.layers.0.mlp.gate_proj.weight": 0.0029296875, + "model.layers.0.mlp.up_proj.weight": 0.00390625, + "model.layers.0.self_attn.indexer.weights_proj.weight": 0.007568359375, + "model.layers.0.self_attn.indexer.wk.weight": 0.0020751953125, + "model.layers.0.self_attn.indexer.wq_b.weight": 0.00390625, + "model.layers.0.self_attn.kv_a_proj_with_mqa.weight": 0.0090680792927742, + "model.layers.0.self_attn.kv_b_proj.weight": 0.002197265625, + "model.layers.0.self_attn.o_proj.weight": 0.00390625, + "model.layers.0.self_attn.q_a_proj.weight": 0.0084170401096344, + "model.layers.0.self_attn.q_b_proj.weight": 0.002593994140625, + "model.layers.1.mlp.experts.0.down_proj.weight": 0.00390625, + "model.layers.1.mlp.experts.0.gate_proj.weight": 0.007498607039451599, + "model.layers.1.mlp.experts.0.up_proj.weight": 0.00250244140625, + "model.layers.1.mlp.experts.1.down_proj.weight": 0.00341796875, + "model.layers.1.mlp.experts.1.gate_proj.weight": 0.00760323740541935, + "model.layers.1.mlp.experts.1.up_proj.weight": 0.00286865234375, + "model.layers.1.mlp.experts.2.down_proj.weight": 0.00390625, + "model.layers.1.mlp.experts.2.gate_proj.weight": 0.008196152746677399, + "model.layers.1.mlp.experts.2.up_proj.weight": 0.0029296875, + "model.layers.1.mlp.experts.3.down_proj.weight": 0.00244140625, + "model.layers.1.mlp.experts.3.gate_proj.weight": 0.00739397294819355, + "model.layers.1.mlp.experts.3.up_proj.weight": 0.002471923828125, + "model.layers.1.mlp.experts.4.down_proj.weight": 0.00244140625, + "model.layers.1.mlp.experts.4.gate_proj.weight": 0.009137839078903198, + "model.layers.1.mlp.experts.4.up_proj.weight": 0.002532958984375, + "model.layers.1.mlp.experts.5.down_proj.weight": 0.001953125, + "model.layers.1.mlp.experts.5.gate_proj.weight": 0.009033203125, + "model.layers.1.mlp.experts.5.up_proj.weight": 0.002410888671875, + "model.layers.1.mlp.experts.6.down_proj.weight": 0.00341796875, + "model.layers.1.mlp.experts.6.gate_proj.weight": 0.008405409753322601, + "model.layers.1.mlp.experts.6.up_proj.weight": 0.00244140625, + "model.layers.1.mlp.experts.7.down_proj.weight": 0.001953125, + "model.layers.1.mlp.experts.7.gate_proj.weight": 0.010091148316860199, + "model.layers.1.mlp.experts.7.up_proj.weight": 0.002349853515625, + "model.layers.1.mlp.shared_experts.down_proj.weight": 0.001953125, + "model.layers.1.mlp.shared_experts.gate_proj.weight": 0.0104282908141613, + "model.layers.1.mlp.shared_experts.up_proj.weight": 0.002777099609375, + "model.layers.1.self_attn.kv_a_proj_with_mqa.weight": 0.00244140625, + "model.layers.1.self_attn.kv_b_proj.weight": 0.0082659050822258, + "model.layers.1.self_attn.o_proj.weight": 0.00250244140625, + "model.layers.1.self_attn.q_a_proj.weight": 0.0029296875, + "model.layers.1.self_attn.q_b_proj.weight": 0.008544921875, + "model.layers.2.mlp.experts.0.down_proj.weight": 0.00244140625, + "model.layers.2.mlp.experts.0.gate_proj.weight": 0.00244140625, + "model.layers.2.mlp.experts.0.up_proj.weight": 0.007498603314161301, + "model.layers.2.mlp.experts.1.down_proj.weight": 0.00299072265625, + "model.layers.2.mlp.experts.1.gate_proj.weight": 0.00244140625, + "model.layers.2.mlp.experts.1.up_proj.weight": 0.009660996496677399, + "model.layers.2.mlp.experts.2.down_proj.weight": 0.00238037109375, + "model.layers.2.mlp.experts.2.gate_proj.weight": 0.00341796875, + "model.layers.2.mlp.experts.2.up_proj.weight": 0.0083937868475914, + "model.layers.2.mlp.experts.3.down_proj.weight": 0.0028076171875, + "model.layers.2.mlp.experts.3.gate_proj.weight": 0.001953125, + "model.layers.2.mlp.experts.3.up_proj.weight": 0.009068083018064499, + "model.layers.2.mlp.experts.4.down_proj.weight": 0.002197265625, + "model.layers.2.mlp.experts.4.gate_proj.weight": 0.001953125, + "model.layers.2.mlp.experts.4.up_proj.weight": 0.0082310251891613, + "model.layers.2.mlp.experts.5.down_proj.weight": 0.00244140625, + "model.layers.2.mlp.experts.5.gate_proj.weight": 0.00390625, + "model.layers.2.mlp.experts.5.up_proj.weight": 0.0102887824177742, + "model.layers.2.mlp.experts.6.down_proj.weight": 0.00274658203125, + "model.layers.2.mlp.experts.6.gate_proj.weight": 0.0029296875, + "model.layers.2.mlp.experts.6.up_proj.weight": 0.0079403817653656, + "model.layers.2.mlp.experts.7.down_proj.weight": 0.002685546875, + "model.layers.2.mlp.experts.7.gate_proj.weight": 0.001953125, + "model.layers.2.mlp.experts.7.up_proj.weight": 0.008475169539451599, + "model.layers.2.mlp.shared_experts.down_proj.weight": 0.00250244140625, + "model.layers.2.mlp.shared_experts.gate_proj.weight": 0.00341796875, + "model.layers.2.mlp.shared_experts.up_proj.weight": 0.0080915167927742, + "model.layers.2.self_attn.indexer.weights_proj.weight": 0.0017547607421875, + "model.layers.2.self_attn.indexer.wk.weight": 0.001953125, + "model.layers.2.self_attn.indexer.wq_b.weight": 0.0104631707072258, + "model.layers.2.self_attn.kv_a_proj_with_mqa.weight": 0.002288818359375, + "model.layers.2.self_attn.kv_b_proj.weight": 0.00341796875, + "model.layers.2.self_attn.o_proj.weight": 0.0085797980427742, + "model.layers.2.self_attn.q_a_proj.weight": 0.002410888671875, + "model.layers.2.self_attn.q_b_proj.weight": 0.001953125, + "model.layers.3.mlp.experts.0.down_proj.weight": 0.008544921875, + "model.layers.3.mlp.experts.0.gate_proj.weight": 0.00250244140625, + "model.layers.3.mlp.experts.0.up_proj.weight": 0.00390625, + "model.layers.3.mlp.experts.1.down_proj.weight": 0.0092424675822258, + "model.layers.3.mlp.experts.1.gate_proj.weight": 0.00274658203125, + "model.layers.3.mlp.experts.1.up_proj.weight": 0.001953125, + "model.layers.3.mlp.experts.2.down_proj.weight": 0.010428294539451599, + "model.layers.3.mlp.experts.2.gate_proj.weight": 0.002471923828125, + "model.layers.3.mlp.experts.2.up_proj.weight": 0.00341796875, + "model.layers.3.mlp.experts.3.down_proj.weight": 0.008265901356935501, + "model.layers.3.mlp.experts.3.gate_proj.weight": 0.00244140625, + "model.layers.3.mlp.experts.3.up_proj.weight": 0.00341796875, + "model.layers.3.mlp.experts.4.down_proj.weight": 0.008196152746677399, + "model.layers.3.mlp.experts.4.gate_proj.weight": 0.002685546875, + "model.layers.3.mlp.experts.4.up_proj.weight": 0.001953125, + "model.layers.3.mlp.experts.5.down_proj.weight": 0.0095912404358387, + "model.layers.3.mlp.experts.5.gate_proj.weight": 0.0030517578125, + "model.layers.3.mlp.experts.5.up_proj.weight": 0.001953125, + "model.layers.3.mlp.experts.6.down_proj.weight": 0.007568359375, + "model.layers.3.mlp.experts.6.gate_proj.weight": 0.00250244140625, + "model.layers.3.mlp.experts.6.up_proj.weight": 0.0029296875, + "model.layers.3.mlp.experts.7.down_proj.weight": 0.0084402896463871, + "model.layers.3.mlp.experts.7.gate_proj.weight": 0.002685546875, + "model.layers.3.mlp.experts.7.up_proj.weight": 0.001953125, + "model.layers.3.mlp.shared_experts.down_proj.weight": 0.008870445191860199, + "model.layers.3.mlp.shared_experts.gate_proj.weight": 0.00262451171875, + "model.layers.3.mlp.shared_experts.up_proj.weight": 0.00341796875, + "model.layers.3.self_attn.kv_a_proj_with_mqa.weight": 0.0074753537774086, + "model.layers.3.self_attn.kv_b_proj.weight": 0.00262451171875, + "model.layers.3.self_attn.o_proj.weight": 0.00390625, + "model.layers.3.self_attn.q_a_proj.weight": 0.0089401975274086, + "model.layers.3.self_attn.q_b_proj.weight": 0.0023193359375 + }, + "encoded_formats": { + "model.layers.0.mlp.down_proj.weight": "modelopt-nvfp4", + "model.layers.0.mlp.gate_proj.weight": "modelopt-fp8-tensor", + "model.layers.0.mlp.up_proj.weight": "modelopt-fp8-block", + "model.layers.0.self_attn.indexer.weights_proj.weight": "modelopt-nvfp4", + "model.layers.0.self_attn.indexer.wk.weight": "modelopt-fp8-tensor", + "model.layers.0.self_attn.indexer.wq_b.weight": "modelopt-fp8-block", + "model.layers.0.self_attn.kv_a_proj_with_mqa.weight": "modelopt-nvfp4", + "model.layers.0.self_attn.kv_b_proj.weight": "modelopt-fp8-tensor", + "model.layers.0.self_attn.o_proj.weight": "modelopt-fp8-block", + "model.layers.0.self_attn.q_a_proj.weight": "modelopt-nvfp4", + "model.layers.0.self_attn.q_b_proj.weight": "modelopt-fp8-tensor", + "model.layers.1.mlp.experts.0.down_proj.weight": "modelopt-fp8-block", + "model.layers.1.mlp.experts.0.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.0.up_proj.weight": "modelopt-fp8-tensor", + "model.layers.1.mlp.experts.1.down_proj.weight": "modelopt-fp8-block", + "model.layers.1.mlp.experts.1.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.1.up_proj.weight": "modelopt-fp8-tensor", + "model.layers.1.mlp.experts.2.down_proj.weight": "modelopt-fp8-block", + "model.layers.1.mlp.experts.2.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.2.up_proj.weight": "modelopt-fp8-tensor", + "model.layers.1.mlp.experts.3.down_proj.weight": "modelopt-fp8-block", + "model.layers.1.mlp.experts.3.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.3.up_proj.weight": "modelopt-fp8-tensor", + "model.layers.1.mlp.experts.4.down_proj.weight": "modelopt-fp8-block", + "model.layers.1.mlp.experts.4.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.4.up_proj.weight": "modelopt-fp8-tensor", + "model.layers.1.mlp.experts.5.down_proj.weight": "modelopt-fp8-block", + "model.layers.1.mlp.experts.5.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.5.up_proj.weight": "modelopt-fp8-tensor", + "model.layers.1.mlp.experts.6.down_proj.weight": "modelopt-fp8-block", + "model.layers.1.mlp.experts.6.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.6.up_proj.weight": "modelopt-fp8-tensor", + "model.layers.1.mlp.experts.7.down_proj.weight": "modelopt-fp8-block", + "model.layers.1.mlp.experts.7.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.7.up_proj.weight": "modelopt-fp8-tensor", + "model.layers.1.mlp.shared_experts.down_proj.weight": "modelopt-fp8-block", + "model.layers.1.mlp.shared_experts.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.shared_experts.up_proj.weight": "modelopt-fp8-tensor", + "model.layers.1.self_attn.kv_a_proj_with_mqa.weight": "modelopt-fp8-block", + "model.layers.1.self_attn.kv_b_proj.weight": "modelopt-nvfp4", + "model.layers.1.self_attn.o_proj.weight": "modelopt-fp8-tensor", + "model.layers.1.self_attn.q_a_proj.weight": "modelopt-fp8-block", + "model.layers.1.self_attn.q_b_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.0.down_proj.weight": "modelopt-fp8-tensor", + "model.layers.2.mlp.experts.0.gate_proj.weight": "modelopt-fp8-block", + "model.layers.2.mlp.experts.0.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.1.down_proj.weight": "modelopt-fp8-tensor", + "model.layers.2.mlp.experts.1.gate_proj.weight": "modelopt-fp8-block", + "model.layers.2.mlp.experts.1.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.2.down_proj.weight": "modelopt-fp8-tensor", + "model.layers.2.mlp.experts.2.gate_proj.weight": "modelopt-fp8-block", + "model.layers.2.mlp.experts.2.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.3.down_proj.weight": "modelopt-fp8-tensor", + "model.layers.2.mlp.experts.3.gate_proj.weight": "modelopt-fp8-block", + "model.layers.2.mlp.experts.3.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.4.down_proj.weight": "modelopt-fp8-tensor", + "model.layers.2.mlp.experts.4.gate_proj.weight": "modelopt-fp8-block", + "model.layers.2.mlp.experts.4.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.5.down_proj.weight": "modelopt-fp8-tensor", + "model.layers.2.mlp.experts.5.gate_proj.weight": "modelopt-fp8-block", + "model.layers.2.mlp.experts.5.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.6.down_proj.weight": "modelopt-fp8-tensor", + "model.layers.2.mlp.experts.6.gate_proj.weight": "modelopt-fp8-block", + "model.layers.2.mlp.experts.6.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.7.down_proj.weight": "modelopt-fp8-tensor", + "model.layers.2.mlp.experts.7.gate_proj.weight": "modelopt-fp8-block", + "model.layers.2.mlp.experts.7.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.shared_experts.down_proj.weight": "modelopt-fp8-tensor", + "model.layers.2.mlp.shared_experts.gate_proj.weight": "modelopt-fp8-block", + "model.layers.2.mlp.shared_experts.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.self_attn.indexer.weights_proj.weight": "modelopt-fp8-tensor", + "model.layers.2.self_attn.indexer.wk.weight": "modelopt-fp8-block", + "model.layers.2.self_attn.indexer.wq_b.weight": "modelopt-nvfp4", + "model.layers.2.self_attn.kv_a_proj_with_mqa.weight": "modelopt-fp8-tensor", + "model.layers.2.self_attn.kv_b_proj.weight": "modelopt-fp8-block", + "model.layers.2.self_attn.o_proj.weight": "modelopt-nvfp4", + "model.layers.2.self_attn.q_a_proj.weight": "modelopt-fp8-tensor", + "model.layers.2.self_attn.q_b_proj.weight": "modelopt-fp8-block", + "model.layers.3.mlp.experts.0.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.0.gate_proj.weight": "modelopt-fp8-tensor", + "model.layers.3.mlp.experts.0.up_proj.weight": "modelopt-fp8-block", + "model.layers.3.mlp.experts.1.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.1.gate_proj.weight": "modelopt-fp8-tensor", + "model.layers.3.mlp.experts.1.up_proj.weight": "modelopt-fp8-block", + "model.layers.3.mlp.experts.2.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.2.gate_proj.weight": "modelopt-fp8-tensor", + "model.layers.3.mlp.experts.2.up_proj.weight": "modelopt-fp8-block", + "model.layers.3.mlp.experts.3.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.3.gate_proj.weight": "modelopt-fp8-tensor", + "model.layers.3.mlp.experts.3.up_proj.weight": "modelopt-fp8-block", + "model.layers.3.mlp.experts.4.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.4.gate_proj.weight": "modelopt-fp8-tensor", + "model.layers.3.mlp.experts.4.up_proj.weight": "modelopt-fp8-block", + "model.layers.3.mlp.experts.5.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.5.gate_proj.weight": "modelopt-fp8-tensor", + "model.layers.3.mlp.experts.5.up_proj.weight": "modelopt-fp8-block", + "model.layers.3.mlp.experts.6.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.6.gate_proj.weight": "modelopt-fp8-tensor", + "model.layers.3.mlp.experts.6.up_proj.weight": "modelopt-fp8-block", + "model.layers.3.mlp.experts.7.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.7.gate_proj.weight": "modelopt-fp8-tensor", + "model.layers.3.mlp.experts.7.up_proj.weight": "modelopt-fp8-block", + "model.layers.3.mlp.shared_experts.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.shared_experts.gate_proj.weight": "modelopt-fp8-tensor", + "model.layers.3.mlp.shared_experts.up_proj.weight": "modelopt-fp8-block", + "model.layers.3.self_attn.kv_a_proj_with_mqa.weight": "modelopt-nvfp4", + "model.layers.3.self_attn.kv_b_proj.weight": "modelopt-fp8-tensor", + "model.layers.3.self_attn.o_proj.weight": "modelopt-fp8-block", + "model.layers.3.self_attn.q_a_proj.weight": "modelopt-nvfp4", + "model.layers.3.self_attn.q_b_proj.weight": "modelopt-fp8-tensor" + }, + "source_sha256": { + "config.json": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "model.safetensors": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1" + }, + "output_sha256": { + "scope.json": "cb9473f3fab8c5ac5738252a4593d822d85b395e602e9ae2588422022aa99603", + "model.safetensors.index.json": "69f417db73c9884a2ce0529cfeaa5f79772ec61db74af607777e6d923bd60079", + "model.safetensors": "9a5c06dffc5c8c08aa0cb0109c87274d044d8297db132405828d914762370199", + "config.json": "33f139cf6a6c6de8e40791cff02405adc77c4447419863d9ce801642a484e958", + "panel.binding.json": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "qfs-source.json": "624fc5b9568aa8bf12b1fc5cb3d54aef94d5e5ad72d73a55bd761dd6ca659cae", + "loader-verification.json": "086b7c5481cfbae5ee958b3bdeb85264128c59142fb005611bd837533fbdf7b0", + "tokenizer.json": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "cpu-reproduction-summary.json": "41f8263ddacbac1379c67637f83fdef2ed843ca4973179817531855939866a55", + "hub-checkpoint-verification.json": "3a4681f9c2876da6ae303592ede176ab17c6abdface107683fa2fe8386de7d36", + "tokenizer_config.json": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63", + "panel.sha256.json": "7fbfbaa8a3b1d7533177e1c2e774f5686e6a3f6b9564be7f2a99d0f66bff92fd", + "build-manifest.json": "57d74b2e6dcc8a789f51f86d251e51b2ec73c6772c329ad56f6132e08626eced", + "generation_config.json": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "cpu-comparison-receipt.json": "fcfcee1383dc0d50b42bbd97c9f2fc5ebe127c97cab791eeac01bf530d06f178", + "LICENSE": "6456969dd395bff476628945088b4cbd9d9c761b01a64e281c07b09daf9f94c3" + }, + "tool_sha256": "9fae546b8cb91df32468bcc7019c0bfbf10e41569526c7f55384f27afafe8699", + "reader_sha256": "588923f0a4700436221923c794a8c112971d9f08e75c746742b0f0ede7921682", + "reference": "compressed-tensors@0.18.0; DeepSeek-V4-Flash@60d8d70770c6776ff598c94bb586a859a38244f1/inference/kernel.py; nvidia/Qwen3.8-Flash-Next-NVFP4@fc694b54fb0174e0913e6adf86691ef85a4ead47/config.json+headers", + "verification": "independent CPU FP32 encoder reconstruction per encoded weight; no GPU parity" +} diff --git a/raw/candidates/modelopt-mixed/model/qfs-source.json b/raw/candidates/modelopt-mixed/model/qfs-source.json new file mode 100644 index 0000000000000000000000000000000000000000..3c71d8671dcbe3678b71a2efe59e0ca341bebdc0 --- /dev/null +++ b/raw/candidates/modelopt-mixed/model/qfs-source.json @@ -0,0 +1,11 @@ +{ + "repository": "https://github.com/malaiwah/quant-fidelity-suite", + "revision": "a903cddb078c2eda8c65d6e6c875a09ac932df49", + "source_files": { + "bin/fidelity/dscompare.py": "4a53f735e1e3fb8bd739854451b57f34e8369bffa9fd4f7b7fd935fb2e7d52df", + "bin/fidelity/dsvalidate.py": "a9d6cd57e801e3ef044a37635e24518c83dbc6d1ec8a4c0b4b5d1b24483ca8d1", + "bin/fidelity/panel.py": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "bin/fidelity_dataset.py": "ac62b63bbfde67e4d5cacecf9cd417193c50f417a6749cc15ee6f1610c153a4e", + "engines/tools/hf_capture.py": "200ba12ca74fb97531307965cbbaa5c10553a5c26e008e524ea2d8aecb005b95" + } +} diff --git a/raw/candidates/modelopt-mixed/model/scope.json b/raw/candidates/modelopt-mixed/model/scope.json new file mode 100644 index 0000000000000000000000000000000000000000..bc56ea837e0fa6d713666942ae29eb7a68e4cd30 --- /dev/null +++ b/raw/candidates/modelopt-mixed/model/scope.json @@ -0,0 +1,121 @@ +{ + "policy": "mixed", + "head_policy": "native", + "kv_cache_dtype": "bf16", + "mtp_included": false, + "activation_quantization": null, + "assignments": [ + { + "tensor_class": "attn.o", + "treatment": "quantized", + "format": "modelopt-fp8-block", + "bits_per_weight": 8, + "layer_range": "0,3", + "note": "2 tensors: model.layers.N.self_attn.o_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "attn.o", + "treatment": "quantized", + "format": "modelopt-fp8-tensor", + "bits_per_weight": 8, + "layer_range": "1", + "note": "1 tensors: model.layers.N.self_attn.o_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "attn.o", + "treatment": "quantized", + "format": "modelopt-nvfp4", + "bits_per_weight": 4, + "layer_range": "2", + "note": "1 tensors: model.layers.N.self_attn.o_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "attn.other", + "treatment": "quantized", + "format": "mixed", + "bits_per_weight": null, + "layer_range": "0-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 12 x native:bf16@16 (model.layers.N.self_attn.indexer.k_norm.bias, model.layers.N.self_attn.indexer.k_norm.weight, model.layers.N.self_attn.kv_a_layernorm.weight); 2 x quantized:modelopt-fp8-block@8 (model.layers.N.self_attn.indexer.wk.weight, model.layers.N.self_attn.indexer.wq_b.weight); 2 x quantized:modelopt-fp8-tensor@8 (model.layers.N.self_attn.indexer.weights_proj.weight, model.layers.N.self_attn.indexer.wk.weight); 2 x quantized:modelopt-nvfp4@4 (model.layers.N.self_attn.indexer.weights_proj.weight, model.layers.N.self_attn.indexer.wq_b.weight). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "attn.qkv", + "treatment": "quantized", + "format": "mixed", + "bits_per_weight": null, + "layer_range": "0-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 4 x quantized:modelopt-fp8-block@8 (model.layers.N.self_attn.kv_a_proj_with_mqa.weight, model.layers.N.self_attn.kv_b_proj.weight, model.layers.N.self_attn.q_a_proj.weight); 6 x quantized:modelopt-fp8-tensor@8 (model.layers.N.self_attn.kv_a_proj_with_mqa.weight, model.layers.N.self_attn.kv_b_proj.weight, model.layers.N.self_attn.q_a_proj.weight); 6 x quantized:modelopt-nvfp4@4 (model.layers.N.self_attn.kv_a_proj_with_mqa.weight, model.layers.N.self_attn.kv_b_proj.weight, model.layers.N.self_attn.q_a_proj.weight). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "embed_tokens", + "treatment": "native", + "format": "bf16", + "bits_per_weight": 16, + "layer_range": "all", + "note": "1 tensors: model.embed_tokens.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "lm_head", + "treatment": "native", + "format": "bf16", + "bits_per_weight": 16, + "layer_range": "all", + "note": "1 tensors: lm_head.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "mlp.down", + "treatment": "quantized", + "format": "modelopt-nvfp4", + "bits_per_weight": 4, + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.down_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "mlp.gate", + "treatment": "quantized", + "format": "modelopt-fp8-tensor", + "bits_per_weight": 8, + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.gate_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "mlp.up", + "treatment": "quantized", + "format": "modelopt-fp8-block", + "bits_per_weight": 8, + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "moe.experts", + "treatment": "quantized", + "format": "mixed", + "bits_per_weight": null, + "layer_range": "1-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 24 x quantized:modelopt-fp8-block@8 (model.layers.N.mlp.experts.E.down_proj.weight, model.layers.N.mlp.experts.E.gate_proj.weight, model.layers.N.mlp.experts.E.up_proj.weight); 24 x quantized:modelopt-fp8-tensor@8 (model.layers.N.mlp.experts.E.down_proj.weight, model.layers.N.mlp.experts.E.gate_proj.weight, model.layers.N.mlp.experts.E.up_proj.weight); 24 x quantized:modelopt-nvfp4@4 (model.layers.N.mlp.experts.E.down_proj.weight, model.layers.N.mlp.experts.E.gate_proj.weight, model.layers.N.mlp.experts.E.up_proj.weight). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "moe.router", + "treatment": "native", + "format": "mixed", + "bits_per_weight": null, + "layer_range": "1-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 3 x native:bf16@16 (model.layers.N.mlp.gate.weight); 3 x native:fp32@32 (model.layers.N.mlp.gate.e_score_correction_bias). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "moe.shared_expert", + "treatment": "quantized", + "format": "mixed", + "bits_per_weight": null, + "layer_range": "1-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 3 x quantized:modelopt-fp8-block@8 (model.layers.N.mlp.shared_experts.down_proj.weight, model.layers.N.mlp.shared_experts.gate_proj.weight, model.layers.N.mlp.shared_experts.up_proj.weight); 3 x quantized:modelopt-fp8-tensor@8 (model.layers.N.mlp.shared_experts.down_proj.weight, model.layers.N.mlp.shared_experts.gate_proj.weight, model.layers.N.mlp.shared_experts.up_proj.weight); 3 x quantized:modelopt-nvfp4@4 (model.layers.N.mlp.shared_experts.down_proj.weight, model.layers.N.mlp.shared_experts.gate_proj.weight, model.layers.N.mlp.shared_experts.up_proj.weight). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "norm", + "treatment": "native", + "format": "bf16", + "bits_per_weight": 16, + "layer_range": "all", + "note": "9 tensors: model.layers.N.input_layernorm.weight, model.layers.N.post_attention_layernorm.weight, model.norm.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + } + ] +} diff --git a/raw/candidates/modelopt-mixed/model/tokenizer.json b/raw/candidates/modelopt-mixed/model/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..5ad9cccfc9ab5ed66f1c38db328de07cbe4939a9 --- /dev/null +++ b/raw/candidates/modelopt-mixed/model/tokenizer.json @@ -0,0 +1,404 @@ +{ + "version": "1.0", + "truncation": null, + "padding": null, + "added_tokens": [ + { + "id": 0, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 1, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 2, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 3, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + } + ], + "normalizer": null, + "pre_tokenizer": { + "type": "ByteLevel", + "add_prefix_space": false, + "trim_offsets": true, + "use_regex": false + }, + "post_processor": { + "type": "TemplateProcessing", + "single": [ + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + }, + { + "Sequence": { + "id": "A", + "type_id": 0 + } + }, + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + } + ], + "pair": [ + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + }, + { + "Sequence": { + "id": "A", + "type_id": 0 + } + }, + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + }, + { + "Sequence": { + "id": "B", + "type_id": 1 + } + }, + { + "SpecialToken": { + "id": "", + "type_id": 1 + } + } + ], + "special_tokens": { + "": { + "id": "", + "ids": [ + 1 + ], + "tokens": [ + "" + ] + }, + "": { + "id": "", + "ids": [ + 2 + ], + "tokens": [ + "" + ] + } + } + }, + "decoder": { + "type": "ByteLevel", + "add_prefix_space": true, + "trim_offsets": true, + "use_regex": true + }, + "model": { + "type": "BPE", + "dropout": null, + "unk_token": "", + "continuing_subword_prefix": null, + "end_of_word_suffix": null, + "fuse_unk": false, + "byte_fallback": false, + "ignore_merges": false, + "vocab": { + "": 0, + "": 1, + "": 2, + "": 3, + "!": 4, + "\"": 5, + "#": 6, + "$": 7, + "%": 8, + "&": 9, + "'": 10, + "(": 11, + ")": 12, + "*": 13, + "+": 14, + ",": 15, + "-": 16, + ".": 17, + "/": 18, + "0": 19, + "1": 20, + "2": 21, + "3": 22, + "4": 23, + "5": 24, + "6": 25, + "7": 26, + "8": 27, + "9": 28, + ":": 29, + ";": 30, + "<": 31, + "=": 32, + ">": 33, + "?": 34, + "@": 35, + "A": 36, + "B": 37, + "C": 38, + "D": 39, + "E": 40, + "F": 41, + "G": 42, + "H": 43, + "I": 44, + "J": 45, + "K": 46, + "L": 47, + "M": 48, + "N": 49, + "O": 50, + "P": 51, + "Q": 52, + "R": 53, + "S": 54, + "T": 55, + "U": 56, + "V": 57, + "W": 58, + "X": 59, + "Y": 60, + "Z": 61, + "[": 62, + "\\": 63, + "]": 64, + "^": 65, + "_": 66, + "`": 67, + "a": 68, + "b": 69, + "c": 70, + "d": 71, + "e": 72, + "f": 73, + "g": 74, + "h": 75, + "i": 76, + "j": 77, + "k": 78, + "l": 79, + "m": 80, + "n": 81, + "o": 82, + "p": 83, + "q": 84, + "r": 85, + "s": 86, + "t": 87, + "u": 88, + "v": 89, + "w": 90, + "x": 91, + "y": 92, + "z": 93, + "{": 94, + "|": 95, + "}": 96, + "~": 97, + "¡": 98, + "¢": 99, + "£": 100, + "¤": 101, + "¥": 102, + "¦": 103, + "§": 104, + "¨": 105, + "©": 106, + "ª": 107, + "«": 108, + "¬": 109, + "®": 110, + "¯": 111, + "°": 112, + "±": 113, + "²": 114, + "³": 115, + "´": 116, + "µ": 117, + "¶": 118, + "·": 119, + "¸": 120, + "¹": 121, + "º": 122, + "»": 123, + "¼": 124, + "½": 125, + "¾": 126, + "¿": 127, + "À": 128, + "Á": 129, + "Â": 130, + "Ã": 131, + "Ä": 132, + "Å": 133, + "Æ": 134, + "Ç": 135, + "È": 136, + "É": 137, + "Ê": 138, + "Ë": 139, + "Ì": 140, + "Í": 141, + "Î": 142, + "Ï": 143, + "Ð": 144, + "Ñ": 145, + "Ò": 146, + "Ó": 147, + "Ô": 148, + "Õ": 149, + "Ö": 150, + "×": 151, + "Ø": 152, + "Ù": 153, + "Ú": 154, + "Û": 155, + "Ü": 156, + "Ý": 157, + "Þ": 158, + "ß": 159, + "à": 160, + "á": 161, + "â": 162, + "ã": 163, + "ä": 164, + "å": 165, + "æ": 166, + "ç": 167, + "è": 168, + "é": 169, + "ê": 170, + "ë": 171, + "ì": 172, + "í": 173, + "î": 174, + "ï": 175, + "ð": 176, + "ñ": 177, + "ò": 178, + "ó": 179, + "ô": 180, + "õ": 181, + "ö": 182, + "÷": 183, + "ø": 184, + "ù": 185, + "ú": 186, + "û": 187, + "ü": 188, + "ý": 189, + "þ": 190, + "ÿ": 191, + "Ā": 192, + "ā": 193, + "Ă": 194, + "ă": 195, + "Ą": 196, + "ą": 197, + "Ć": 198, + "ć": 199, + "Ĉ": 200, + "ĉ": 201, + "Ċ": 202, + "ċ": 203, + "Č": 204, + "č": 205, + "Ď": 206, + "ď": 207, + "Đ": 208, + "đ": 209, + "Ē": 210, + "ē": 211, + "Ĕ": 212, + "ĕ": 213, + "Ė": 214, + "ė": 215, + "Ę": 216, + "ę": 217, + "Ě": 218, + "ě": 219, + "Ĝ": 220, + "ĝ": 221, + "Ğ": 222, + "ğ": 223, + "Ġ": 224, + "ġ": 225, + "Ģ": 226, + "ģ": 227, + "Ĥ": 228, + "ĥ": 229, + "Ħ": 230, + "ħ": 231, + "Ĩ": 232, + "ĩ": 233, + "Ī": 234, + "ī": 235, + "Ĭ": 236, + "ĭ": 237, + "Į": 238, + "į": 239, + "İ": 240, + "ı": 241, + "IJ": 242, + "ij": 243, + "Ĵ": 244, + "ĵ": 245, + "Ķ": 246, + "ķ": 247, + "ĸ": 248, + "Ĺ": 249, + "ĺ": 250, + "Ļ": 251, + "ļ": 252, + "Ľ": 253, + "ľ": 254, + "Ŀ": 255, + "ŀ": 256, + "Ł": 257, + "ł": 258, + "Ń": 259 + }, + "merges": [] + } +} \ No newline at end of file diff --git a/raw/candidates/modelopt-mixed/model/tokenizer_config.json b/raw/candidates/modelopt-mixed/model/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..df4d789a0874511220f5e2676081000298ad025d --- /dev/null +++ b/raw/candidates/modelopt-mixed/model/tokenizer_config.json @@ -0,0 +1,10 @@ +{ + "backend": "tokenizers", + "bos_token": "", + "clean_up_tokenization_spaces": false, + "eos_token": "", + "model_max_length": 256, + "pad_token": "", + "tokenizer_class": "TokenizersBackend", + "unk_token": "" +} diff --git a/raw/candidates/modelopt-mixed/source-pin-evidence.json b/raw/candidates/modelopt-mixed/source-pin-evidence.json new file mode 100644 index 0000000000000000000000000000000000000000..a945fcd41be2d8dfe6c70658cf10f77281b14fa8 --- /dev/null +++ b/raw/candidates/modelopt-mixed/source-pin-evidence.json @@ -0,0 +1,266 @@ +{ + "source": { + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "a1a973330e4e912678adbd8ea41e8b86b1c9dccb" + }, + "format": "modelopt-mixed", + "algorithm": "Build tiny FORMAT fixtures, optionally capture via integrated QFS layer-outer.\n\nNo optimizer-quality claim: deterministic CPU minmax/conservative-scale RTN.\nMXFP4 uses ceil(log2(group_max/6)); this is NOT CT's MX observer or Kimi QAT.\nNVFP4 uses a tensor maximum global, rounded E4M3 group scales, then E2M1\nnearest-even RTN. FP8 uses ceil(log2(block_max/448)) UE8M0 + E4M3 RTN.\nNo calibration, activation quantization, kernel parity, training or model code.\n", + "claim": "FORMAT fixture, not Kimi QAT/ModelOpt calibration/CT observer quality", + "reconstruction_scope": { + "scope": "weights-reconstructed/advisory; activation-not-captured", + "applied_to_weights": false, + "declared": {}, + "kv_cache_scheme": null, + "stored_components": [] + }, + "encoded_tensors": { + "model.layers.0.mlp.down_proj.weight": 0.010242283344268799, + "model.layers.0.mlp.gate_proj.weight": 0.0029296875, + "model.layers.0.mlp.up_proj.weight": 0.00390625, + "model.layers.0.self_attn.indexer.weights_proj.weight": 0.007568359375, + "model.layers.0.self_attn.indexer.wk.weight": 0.0020751953125, + "model.layers.0.self_attn.indexer.wq_b.weight": 0.00390625, + "model.layers.0.self_attn.kv_a_proj_with_mqa.weight": 0.0090680792927742, + "model.layers.0.self_attn.kv_b_proj.weight": 0.002197265625, + "model.layers.0.self_attn.o_proj.weight": 0.00390625, + "model.layers.0.self_attn.q_a_proj.weight": 0.0084170401096344, + "model.layers.0.self_attn.q_b_proj.weight": 0.002593994140625, + "model.layers.1.mlp.experts.0.down_proj.weight": 0.00390625, + "model.layers.1.mlp.experts.0.gate_proj.weight": 0.007498607039451599, + "model.layers.1.mlp.experts.0.up_proj.weight": 0.00250244140625, + "model.layers.1.mlp.experts.1.down_proj.weight": 0.00341796875, + "model.layers.1.mlp.experts.1.gate_proj.weight": 0.00760323740541935, + "model.layers.1.mlp.experts.1.up_proj.weight": 0.00286865234375, + "model.layers.1.mlp.experts.2.down_proj.weight": 0.00390625, + "model.layers.1.mlp.experts.2.gate_proj.weight": 0.008196152746677399, + "model.layers.1.mlp.experts.2.up_proj.weight": 0.0029296875, + "model.layers.1.mlp.experts.3.down_proj.weight": 0.00244140625, + "model.layers.1.mlp.experts.3.gate_proj.weight": 0.00739397294819355, + "model.layers.1.mlp.experts.3.up_proj.weight": 0.002471923828125, + "model.layers.1.mlp.experts.4.down_proj.weight": 0.00244140625, + "model.layers.1.mlp.experts.4.gate_proj.weight": 0.009137839078903198, + "model.layers.1.mlp.experts.4.up_proj.weight": 0.002532958984375, + "model.layers.1.mlp.experts.5.down_proj.weight": 0.001953125, + "model.layers.1.mlp.experts.5.gate_proj.weight": 0.009033203125, + "model.layers.1.mlp.experts.5.up_proj.weight": 0.002410888671875, + "model.layers.1.mlp.experts.6.down_proj.weight": 0.00341796875, + "model.layers.1.mlp.experts.6.gate_proj.weight": 0.008405409753322601, + "model.layers.1.mlp.experts.6.up_proj.weight": 0.00244140625, + "model.layers.1.mlp.experts.7.down_proj.weight": 0.001953125, + "model.layers.1.mlp.experts.7.gate_proj.weight": 0.010091148316860199, + "model.layers.1.mlp.experts.7.up_proj.weight": 0.002349853515625, + "model.layers.1.mlp.shared_experts.down_proj.weight": 0.001953125, + "model.layers.1.mlp.shared_experts.gate_proj.weight": 0.0104282908141613, + "model.layers.1.mlp.shared_experts.up_proj.weight": 0.002777099609375, + "model.layers.1.self_attn.kv_a_proj_with_mqa.weight": 0.00244140625, + "model.layers.1.self_attn.kv_b_proj.weight": 0.0082659050822258, + "model.layers.1.self_attn.o_proj.weight": 0.00250244140625, + "model.layers.1.self_attn.q_a_proj.weight": 0.0029296875, + "model.layers.1.self_attn.q_b_proj.weight": 0.008544921875, + "model.layers.2.mlp.experts.0.down_proj.weight": 0.00244140625, + "model.layers.2.mlp.experts.0.gate_proj.weight": 0.00244140625, + "model.layers.2.mlp.experts.0.up_proj.weight": 0.007498603314161301, + "model.layers.2.mlp.experts.1.down_proj.weight": 0.00299072265625, + "model.layers.2.mlp.experts.1.gate_proj.weight": 0.00244140625, + "model.layers.2.mlp.experts.1.up_proj.weight": 0.009660996496677399, + "model.layers.2.mlp.experts.2.down_proj.weight": 0.00238037109375, + "model.layers.2.mlp.experts.2.gate_proj.weight": 0.00341796875, + "model.layers.2.mlp.experts.2.up_proj.weight": 0.0083937868475914, + "model.layers.2.mlp.experts.3.down_proj.weight": 0.0028076171875, + "model.layers.2.mlp.experts.3.gate_proj.weight": 0.001953125, + "model.layers.2.mlp.experts.3.up_proj.weight": 0.009068083018064499, + "model.layers.2.mlp.experts.4.down_proj.weight": 0.002197265625, + "model.layers.2.mlp.experts.4.gate_proj.weight": 0.001953125, + "model.layers.2.mlp.experts.4.up_proj.weight": 0.0082310251891613, + "model.layers.2.mlp.experts.5.down_proj.weight": 0.00244140625, + "model.layers.2.mlp.experts.5.gate_proj.weight": 0.00390625, + "model.layers.2.mlp.experts.5.up_proj.weight": 0.0102887824177742, + "model.layers.2.mlp.experts.6.down_proj.weight": 0.00274658203125, + "model.layers.2.mlp.experts.6.gate_proj.weight": 0.0029296875, + "model.layers.2.mlp.experts.6.up_proj.weight": 0.0079403817653656, + "model.layers.2.mlp.experts.7.down_proj.weight": 0.002685546875, + "model.layers.2.mlp.experts.7.gate_proj.weight": 0.001953125, + "model.layers.2.mlp.experts.7.up_proj.weight": 0.008475169539451599, + "model.layers.2.mlp.shared_experts.down_proj.weight": 0.00250244140625, + "model.layers.2.mlp.shared_experts.gate_proj.weight": 0.00341796875, + "model.layers.2.mlp.shared_experts.up_proj.weight": 0.0080915167927742, + "model.layers.2.self_attn.indexer.weights_proj.weight": 0.0017547607421875, + "model.layers.2.self_attn.indexer.wk.weight": 0.001953125, + "model.layers.2.self_attn.indexer.wq_b.weight": 0.0104631707072258, + "model.layers.2.self_attn.kv_a_proj_with_mqa.weight": 0.002288818359375, + "model.layers.2.self_attn.kv_b_proj.weight": 0.00341796875, + "model.layers.2.self_attn.o_proj.weight": 0.0085797980427742, + "model.layers.2.self_attn.q_a_proj.weight": 0.002410888671875, + "model.layers.2.self_attn.q_b_proj.weight": 0.001953125, + "model.layers.3.mlp.experts.0.down_proj.weight": 0.008544921875, + "model.layers.3.mlp.experts.0.gate_proj.weight": 0.00250244140625, + "model.layers.3.mlp.experts.0.up_proj.weight": 0.00390625, + "model.layers.3.mlp.experts.1.down_proj.weight": 0.0092424675822258, + "model.layers.3.mlp.experts.1.gate_proj.weight": 0.00274658203125, + "model.layers.3.mlp.experts.1.up_proj.weight": 0.001953125, + "model.layers.3.mlp.experts.2.down_proj.weight": 0.010428294539451599, + "model.layers.3.mlp.experts.2.gate_proj.weight": 0.002471923828125, + "model.layers.3.mlp.experts.2.up_proj.weight": 0.00341796875, + "model.layers.3.mlp.experts.3.down_proj.weight": 0.008265901356935501, + "model.layers.3.mlp.experts.3.gate_proj.weight": 0.00244140625, + "model.layers.3.mlp.experts.3.up_proj.weight": 0.00341796875, + "model.layers.3.mlp.experts.4.down_proj.weight": 0.008196152746677399, + "model.layers.3.mlp.experts.4.gate_proj.weight": 0.002685546875, + "model.layers.3.mlp.experts.4.up_proj.weight": 0.001953125, + "model.layers.3.mlp.experts.5.down_proj.weight": 0.0095912404358387, + "model.layers.3.mlp.experts.5.gate_proj.weight": 0.0030517578125, + "model.layers.3.mlp.experts.5.up_proj.weight": 0.001953125, + "model.layers.3.mlp.experts.6.down_proj.weight": 0.007568359375, + "model.layers.3.mlp.experts.6.gate_proj.weight": 0.00250244140625, + "model.layers.3.mlp.experts.6.up_proj.weight": 0.0029296875, + "model.layers.3.mlp.experts.7.down_proj.weight": 0.0084402896463871, + "model.layers.3.mlp.experts.7.gate_proj.weight": 0.002685546875, + "model.layers.3.mlp.experts.7.up_proj.weight": 0.001953125, + "model.layers.3.mlp.shared_experts.down_proj.weight": 0.008870445191860199, + "model.layers.3.mlp.shared_experts.gate_proj.weight": 0.00262451171875, + "model.layers.3.mlp.shared_experts.up_proj.weight": 0.00341796875, + "model.layers.3.self_attn.kv_a_proj_with_mqa.weight": 0.0074753537774086, + "model.layers.3.self_attn.kv_b_proj.weight": 0.00262451171875, + "model.layers.3.self_attn.o_proj.weight": 0.00390625, + "model.layers.3.self_attn.q_a_proj.weight": 0.0089401975274086, + "model.layers.3.self_attn.q_b_proj.weight": 0.0023193359375 + }, + "encoded_formats": { + "model.layers.0.mlp.down_proj.weight": "modelopt-nvfp4", + "model.layers.0.mlp.gate_proj.weight": "modelopt-fp8-tensor", + "model.layers.0.mlp.up_proj.weight": "modelopt-fp8-block", + "model.layers.0.self_attn.indexer.weights_proj.weight": "modelopt-nvfp4", + "model.layers.0.self_attn.indexer.wk.weight": "modelopt-fp8-tensor", + "model.layers.0.self_attn.indexer.wq_b.weight": "modelopt-fp8-block", + "model.layers.0.self_attn.kv_a_proj_with_mqa.weight": "modelopt-nvfp4", + "model.layers.0.self_attn.kv_b_proj.weight": "modelopt-fp8-tensor", + "model.layers.0.self_attn.o_proj.weight": "modelopt-fp8-block", + "model.layers.0.self_attn.q_a_proj.weight": "modelopt-nvfp4", + "model.layers.0.self_attn.q_b_proj.weight": "modelopt-fp8-tensor", + "model.layers.1.mlp.experts.0.down_proj.weight": "modelopt-fp8-block", + "model.layers.1.mlp.experts.0.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.0.up_proj.weight": "modelopt-fp8-tensor", + "model.layers.1.mlp.experts.1.down_proj.weight": "modelopt-fp8-block", + "model.layers.1.mlp.experts.1.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.1.up_proj.weight": "modelopt-fp8-tensor", + "model.layers.1.mlp.experts.2.down_proj.weight": "modelopt-fp8-block", + "model.layers.1.mlp.experts.2.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.2.up_proj.weight": "modelopt-fp8-tensor", + "model.layers.1.mlp.experts.3.down_proj.weight": "modelopt-fp8-block", + "model.layers.1.mlp.experts.3.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.3.up_proj.weight": "modelopt-fp8-tensor", + "model.layers.1.mlp.experts.4.down_proj.weight": "modelopt-fp8-block", + "model.layers.1.mlp.experts.4.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.4.up_proj.weight": "modelopt-fp8-tensor", + "model.layers.1.mlp.experts.5.down_proj.weight": "modelopt-fp8-block", + "model.layers.1.mlp.experts.5.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.5.up_proj.weight": "modelopt-fp8-tensor", + "model.layers.1.mlp.experts.6.down_proj.weight": "modelopt-fp8-block", + "model.layers.1.mlp.experts.6.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.6.up_proj.weight": "modelopt-fp8-tensor", + "model.layers.1.mlp.experts.7.down_proj.weight": "modelopt-fp8-block", + "model.layers.1.mlp.experts.7.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.7.up_proj.weight": "modelopt-fp8-tensor", + "model.layers.1.mlp.shared_experts.down_proj.weight": "modelopt-fp8-block", + "model.layers.1.mlp.shared_experts.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.shared_experts.up_proj.weight": "modelopt-fp8-tensor", + "model.layers.1.self_attn.kv_a_proj_with_mqa.weight": "modelopt-fp8-block", + "model.layers.1.self_attn.kv_b_proj.weight": "modelopt-nvfp4", + "model.layers.1.self_attn.o_proj.weight": "modelopt-fp8-tensor", + "model.layers.1.self_attn.q_a_proj.weight": "modelopt-fp8-block", + "model.layers.1.self_attn.q_b_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.0.down_proj.weight": "modelopt-fp8-tensor", + "model.layers.2.mlp.experts.0.gate_proj.weight": "modelopt-fp8-block", + "model.layers.2.mlp.experts.0.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.1.down_proj.weight": "modelopt-fp8-tensor", + "model.layers.2.mlp.experts.1.gate_proj.weight": "modelopt-fp8-block", + "model.layers.2.mlp.experts.1.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.2.down_proj.weight": "modelopt-fp8-tensor", + "model.layers.2.mlp.experts.2.gate_proj.weight": "modelopt-fp8-block", + "model.layers.2.mlp.experts.2.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.3.down_proj.weight": "modelopt-fp8-tensor", + "model.layers.2.mlp.experts.3.gate_proj.weight": "modelopt-fp8-block", + "model.layers.2.mlp.experts.3.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.4.down_proj.weight": "modelopt-fp8-tensor", + "model.layers.2.mlp.experts.4.gate_proj.weight": "modelopt-fp8-block", + "model.layers.2.mlp.experts.4.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.5.down_proj.weight": "modelopt-fp8-tensor", + "model.layers.2.mlp.experts.5.gate_proj.weight": "modelopt-fp8-block", + "model.layers.2.mlp.experts.5.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.6.down_proj.weight": "modelopt-fp8-tensor", + "model.layers.2.mlp.experts.6.gate_proj.weight": "modelopt-fp8-block", + "model.layers.2.mlp.experts.6.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.7.down_proj.weight": "modelopt-fp8-tensor", + "model.layers.2.mlp.experts.7.gate_proj.weight": "modelopt-fp8-block", + "model.layers.2.mlp.experts.7.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.shared_experts.down_proj.weight": "modelopt-fp8-tensor", + "model.layers.2.mlp.shared_experts.gate_proj.weight": "modelopt-fp8-block", + "model.layers.2.mlp.shared_experts.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.self_attn.indexer.weights_proj.weight": "modelopt-fp8-tensor", + "model.layers.2.self_attn.indexer.wk.weight": "modelopt-fp8-block", + "model.layers.2.self_attn.indexer.wq_b.weight": "modelopt-nvfp4", + "model.layers.2.self_attn.kv_a_proj_with_mqa.weight": "modelopt-fp8-tensor", + "model.layers.2.self_attn.kv_b_proj.weight": "modelopt-fp8-block", + "model.layers.2.self_attn.o_proj.weight": "modelopt-nvfp4", + "model.layers.2.self_attn.q_a_proj.weight": "modelopt-fp8-tensor", + "model.layers.2.self_attn.q_b_proj.weight": "modelopt-fp8-block", + "model.layers.3.mlp.experts.0.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.0.gate_proj.weight": "modelopt-fp8-tensor", + "model.layers.3.mlp.experts.0.up_proj.weight": "modelopt-fp8-block", + "model.layers.3.mlp.experts.1.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.1.gate_proj.weight": "modelopt-fp8-tensor", + "model.layers.3.mlp.experts.1.up_proj.weight": "modelopt-fp8-block", + "model.layers.3.mlp.experts.2.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.2.gate_proj.weight": "modelopt-fp8-tensor", + "model.layers.3.mlp.experts.2.up_proj.weight": "modelopt-fp8-block", + "model.layers.3.mlp.experts.3.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.3.gate_proj.weight": "modelopt-fp8-tensor", + "model.layers.3.mlp.experts.3.up_proj.weight": "modelopt-fp8-block", + "model.layers.3.mlp.experts.4.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.4.gate_proj.weight": "modelopt-fp8-tensor", + "model.layers.3.mlp.experts.4.up_proj.weight": "modelopt-fp8-block", + "model.layers.3.mlp.experts.5.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.5.gate_proj.weight": "modelopt-fp8-tensor", + "model.layers.3.mlp.experts.5.up_proj.weight": "modelopt-fp8-block", + "model.layers.3.mlp.experts.6.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.6.gate_proj.weight": "modelopt-fp8-tensor", + "model.layers.3.mlp.experts.6.up_proj.weight": "modelopt-fp8-block", + "model.layers.3.mlp.experts.7.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.7.gate_proj.weight": "modelopt-fp8-tensor", + "model.layers.3.mlp.experts.7.up_proj.weight": "modelopt-fp8-block", + "model.layers.3.mlp.shared_experts.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.shared_experts.gate_proj.weight": "modelopt-fp8-tensor", + "model.layers.3.mlp.shared_experts.up_proj.weight": "modelopt-fp8-block", + "model.layers.3.self_attn.kv_a_proj_with_mqa.weight": "modelopt-nvfp4", + "model.layers.3.self_attn.kv_b_proj.weight": "modelopt-fp8-tensor", + "model.layers.3.self_attn.o_proj.weight": "modelopt-fp8-block", + "model.layers.3.self_attn.q_a_proj.weight": "modelopt-nvfp4", + "model.layers.3.self_attn.q_b_proj.weight": "modelopt-fp8-tensor" + }, + "source_sha256": { + "config.json": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "model.safetensors": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1" + }, + "output_sha256": { + "scope.json": "cb9473f3fab8c5ac5738252a4593d822d85b395e602e9ae2588422022aa99603", + "model.safetensors.index.json": "69f417db73c9884a2ce0529cfeaa5f79772ec61db74af607777e6d923bd60079", + "model.safetensors": "9a5c06dffc5c8c08aa0cb0109c87274d044d8297db132405828d914762370199", + "config.json": "33f139cf6a6c6de8e40791cff02405adc77c4447419863d9ce801642a484e958", + "panel.binding.json": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "qfs-source.json": "624fc5b9568aa8bf12b1fc5cb3d54aef94d5e5ad72d73a55bd761dd6ca659cae", + "loader-verification.json": "086b7c5481cfbae5ee958b3bdeb85264128c59142fb005611bd837533fbdf7b0", + "tokenizer.json": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "cpu-reproduction-summary.json": "41f8263ddacbac1379c67637f83fdef2ed843ca4973179817531855939866a55", + "hub-checkpoint-verification.json": "3a4681f9c2876da6ae303592ede176ab17c6abdface107683fa2fe8386de7d36", + "tokenizer_config.json": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63", + "panel.sha256.json": "7fbfbaa8a3b1d7533177e1c2e774f5686e6a3f6b9564be7f2a99d0f66bff92fd", + "build-manifest.json": "57d74b2e6dcc8a789f51f86d251e51b2ec73c6772c329ad56f6132e08626eced", + "generation_config.json": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "cpu-comparison-receipt.json": "fcfcee1383dc0d50b42bbd97c9f2fc5ebe127c97cab791eeac01bf530d06f178", + "LICENSE": "6456969dd395bff476628945088b4cbd9d9c761b01a64e281c07b09daf9f94c3" + }, + "tool_sha256": "9fae546b8cb91df32468bcc7019c0bfbf10e41569526c7f55384f27afafe8699", + "reader_sha256": "588923f0a4700436221923c794a8c112971d9f08e75c746742b0f0ede7921682", + "reference": "compressed-tensors@0.18.0; DeepSeek-V4-Flash@60d8d70770c6776ff598c94bb586a859a38244f1/inference/kernel.py; nvidia/Qwen3.8-Flash-Next-NVFP4@fc694b54fb0174e0913e6adf86691ef85a4ead47/config.json+headers", + "verification": "independent CPU FP32 encoder reconstruction per encoded weight; no GPU parity" +} diff --git a/raw/candidates/modelopt-mixed/source/LICENSE b/raw/candidates/modelopt-mixed/source/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..71f32fb2284323cef90b3e784a7655747c8ae683 --- /dev/null +++ b/raw/candidates/modelopt-mixed/source/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Michel Belleau + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/raw/candidates/modelopt-mixed/source/README.md b/raw/candidates/modelopt-mixed/source/README.md new file mode 100644 index 0000000000000000000000000000000000000000..84524ad288d3abdc9da67201d2e6389b3968319b --- /dev/null +++ b/raw/candidates/modelopt-mixed/source/README.md @@ -0,0 +1,202 @@ +--- +license: mit +library_name: transformers +pipeline_tag: text-generation +tags: + - glm_moe_dsa + - fixture + - testing + - random-initialization + - cpu + - bfloat16 + - reproducibility +datasets: + - malaiwah/glm-moe-dsa-tiny-cpu-repro-v1 +--- + +# Complete tiny GLM MoE DSA fixture — CPU, BF16, reproducible + +**A runnable random-init architecture fixture, not a language model quality claim.** +It is not trained, distilled, or a quantization of GLM/Fruit. Generated text is meaningless. + +This checkpoint is constructed and saved by the native Transformers +`GlmMoeDsaForCausalLM` implementation. It includes the complete MLA attention path, +DSA indexers, dense/MoE weights, router buffers, independent `lm_head`, and a working +byte-level tokenizer. There is no `trust_remote_code` requirement and no missing-weight +or mismatched-size override. + +Inspired by [GLM-5.2-SIQ-Fruit-bf16](https://huggingface.co/malaiwah/GLM-5.2-SIQ-Fruit-bf16)'s +architecture and dense/MoE plus full/shared-indexer schedules. **No Fruit or other GLM +weights were reused.** Fruit is about 10.1 GB; this checkpoint is **571,000 bytes**. + +## Geometry + +| Property | Value | +|---|---:| +| Trainable parameters | 277,824 | +| Additional stored router-buffer elements | 24, FP32 | +| Stored tensors | 139 (native saving expands fused experts into per-expert keys) | +| Decoder layers / hidden width | 4 / 64 | +| Dense/MoE schedule | dense, sparse, sparse, sparse | +| Routed experts / active experts / shared experts | 8 / 2 / 1 | +| Attention heads / key-value heads | 4 / 4 | +| Query LoRA rank / KV LoRA rank | 32 / 16 | +| QK non-RoPE / RoPE / value head dimensions | 8 / 8 / 16 | +| DSA indexer heads / head dimension / token top-k | 4 / 16 / 8 | +| DSA indexer schedule | full, shared, full, shared | +| Vocabulary | 260: 256 byte symbols + pad/BOS/EOS/unknown | +| Maximum context | 256 tokens | +| Output head | Complete, untied, 260 x 64 BF16 | +| Weight dtype | BF16; native router correction buffers retained FP32 | +| MTP | Intentionally absent: zero next-n-prediction layers, no orphan MTP tensors | + +The shared DSA layers correctly reuse the preceding full indexer's selection. +The published artifact is deliberately BF16, matching QFS's lossless BF16 hidden-capture +contract. Initialization starts in FP32 and is rounded during **artifact construction**, +not silently inside a capture labelled lossless. + +## What was actually verified + +Tested on Linux x86-64, Intel Xeon X5570, Python 3.12.14, **two CPU threads**, no CUDA, +with PyTorch **2.11.0+cpu** and Transformers **5.16.1**. The exact package environment is +in [requirements-cpu.txt](requirements-cpu.txt). + +- Native save/reload preserved every in-memory state tensor's value and dtype. +- QFS loading report: **zero missing, unexpected, mismatched, or conversion-error weights**. +- Two independent generator processes produced byte-identical checkpoint/config/tokenizer files. +- Tokenizer roundtrips include ASCII, accented text, and non-Latin UTF-8 text. +- A real four-by-64-token CPU forward produced finite, nonconstant logits of shape `[4,64,260]`. +- Greedy cached generation executed successfully on CPU. +- **Two fresh QFS capture processes** covered four 64-token windows, **252 scored positions**. +- Both complete captures passed QFS tensor verification and strict dataset validation. +- Their checkpoint, head, stack and capture-content digests agree. +- `fidelity-dataset compare --self-compare --force-compute` returned **exactly 0.0 nats**; + the saved tokenwise array contains **252 literal positive float64 zeros**. +- The comparison receipt passed strict validation. Its reported top-1 agreement is **1.0**. + +QFS retains its reproduction hash-proof result (`short_circuited: true`) even when +forced arithmetic runs. **`self_compare.force_compute_agreed: true` proves that the +independently executed numerical KL replay agreed with those zeros.** The receipt's +top-1 value comes from the identity proof, not a separate top-1 benchmark. + +This is a reproduction confirmation, **not registry admission, a qualified production +reference, or evidence of quantization quality**. The comparison receipt's generic +`determinism.run_count` is one comparison and its `identical_across_runs` field remains +null; the separate evidence summary records the two actual fresh capture processes +and equal tensor digests. No registry row was submitted. + +### Measured resource use + +| Operation | Measured result | +|---|---:| +| First fresh QFS capture, including process startup | 6.49 s | +| Second fresh QFS capture, including process startup | 6.43 s | +| Forced comparison command, including process startup | 3.73 s | +| Full two-capture + verification + comparison driver | 34.86 s | +| Peak capture process RSS | 367,374,336 bytes (about 350 MiB) | +| Materialized model parameters + runtime buffers | 555,776 bytes | + +These are local two-thread CPU observations, **not a benchmark of HF CPU Basic** or a +latency guarantee for another machine. They make this fixture a practical candidate +for a bounded CPU-only demo without downloading large GLM weights. + +## Immutable identities and evidence + +Checkpoint/config/tokenizer revision used for the captures: + +```text +45563636ef723acfb826755493447dc40c7a0c37 +``` + +Checkpoint file SHA-256: + +```text +9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1 +``` + +Both independent captures' content digest: + +```text +d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39 +``` + +- [Build manifest and all tensor hashes](build-manifest.json) +- [Clean loader, tokenizer, forward and generation evidence](loader-verification.json) +- [Fresh Hub-download byte verification](hub-checkpoint-verification.json) +- [CPU reproduction summary](cpu-reproduction-summary.json) +- [Forced zero-KL comparison receipt](cpu-comparison-receipt.json) +- [Full capture/replay evidence bundle](https://huggingface.co/datasets/malaiwah/glm-moe-dsa-tiny-cpu-repro-v1) +- [Pinned QFS source identity](qfs-source.json) + +The evidence dataset is a **bundle**: `first/` and `repeat/` are separate conformant +fidelity dataset trees, while `comparison/` contains the computed comparison. Download +the bundle and use these local subdirectories; its repository root is not itself a +single root-format fidelity dataset. Original sealed capture files are not rewritten. + +## Load and run on CPU + +Use a Python 3.12 Linux environment with the recorded CPU packages. At minimum: + +```bash +pip install 'torch==2.11.0+cpu' --index-url https://download.pytorch.org/whl/cpu +pip install 'transformers==5.16.1' 'tokenizers==0.23.2' 'safetensors==0.8.0' +``` + +```python +import torch +from transformers import AutoModelForCausalLM, AutoTokenizer + +repo = "malaiwah/glm-moe-dsa-tiny-random-bf16" +revision = "45563636ef723acfb826755493447dc40c7a0c37" +torch.set_num_threads(2) +tokenizer = AutoTokenizer.from_pretrained(repo, revision=revision, trust_remote_code=False) +model = AutoModelForCausalLM.from_pretrained( + repo, revision=revision, dtype=torch.bfloat16, trust_remote_code=False +).to("cpu").eval() +inputs = tokenizer("A tiny, complete CPU fixture.", return_tensors="pt", + return_token_type_ids=False) +with torch.inference_mode(): + logits = model(**inputs, use_cache=False).logits +print(logits.shape, torch.isfinite(logits).all().item()) +``` + +## Reproduce the full QFS zero-KL check + +In a fresh Python 3.12 Linux environment, install the HF CLI if needed, then: + +```bash +pip install 'huggingface_hub==1.30.0' +hf download malaiwah/glm-moe-dsa-tiny-random-bf16 \ + --revision 45563636ef723acfb826755493447dc40c7a0c37 --local-dir tiny +pip install -r tiny/requirements-cpu.txt + +git clone https://github.com/malaiwah/quant-fidelity-suite.git qfs +git -C qfs checkout a903cddb078c2eda8c65d6e6c875a09ac932df49 + +python tiny/build_panel.py --model-dir tiny \ + --model-repository malaiwah/glm-moe-dsa-tiny-random-bf16 \ + --model-revision 45563636ef723acfb826755493447dc40c7a0c37 \ + --out tiny-panel --qfs-root qfs + +python tiny/verify_cpu.py --model-dir tiny \ + --model-repository malaiwah/glm-moe-dsa-tiny-random-bf16 \ + --model-revision 45563636ef723acfb826755493447dc40c7a0c37 \ + --panel-dir tiny-panel --out cpu-proof --qfs-root qfs +``` + +Both tools refuse existing output directories. No GPU, cloud API, registry changes, +missing-weight exception, or disabled sanity probe is used. The lane is the schema's +`other`, explicitly disclosed as CPU; it is never mislabelled `local-cuda-budget`. +The synthetic panel is independent of the large-vocabulary GLM benchmark panels and +cannot be used to rank real GLM quantizations. + +To regenerate the native checkpoint itself with the recorded build versions: + +```bash +python tiny/build_fixture.py --out regenerated-tiny +``` + +The fixed seed is **20260907**. The generator checks native save/reload equality; +[build-manifest.json](build-manifest.json) provides the expected file/tensor hashes. +Byte-identical generation was measured in this pinned CPU environment, not asserted +across arbitrary future PyTorch releases or hardware architectures. diff --git a/raw/candidates/modelopt-mixed/source/build-manifest.json b/raw/candidates/modelopt-mixed/source/build-manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..539ac3c8e8430caad8e5c81ca4d23dce391cac14 --- /dev/null +++ b/raw/candidates/modelopt-mixed/source/build-manifest.json @@ -0,0 +1,1561 @@ +{ + "architecture_inspiration": "GLM-5.2-SIQ-Fruit-bf16 geometry and dense/MoE plus full/shared DSA schedules; no Fruit or GLM model weights reused.", + "files": { + "config.json": { + "bytes": 1479, + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + "generation_config.json": { + "bytes": 216, + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + "model.safetensors": { + "bytes": 571000, + "sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1" + }, + "tokenizer.json": { + "bytes": 6763, + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + "tokenizer_config.json": { + "bytes": 236, + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + }, + "generation": "Native GlmMoeDsaForCausalLM random initialization in FP32, rounded to the published BF16 artifact; native router correction buffers retained FP32.", + "generator_sha256": "19c3489f1bc7e8e9323cb26afbead562816a6918d6823af252eb6d04dff8e81e", + "limitations": [ + "Random initialization; not trained or distilled.", + "Not a quantization or behavioral approximation of a released GLM model.", + "MTP intentionally absent (zero next-n-prediction layers); no unmatched MTP tensors.", + "This build manifest describes generated bytes, not proof of clean loading or capture; see separately measured verification evidence." + ], + "parameter_count": 277824, + "schema": "malaiwah.glm-moe-dsa-tiny-build.v1", + "seed": 20260907, + "stored_elements": 277848, + "tensor_count": 139, + "tensors": [ + { + "bytes": 33280, + "dtype": "torch.bfloat16", + "elements": 16640, + "name": "lm_head.weight", + "sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "shape": [ + 260, + 64 + ] + }, + { + "bytes": 33280, + "dtype": "torch.bfloat16", + "elements": 16640, + "name": "model.embed_tokens.weight", + "sha256": "18df1b3a5f263a31f5bd4225c3c4629573b75e47b7e28b6e73501586bb47d6f1", + "shape": [ + 260, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.0.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 16384, + "dtype": "torch.bfloat16", + "elements": 8192, + "name": "model.layers.0.mlp.down_proj.weight", + "sha256": "101a9db78e4e21058dcb6f5240e751bcaf3bd662b98696a63a719f86ecabf787", + "shape": [ + 64, + 128 + ] + }, + { + "bytes": 16384, + "dtype": "torch.bfloat16", + "elements": 8192, + "name": "model.layers.0.mlp.gate_proj.weight", + "sha256": "ef5262b354f74dce3a9dc4c3134e4db8cbf63f03ed8a1cd78ebb3e9a05af97cc", + "shape": [ + 128, + 64 + ] + }, + { + "bytes": 16384, + "dtype": "torch.bfloat16", + "elements": 8192, + "name": "model.layers.0.mlp.up_proj.weight", + "sha256": "359b4dac1da3e3956583050af84147aef2f41b8680a85b32083ffd0e1847d997", + "shape": [ + 128, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.0.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.0.self_attn.indexer.k_norm.bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 16 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.0.self_attn.indexer.k_norm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 512, + "dtype": "torch.bfloat16", + "elements": 256, + "name": "model.layers.0.self_attn.indexer.weights_proj.weight", + "sha256": "50ca7a10fe9a0556d8c3ad38bd3f715ee6c6e13084b4cb6b51b2ef78f57c53b2", + "shape": [ + 4, + 64 + ] + }, + { + "bytes": 2048, + "dtype": "torch.bfloat16", + "elements": 1024, + "name": "model.layers.0.self_attn.indexer.wk.weight", + "sha256": "f724d0b2c09ba9ae41cfc3fbe4e458bd7f644e5f0fb8c1446e19b3cf8c650274", + "shape": [ + 16, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.0.self_attn.indexer.wq_b.weight", + "sha256": "048349f93320b7625130fa5abc86dbcc89715b9f02d6853284563e765eb7bc11", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.0.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.0.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "5ad58e7c4515d8c4e84ecf10ecfa7aacb3c39ee1d6a3219307036bd8b59f529d", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.0.self_attn.kv_b_proj.weight", + "sha256": "9a8cfdd6e51c3868d27f147509d24549480e70f278758a8c16adf1ea5c197938", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.0.self_attn.o_proj.weight", + "sha256": "734b1edea5c19958ab29dfba4314ab5a5a25280be3db3de20b82b2e7c78c35ff", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.0.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.0.self_attn.q_a_proj.weight", + "sha256": "6d6e018ec4d4251755a002469f0778accef3b7628062f82a5d292d4130fd4c85", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.0.self_attn.q_b_proj.weight", + "sha256": "28ef2f379f06054843ff97f99d63f515a2f583059dd49fd894a53d04733f0650", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.1.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.0.down_proj.weight", + "sha256": "a0378aa3bb69ed49af25a51d57476ef63ccf5dc98bc4d3008d28660e16f82492", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.0.gate_proj.weight", + "sha256": "e6c7b0ce29c7e6ea16adfd8423cd9a8a27f1be217a2061a635468c9e5603439c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.0.up_proj.weight", + "sha256": "528f777edc3fc406c76dc1e150a648c23009c701134a3a86dcbdeb15f8ddc4bb", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.1.down_proj.weight", + "sha256": "c966c5eed64d8bb32ff5cf25587fc4eb714b7536b6f670725efb136acc6ca26c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.1.gate_proj.weight", + "sha256": "e55ceb89e6891b34fb67fe5c99b529a1cab9729bea2f6ef08be6af7eefcf6c2e", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.1.up_proj.weight", + "sha256": "46b43c2f3a025bab46be05795bb60916e592bb58d4fdf2a18d2e88d37a7a4fb8", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.2.down_proj.weight", + "sha256": "a649be4fd07f95d770fbe14e87561a13f62f155d2053b8a35fa6962b5d5e8c8d", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.2.gate_proj.weight", + "sha256": "5560e590344e57ff54425f4aa6c07edaaade8c73343e32c27199f1c0dc61fe51", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.2.up_proj.weight", + "sha256": "35a639103a8a914203b4dde3f87d197515879ae6ca72557cde8ea9dea6e6e0d2", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.3.down_proj.weight", + "sha256": "0969db499dfe821348b3c06873d36635f7216f1f595968ad43ae984b57565205", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.3.gate_proj.weight", + "sha256": "75c5c77c39a77a4a6dbe7b601a88814bca9cae6fcde0069ff2ca86352e6c13e7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.3.up_proj.weight", + "sha256": "241533cb545cfed7685091b023213c9d530cb54431a712eba7bf3aaebdae3b53", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.4.down_proj.weight", + "sha256": "ca1273d291e431a10b8d8c2170031b29440c2bec8bc1d7f46353990c7fe1a03f", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.4.gate_proj.weight", + "sha256": "69dc9149cbfd65fb10bd6c11f99357d279d471e5874cf19dbef7cfd8ee4d796c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.4.up_proj.weight", + "sha256": "81cb04732e3cc53acb1152c7fc06a6399af18a5f282762cb72abb56b1e6b7c6f", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.5.down_proj.weight", + "sha256": "ebd8e01f9c2daf657e915575afb3ff5ba261a2a83c25c9c50818319dd587a2f2", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.5.gate_proj.weight", + "sha256": "bc70a7d1a5263ca17d00766bb2dc48e1debb815344150741e55dea48af4d75c0", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.5.up_proj.weight", + "sha256": "f84a95d64728067676d4f7b61ac4a589fa11e45226a8996a4719d65f0b018dbf", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.6.down_proj.weight", + "sha256": "00535633e5d98b7a527cc1198d572a9104405e2aff7ee303ae60195654fb24c2", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.6.gate_proj.weight", + "sha256": "2bb299a5e306108c7af11aa5c6114abeb4d06bde9001e6f7644e0d9dca184dc5", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.6.up_proj.weight", + "sha256": "72df8a498b866a242abc9383b16c5b4428feadab02c7f274afa28653e8586107", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.7.down_proj.weight", + "sha256": "90331ab3da1e867c32d3db1aac94c69c86349dbb539400ed9e0c19c148bf5e43", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.7.gate_proj.weight", + "sha256": "576a9df3d1d72f7323e8a8490118821d826f50c9403ca7ecbe196277e62c7730", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.7.up_proj.weight", + "sha256": "3869533066e5bca84402355c6b80b177424f2d79d2b97cbb9cff30eee748135f", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.float32", + "elements": 8, + "name": "model.layers.1.mlp.gate.e_score_correction_bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 8 + ] + }, + { + "bytes": 1024, + "dtype": "torch.bfloat16", + "elements": 512, + "name": "model.layers.1.mlp.gate.weight", + "sha256": "7d1dbc5cc90900cdc1f9d4a241c8b62d0ad50de09231f9f036cce33982cfdfe7", + "shape": [ + 8, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.shared_experts.down_proj.weight", + "sha256": "eb5297f619dfdfb40419b3330406e8ff43cb0fe35797911f2de6ebff4b95690a", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.shared_experts.gate_proj.weight", + "sha256": "eeeff2280eef91eac1215b28717f2b7fdee09fdbfd484ff44855e7e7cdd11718", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.shared_experts.up_proj.weight", + "sha256": "dab5aeab83d842104e1c5557b9b6d6cb5fe519284b909e8c0c975c752dc92d41", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.1.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.1.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.1.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "bff5998ab14190d56392c70e92927904d84a2b9d04ee222967d774a5bb5eecc4", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.1.self_attn.kv_b_proj.weight", + "sha256": "876302ef3f8bba74a997f973913ca4b802aa488d27b46747c470062c9a7ebee5", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.1.self_attn.o_proj.weight", + "sha256": "ecda88672dc8fbc3bac348fa6118010e51b170d8fe3596a811bc9aa95f71915c", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.1.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.self_attn.q_a_proj.weight", + "sha256": "29fc979642704e621b0b6b59a24c13d6900782bfa9655ea9a3311c1d4c69770a", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.self_attn.q_b_proj.weight", + "sha256": "01bae246d61c4d08e751e42e6a03315b55266ae46bd15b34bd343f606a538349", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.2.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.0.down_proj.weight", + "sha256": "8c1c19d08541dc9251736b480f53cfefd21bfbcb0b4e9f725dc66e6c52d7705c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.0.gate_proj.weight", + "sha256": "8c326913b2ef159b507b584c1ae018619573a09b6f41ab687df629d3685884c4", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.0.up_proj.weight", + "sha256": "8611bc004f735fbc1c14a9c9c23f4150c7e754127e44926a44efd0b767a653ed", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.1.down_proj.weight", + "sha256": "1d4d668c4c8183e5991eefe780a138eda70578a4740c07df5b386f233cb4e5c3", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.1.gate_proj.weight", + "sha256": "21224f6173f4785ff6252dd0c1f7a6937b36bbd5bc1c20d25feecc85d6d25f3e", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.1.up_proj.weight", + "sha256": "05542672d0174f9ddfee4bd385b56455c004532da88bf34363b1e543948bf899", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.2.down_proj.weight", + "sha256": "7330dee9a6a416e9922f61d10ee0507584e007cbdd349131471b43a745b6fed8", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.2.gate_proj.weight", + "sha256": "eca5904e6634e97ca89e7dfb1f12774f78adb33b78256136e7e8ee522af92d96", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.2.up_proj.weight", + "sha256": "5a90748752e46844a0cf0efd84c16ec2db25315ffa7a13b9c4bff2697d00bbf6", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.3.down_proj.weight", + "sha256": "a42569462225d60158dfaf24406463f135b632fe258e66ae2e521efed502a37c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.3.gate_proj.weight", + "sha256": "8cf448df350984fe0429a1ca3b2081315b594e50ce85fbc2e9f63eafb8a896b7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.3.up_proj.weight", + "sha256": "54a1269ba638d42c7d6d3926826b04d52310c82804fddcd73c253680a4270032", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.4.down_proj.weight", + "sha256": "5a236edfdc8fc79f687cec866d13724515b8f26465dca2ffde051d0870d5d0ac", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.4.gate_proj.weight", + "sha256": "6c18140a11c9986f99b7c269da01a8f69f1b5215c41be1801d6900eb511bdc76", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.4.up_proj.weight", + "sha256": "7b964f5c207a6bbeaa589a6c07f9665967aca4e7c57148190ed6a6f12e0ca572", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.5.down_proj.weight", + "sha256": "74c2633e7d3b0bf844d3e3812533774fc09b6552435e778e68b442ad161c0985", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.5.gate_proj.weight", + "sha256": "6177166c1bc51e03fde63b60d85347f5a5412446df5b4dd893817d18fcf0d56c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.5.up_proj.weight", + "sha256": "7bb8e1f65a918589a1593926dc93bf3fa1329f5d31f16266c3ad6fe0fd390d47", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.6.down_proj.weight", + "sha256": "af74e303b86b1aec96fd69b64d39848d7d08f255822739cf7d5f4456de67f010", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.6.gate_proj.weight", + "sha256": "c4fc94863e17270bf8cb5a18d3a125bea82d04bfb38457fd27896a00ddeea056", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.6.up_proj.weight", + "sha256": "4e92bebe11c518a225d75d4d7de7b85f9a82baad7a961ac090dd7343a612b577", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.7.down_proj.weight", + "sha256": "8971d6a869ba59445fe28163bd73c74c8338e0b8b675f008277b5a8973967bb2", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.7.gate_proj.weight", + "sha256": "3f90ff90c18d50349a50d11c472d48c6b297496ba5bedfe4ff0da257e1e2fdef", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.7.up_proj.weight", + "sha256": "5a2fcecdbb84a9138b4dd32da15793393aeaee1d00da95ed3d55803b1f45cc86", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.float32", + "elements": 8, + "name": "model.layers.2.mlp.gate.e_score_correction_bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 8 + ] + }, + { + "bytes": 1024, + "dtype": "torch.bfloat16", + "elements": 512, + "name": "model.layers.2.mlp.gate.weight", + "sha256": "aa35eb60ee6dd8e32728c95210b15016120675b111542f36ee1b1cca64668f9d", + "shape": [ + 8, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.shared_experts.down_proj.weight", + "sha256": "e8a1e6e8db3b1996aad9cd457ae20aa5aaac876d400fd6e8d764f543ff7833b9", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.shared_experts.gate_proj.weight", + "sha256": "c5b456aab9a02d3828987060b24d24c07e7b611d3036f0d5c28662c922d1238d", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.shared_experts.up_proj.weight", + "sha256": "6a84e814bd21fcc17878151b94508853dd70099787ef5303cdc06f90b6cd7092", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.2.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.2.self_attn.indexer.k_norm.bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 16 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.2.self_attn.indexer.k_norm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 512, + "dtype": "torch.bfloat16", + "elements": 256, + "name": "model.layers.2.self_attn.indexer.weights_proj.weight", + "sha256": "d65c6e5c3f34fcad47b7137c46dd3bcd6d5cf24ce508df7fad9d20788d3a18b8", + "shape": [ + 4, + 64 + ] + }, + { + "bytes": 2048, + "dtype": "torch.bfloat16", + "elements": 1024, + "name": "model.layers.2.self_attn.indexer.wk.weight", + "sha256": "917ff454cb253fa0e5d3d68bf15e716401bb928fbd7cd260a348afec25b1b2c8", + "shape": [ + 16, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.self_attn.indexer.wq_b.weight", + "sha256": "3fe5b407fe2d74a0dda78b6cb7ae3f65066a781fd5f81971b83be600fc911d14", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.2.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.2.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "26cecf47e8fb14a837f760549a9b9dd8589c37dc76870f8b115d4ab634b853ab", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.2.self_attn.kv_b_proj.weight", + "sha256": "23447f5f72c55b0cd7acd571ff1317c16c8097e9f0de4cc9b66101b51f7988c1", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.2.self_attn.o_proj.weight", + "sha256": "a1a0c84b3214c9b7b00c438754280833964cdc719aadeff64358b3d09b2063d8", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.2.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.self_attn.q_a_proj.weight", + "sha256": "3eda4fc6a047b282d63ad2884d870ee8150a99f3c71d21031ea71e749cf39815", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.self_attn.q_b_proj.weight", + "sha256": "58ecb919757c3c93d6a43b9344236d9abd32870e68907f37cb8db779d2c93fff", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.3.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.0.down_proj.weight", + "sha256": "e8c77c987baa36019ce1adf05e02e2a31395286e584428b2049e06331848c216", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.0.gate_proj.weight", + "sha256": "69871151865d8a23e2cc39b9fe5da60eb4f41cb6c053520f29d7c7b58e6fa5e0", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.0.up_proj.weight", + "sha256": "12df1ea42b96e959785c09427c3ca3bcdc53aa7942d15187c7b1e19bdd66d08a", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.1.down_proj.weight", + "sha256": "5feaa5de7da59348b465458b8aff5373b11dae8b5150f8e7bb8015acc172e3ff", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.1.gate_proj.weight", + "sha256": "e907e6e36b7266d56e190c1e56551e0a40d64741ce668328d898c17b488ec6c9", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.1.up_proj.weight", + "sha256": "c0062ef6004073cbabf3098703b5f565f0e973e094d90c3eba36c7be471f947e", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.2.down_proj.weight", + "sha256": "efec1e8a6a5e12a6db226699e10a6d346fa95c453009f148fe304d378567f5fe", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.2.gate_proj.weight", + "sha256": "7722cc87a7696f53e7f1e0d741230a7db18d2c324f7faec742a9621c75189cb7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.2.up_proj.weight", + "sha256": "5917df5932d0ce4854458ce357a8a2c3384bc463531996875d1c68c6ea17734c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.3.down_proj.weight", + "sha256": "fd331dc77911f8d80ddfdee938993a08b3715d06767901879c5a55700dbb8961", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.3.gate_proj.weight", + "sha256": "1e8aa3749cdc3d21baf7108c47bb69ad4a532c1f41c0556ca8d68ca2c226a7a8", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.3.up_proj.weight", + "sha256": "858e72360951a5073d117a75b2cd759bc3503c6c270388b30fe73d7554f54dae", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.4.down_proj.weight", + "sha256": "b80cf998a1db7569ca4600388bbe4c6d20bd7fe7209c4e37b5de015041d01423", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.4.gate_proj.weight", + "sha256": "b39a0f5b9cd6f9175e7fa29b342772476caf8a76dad1c34d88075988c1894853", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.4.up_proj.weight", + "sha256": "cef4d7b5fb77e750e91c17cae1622a6362ba204b1b30bf5ed7b65f9e6ed15ff1", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.5.down_proj.weight", + "sha256": "65a04840ec88842630cc6f120899a3bfa6151990d7411bfe44839727648e4d03", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.5.gate_proj.weight", + "sha256": "101836900c549af917f8392a6b1428e2f14e4e1f1ef0fdd9b04e79b98c1c3d02", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.5.up_proj.weight", + "sha256": "4fc8edda4b1a92a43be268a8b249274dd5f4370fd6ea6a3134b8c2c4cf730d95", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.6.down_proj.weight", + "sha256": "fd3a10e1464c20bf5e575c105f39882bcbddcab892ef36f24e5a852d597ee7ef", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.6.gate_proj.weight", + "sha256": "8211aaeed6f1ea2711aa1865309d2d36742c0b41021eea1e00fcac45dc353b4b", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.6.up_proj.weight", + "sha256": "ec4f5d1acc5d045de6ae4106bc8f52d17d64ac355c910f12fac8b1b0b573296d", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.7.down_proj.weight", + "sha256": "03c257936ec78df3f941fe0ca4ce5aad636654cf2a351b64515ac07ad8871cae", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.7.gate_proj.weight", + "sha256": "67c1e28fd0a028104b9c76279a3c473f50452633c8a4feabda637e5f5b71f797", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.7.up_proj.weight", + "sha256": "1b18f8b452b71ca57fec09892a48df2ee2108067f97f62b76a3817c9bea91708", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.float32", + "elements": 8, + "name": "model.layers.3.mlp.gate.e_score_correction_bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 8 + ] + }, + { + "bytes": 1024, + "dtype": "torch.bfloat16", + "elements": 512, + "name": "model.layers.3.mlp.gate.weight", + "sha256": "7e86bda3f7704f19dc2a3f6a0ca22b0df554723adf0cf3add837a1e497ad4d3a", + "shape": [ + 8, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.shared_experts.down_proj.weight", + "sha256": "110ad4d8dd59a5ec2b0d4c2e0a79d022bcdba240a4998ff84ad2590dd32fce2c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.shared_experts.gate_proj.weight", + "sha256": "cca5d02ac9eccab3ee8be47f55ef4d59750dd311800e25c22cc3f22b437ffd8b", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.shared_experts.up_proj.weight", + "sha256": "c8fe3987299d1526946a87facc4d3f99300fafbac552471ed826454c41ed31e5", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.3.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.3.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.3.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "5c230cafd4add95096f53702bab8ef1673993cca9433de8c874638958a61995a", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.3.self_attn.kv_b_proj.weight", + "sha256": "ff432280fe1fbbc2a5b7fee7fb18f6de59d675d2d7d0eec0d769a5fd012699a9", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.3.self_attn.o_proj.weight", + "sha256": "59e2e2ee8f9cba29e9cf3e6098539ddca5811d35d3df3c860488f348d6be9584", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.3.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.self_attn.q_a_proj.weight", + "sha256": "172aae8ff1a79376bf65182f5e92c06da2f9b307c15f214a20597491729aa0d7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.self_attn.q_b_proj.weight", + "sha256": "5d917d8c510906982c609808f1eb0d16da467976550e3a063637f1fde013cbdb", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.norm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + } + ], + "tokenizer": { + "kind": "byte-level BPE without merges", + "special_token_ids": { + "": 1, + "": 2, + "": 0, + "": 3 + }, + "vocab_size": 260 + }, + "versions": { + "safetensors": "0.8.0", + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "transformers": "5.16.1" + } +} diff --git a/raw/candidates/modelopt-mixed/source/build_fixture.py b/raw/candidates/modelopt-mixed/source/build_fixture.py new file mode 100644 index 0000000000000000000000000000000000000000..c86f3466f6c2ac6df7f31bb4ac5ca8bbcaeebf2c --- /dev/null +++ b/raw/candidates/modelopt-mixed/source/build_fixture.py @@ -0,0 +1,145 @@ +#!/usr/bin/env python3 +"""Build a complete, untrained GLM MoE DSA checkpoint for CPU pipeline checks. + +No source model weights, remote Python code, training data or paid compute are used. +Reproducibility is asserted only for the recorded dependency versions on CPU. +""" +from __future__ import annotations + +import argparse +import hashlib +import json +from pathlib import Path +import shutil + +SEED = 20260907 +SPECIAL_TOKENS = ["", "", "", ""] +VERSIONS = {"torch": "2.11.0+cpu", "transformers": "5.16.1", "tokenizers": "0.23.2", "safetensors": "0.8.0"} + + +def write_json(path, value): + path.write_text(json.dumps(value, sort_keys=True, indent=2, ensure_ascii=False, allow_nan=False) + "\n", encoding="utf-8") + + +def build(destination): + import torch + import transformers + import tokenizers + import safetensors + from tokenizers import Tokenizer, decoders, models, pre_tokenizers, processors + from transformers import GlmMoeDsaConfig, GlmMoeDsaForCausalLM, PreTrainedTokenizerFast + + observed = {"torch": torch.__version__, "transformers": transformers.__version__, + "tokenizers": tokenizers.__version__, "safetensors": safetensors.__version__} + if observed != VERSIONS: + raise ValueError("Use the recorded CPU build environment: expected %s; observed %s" % (VERSIONS, observed)) + if destination.exists(): + raise ValueError("Refusing to overwrite an existing destination: %s" % destination) + destination.mkdir(parents=True) + torch.set_num_threads(2) + torch.set_num_interop_threads(1) + torch.manual_seed(SEED) + torch.use_deterministic_algorithms(True) + + alphabet = sorted(pre_tokenizers.ByteLevel.alphabet()) + if len(alphabet) != 256: + raise ValueError("The byte alphabet must contain exactly 256 symbols") + vocabulary = {token: index for index, token in enumerate(SPECIAL_TOKENS + alphabet)} + backend = Tokenizer(models.BPE(vocab=vocabulary, merges=[], unk_token="")) + backend.pre_tokenizer = pre_tokenizers.ByteLevel(add_prefix_space=False, use_regex=False) + backend.decoder = decoders.ByteLevel() + backend.post_processor = processors.TemplateProcessing( + single=" $A ", pair=" $A $B:1 :1", + special_tokens=[("", 1), ("", 2)]) + tokenizer = PreTrainedTokenizerFast( + tokenizer_object=backend, pad_token="", bos_token="", + eos_token="", unk_token="", model_max_length=256, + clean_up_tokenization_spaces=False) + tokenizer.save_pretrained(destination) + + config = GlmMoeDsaConfig( + vocab_size=len(tokenizer), hidden_size=64, intermediate_size=128, + moe_intermediate_size=32, num_hidden_layers=4, + num_attention_heads=4, num_key_value_heads=4, + n_shared_experts=1, n_routed_experts=8, num_experts_per_tok=2, + n_group=1, topk_group=1, norm_topk_prob=True, routed_scaling_factor=2.5, + q_lora_rank=32, kv_lora_rank=16, qk_nope_head_dim=8, + qk_rope_head_dim=8, v_head_dim=16, + index_n_heads=4, index_head_dim=16, index_topk=8, + indexer_types=["full", "shared", "full", "shared"], + first_k_dense_replace=1, mlp_layer_types=["dense", "sparse", "sparse", "sparse"], + num_nextn_predict_layers=0, max_position_embeddings=256, + rope_parameters={"rope_type": "default", "rope_theta": 10000.0}, + pad_token_id=0, bos_token_id=1, eos_token_id=2, tie_word_embeddings=False, + attention_bias=False, attention_dropout=0.0, mlp_bias=False, + initializer_range=0.02, rms_norm_eps=1e-5, dtype="bfloat16", + ) + # Construct the native class, never hand-author a subset of state_dict keys. + # Initialize in FP32, then deliberately define the published artifact in BF16. + model = GlmMoeDsaForCausalLM(config).to(device="cpu", dtype=torch.bfloat16).eval() + # The native BF16 loader strictly retains router correction buffers in FP32. + # Store that exception explicitly; the rest reloads without dtype changes. + for module in model.modules(): + if hasattr(module, "e_score_correction_bias"): + module.e_score_correction_bias = module.e_score_correction_bias.float() + if model.get_output_embeddings().weight.data_ptr() == model.get_input_embeddings().weight.data_ptr(): + raise ValueError("Fixture must contain a complete, independent output head") + for name, tensor in model.state_dict().items(): + if tensor.is_floating_point() and not torch.isfinite(tensor).all(): + raise ValueError("Non-finite initialized tensor: " + name) + model.save_pretrained(destination, safe_serialization=True, max_shard_size="10MB") + + from safetensors import safe_open + tensors = [] + with safe_open(destination / "model.safetensors", framework="pt", device="cpu") as saved: + for name in sorted(saved.keys()): + tensor = saved.get_tensor(name) + raw = tensor.contiguous().view(torch.uint8).numpy().tobytes() + tensors.append({"name": name, "shape": list(tensor.shape), "dtype": str(tensor.dtype), + "elements": tensor.numel(), "bytes": len(raw), + "sha256": hashlib.sha256(raw).hexdigest()}) + # Native saving expands fused expert tensors into canonical per-expert + # checkpoint keys. Verify their semantic roundtrip, not name equality between + # the storage representation and the in-memory fused representation. + reloaded = transformers.AutoModelForCausalLM.from_pretrained( + destination, dtype=torch.bfloat16, local_files_only=True, trust_remote_code=False) + expected_state, observed_state = model.state_dict(), reloaded.state_dict() + if expected_state.keys() != observed_state.keys(): + raise ValueError("Native state keys changed across save/reload") + for name, tensor in expected_state.items(): + if tensor.dtype != observed_state[name].dtype or not torch.equal(tensor, observed_state[name]): + raise ValueError("Tensor changed across native save/reload: " + name) + files = {} + for name in ("config.json", "generation_config.json", "model.safetensors", "tokenizer.json", "tokenizer_config.json"): + raw = (destination / name).read_bytes() + files[name] = {"bytes": len(raw), "sha256": hashlib.sha256(raw).hexdigest()} + manifest = { + "schema": "malaiwah.glm-moe-dsa-tiny-build.v1", + "seed": SEED, "versions": observed, + "generator_sha256": hashlib.sha256(Path(__file__).read_bytes()).hexdigest(), + "generation": "Native GlmMoeDsaForCausalLM random initialization in FP32, rounded to the published BF16 artifact; native router correction buffers retained FP32.", + "parameter_count": sum(p.numel() for p in model.parameters()), + "tensor_count": len(tensors), "stored_elements": sum(t["elements"] for t in tensors), + "files": files, "tensors": tensors, + "tokenizer": {"kind": "byte-level BPE without merges", "vocab_size": len(tokenizer), + "special_token_ids": {token: tokenizer.convert_tokens_to_ids(token) for token in SPECIAL_TOKENS}}, + "architecture_inspiration": "GLM-5.2-SIQ-Fruit-bf16 geometry and dense/MoE plus full/shared DSA schedules; no Fruit or GLM model weights reused.", + "limitations": ["Random initialization; not trained or distilled.", "Not a quantization or behavioral approximation of a released GLM model.", + "MTP intentionally absent (zero next-n-prediction layers); no unmatched MTP tensors.", + "This build manifest describes generated bytes, not proof of clean loading or capture; see separately measured verification evidence."], + } + write_json(destination / "build-manifest.json", manifest) + shutil.copyfile(__file__, destination / "build_fixture.py") + print(json.dumps({"destination": str(destination), "parameter_count": manifest["parameter_count"], + "tensor_count": len(tensors), "weight_file": files["model.safetensors"]}, indent=2)) + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--out", required=True, type=Path) + args = parser.parse_args() + build(args.out) + + +if __name__ == "__main__": + main() diff --git a/raw/candidates/modelopt-mixed/source/build_panel.py b/raw/candidates/modelopt-mixed/source/build_panel.py new file mode 100644 index 0000000000000000000000000000000000000000..258be1a623b3009940fb0b1417c5be9ea02904be --- /dev/null +++ b/raw/candidates/modelopt-mixed/source/build_panel.py @@ -0,0 +1,232 @@ +#!/usr/bin/env python3 +"""Build the tiny GLM-MoE-DSA synthetic CPU smoke panel, not a benchmark. + +The QFS panel directory has an exact sealed file closure. Its resolved binding +and SHA report are therefore written beside --out, never inside it. The caller +must supply the genuine published model commit; this offline builder verifies +local bytes, not their remote availability at that commit. +""" +from __future__ import annotations + +import argparse +import importlib.util +import json +from pathlib import Path +import re +import sys + + +PANEL_ID = "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1" +PANEL_NAME = "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)" +CONTEXT_LENGTH = 64 +VOCAB_SIZE = 260 +ARTIFACT_EPOCH = "2026-09-07T00:00:00Z" +# Authored synthetic inputs, embedded verbatim in the receipt for reconstruction. +TEXTS = ( + ("garden", "The small garden has red flowers, green leaves, and a stone path. " + "A gentle breeze moves the branches while a robin sings near the gate."), + ("arithmetic", "A shelf holds three blue boxes and five red boxes. There are eight " + "boxes in total. Move two boxes to the desk and count the six boxes remaining."), + ("code", "def add_values(left, right):\n return left + right\n\n" + "result = add_values(7, 9)\nprint(result)\n" + "# This readable snippet is synthetic input, not a coding benchmark.\n"), + ("instructions", "First place a clean cup on the table. Next pour cool water into " + "the cup. Finally put the bottle away and write a short note about the steps."), +) +TOKENIZER_FILES = ( + "config.json", "generation_config.json", "tokenizer.json", "tokenizer_config.json", + "special_tokens_map.json", "added_tokens.json", "vocab.json", "merges.txt", + "tokenizer.model", "spiece.model", "sentencepiece.bpe.model", "chat_template.jinja", +) + + +def write_json(path: Path, value: object) -> None: + with path.open("x", encoding="utf-8", newline="\n") as handle: + handle.write(json.dumps(value, indent=2, sort_keys=True, + ensure_ascii=False, allow_nan=False) + "\n") + + +def main(argv: list[str] | None = None) -> int: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--model-dir", required=True, type=Path) + parser.add_argument("--model-repository", required=True) + parser.add_argument("--model-revision", required=True, + help="genuine immutable published model commit (40 lowercase hex)") + parser.add_argument("--out", required=True, type=Path, + help="new sealed panel directory; binding/report are sibling files") + parser.add_argument("--qfs-root", required=True, type=Path, + help="QFS checkout containing bin/fidelity and engines/tools") + args = parser.parse_args(argv) + if re.fullmatch(r"[0-9a-f]{40}", args.model_revision) is None: + parser.error("--model-revision must be an immutable 40-character lowercase hex commit") + if re.fullmatch(r"[A-Za-z0-9][A-Za-z0-9._-]*/[A-Za-z0-9][A-Za-z0-9._-]*", + args.model_repository) is None: + parser.error("--model-repository must be a Hugging Face owner/repository ID") + model_dir = args.model_dir.resolve() + qfs_root = args.qfs_root.resolve() + out = args.out.resolve() + binding_path = out.with_name(out.name + ".binding.json") + report_path = out.with_name(out.name + ".sha256.json") + if not model_dir.is_dir(): + parser.error("--model-dir must already contain the saved model and native tokenizer") + for destination in (out, binding_path, report_path): + if destination.exists() or destination.is_symlink(): + parser.error("refusing to overwrite %s" % destination) + if destination.is_relative_to(model_dir) or destination.is_relative_to(qfs_root): + parser.error("output must be outside the model directory and QFS checkout") + builder_path = qfs_root / "engines/tools/build_token_panel.py" + resolver_path = qfs_root / "bin/fidelity/panel.py" + if not builder_path.is_file() or not resolver_path.is_file(): + parser.error("--qfs-root lacks the existing token-panel builder or resolver") + + # Reuse the existing format's seal and token preimages. Its CLI cannot meet + # this contract: it hardcodes add_special_tokens=False and not local-only. + spec = importlib.util.spec_from_file_location("qfs_token_panel_builder", builder_path) + if spec is None or spec.loader is None: + raise RuntimeError("cannot import the QFS token-panel builder") + builder = importlib.util.module_from_spec(spec) + spec.loader.exec_module(builder) + sys.path.insert(0, str(qfs_root / "bin")) + from fidelity import panel as panel_contract + import numpy as np + import tokenizers + import transformers + from transformers import AutoTokenizer + + for name in ("config.json", "tokenizer.json", "tokenizer_config.json"): + if not (model_dir / name).is_file(): + raise ValueError("required native tokenizer/model file missing: " + name) + config = json.loads((model_dir / "config.json").read_text(encoding="utf-8")) + if config.get("model_type") != "glm_moe_dsa" or config.get("vocab_size") != VOCAB_SIZE: + raise ValueError("expected glm_moe_dsa model with vocabulary size 260") + if config.get("max_position_embeddings", 0) < CONTEXT_LENGTH: + raise ValueError("model context limit cannot accommodate 64-token windows") + file_hashes = {name: builder.sha256_file(model_dir / name) + for name in sorted(TOKENIZER_FILES) if (model_dir / name).is_file()} + tokenizer = AutoTokenizer.from_pretrained( + model_dir, local_files_only=True, trust_remote_code=False) + if len(tokenizer) != VOCAB_SIZE or tokenizer.vocab_size != VOCAB_SIZE: + raise ValueError("expected exactly 260 native tokenizer entries, including special tokens") + if set(tokenizer.get_vocab().values()) != set(range(VOCAB_SIZE)): + raise ValueError("tokenizer IDs must cover the contiguous interval [0,260)") + expected_specials = {"pad_token_id": 0, "bos_token_id": 1, + "eos_token_id": 2, "unk_token_id": 3} + for name, expected in expected_specials.items(): + if getattr(tokenizer, name, None) != expected: + raise ValueError("unexpected tokenizer special ID for " + name) + + encoded_windows = [] + sources = [] + for index, (domain, text) in enumerate(TEXTS): + encoded = tokenizer(text, add_special_tokens=True, truncation=True, + max_length=CONTEXT_LENGTH, padding=False, + return_attention_mask=True, return_special_tokens_mask=True) + ids = encoded["input_ids"] + mask = encoded["attention_mask"] + special_mask = encoded["special_tokens_mask"] + if (len(ids) != CONTEXT_LENGTH or len(mask) != CONTEXT_LENGTH + or len(special_mask) != CONTEXT_LENGTH + or any(type(value) is not int or not 0 <= value < VOCAB_SIZE for value in ids) + or mask != [1] * CONTEXT_LENGTH): + raise ValueError("tokenizer produced invalid token IDs or 64-token/mask shape") + if (any(value not in (0, 1) for value in special_mask) + or not any(special_mask) + or not all(ids[pos] in tokenizer.all_special_ids + for pos, marked in enumerate(special_mask) if marked)): + raise ValueError("native tokenizer did not apply a valid special-token template") + window_id = "final-%04d" % index + encoded_windows.append((window_id, domain, ids)) + raw = text.encode("utf-8") + sources.append({"stratum": domain, "document": domain + ".txt", + "document_sha256": builder.sha256_bytes(raw), "bytes": len(raw), + "text_utf8": text, "selected": True, "window_id": window_id, + "tokens_total": len(tokenizer(text, add_special_tokens=True)["input_ids"]), + "num_tokens": len(ids), "special_tokens_mask": special_mask}) + + arrays = out / "arrays" + arrays.mkdir(parents=True, exist_ok=False) + mask_path = arrays / "causal-mask-64.npy" + np.save(mask_path, np.ones(CONTEXT_LENGTH, dtype=np.uint8), allow_pickle=False) + mask_sha = builder.sha256_file(mask_path) + windows = [] + for window_id, domain, ids in encoded_windows: + token_path = arrays / (window_id + ".tokens.npy") + np.save(token_path, np.asarray(ids, dtype=" same_stack", + "overridden_by": null, + "passed": true + } + }, + "high_kld_contexts": [ + { + "allocation_stratum": null, + "domain": "garden", + "index": 0, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0000" + }, + { + "allocation_stratum": null, + "domain": "arithmetic", + "index": 1, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0001" + }, + { + "allocation_stratum": null, + "domain": "code", + "index": 2, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0002" + }, + { + "allocation_stratum": null, + "domain": "instructions", + "index": 3, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0003" + } + ], + "kl": { + "max": 0.0, + "mean": 0.0, + "median": 0.0, + "p95": 0.0, + "p99": 0.0, + "p99_9": 0.0 + }, + "kl_macro_stratum_mean": null, + "kl_micro_token_mean": 0.0, + "measurement_scope": { + "contexts": 4, + "covers_full_panel": true, + "position_filter": "all", + "positions_per_context": 63, + "scored_positions": 252, + "subset_detail": null + }, + "metric": { + "direction": "reference_to_candidate", + "direction_label": "KL(reference || candidate)", + "higher_is_better": false, + "name": "mean_tokenwise_kld", + "units": "nats", + "value": 0.0 + }, + "panel": { + "context_length": 64, + "contexts": 4, + "panel_id": "panel--panel", + "panel_token_sha256_legacy": "3c9467c85be43d238926f6d18bf825c2e4748814c95b8b0e8b8f1420546c3089", + "scored_positions": 252, + "scoring_window": { + "dropped_positions_total": 0, + "min_left_context_tokens": 1, + "policy": "every causal prediction position of every window is scored; nothing is dropped", + "score_from": 0, + "windowed": false + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + }, + "tokenizer_candidate": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + }, + "tokenizer_identity_equal": true, + "tokenizer_reference": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } + }, + "per_context": [ + { + "allocation_stratum": null, + "domain": "garden", + "index": 0, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0000" + }, + { + "allocation_stratum": null, + "domain": "arithmetic", + "index": 1, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0001" + }, + { + "allocation_stratum": null, + "domain": "code", + "index": 2, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0002" + }, + { + "allocation_stratum": null, + "domain": "instructions", + "index": 3, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0003" + } + ], + "per_domain": null, + "per_stratum": null, + "receipt_sha256": "4910833e5cc175ea351055e567c5d896475b4020598359291aedc958d8ada382", + "reference": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "dataset_id": "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "dataset_sha256": "56588f20f9cf055301f83a828fa75fa94c1e26593e64a07c5c6c4e38e9454563", + "form": "hidden", + "head": { + "bits": 16, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510" + }, + "label": "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "lane": "other", + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "repository": "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "revision": null, + "role": "root", + "scope_digest": "attn.o=native:bf16@16|attn.qkv=native:bf16@16|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=native:bf16@16|mlp.gate=native:bf16@16|mlp.up=native:bf16@16|moe.experts=native:bf16@16|norm=native:bf16@16|head=native|kv=bf16", + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd", + "weights": { + "artifact_ref": null, + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "codec": null, + "config_sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "declared_bits": null, + "declared_head_bits": 16, + "index_sha256": null, + "model_ref": null, + "model_revision": "45563636ef723acfb826755493447dc40c7a0c37", + "quantized": false, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37" + } + }, + "schema": "malaiwah.fidelity-comparison-receipt.v1", + "self_compare": { + "asserted_exact_zero": true, + "capture_content_digest_equal": true, + "expected_tokenwise_bytes": 2144, + "expected_tokenwise_sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d", + "force_compute_agreed": true, + "head_digest_equal": true, + "weights_identity_equal": true + }, + "submission": { + "emitted": false, + "path": null, + "receipt_sha256": null, + "refusal": "comparison_kind is reproduction_confirmation, not measurement; bin/fidelity/receipt.py::_scan_for_unsubmittable is the second, independent refusal axis.", + "submission_schema": null + }, + "tokenwise": { + "bytes": 2144, + "path": "tokenwise-kld.npy", + "sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d" + }, + "top1_agreement": 1.0, + "top1_discordant_contexts": [], + "uncertainty": { + "ci95_high": null, + "ci95_low": null, + "cluster_unit": null, + "clusters": null, + "method": "none", + "samples": null, + "seed": null + } +} diff --git a/raw/candidates/modelopt-mixed/source/cpu-reproduction-summary.json b/raw/candidates/modelopt-mixed/source/cpu-reproduction-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..7fe4e433fbfabcad4ab3781b796fbd3439d5db17 --- /dev/null +++ b/raw/candidates/modelopt-mixed/source/cpu-reproduction-summary.json @@ -0,0 +1,851 @@ +{ + "captures": { + "first": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "cold_run": "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "dataset_sha256": "56588f20f9cf055301f83a828fa75fa94c1e26593e64a07c5c6c4e38e9454563", + "generation_sanity_probe": { + "degenerate": false, + "enforced": false, + "entropy_nats": 5.548019647470335, + "expect": null, + "logit_spread": 0.986328125, + "note": "one extra window through the same schedule; its hidden state is discarded and never enters the dataset.", + "prompt": "The capital of France is", + "schema": "malaiwah.generation-sanity-probe.v1", + "status": "recorded", + "top1_id": 113, + "top1_probability": 0.006720104384265371, + "top1_text": "�", + "top_k": [ + { + "id": 113, + "probability": 0.006720104384265371, + "text": "�" + }, + { + "id": 237, + "probability": 0.006412368399474785, + "text": "�" + }, + { + "id": 193, + "probability": 0.006035639491843906, + "text": "\u0001" + }, + { + "id": 236, + "probability": 0.0055386141320063614, + "text": "�" + }, + { + "id": 44, + "probability": 0.0054740873228682424, + "text": "I" + } + ], + "uniform_entropy_nats": 5.560681631015528, + "vocab_size": 260 + }, + "head_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "memory_report": { + "context_length": 64, + "decoder_layers": null, + "device": "cpu", + "hidden_size": 64, + "layer_residency": null, + "model": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "peak_resident_weight_bytes": 555776, + "peak_resident_weight_detail": { + "buffers": 128, + "parameters": 555648, + "total": 555776 + }, + "peak_resident_weight_gb": 0.001, + "peak_rss_bytes": 367374336, + "peak_rss_gb": 0.367, + "resident_weight_note": "the maximum, over the run, of the materialised parameter+buffer bytes. On the CPU path peak_rss_bytes ALSO counts the safetensors mmap page cache, which is evictable and is not held by the schedule; this figure is not confounded by it. On CUDA, peak_cuda_allocated_bytes is the authoritative number because it includes activations and workspace and has no page cache.", + "rss_units_source": "Linux ru_maxrss", + "schedule": "window-outer", + "vocab_size": 260, + "windows": 4 + }, + "path": "first", + "pid": 406991, + "resources": { + "bytes": { + "checkpoint_read": 572479, + "hidden_d2h": 36616, + "weights_h2d": null + }, + "checkpoint_bytes": 572479, + "checkpoint_files": 2, + "device_name": null, + "forward_timing": "wall-clock", + "note": "provenance, not identity: peaks and stage seconds this run measured; forward_sum is device time under cuda-events, wall time otherwise; seal covers head serialisation up to this block's assembly", + "peak_cuda_allocated_bytes": null, + "peak_cuda_reserved_bytes": null, + "peak_resident_weight_bytes": 555776, + "peak_rss_bytes": 367374336, + "rss_units_source": "Linux ru_maxrss", + "seconds": { + "decode_sum": null, + "elapsed": 2.448, + "fill_sum": null, + "forward_sum": 0.126, + "identity": 0.005, + "layer_load_max": null, + "layer_load_sum": null, + "layer_loads": null, + "resident_load": 2.283, + "seal": 0.007 + } + }, + "runtime_versions": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 406991, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd" + }, + "repeat": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "cold_run": "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d", + "dataset_sha256": "c3ff6c32dc57502825d3ca3ac2133ed6a4c31e7bc7602191d595ee044ebe9048", + "generation_sanity_probe": { + "degenerate": false, + "enforced": false, + "entropy_nats": 5.548019647470335, + "expect": null, + "logit_spread": 0.986328125, + "note": "one extra window through the same schedule; its hidden state is discarded and never enters the dataset.", + "prompt": "The capital of France is", + "schema": "malaiwah.generation-sanity-probe.v1", + "status": "recorded", + "top1_id": 113, + "top1_probability": 0.006720104384265371, + "top1_text": "�", + "top_k": [ + { + "id": 113, + "probability": 0.006720104384265371, + "text": "�" + }, + { + "id": 237, + "probability": 0.006412368399474785, + "text": "�" + }, + { + "id": 193, + "probability": 0.006035639491843906, + "text": "\u0001" + }, + { + "id": 236, + "probability": 0.0055386141320063614, + "text": "�" + }, + { + "id": 44, + "probability": 0.0054740873228682424, + "text": "I" + } + ], + "uniform_entropy_nats": 5.560681631015528, + "vocab_size": 260 + }, + "head_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "memory_report": { + "context_length": 64, + "decoder_layers": null, + "device": "cpu", + "hidden_size": 64, + "layer_residency": null, + "model": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "peak_resident_weight_bytes": 555776, + "peak_resident_weight_detail": { + "buffers": 128, + "parameters": 555648, + "total": 555776 + }, + "peak_resident_weight_gb": 0.001, + "peak_rss_bytes": 367198208, + "peak_rss_gb": 0.367, + "resident_weight_note": "the maximum, over the run, of the materialised parameter+buffer bytes. On the CPU path peak_rss_bytes ALSO counts the safetensors mmap page cache, which is evictable and is not held by the schedule; this figure is not confounded by it. On CUDA, peak_cuda_allocated_bytes is the authoritative number because it includes activations and workspace and has no page cache.", + "rss_units_source": "Linux ru_maxrss", + "schedule": "window-outer", + "vocab_size": 260, + "windows": 4 + }, + "path": "repeat", + "pid": 409089, + "resources": { + "bytes": { + "checkpoint_read": 572479, + "hidden_d2h": 36616, + "weights_h2d": null + }, + "checkpoint_bytes": 572479, + "checkpoint_files": 2, + "device_name": null, + "forward_timing": "wall-clock", + "note": "provenance, not identity: peaks and stage seconds this run measured; forward_sum is device time under cuda-events, wall time otherwise; seal covers head serialisation up to this block's assembly", + "peak_cuda_allocated_bytes": null, + "peak_cuda_reserved_bytes": null, + "peak_resident_weight_bytes": 555776, + "peak_rss_bytes": 367198208, + "rss_units_source": "Linux ru_maxrss", + "seconds": { + "decode_sum": null, + "elapsed": 2.619, + "fill_sum": null, + "forward_sum": 0.128, + "identity": 0.004, + "layer_load_max": null, + "layer_load_sum": null, + "layer_loads": null, + "resident_load": 2.453, + "seal": 0.005 + } + }, + "runtime_versions": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 409089, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd" + } + }, + "commands": [ + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--model", + "/tmp/qfs-complete-tiny-fixture/model", + "--weights-repository", + "malaiwah/glm-moe-dsa-tiny-random-bf16", + "--model-revision", + "45563636ef723acfb826755493447dc40c7a0c37", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-complete-tiny-fixture/reproduction/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--role", + "root", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--schedule", + "window-outer", + "--dataset-id", + "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "--dataset-name", + "GLM MoE DSA tiny random CPU root", + "--repository", + "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "--author", + "malaiwah", + "--disclosures", + "[{\"code\":\"random_init_cpu_fixture\",\"severity\":\"info\",\"affects_comparability\":false,\"detail\":\"Complete randomly initialized tiny glm_moe_dsa checkpoint; CPU smoke fixture only, not trained quality evidence or a registry measurement. Lane other denotes CPU, not local-cuda-budget.\"}]", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--run-name", + "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "--cold-run", + "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "--memory-report", + "/tmp/qfs-complete-tiny-fixture/reproduction/first.memory.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 6.485651439987123, + "name": "capture-first", + "pid": 406991, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 406991, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "capture-first.stderr.log", + "stdout": "capture-first.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "verify", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/first.verify.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.575829998124391, + "name": "verify-first", + "pid": 408026, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 408026, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "verify-first.stderr.log", + "stdout": "verify-first.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "validate", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--strict", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/first.strict.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.8252810118719935, + "name": "strict-first", + "pid": 408494, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 408494, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "strict-first.stderr.log", + "stdout": "strict-first.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--model", + "/tmp/qfs-complete-tiny-fixture/model", + "--weights-repository", + "malaiwah/glm-moe-dsa-tiny-random-bf16", + "--model-revision", + "45563636ef723acfb826755493447dc40c7a0c37", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-complete-tiny-fixture/reproduction/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--role", + "root", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--schedule", + "window-outer", + "--dataset-id", + "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "--dataset-name", + "GLM MoE DSA tiny random CPU root", + "--repository", + "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "--author", + "malaiwah", + "--disclosures", + "[{\"code\":\"random_init_cpu_fixture\",\"severity\":\"info\",\"affects_comparability\":false,\"detail\":\"Complete randomly initialized tiny glm_moe_dsa checkpoint; CPU smoke fixture only, not trained quality evidence or a registry measurement. Lane other denotes CPU, not local-cuda-budget.\"}]", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--run-name", + "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d", + "--cold-run", + "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d", + "--memory-report", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat.memory.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 6.431767418049276, + "name": "capture-repeat", + "pid": 409089, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 409089, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "capture-repeat.stderr.log", + "stdout": "capture-repeat.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "verify", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat.verify.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.7754629959817976, + "name": "verify-repeat", + "pid": 409951, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 409951, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "verify-repeat.stderr.log", + "stdout": "verify-repeat.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "validate", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--strict", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat.strict.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.423026765929535, + "name": "strict-repeat", + "pid": 410549, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 410549, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "strict-repeat.stderr.log", + "stdout": "strict-repeat.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "compare", + "--reference", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--candidate", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction/comparison", + "--self-compare", + "--force-compute", + "--device", + "cpu", + "--replay-device", + "numpy", + "--replay-dtype", + "float32", + "--vocab-chunk", + "8192", + "--chunk-positions", + "128", + "--verify-tensors", + "--reference-label", + "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "--candidate-label", + "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.7282893639057875, + "name": "compare", + "pid": 411043, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 411043, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "compare.stderr.log", + "stdout": "compare.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "validate", + "--receipt", + "/tmp/qfs-complete-tiny-fixture/reproduction/comparison/comparison-receipt.json", + "--strict", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/comparison.validate.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.424050308065489, + "name": "validate-comparison", + "pid": 411487, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 411487, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "validate-comparison.stderr.log", + "stdout": "validate-comparison.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + } + ], + "comparison": { + "comparator": { + "accumulation_dtype": "float64", + "bf16_reduced_precision_reduction": false, + "cublas_workspace_config": null, + "deterministic_algorithms": true, + "device": "cpu", + "estimator_backend": "torch:k6_kld_report._token_kld", + "head_applied_candidate_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "head_applied_reference_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "head_applied_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "logprob_dtype": "float64", + "position_block": 128, + "replay_backend": "numpy:cpu:float32", + "replay_env": { + "blas_configuration": "OpenBLAS 0.3.34.106.0 USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell MAX_THREADS=64", + "blas_name": "scipy-openblas", + "blas_threads": 2, + "blas_threads_source": "ctypes:scipy_openblas_get_num_threads64_", + "blas_version": "0.3.34.106.0", + "cpu_model": "Intel(R) Xeon(R) CPU X5570 @ 2.93GHz", + "library": "numpy", + "numpy_version": "2.5.3", + "replay_dtype": "float32" + }, + "replay_peak_device_bytes": null, + "short_circuited": true, + "source_file_hashes_verified": true, + "tensor_content_digests_verified": true, + "tf32": false, + "tool": { + "entrypoint": "bin/fidelity-dataset compare", + "note": "the fp64 estimator is k6_kld_report._token_kld, imported not copied, whenever torch is importable; estimator_backend records which path ran." + }, + "two_pass": true, + "vocab_chunk": 8192 + }, + "comparison_kind": "reproduction_confirmation", + "kl": { + "max": 0.0, + "mean": 0.0, + "median": 0.0, + "p95": 0.0, + "p99": 0.0, + "p99_9": 0.0 + }, + "measurement_scope": { + "contexts": 4, + "covers_full_panel": true, + "position_filter": "all", + "positions_per_context": 63, + "scored_positions": 252, + "subset_detail": null + }, + "metric": { + "direction": "reference_to_candidate", + "direction_label": "KL(reference || candidate)", + "higher_is_better": false, + "name": "mean_tokenwise_kld", + "units": "nats", + "value": 0.0 + }, + "note": "QFS retains its hash-proof result and top-1 value for reproduction confirmations; --force-compute independently runs the estimator and requires its tokenwise KL array to agree exactly. short_circuited=true therefore does not mean replay was skipped.", + "receipt": "comparison/comparison-receipt.json", + "receipt_sha256": "4910833e5cc175ea351055e567c5d896475b4020598359291aedc958d8ada382", + "self_compare": { + "asserted_exact_zero": true, + "capture_content_digest_equal": true, + "expected_tokenwise_bytes": 2144, + "expected_tokenwise_sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d", + "force_compute_agreed": true, + "head_digest_equal": true, + "weights_identity_equal": true + }, + "tokenwise": { + "bytes": 2144, + "path": "tokenwise-kld.npy", + "sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d" + }, + "top1_agreement": 1.0 + }, + "cpu_threads": 2, + "dataset_id": "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "dataset_repository": "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "device": "cpu", + "driver_argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "/tmp/qfs-complete-tiny-fixture/verify_cpu.py", + "--model-dir", + "/tmp/qfs-complete-tiny-fixture/model", + "--model-repository", + "malaiwah/glm-moe-dsa-tiny-random-bf16", + "--model-revision", + "45563636ef723acfb826755493447dc40c7a0c37", + "--panel-dir", + "/tmp/qfs-complete-tiny-fixture/panel", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction", + "--qfs-root", + "/tmp/qfs-explorer-development" + ], + "driver_sha256": "2e507993f0085a72d5236527942a7143fd036d56b82223b26e90889de5cd9f98", + "dtype": "bfloat16", + "elapsed_seconds": 34.85638747992925, + "lane": "other", + "lane_description": "local CPU random-init fixture", + "model_repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "model_revision": "45563636ef723acfb826755493447dc40c7a0c37", + "panel_binding": "panel-binding.json", + "panel_binding_sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "provenance_note": "Local QFS source bytes are hashed; no source commit is asserted. The caller supplies an immutable model pin; QFS hashes the local checkpoint. This script does not independently prove Hub-to-local weight equality.", + "qfs_source_files": { + "bin/fidelity/dscompare.py": "4a53f735e1e3fb8bd739854451b57f34e8369bffa9fd4f7b7fd935fb2e7d52df", + "bin/fidelity/dsvalidate.py": "a9d6cd57e801e3ef044a37635e24518c83dbc6d1ec8a4c0b4b5d1b24483ca8d1", + "bin/fidelity/panel.py": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "bin/fidelity_dataset.py": "ac62b63bbfde67e4d5cacecf9cd417193c50f417a6749cc15ee6f1610c153a4e", + "engines/tools/hf_capture.py": "200ba12ca74fb97531307965cbbaa5c10553a5c26e008e524ea2d8aecb005b95" + }, + "schema": "malaiwah.glm-moe-dsa-tiny-cpu-reproduction.v1", + "scope": "Random-init CPU reproduction only; no quality claim or registry submission.", + "status": "passed" +} diff --git a/raw/candidates/modelopt-mixed/source/generation_config.json b/raw/candidates/modelopt-mixed/source/generation_config.json new file mode 100644 index 0000000000000000000000000000000000000000..59bd0680606c94f6570a92e60fa4acd2e2170f70 --- /dev/null +++ b/raw/candidates/modelopt-mixed/source/generation_config.json @@ -0,0 +1,10 @@ +{ + "_from_model_config": true, + "bos_token_id": 1, + "eos_token_id": 2, + "output_attentions": false, + "output_hidden_states": false, + "pad_token_id": 0, + "transformers_version": "5.16.1", + "use_cache": true +} diff --git a/raw/candidates/modelopt-mixed/source/hub-checkpoint-verification.json b/raw/candidates/modelopt-mixed/source/hub-checkpoint-verification.json new file mode 100644 index 0000000000000000000000000000000000000000..b9648c8ae18de0fb86ce18398175c6686afbd7b2 --- /dev/null +++ b/raw/candidates/modelopt-mixed/source/hub-checkpoint-verification.json @@ -0,0 +1,32 @@ +{ + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "downloaded_from_hub": true, + "files": { + "config.json": { + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "bytes": 1479, + "matches_build": true + }, + "generation_config.json": { + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "bytes": 216, + "matches_build": true + }, + "model.safetensors": { + "sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1", + "bytes": 571000, + "matches_build": true + }, + "tokenizer.json": { + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "bytes": 6763, + "matches_build": true + }, + "tokenizer_config.json": { + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63", + "bytes": 236, + "matches_build": true + } + } +} diff --git a/raw/candidates/modelopt-mixed/source/loader-verification.json b/raw/candidates/modelopt-mixed/source/loader-verification.json new file mode 100644 index 0000000000000000000000000000000000000000..871fc889a9d3a025569770a96e83ff5f0a2fb420 --- /dev/null +++ b/raw/candidates/modelopt-mixed/source/loader-verification.json @@ -0,0 +1,60 @@ +{ + "schema": "malaiwah.tiny-fixture-loader-check.v1", + "checkpoint_sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1", + "runtime": { + "torch": "2.11.0+cpu", + "transformers": "5.16.1", + "device": "cpu", + "threads": 2 + }, + "qfs_load_report": { + "observed": true, + "conversion_errors_visible": true, + "missing_keys": [], + "unexpected_keys": [], + "mismatched_keys": [], + "error_msgs": [], + "conversion_errors": {} + }, + "native_save_reload_tensor_equality": true, + "independent_build_files_byte_equal": true, + "tokenizer_roundtrip_examples": [ + "The CPU fixture carries a complete output head and real sparse attention.", + "Small deterministic tensors make a repeatable pipeline experiment.", + "Unicode roundtrip: caf\u00e9, snow \u96ea, punctuation!", + "The same bytes must survive saving and loading without repair." + ], + "forward_shape": [ + 4, + 64, + 260 + ], + "forward_all_finite": true, + "forward_logit_std": 0.16186420619487762, + "load_seconds": 2.1670503590721637, + "batch_forward_seconds": 0.05775680090300739, + "greedy_generation_seconds": 0.04374621692113578, + "generated_token_ids": [ + 1, + 55, + 75, + 72, + 224, + 38, + 51, + 56, + 224, + 73, + 76, + 91, + 87, + 88, + 85, + 72, + 171, + 105, + 156, + 236 + ], + "peak_process_rss_mib": 351.9296875 +} diff --git a/raw/candidates/modelopt-mixed/source/model.safetensors b/raw/candidates/modelopt-mixed/source/model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..4fb280ef48135a3788c03440ffe9075628c12dfd --- /dev/null +++ b/raw/candidates/modelopt-mixed/source/model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1 +size 571000 diff --git a/raw/candidates/modelopt-mixed/source/panel.binding.json b/raw/candidates/modelopt-mixed/source/panel.binding.json new file mode 100644 index 0000000000000000000000000000000000000000..573cea0b332c636bdda89b150f95cda307b89194 --- /dev/null +++ b/raw/candidates/modelopt-mixed/source/panel.binding.json @@ -0,0 +1,102 @@ +{ + "content": { + "archive": { + "algorithm": "sha256(ustar: sorted regular files; mode=0644; uid=gid=mtime=0)", + "bytes": 20480, + "compression": "none", + "format": "ustar", + "sha256": "389706dfa3335a75ec70a40d079995af1a60c05512334125dbd336790f12702f" + }, + "manifest": [ + { + "bytes": 192, + "path": "arrays/causal-mask-64.npy", + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02" + }, + { + "bytes": 384, + "path": "arrays/final-0000.tokens.npy", + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af" + }, + { + "bytes": 384, + "path": "arrays/final-0001.tokens.npy", + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea" + }, + { + "bytes": 384, + "path": "arrays/final-0002.tokens.npy", + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c" + }, + { + "bytes": 384, + "path": "arrays/final-0003.tokens.npy", + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a" + }, + { + "bytes": 4195, + "path": "panel.json", + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6" + }, + { + "bytes": 7808, + "path": "panel.receipt.json", + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263" + } + ], + "manifest_sha256": "e5f2d6410a6290da1197016c5b57ae522a3570665215ddc23e2a0bd45f912181" + }, + "panel": { + "bytes": 4195, + "context_length": 64, + "contexts": 4, + "file": "panel.json", + "id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "positions_per_context": 63, + "role": "final", + "scored_positions_total": 252, + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6", + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36" + }, + "receipt": { + "bytes": 7808, + "declared_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "file": "panel.receipt.json", + "receipt_file_sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "receipt_seal_mode": "self-blank" + }, + "schema": "malaiwah.resolved-panel.v1", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } +} diff --git a/raw/candidates/modelopt-mixed/source/panel.sha256.json b/raw/candidates/modelopt-mixed/source/panel.sha256.json new file mode 100644 index 0000000000000000000000000000000000000000..30e122a1cc6d1937fecc0d31e38e468bceefc9de --- /dev/null +++ b/raw/candidates/modelopt-mixed/source/panel.sha256.json @@ -0,0 +1,83 @@ +{ + "binding_file": "panel.binding.json", + "binding_sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "context_length": 64, + "contexts": 4, + "model_repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "model_revision": "45563636ef723acfb826755493447dc40c7a0c37", + "panel_archive": { + "algorithm": "sha256(ustar: sorted regular files; mode=0644; uid=gid=mtime=0)", + "bytes": 20480, + "compression": "none", + "format": "ustar", + "sha256": "389706dfa3335a75ec70a40d079995af1a60c05512334125dbd336790f12702f" + }, + "panel_directory": "panel", + "panel_files": [ + { + "bytes": 192, + "path": "arrays/causal-mask-64.npy", + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02" + }, + { + "bytes": 384, + "path": "arrays/final-0000.tokens.npy", + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af" + }, + { + "bytes": 384, + "path": "arrays/final-0001.tokens.npy", + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea" + }, + { + "bytes": 384, + "path": "arrays/final-0002.tokens.npy", + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c" + }, + { + "bytes": 384, + "path": "arrays/final-0003.tokens.npy", + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a" + }, + { + "bytes": 4195, + "path": "panel.json", + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6" + }, + { + "bytes": 7808, + "path": "panel.receipt.json", + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263" + } + ], + "panel_id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "panel_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "purpose": "Synthetic CPU smoke only, not a quality benchmark.", + "revision_verification": "Caller-supplied published commit; local files byte-verified offline.", + "scored_positions_total": 252, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer_files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "tokenizer_files_verified": true, + "tokenizer_identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1" +} diff --git a/raw/candidates/modelopt-mixed/source/panel/arrays/causal-mask-64.npy b/raw/candidates/modelopt-mixed/source/panel/arrays/causal-mask-64.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/modelopt-mixed/source/panel/arrays/causal-mask-64.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/modelopt-mixed/source/panel/arrays/final-0000.tokens.npy b/raw/candidates/modelopt-mixed/source/panel/arrays/final-0000.tokens.npy new file mode 100644 index 0000000000000000000000000000000000000000..b53a3cc1093c0363db45470d868194d867ed93cf --- /dev/null +++ b/raw/candidates/modelopt-mixed/source/panel/arrays/final-0000.tokens.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af +size 384 diff --git a/raw/candidates/modelopt-mixed/source/panel/arrays/final-0001.tokens.npy b/raw/candidates/modelopt-mixed/source/panel/arrays/final-0001.tokens.npy new file mode 100644 index 0000000000000000000000000000000000000000..54551046d9609a29e60c1b1460b4927e45b9d785 --- /dev/null +++ b/raw/candidates/modelopt-mixed/source/panel/arrays/final-0001.tokens.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea +size 384 diff --git a/raw/candidates/modelopt-mixed/source/panel/arrays/final-0002.tokens.npy b/raw/candidates/modelopt-mixed/source/panel/arrays/final-0002.tokens.npy new file mode 100644 index 0000000000000000000000000000000000000000..557330708fb66b049bf4bb046038e98fafced952 --- /dev/null +++ b/raw/candidates/modelopt-mixed/source/panel/arrays/final-0002.tokens.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c +size 384 diff --git a/raw/candidates/modelopt-mixed/source/panel/arrays/final-0003.tokens.npy b/raw/candidates/modelopt-mixed/source/panel/arrays/final-0003.tokens.npy new file mode 100644 index 0000000000000000000000000000000000000000..88ac7b071317640a2ac3432c2cc17a46a2741688 --- /dev/null +++ b/raw/candidates/modelopt-mixed/source/panel/arrays/final-0003.tokens.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a +size 384 diff --git a/raw/candidates/modelopt-mixed/source/panel/panel.json b/raw/candidates/modelopt-mixed/source/panel/panel.json new file mode 100644 index 0000000000000000000000000000000000000000..bc0b51f795d2ba81d472c21c88dc52cad9910a41 --- /dev/null +++ b/raw/candidates/modelopt-mixed/source/panel/panel.json @@ -0,0 +1,197 @@ +{ + "name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "panel_id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "schema": "quant-pipeline.glm53-token-panel.v1", + "sealed_corpus_sha256": null, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "windows": [ + { + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "document_id": "embedded-synthetic/garden.txt", + "domain": "garden", + "num_tokens": 64, + "prediction_positions": 63, + "role": "final", + "token_ids_first16": [ + 1, + 55, + 75, + 72, + 224, + 86, + 80, + 68, + 79, + 79, + 224, + 74, + 68, + 85, + 71, + 72 + ], + "token_ids_json_sha256": "08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315", + "token_ids_last16": [ + 224, + 68, + 81, + 71, + 224, + 68, + 224, + 86, + 87, + 82, + 81, + 72, + 224, + 83, + 68, + 2 + ], + "token_ids_sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af", + "window_id": "final-0000" + }, + { + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "document_id": "embedded-synthetic/arithmetic.txt", + "domain": "arithmetic", + "num_tokens": 64, + "prediction_positions": 63, + "role": "final", + "token_ids_first16": [ + 1, + 36, + 224, + 86, + 75, + 72, + 79, + 73, + 224, + 75, + 82, + 79, + 71, + 86, + 224, + 87 + ], + "token_ids_json_sha256": "5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46", + "token_ids_last16": [ + 72, + 86, + 17, + 224, + 55, + 75, + 72, + 85, + 72, + 224, + 68, + 85, + 72, + 224, + 72, + 2 + ], + "token_ids_sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea", + "window_id": "final-0001" + }, + { + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "document_id": "embedded-synthetic/code.txt", + "domain": "code", + "num_tokens": 64, + "prediction_positions": 63, + "role": "final", + "token_ids_first16": [ + 1, + 71, + 72, + 73, + 224, + 68, + 71, + 71, + 66, + 89, + 68, + 79, + 88, + 72, + 86, + 11 + ], + "token_ids_json_sha256": "51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07", + "token_ids_last16": [ + 85, + 76, + 74, + 75, + 87, + 202, + 202, + 85, + 72, + 86, + 88, + 79, + 87, + 224, + 32, + 2 + ], + "token_ids_sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c", + "window_id": "final-0002" + }, + { + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "document_id": "embedded-synthetic/instructions.txt", + "domain": "instructions", + "num_tokens": 64, + "prediction_positions": 63, + "role": "final", + "token_ids_first16": [ + 1, + 41, + 76, + 85, + 86, + 87, + 224, + 83, + 79, + 68, + 70, + 72, + 224, + 68, + 224, + 70 + ], + "token_ids_json_sha256": "8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d", + "token_ids_last16": [ + 224, + 70, + 82, + 82, + 79, + 224, + 90, + 68, + 87, + 72, + 85, + 224, + 76, + 81, + 87, + 2 + ], + "token_ids_sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a", + "window_id": "final-0003" + } + ] +} diff --git a/raw/candidates/modelopt-mixed/source/panel/panel.receipt.json b/raw/candidates/modelopt-mixed/source/panel/panel.receipt.json new file mode 100644 index 0000000000000000000000000000000000000000..fbc2ce3e8e9602a492d83ae681817e0fa02e4173 --- /dev/null +++ b/raw/candidates/modelopt-mixed/source/panel/panel.receipt.json @@ -0,0 +1,376 @@ +{ + "corpus": { + "documents_considered": 4, + "documents_selected": 4, + "path_prefix": "embedded-synthetic/", + "repository": null, + "revision": null, + "source": "Synthetic texts embedded verbatim in this sealed receipt and builder." + }, + "created_utc": "2026-09-07T00:00:00Z", + "created_utc_policy": "Fixed artifact epoch for deterministic bytes; not an execution timestamp.", + "documents": [ + { + "bytes": 135, + "document": "garden.txt", + "document_sha256": "2aca14290cd4753c3b15d8a20aaa7a6963d2cb48d78e8538a4ce34d4665dcb94", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "garden", + "text_utf8": "The small garden has red flowers, green leaves, and a stone path. A gentle breeze moves the branches while a robin sings near the gate.", + "tokens_total": 137, + "window_id": "final-0000" + }, + { + "bytes": 144, + "document": "arithmetic.txt", + "document_sha256": "b867a2e8cbe81cc8d5781bfe6718a43e171fb5c7c138b9ed6ac86bebc24bca83", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "arithmetic", + "text_utf8": "A shelf holds three blue boxes and five red boxes. There are eight boxes in total. Move two boxes to the desk and count the six boxes remaining.", + "tokens_total": 146, + "window_id": "final-0001" + }, + { + "bytes": 162, + "document": "code.txt", + "document_sha256": "08c8f75f45899cbc9656a7a3fcdbf3092abfa7bc97fe353957b08d7e9660240b", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "code", + "text_utf8": "def add_values(left, right):\n return left + right\n\nresult = add_values(7, 9)\nprint(result)\n# This readable snippet is synthetic input, not a coding benchmark.\n", + "tokens_total": 164, + "window_id": "final-0002" + }, + { + "bytes": 140, + "document": "instructions.txt", + "document_sha256": "1dba5052b28929f94f322ad9e8c0b238bcbd653d6fae54ebaea8e5e3f6073378", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "instructions", + "text_utf8": "First place a clean cup on the table. Next pour cool water into the cup. Finally put the bottle away and write a short note about the steps.", + "tokens_total": 142, + "window_id": "final-0003" + } + ], + "environment": { + "numpy": "2.5.3", + "tokenizers": "0.23.2", + "transformers": "5.16.1" + }, + "format_builder": "engines/tools/build_token_panel.py", + "format_builder_sha256": "30eb4d4d7e465aaa8d9ef2d947a0ac7fd42ec45388f20c8b6db242c88dc2d851", + "format_version": 1, + "panel_id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "panel_name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "parameters": { + "context_length": 64, + "generation_seed": null, + "generation_seed_policy": "No RNG is used.", + "prediction_positions_per_window": 63, + "scored_positions_total": 252, + "strata": [ + "garden", + "arithmetic", + "code", + "instructions" + ], + "windows_per_stratum": 1, + "windows_total": 4 + }, + "receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "resolver_sha256": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "schema": "malaiwah.token-panel-build-receipt.v1", + "selection_rule": "Four embedded readable synthetic documents in declared order; native tokenizer with add_special_tokens=True, truncation=True, max_length=64, padding=False; each encoded window must be exactly 64 tokens; no chat template; all 63 shifted next-token positions scored; no RNG.", + "separation": { + "checked": false, + "method": "No contamination scan or benchmark selection.", + "note": "Authored synthetic CPU smoke inputs for a random-init model; not a benchmark, held-out quality claim, or registry-row submission." + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "add_special_tokens": true, + "chat_template_applied": false, + "class": "TokenizersBackend", + "files_sha256": { + "config.json": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "generation_config.json": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "tokenizer.json": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "tokenizer_config.json": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + }, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "local_files_only": true, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "trust_remote_code": false, + "vocab_size": 260 + }, + "tool": "build_panel.py", + "tool_sha256": "f17b17262816676d6ededcc969756ac07ff991eab73117040ec41005f6ff63f3" +} diff --git a/raw/candidates/modelopt-mixed/source/qfs-source.json b/raw/candidates/modelopt-mixed/source/qfs-source.json new file mode 100644 index 0000000000000000000000000000000000000000..3c71d8671dcbe3678b71a2efe59e0ca341bebdc0 --- /dev/null +++ b/raw/candidates/modelopt-mixed/source/qfs-source.json @@ -0,0 +1,11 @@ +{ + "repository": "https://github.com/malaiwah/quant-fidelity-suite", + "revision": "a903cddb078c2eda8c65d6e6c875a09ac932df49", + "source_files": { + "bin/fidelity/dscompare.py": "4a53f735e1e3fb8bd739854451b57f34e8369bffa9fd4f7b7fd935fb2e7d52df", + "bin/fidelity/dsvalidate.py": "a9d6cd57e801e3ef044a37635e24518c83dbc6d1ec8a4c0b4b5d1b24483ca8d1", + "bin/fidelity/panel.py": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "bin/fidelity_dataset.py": "ac62b63bbfde67e4d5cacecf9cd417193c50f417a6749cc15ee6f1610c153a4e", + "engines/tools/hf_capture.py": "200ba12ca74fb97531307965cbbaa5c10553a5c26e008e524ea2d8aecb005b95" + } +} diff --git a/raw/candidates/modelopt-mixed/source/requirements-cpu.txt b/raw/candidates/modelopt-mixed/source/requirements-cpu.txt new file mode 100644 index 0000000000000000000000000000000000000000..5d504ef63dffa9df18b1e01a3492065235acbe48 --- /dev/null +++ b/raw/candidates/modelopt-mixed/source/requirements-cpu.txt @@ -0,0 +1,38 @@ +# Tested Linux CPU environment, Python 3.12.14. +--extra-index-url https://download.pytorch.org/whl/cpu +accelerate==1.14.0 +annotated-doc==0.0.5 +anyio==4.15.1 +certifi==2026.7.22 +click==8.5.0 +filelock==3.32.5 +fsspec==2026.7.0 +h11==0.16.0 +hf-xet==1.6.0 +httpcore==1.0.9 +httpx==0.28.1 +huggingface-hub==1.30.0 +idna==3.19 +jinja2==3.1.6 +markdown-it-py==4.2.0 +markupsafe==3.0.3 +mdurl==0.1.2 +mpmath==1.3.0 +networkx==3.6.1 +numpy==2.5.3 +packaging==26.3 +psutil==7.2.2 +pygments==2.21.0 +pyyaml==6.0.3 +regex==2026.9.3 +rich==15.0.0 +safetensors==0.8.0 +setuptools==81.0.0 +shellingham==1.5.4 +sympy==1.14.0 +tokenizers==0.23.2 +torch==2.11.0+cpu +tqdm==4.70.0 +transformers==5.16.1 +typer==0.27.2 +typing-extensions==4.16.0 diff --git a/raw/candidates/modelopt-mixed/source/tokenizer.json b/raw/candidates/modelopt-mixed/source/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..5ad9cccfc9ab5ed66f1c38db328de07cbe4939a9 --- /dev/null +++ b/raw/candidates/modelopt-mixed/source/tokenizer.json @@ -0,0 +1,404 @@ +{ + "version": "1.0", + "truncation": null, + "padding": null, + "added_tokens": [ + { + "id": 0, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 1, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 2, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 3, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + } + ], + "normalizer": null, + "pre_tokenizer": { + "type": "ByteLevel", + "add_prefix_space": false, + "trim_offsets": true, + "use_regex": false + }, + "post_processor": { + "type": "TemplateProcessing", + "single": [ + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + }, + { + "Sequence": { + "id": "A", + "type_id": 0 + } + }, + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + } + ], + "pair": [ + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + }, + { + "Sequence": { + "id": "A", + "type_id": 0 + } + }, + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + }, + { + "Sequence": { + "id": "B", + "type_id": 1 + } + }, + { + "SpecialToken": { + "id": "", + "type_id": 1 + } + } + ], + "special_tokens": { + "": { + "id": "", + "ids": [ + 1 + ], + "tokens": [ + "" + ] + }, + "": { + "id": "", + "ids": [ + 2 + ], + "tokens": [ + "" + ] + } + } + }, + "decoder": { + "type": "ByteLevel", + "add_prefix_space": true, + "trim_offsets": true, + "use_regex": true + }, + "model": { + "type": "BPE", + "dropout": null, + "unk_token": "", + "continuing_subword_prefix": null, + "end_of_word_suffix": null, + "fuse_unk": false, + "byte_fallback": false, + "ignore_merges": false, + "vocab": { + "": 0, + "": 1, + "": 2, + "": 3, + "!": 4, + "\"": 5, + "#": 6, + "$": 7, + "%": 8, + "&": 9, + "'": 10, + "(": 11, + ")": 12, + "*": 13, + "+": 14, + ",": 15, + "-": 16, + ".": 17, + "/": 18, + "0": 19, + "1": 20, + "2": 21, + "3": 22, + "4": 23, + "5": 24, + "6": 25, + "7": 26, + "8": 27, + "9": 28, + ":": 29, + ";": 30, + "<": 31, + "=": 32, + ">": 33, + "?": 34, + "@": 35, + "A": 36, + "B": 37, + "C": 38, + "D": 39, + "E": 40, + "F": 41, + "G": 42, + "H": 43, + "I": 44, + "J": 45, + "K": 46, + "L": 47, + "M": 48, + "N": 49, + "O": 50, + "P": 51, + "Q": 52, + "R": 53, + "S": 54, + "T": 55, + "U": 56, + "V": 57, + "W": 58, + "X": 59, + "Y": 60, + "Z": 61, + "[": 62, + "\\": 63, + "]": 64, + "^": 65, + "_": 66, + "`": 67, + "a": 68, + "b": 69, + "c": 70, + "d": 71, + "e": 72, + "f": 73, + "g": 74, + "h": 75, + "i": 76, + "j": 77, + "k": 78, + "l": 79, + "m": 80, + "n": 81, + "o": 82, + "p": 83, + "q": 84, + "r": 85, + "s": 86, + "t": 87, + "u": 88, + "v": 89, + "w": 90, + "x": 91, + "y": 92, + "z": 93, + "{": 94, + "|": 95, + "}": 96, + "~": 97, + "¡": 98, + "¢": 99, + "£": 100, + "¤": 101, + "¥": 102, + "¦": 103, + "§": 104, + "¨": 105, + "©": 106, + "ª": 107, + "«": 108, + "¬": 109, + "®": 110, + "¯": 111, + "°": 112, + "±": 113, + "²": 114, + "³": 115, + "´": 116, + "µ": 117, + "¶": 118, + "·": 119, + "¸": 120, + "¹": 121, + "º": 122, + "»": 123, + "¼": 124, + "½": 125, + "¾": 126, + "¿": 127, + "À": 128, + "Á": 129, + "Â": 130, + "Ã": 131, + "Ä": 132, + "Å": 133, + "Æ": 134, + "Ç": 135, + "È": 136, + "É": 137, + "Ê": 138, + "Ë": 139, + "Ì": 140, + "Í": 141, + "Î": 142, + "Ï": 143, + "Ð": 144, + "Ñ": 145, + "Ò": 146, + "Ó": 147, + "Ô": 148, + "Õ": 149, + "Ö": 150, + "×": 151, + "Ø": 152, + "Ù": 153, + "Ú": 154, + "Û": 155, + "Ü": 156, + "Ý": 157, + "Þ": 158, + "ß": 159, + "à": 160, + "á": 161, + "â": 162, + "ã": 163, + "ä": 164, + "å": 165, + "æ": 166, + "ç": 167, + "è": 168, + "é": 169, + "ê": 170, + "ë": 171, + "ì": 172, + "í": 173, + "î": 174, + "ï": 175, + "ð": 176, + "ñ": 177, + "ò": 178, + "ó": 179, + "ô": 180, + "õ": 181, + "ö": 182, + "÷": 183, + "ø": 184, + "ù": 185, + "ú": 186, + "û": 187, + "ü": 188, + "ý": 189, + "þ": 190, + "ÿ": 191, + "Ā": 192, + "ā": 193, + "Ă": 194, + "ă": 195, + "Ą": 196, + "ą": 197, + "Ć": 198, + "ć": 199, + "Ĉ": 200, + "ĉ": 201, + "Ċ": 202, + "ċ": 203, + "Č": 204, + "č": 205, + "Ď": 206, + "ď": 207, + "Đ": 208, + "đ": 209, + "Ē": 210, + "ē": 211, + "Ĕ": 212, + "ĕ": 213, + "Ė": 214, + "ė": 215, + "Ę": 216, + "ę": 217, + "Ě": 218, + "ě": 219, + "Ĝ": 220, + "ĝ": 221, + "Ğ": 222, + "ğ": 223, + "Ġ": 224, + "ġ": 225, + "Ģ": 226, + "ģ": 227, + "Ĥ": 228, + "ĥ": 229, + "Ħ": 230, + "ħ": 231, + "Ĩ": 232, + "ĩ": 233, + "Ī": 234, + "ī": 235, + "Ĭ": 236, + "ĭ": 237, + "Į": 238, + "į": 239, + "İ": 240, + "ı": 241, + "IJ": 242, + "ij": 243, + "Ĵ": 244, + "ĵ": 245, + "Ķ": 246, + "ķ": 247, + "ĸ": 248, + "Ĺ": 249, + "ĺ": 250, + "Ļ": 251, + "ļ": 252, + "Ľ": 253, + "ľ": 254, + "Ŀ": 255, + "ŀ": 256, + "Ł": 257, + "ł": 258, + "Ń": 259 + }, + "merges": [] + } +} \ No newline at end of file diff --git a/raw/candidates/modelopt-mixed/source/tokenizer_config.json b/raw/candidates/modelopt-mixed/source/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..df4d789a0874511220f5e2676081000298ad025d --- /dev/null +++ b/raw/candidates/modelopt-mixed/source/tokenizer_config.json @@ -0,0 +1,10 @@ +{ + "backend": "tokenizers", + "bos_token": "", + "clean_up_tokenization_spaces": false, + "eos_token": "", + "model_max_length": 256, + "pad_token": "", + "tokenizer_class": "TokenizersBackend", + "unk_token": "" +} diff --git a/raw/candidates/modelopt-mixed/source/verify_cpu.py b/raw/candidates/modelopt-mixed/source/verify_cpu.py new file mode 100644 index 0000000000000000000000000000000000000000..9081677f6d92ed81eec78043634f56eec3e193f5 --- /dev/null +++ b/raw/candidates/modelopt-mixed/source/verify_cpu.py @@ -0,0 +1,320 @@ +#!/usr/bin/env python3 +"""Two cold QFS CPU captures, strict verification, and forced numerical replay.""" +from __future__ import annotations + +import argparse +import hashlib +import json +import math +import os +from pathlib import Path +import re +import signal +import subprocess +import sys +import time +import traceback +import uuid + +DATASET_ID = "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1" +DATASET_REPOSITORY = "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1" +PANEL_ID = "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1" +TIMEOUT_SECONDS = 300 + +# Execute the real entrypoint without changing its implementation. Set thread +# counts before any model work, and record the observed counts in every child. +CHILD_BOOTSTRAP = r''' +import json, os, platform, runpy, sys +import numpy, torch, transformers, safetensors, tokenizers +import huggingface_hub +torch.set_num_threads(2) +torch.set_num_interop_threads(2) +print(json.dumps({"stage": "fixture_child_runtime", "pid": os.getpid(), + "python": sys.version, "executable": sys.executable, + "platform": platform.platform(), "machine": platform.machine(), + "torch": torch.__version__, "transformers": transformers.__version__, + "numpy": numpy.__version__, "safetensors": safetensors.__version__, + "tokenizers": tokenizers.__version__, "huggingface_hub": huggingface_hub.__version__, + "torch_num_threads": torch.get_num_threads(), + "torch_num_interop_threads": torch.get_num_interop_threads(), + "cuda_runtime": torch.version.cuda, + "thread_environment": {k: os.environ.get(k) for k in + ("OMP_NUM_THREADS", "MKL_NUM_THREADS", "OPENBLAS_NUM_THREADS", + "NUMEXPR_NUM_THREADS", "VECLIB_MAXIMUM_THREADS")}}, sort_keys=True), flush=True) +sys.argv = sys.argv[1:] +runpy.run_path(sys.argv[0], run_name="__main__") +''' + + +def require(condition, message): + if not condition: + raise RuntimeError(message) + + +def read_json(path): + def reject_constant(value): + raise ValueError("Non-finite JSON constant: " + value) + return json.loads(Path(path).read_text(encoding="utf-8"), parse_constant=reject_constant) + + +def write_json(path, value): + Path(path).write_text(json.dumps(value, sort_keys=True, indent=2, + ensure_ascii=False, allow_nan=False) + "\n", + encoding="utf-8") + + +def sha256(path): + with Path(path).open("rb") as stream: + return hashlib.file_digest(stream, "sha256").hexdigest() + + +def positive_zero(value): + return type(value) is float and value == 0.0 and math.copysign(1.0, value) == 1.0 + + +def run_command(name, entrypoint, arguments, *, out, qfs_root, summary): + argv = [sys.executable, "-c", CHILD_BOOTSTRAP, str(entrypoint), *map(str, arguments)] + stdout_path, stderr_path = out / (name + ".stdout.log"), out / (name + ".stderr.log") + environment = os.environ.copy() + environment.update({key: "2" for key in ( + "OMP_NUM_THREADS", "MKL_NUM_THREADS", "OPENBLAS_NUM_THREADS", + "NUMEXPR_NUM_THREADS", "VECLIB_MAXIMUM_THREADS")}) + environment.update({"HF_HUB_OFFLINE": "1", "TRANSFORMERS_OFFLINE": "1", + "TOKENIZERS_PARALLELISM": "false", "PYTHONUNBUFFERED": "1"}) + record = {"name": name, "argv": argv, "cwd": str(qfs_root), + "stdout": stdout_path.name, "stderr": stderr_path.name, + "timeout_seconds": TIMEOUT_SECONDS, "returncode": None, + "timed_out": False} + summary["commands"].append(record) + started = time.monotonic() + try: + with stdout_path.open("xb") as stdout, stderr_path.open("xb") as stderr: + process = subprocess.Popen(argv, cwd=qfs_root, env=environment, + stdout=stdout, stderr=stderr, start_new_session=True) + record["pid"] = process.pid + try: + record["returncode"] = process.wait(timeout=TIMEOUT_SECONDS) + except subprocess.TimeoutExpired: + record["timed_out"] = True + os.killpg(process.pid, signal.SIGKILL) + record["returncode"] = process.wait() + finally: + record["elapsed_seconds"] = time.monotonic() - started + write_json(out / "evidence-summary.json", summary) + # Capture children produce JSONL mixed with human-readable engine output. + with stdout_path.open(encoding="utf-8", errors="replace") as stdout: + for line in stdout: + if not line.startswith("{"): + continue + try: + item = json.loads(line) + except ValueError: + continue + if isinstance(item, dict) and item.get("stage") == "fixture_child_runtime": + record["runtime"] = item + break + require(not record["timed_out"], f"{name} exceeded {TIMEOUT_SECONDS}s; logs preserved") + require(record["returncode"] == 0, + f"{name} exited {record['returncode']}; see {stderr_path.name} and {stdout_path.name}") + require(record.get("runtime", {}).get("torch_num_threads") == 2, + f"{name} did not report two observed CPU threads") + return record + + +def check_report(path): + report = read_json(path) + require(report["structural_status"] == "sealed" and report["error_count"] == 0 + and report["warning_count"] == 0, f"Strict QFS verification failed: {path}") + return report + + +def reproduce(args, out, summary): + qfs_root, model_dir, panel_dir = (Path(value).resolve(strict=True) + for value in (args.qfs_root, args.model_dir, args.panel_dir)) + require(all(path.is_dir() for path in (qfs_root, model_dir, panel_dir)), + "--qfs-root, --model-dir and --panel-dir must be directories") + capture_tool = qfs_root / "engines/tools/hf_capture.py" + dataset_tool = qfs_root / "bin/fidelity_dataset.py" + require(capture_tool.is_file() and dataset_tool.is_file(), "QFS entrypoints not found") + sys.path.insert(0, str(qfs_root / "bin")) + from fidelity import dsformat as F + from fidelity import panel + + binding = panel.resolve_panel(panel_dir, role="final", tokenizer_root=model_dir).to_dict() + tokenizer, dimensions = binding["tokenizer"], binding["panel"] + require(tokenizer["files_verified"] is True, "Panel tokenizer bytes were not verified") + require(tokenizer["repository"] == args.model_repository + and tokenizer["revision"] == args.model_revision, + "Panel tokenizer repository/revision differs from the explicit model pin") + require(tokenizer["vocab_size"] == 260, "Expected byte-level vocabulary of 260 tokens") + require(dimensions["id"] == PANEL_ID and dimensions["role"] == "final" + and dimensions["contexts"] == 4 and dimensions["context_length"] == 64 + and dimensions["positions_per_context"] == 63 + and dimensions["scored_positions_total"] == 252, + "Expected the complete four-window, 64-token, 252-position fixture panel") + require("other" in F.LANES, "QFS no longer permits the honest CPU lane 'other'") + binding_path = out / "panel-binding.json" + write_json(binding_path, binding) + binding_sha = sha256(binding_path) + summary.update({"panel_binding": binding_path.name, "panel_binding_sha256": binding_sha, + "model_repository": args.model_repository, "model_revision": args.model_revision, + "dataset_id": DATASET_ID, "dataset_repository": DATASET_REPOSITORY, + "lane": "other", "lane_description": "local CPU random-init fixture", + "device": "cpu", "dtype": "bfloat16", "cpu_threads": 2, + "qfs_source_files": {str(path.relative_to(qfs_root)): sha256(path) + for path in (capture_tool, dataset_tool, qfs_root / "bin/fidelity/panel.py", + qfs_root / "bin/fidelity/dscompare.py", + qfs_root / "bin/fidelity/dsvalidate.py")}, + "provenance_note": "Local QFS source bytes are hashed; no source commit is asserted. " + "The caller supplies an immutable model pin; QFS hashes the local checkpoint. " + "This script does not independently prove Hub-to-local weight equality.", + "captures": {}}) + disclosure = [{"code": "random_init_cpu_fixture", "severity": "info", + "affects_comparability": False, + "detail": "Complete randomly initialized tiny glm_moe_dsa checkpoint; CPU smoke " + "fixture only, not trained quality evidence or a registry measurement. " + "Lane other denotes CPU, not local-cuda-budget."}] + common = ["--model", model_dir, "--weights-repository", args.model_repository, + "--model-revision", args.model_revision, "--panel", panel_dir, + "--panel-role", "final", "--panel-binding", binding_path, + "--panel-binding-sha256", binding_sha, "--panel-tokenizer-root", model_dir, + "--role", "root", "--lane", "other", "--device", "cpu", + "--dtype", "bfloat16", "--schedule", "window-outer", + "--dataset-id", DATASET_ID, "--dataset-name", "GLM MoE DSA tiny random CPU root", + "--repository", DATASET_REPOSITORY, "--author", "malaiwah", + "--disclosures", json.dumps(disclosure, separators=(",", ":"))] + run = lambda name, tool, argv: run_command(name, tool, argv, out=out, + qfs_root=qfs_root, summary=summary) + cold_labels = {side: f"cpu-{side}-{uuid.uuid4().hex}" for side in ("first", "repeat")} + for side in ("first", "repeat"): + root = out / side + memory_path = out / (side + ".memory.json") + command = run("capture-" + side, capture_tool, + [*common, "--out", root, "--run-name", cold_labels[side], + "--cold-run", cold_labels[side], "--memory-report", memory_path]) + verify_path, strict_path = out / (side + ".verify.json"), out / (side + ".strict.json") + run("verify-" + side, dataset_tool, + ["verify", root, "--verify-tensors", "--json", verify_path]) + run("strict-" + side, dataset_tool, + ["validate", root, "--strict", "--verify-tensors", "--json", strict_path]) + check_report(verify_path) + check_report(strict_path) + manifest = F.load_manifest(str(root)) + runtime = read_json(root / manifest["runtime"]["file"]) + probe = manifest["generation_sanity_probe"] + require(probe["status"] == "recorded" and probe["degenerate"] is False + and probe["expect"] is None and probe["logit_spread"] > 0, + f"{side}: default nondegenerate generation sanity probe did not run") + require(runtime["runtime_environment"]["cold_run"] == cold_labels[side], + f"{side}: cold-run label not recorded") + require(runtime["stack_fingerprint"]["device"] == "cpu" + and manifest["runtime"]["lane"] == "other", f"{side}: not an honest CPU capture") + require(manifest["dataset"]["id"] == DATASET_ID and manifest["dataset"]["role"] == "root" + and manifest["weights"]["revision"] == args.model_revision + and manifest["weights"]["repository"] == args.model_repository, + f"{side}: model/dataset identity mismatch") + require(runtime["capture_tool"]["resolved_panel_binding"]["binding"] == binding, + f"{side}: captured panel binding differs") + require(manifest["capture"]["records_count"] == 4 + and manifest["capture"]["scored_rows_total"] == 252 + and manifest["capture"]["dtype"] == "BF16", f"{side}: incomplete BF16 capture") + summary["captures"][side] = { + "path": side, "cold_run": cold_labels[side], "pid": command["pid"], + "dataset_sha256": manifest[F.SEAL_FIELD], + "capture_content_digest": manifest["capture"]["capture_content_digest"], + "head_tensor_content_sha256": manifest["head"]["tensor_content_sha256"], + "checkpoint_identity_sha256": manifest["weights"]["checkpoint_identity_sha256"], + "stack_fingerprint_sha256": manifest["runtime"]["stack_fingerprint_sha256"], + "resources": runtime["resources"], "memory_report": read_json(memory_path), + "generation_sanity_probe": probe, "runtime_versions": command["runtime"]} + write_json(out / "evidence-summary.json", summary) + + first, repeat = (summary["captures"][side] for side in ("first", "repeat")) + for key in ("capture_content_digest", "head_tensor_content_sha256", + "checkpoint_identity_sha256", "stack_fingerprint_sha256"): + require(first[key] == repeat[key], f"Cold captures disagree: {key}") + comparison_dir = out / "comparison" + run("compare", dataset_tool, + ["compare", "--reference", out / "first", "--candidate", out / "repeat", + "--out", comparison_dir, "--self-compare", "--force-compute", "--device", "cpu", + "--replay-device", "numpy", "--replay-dtype", "float32", "--vocab-chunk", "8192", + "--chunk-positions", "128", "--verify-tensors", + "--reference-label", cold_labels["first"], "--candidate-label", cold_labels["repeat"]]) + receipt_path = comparison_dir / "comparison-receipt.json" + receipt_report = out / "comparison.validate.json" + run("validate-comparison", dataset_tool, + ["validate", "--receipt", receipt_path, "--strict", "--json", receipt_report]) + check_report(receipt_report) + receipt = read_json(receipt_path) + require(receipt["comparison_kind"] == "reproduction_confirmation" + and receipt["comparability"]["class"] == "strict", "Not a strict reproduction") + require(receipt["self_compare"]["force_compute_agreed"] is True + and receipt["self_compare"]["capture_content_digest_equal"] is True, + "Forced numerical replay did not agree with the content hash proof") + require(positive_zero(receipt["metric"]["value"]) + and all(positive_zero(value) for value in receipt["kl"].values()) + and type(receipt["top1_agreement"]) is float and receipt["top1_agreement"] == 1.0, + "Comparison did not report literal +0.0 KL and 1.0 top-1 agreement") + require(receipt["comparator"]["replay_backend"] == "numpy:cpu:float32" + and receipt["comparator"]["tensor_content_digests_verified"] is True + and receipt["measurement_scope"]["scored_positions"] == 252 + and receipt["measurement_scope"]["contexts"] == 4 + and receipt["measurement_scope"]["covers_full_panel"] is True, + "Replay backend, verification, or panel coverage differs") + import numpy as np + tokenwise_path = comparison_dir / receipt["tokenwise"]["path"] + require(sha256(tokenwise_path) == receipt["tokenwise"]["sha256"], "Tokenwise file hash differs") + values = np.load(tokenwise_path, allow_pickle=False) + require(values.dtype == np.dtype("float64") and values.shape == (252,) + and bool(np.all(values == 0.0)) and not bool(np.any(np.signbit(values))), + "Tokenwise artifact is not exactly 252 positive float64 zeros") + summary["comparison"] = { + "receipt": str(receipt_path.relative_to(out)), "receipt_sha256": receipt["receipt_sha256"], + "comparison_kind": receipt["comparison_kind"], "metric": receipt["metric"], + "kl": receipt["kl"], "top1_agreement": receipt["top1_agreement"], + "comparator": receipt["comparator"], "self_compare": receipt["self_compare"], + "tokenwise": receipt["tokenwise"], "measurement_scope": receipt["measurement_scope"], + "note": "QFS retains its hash-proof result and top-1 value for reproduction confirmations; " + "--force-compute independently runs the estimator and requires its tokenwise KL " + "array to agree exactly. short_circuited=true therefore does not mean replay was skipped."} + + +def main(argv=None): + parser = argparse.ArgumentParser(description=__doc__) + for flag in ("model-dir", "model-repository", "model-revision", "panel-dir", "out", "qfs-root"): + parser.add_argument("--" + flag, required=True) + args = parser.parse_args(argv) + if not re.fullmatch(r"[0-9a-f]{40}", args.model_revision): + parser.error("--model-revision must be an actual immutable lowercase 40-hex Hub commit") + if not re.fullmatch(r"[A-Za-z0-9][A-Za-z0-9._-]*/[A-Za-z0-9][A-Za-z0-9._-]*", args.model_repository): + parser.error("--model-repository must be an owner/repository Hub identity") + out = Path(args.out).absolute() + try: + out.mkdir(parents=True, exist_ok=False) + except OSError as exc: + parser.error(f"Refusing output directory {out}: {exc}") + started = time.monotonic() + summary = {"schema": "malaiwah.glm-moe-dsa-tiny-cpu-reproduction.v1", "status": "running", + "commands": [], "driver_argv": [sys.executable, str(Path(__file__).resolve()), + *(sys.argv[1:] if argv is None else argv)], + "driver_sha256": sha256(__file__), + "scope": "Random-init CPU reproduction only; no quality claim or registry submission."} + try: + reproduce(args, out, summary) + summary["status"] = "passed" + code = 0 + except Exception as exc: + summary.update({"status": "failed", "error": f"{type(exc).__name__}: {exc}"}) + (out / "failure.traceback.log").write_text(traceback.format_exc(), encoding="utf-8") + print(summary["error"], file=sys.stderr) + code = 1 + finally: + summary["elapsed_seconds"] = time.monotonic() - started + write_json(out / "evidence-summary.json", summary) + print(json.dumps({"status": summary["status"], "evidence": str(out / "evidence-summary.json")}, + sort_keys=True)) + return code + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/raw/candidates/modelopt-nvfp4/evidence/candidate/README.md b/raw/candidates/modelopt-nvfp4/evidence/candidate/README.md new file mode 100644 index 0000000000000000000000000000000000000000..12dbbb465a1b2275398c0f1c8b838169b7a1456c --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/candidate/README.md @@ -0,0 +1,95 @@ +--- +license: mit +tags: +- fidelity +- kl-divergence +- fidelity-provenance +- fidelity-dataset +- fidelity-quant +x_fidelity: + spec: https://github.com/malaiwah/quant-fidelity-suite/blob/main/docs/FIDELITY-DATASET-SPEC.md + spec_version: fidelity-provenance/v1 + role: fidelity-dataset + captured_model: + repository: /tmp/qfs-quant-microfloat-release/stage-main/modelopt-nvfp4 + revision: null + role: quant + form: hidden + lane: other + panel: + panel_id: panel--panel + suite_token_hash_sha256: 525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36 + contexts: 4 + scored_positions: 252 + repository: null + revision: null + head: + policy: native + quantized: false + bits: 16 + lm_head_tensor_content_sha256: 2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510 + lm_head_file_sha256: 07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913 + final_norm_tensor_content_sha256: null + final_norm_file_sha256: null + equality_receipt: null + replay_permitted: true + scope_digest: attn.o=quantized:modelopt-nvfp4@4|attn.other=quantized:mixed|attn.qkv=quantized:modelopt-nvfp4@4|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=quantized:modelopt-nvfp4@4|mlp.gate=quantized:modelopt-nvfp4@4|mlp.up=quantized:modelopt-nvfp4@4|moe.experts=quantized:modelopt-nvfp4@4|moe.router=native:mixed|moe.shared_expert=quantized:modelopt-nvfp4@4|norm=native:bf16@16|head=native|kv=bf16 + seal: + manifest: fidelity-dataset.json + dataset_sha256: null + checksums: checksums.txt + checksums_sha256: '0000000000000000000000000000000000000000000000000000000000000000' + note: 'written before the seal: dataset_sha256 and checksums_sha256 are digests of the tree this file + is inside, so they cannot appear in it. Read them from fidelity-dataset.json.' + interop: + compatible_with: + - kimi-k3-distribution-fidelity/1 + k3_compat_emitted: false + registry: + dataset: malaiwah/quant-fidelity-registry + schema_version: quant-fidelity-registry/v1 + artifact_id: null + measurement_ids: [] + snapshot: null + fidelity_dataset: + repository: null + revision: null + dataset_sha256: null + capture_content_digest: a516142b91f38f118037c335935a365b0666c014d6a59056e1d7bc2adeb4acc0 + form: hidden + role: quant + measurements: [] +--- +# Local quant integration candidate + +A **quant** fidelity dataset in **hidden form**, produced by `engines/tools/hf_capture.py` from `/tmp/qfs-quant-microfloat-release/stage-main/modelopt-nvfp4`. + +## The cut + +the final hidden state handed to lm_head -- after the text model's final norm and immediately before the head matmul -- captured as the head module's input via torch.nn.Module.register_forward_pre_hook; replay applies the head ONLY (no final norm at replay time: the capture already sits after it). Same cut as engines/tools/hidden_replay.py and as Festr's kimi-k3 hidden-replay qualification. + +## What is here + +| | | +|---|---| +| records | 4 | +| scored positions | 252 | +| context length | 64 | +| hidden width | 64 | +| vocab size | 260 | +| capture bytes (hidden form) | 33348 | +| the same capture in logit form would be | 262080 bytes (8x) | +| scope policy | mixed | +| lane | other | + +## Does the model still generate sensibly + +`The capital of France is` -> `�` (p=0.0069, entropy 5.549 of a possible 5.561 nats). Recorded, not enforced. One extra window through the same schedule; its hidden state was discarded and is not part of this dataset. + +## How to check it + +``` +bin/fidelity-dataset verify +``` + +Full specification: diff --git a/raw/candidates/modelopt-nvfp4/evidence/candidate/capture/hidden_0000.safetensors b/raw/candidates/modelopt-nvfp4/evidence/candidate/capture/hidden_0000.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..2153748abd6f0e121725fd55f69cbdc926d13fd4 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/candidate/capture/hidden_0000.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95ae792612a09ab7981fd568edc2151ad16b739f58d0778664ee6728dc25cdeb +size 8337 diff --git a/raw/candidates/modelopt-nvfp4/evidence/candidate/capture/hidden_0001.safetensors b/raw/candidates/modelopt-nvfp4/evidence/candidate/capture/hidden_0001.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..afd3603188c63c82ce9f728ba20265ac4814c9cd --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/candidate/capture/hidden_0001.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d70646e6758e6a17c9cc1a70ce6feb43050f98013e1835fd66ab905c2bc36b82 +size 8337 diff --git a/raw/candidates/modelopt-nvfp4/evidence/candidate/capture/hidden_0002.safetensors b/raw/candidates/modelopt-nvfp4/evidence/candidate/capture/hidden_0002.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..394f45cb92bd1f047a3ebbc913b93f4971e43691 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/candidate/capture/hidden_0002.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4ae420424ce1fcc680883425c5bb6b054c9dab7a0613b2e556b8a8e5c8acc6c7 +size 8337 diff --git a/raw/candidates/modelopt-nvfp4/evidence/candidate/capture/hidden_0003.safetensors b/raw/candidates/modelopt-nvfp4/evidence/candidate/capture/hidden_0003.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..3a38b03907a3dcbdcfd39a44e10c83fde2cd53fb --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/candidate/capture/hidden_0003.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d05493ad9cb77584d6105a9902dd3cb236f6b02c38474bda10a0bc753e4e4314 +size 8337 diff --git a/raw/candidates/modelopt-nvfp4/evidence/candidate/capture/manifest.json b/raw/candidates/modelopt-nvfp4/evidence/candidate/capture/manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..c9ceb94f2456527e333b2ffb9ef87877f28b3617 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/candidate/capture/manifest.json @@ -0,0 +1,159 @@ +{ + "capture_content_digest": "a516142b91f38f118037c335935a365b0666c014d6a59056e1d7bc2adeb4acc0", + "context_length": 64, + "coverage": { + "complete": true, + "declared_records": 4, + "index_range": [ + 0, + 3 + ], + "missing_indices_sample": [], + "present_records": 4, + "shard_of": null, + "subset_detail": null + }, + "created_utc": "2026-09-07T16:52:53Z", + "dtype": "BF16", + "dtype_lossless": true, + "form": "hidden", + "format_version": 1, + "hidden_width": 64, + "receipt_sha256": "8312f676abb81efee5012c810be028a3e81ca6f22cba107c793092da39ead744", + "records": [ + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 0, + "document_id": "embedded-synthetic/garden.txt", + "domain": "garden", + "dtype": "BF16", + "elapsed_seconds": 0.039, + "file": "hidden_0000.safetensors", + "index": 0, + "key": "hidden_states", + "payload_sha256": "205fa2d80d4321f1eb58ea0885e7bae6e19c23e40dc5fefe3997a47cd38dfbcc", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "95ae792612a09ab7981fd568edc2151ad16b739f58d0778664ee6728dc25cdeb", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "205fa2d80d4321f1eb58ea0885e7bae6e19c23e40dc5fefe3997a47cd38dfbcc", + "token_ids_json_sha256": "08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315", + "token_ids_sha256_legacy": "9d5378f0316be57e37f80d2bae7895ba4a1140c302c87ff8cce2fbd9afc83b77", + "window_id": "final-0000", + "window_index": 0 + }, + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 1, + "document_id": "embedded-synthetic/arithmetic.txt", + "domain": "arithmetic", + "dtype": "BF16", + "elapsed_seconds": 0.051, + "file": "hidden_0001.safetensors", + "index": 1, + "key": "hidden_states", + "payload_sha256": "c9124b50c29c09727a94c6c75bc64f10dfb754ffec77ff9ca92c44c44fcb21e3", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "d70646e6758e6a17c9cc1a70ce6feb43050f98013e1835fd66ab905c2bc36b82", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "c9124b50c29c09727a94c6c75bc64f10dfb754ffec77ff9ca92c44c44fcb21e3", + "token_ids_json_sha256": "5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46", + "token_ids_sha256_legacy": "e0f95114b71a46cb489539dc38909fb67fb378f25fafbb513e32690cc7f11b37", + "window_id": "final-0001", + "window_index": 1 + }, + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 2, + "document_id": "embedded-synthetic/code.txt", + "domain": "code", + "dtype": "BF16", + "elapsed_seconds": 0.037, + "file": "hidden_0002.safetensors", + "index": 2, + "key": "hidden_states", + "payload_sha256": "f54271e682b0b1db920345970fddd8f3cd23c3de20822ff81a308a0a7e79b9ed", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "4ae420424ce1fcc680883425c5bb6b054c9dab7a0613b2e556b8a8e5c8acc6c7", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "f54271e682b0b1db920345970fddd8f3cd23c3de20822ff81a308a0a7e79b9ed", + "token_ids_json_sha256": "51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07", + "token_ids_sha256_legacy": "482b890c7b0e2f7400257c43680093b7f2b90d6df5361c6de3ae97ddfdd2504e", + "window_id": "final-0002", + "window_index": 2 + }, + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 3, + "document_id": "embedded-synthetic/instructions.txt", + "domain": "instructions", + "dtype": "BF16", + "elapsed_seconds": 0.036, + "file": "hidden_0003.safetensors", + "index": 3, + "key": "hidden_states", + "payload_sha256": "2c65e59b1a26ce8afeedf45ff557b574a55ff377c0cab066621cb8641d687e8f", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "d05493ad9cb77584d6105a9902dd3cb236f6b02c38474bda10a0bc753e4e4314", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "2c65e59b1a26ce8afeedf45ff557b574a55ff377c0cab066621cb8641d687e8f", + "token_ids_json_sha256": "8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d", + "token_ids_sha256_legacy": "12e01edd3900ff2ca82621feb5504f24b003a53c0afe98a9ee0b490eb93141d4", + "window_id": "final-0003", + "window_index": 3 + } + ], + "run_name": "hf-capture", + "runtime_manifest": "../runtime/capture-runtime.json", + "runtime_manifest_sha256": "5b627d516f779bb56427e7c47e92f988636771a861296b6d736635b3cbae3b04", + "schema": "malaiwah.fidelity-capture-manifest.v1", + "scored_rows_per_context": 63, + "semantic_point": "after_final_rmsnorm_before_lm_head", + "tensor_key": "hidden_states", + "total_scored_rows": 252, + "total_size_bytes": 33348, + "vocab_size": 260 +} diff --git a/raw/candidates/modelopt-nvfp4/evidence/candidate/checksums.txt b/raw/candidates/modelopt-nvfp4/evidence/candidate/checksums.txt new file mode 100644 index 0000000000000000000000000000000000000000..4351205d80b62343c20a424ce6719c04c9925d4a --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/candidate/checksums.txt @@ -0,0 +1,20 @@ +01fe610eaf77b35a23fdb66d55b2256ea9a21b4ca30490a0aca2f77d48bf2612 README.md +95ae792612a09ab7981fd568edc2151ad16b739f58d0778664ee6728dc25cdeb capture/hidden_0000.safetensors +d70646e6758e6a17c9cc1a70ce6feb43050f98013e1835fd66ab905c2bc36b82 capture/hidden_0001.safetensors +4ae420424ce1fcc680883425c5bb6b054c9dab7a0613b2e556b8a8e5c8acc6c7 capture/hidden_0002.safetensors +d05493ad9cb77584d6105a9902dd3cb236f6b02c38474bda10a0bc753e4e4314 capture/hidden_0003.safetensors +da682fe4e6d61719b34a17f08bbeb1f3c09d46eef3ce09653f8fce0a32af087f capture/manifest.json +777b038f747bed25d1f5db8adbfd2a78c7762fb5c870ff8c3c785a984d48a168 head/head.json +07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913 head/weight.safetensors +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0000.npy +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0001.npy +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0002.npy +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0003.npy +b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263 panel/panel-receipt.json +68efa258ea3c5d4ba759c3c15aadd6e8c984711831bea3f335903109345cdcef panel/panel.json +08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315 panel/tokens/context-0000.json +5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46 panel/tokens/context-0001.json +51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07 panel/tokens/context-0002.json +8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d panel/tokens/context-0003.json +5b627d516f779bb56427e7c47e92f988636771a861296b6d736635b3cbae3b04 runtime/capture-runtime.json +d3024ee8845d123018358b9c98a844bcdc3c985fbbc92d9e1b8565b121fe8a45 validation/structural-validation.json diff --git a/raw/candidates/modelopt-nvfp4/evidence/candidate/fidelity-dataset.json b/raw/candidates/modelopt-nvfp4/evidence/candidate/fidelity-dataset.json new file mode 100644 index 0000000000000000000000000000000000000000..6b280ad6c0ad3e0d73afc2c32295fece0856deb8 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/candidate/fidelity-dataset.json @@ -0,0 +1,422 @@ +{ + "capture": { + "capture_content_digest": "a516142b91f38f118037c335935a365b0666c014d6a59056e1d7bc2adeb4acc0", + "dtype": "BF16", + "dtype_lossless": true, + "form": "hidden", + "head_not_separable_reason": null, + "head_separable": true, + "hidden_width": 64, + "lossy_codec": null, + "manifest_file": "capture/manifest.json", + "manifest_file_sha256": "da682fe4e6d61719b34a17f08bbeb1f3c09d46eef3ce09653f8fce0a32af087f", + "records_count": 4, + "scored_rows_total": 252, + "semantic_point": "after_final_rmsnorm_before_lm_head", + "tensor_key": "hidden_states", + "total_size_bytes": 33348, + "vocab_size": 260 + }, + "coverage": { + "complete": true, + "declared_records": 4, + "index_range": [ + 0, + 3 + ], + "missing_indices_sample": [], + "present_records": 4, + "shard_of": null, + "subset_detail": null + }, + "created_utc": "2026-09-07T16:52:53Z", + "dataset": { + "author": { + "handle": null, + "is_registry_maintainer": false, + "name": "malaiwah", + "role": "capture-author", + "url": null + }, + "base_capture": null, + "id": "fidelity--quant-integration.candidate", + "license": "mit", + "name": "Local quant integration candidate", + "qualification": null, + "repository": null, + "revision": null, + "role": "quant", + "structural_status": "sealed" + }, + "dataset_sha256": "e3ef9f50c9eb87268b56e6c79e42e714d5ec58b590afa68bbbe0d3ce8e45afd9", + "determinism": { + "cold_start_per_run": true, + "distinct_evidence_hash_count": 1, + "evidence_hashes": [ + "a516142b91f38f118037c335935a365b0666c014d6a59056e1d7bc2adeb4acc0" + ], + "evidence_kind": "hidden_state_tensor_sha256", + "identical_across_runs": null, + "note": "a single cold capture; cross-run determinism is NOT asserted here. Capture a second cold run and run `fidelity-dataset compare --self-compare` -- an exactly 0.0 result is the SC-1 reproduction confirmation.", + "repeat_noise": null, + "repeats": [], + "run_count": 1 + }, + "disclosures": [ + { + "affects_comparability": false, + "code": "rtn_format_fixture", + "detail": "Local RTN-format fixture; optimizer-not-run; no model-quality or serving-kernel equivalence claim.", + "severity": "info" + }, + { + "affects_comparability": false, + "code": "reduced_run_count", + "detail": "this dataset is ONE cold capture (run_count 1, the DET-D4 floor is 5). Cross-run determinism is not asserted by the dataset; it is established by a second cold capture plus `fidelity-dataset compare --self-compare`, whose exactly-0.0 result is the SC-1 reproduction confirmation.", + "severity": "caveat" + } + ], + "format_version": 1, + "generation_sanity_probe": { + "degenerate": false, + "enforced": false, + "entropy_nats": 5.548674632740069, + "expect": null, + "logit_spread": 1.033203125, + "note": "one extra window through the same schedule; its hidden state is discarded and never enters the dataset.", + "prompt": "The capital of France is", + "schema": "malaiwah.generation-sanity-probe.v1", + "status": "recorded", + "top1_id": 113, + "top1_probability": 0.00693052521055701, + "top1_text": "�", + "top_k": [ + { + "id": 113, + "probability": 0.00693052521055701, + "text": "�" + }, + { + "id": 237, + "probability": 0.006033116581796345, + "text": "�" + }, + { + "id": 193, + "probability": 0.005836087351734669, + "text": "\u0001" + }, + { + "id": 44, + "probability": 0.005482496693940052, + "text": "I" + }, + { + "id": 236, + "probability": 0.005272465543894964, + "text": "�" + } + ], + "uniform_entropy_nats": 5.560681631015528, + "vocab_size": 260 + }, + "head": { + "applied_in_capture": false, + "bias": null, + "bits": 16, + "compat_tensor_key": "weight", + "dtype": "BF16", + "equality_receipt": null, + "file": "head/weight.safetensors", + "file_sha256": "07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913", + "final_norm": { + "applied_at_replay": false, + "applied_in_capture": true, + "dtype": null, + "file": null, + "file_sha256": null, + "shape": null, + "tensor_content_sha256": null, + "tensor_key": null + }, + "head_json": "head/head.json", + "present": true, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "shape": [ + 260, + 64 + ], + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "tensor_key": "lm_head.weight" + }, + "interop": { + "adapted_from": null, + "compatible_with": [ + "kimi-k3-distribution-fidelity/1" + ], + "divergences": [ + { + "field": "head", + "id": "D-1", + "reason": "every capture declares its OWN head identity by tensor content digest; the comparator refuses a hidden-form comparison across differing heads." + }, + { + "field": "runtime.lane", + "id": "D-2", + "reason": "lane is required and gated at compare time so registry BIAS-006 is checked before a number exists, not at submission." + }, + { + "field": "panel.scoring_window", + "id": "D-3", + "reason": "scoring_window is part of panel identity, not a comparator flag: a score_from=1024 number is a different panel, not a variant." + }, + { + "field": "comparison_kind", + "id": "D-4", + "reason": "self-compare is a first-class mode asserting exactly 0.0." + }, + { + "field": "estimator.accumulation_dtype", + "id": "D-5", + "reason": "required, fp64 default; an fp32 estimator lands in a different comparability class on the same data and that must be visible." + }, + { + "field": "coverage", + "id": "D-6", + "reason": "declared vs present record counts with shard_of; fixes our own manifest that claimed 5,120 captures in a 512-file repository." + }, + { + "field": "panel", + "id": "D-7", + "reason": "the panel is a separately referenceable object, which is what makes a candidate capture publishable standalone." + }, + { + "field": "capture.lossy_codec", + "id": "D-8", + "reason": "lets a llama.cpp .kld be ingested without laundering a lossy capture as exact." + }, + { + "field": "capture.records[].attention_mask_sha256", + "id": "D-9", + "reason": "our packed and streaming lanes vary mask construction; a single-request capture path makes it invariant and has no equivalent field." + }, + { + "field": "capture.head_separable", + "id": "D-10", + "reason": "hidden form is the default; logit form must declare head_separable:false with a reason." + } + ], + "k3_compat_emitted": false, + "note": null + }, + "panel": { + "contamination": { + "checked": false, + "hits": null, + "method": "not established", + "receipt": null + }, + "context_length": 64, + "contexts": 4, + "panel_file": "panel/panel.json", + "panel_file_sha256": "68efa258ea3c5d4ba759c3c15aadd6e8c984711831bea3f335903109345cdcef", + "panel_id": "panel--panel", + "panel_receipt_file": "panel/panel-receipt.json", + "panel_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "panel_token_sha256_legacy": "3c9467c85be43d238926f6d18bf825c2e4748814c95b8b0e8b8f1420546c3089", + "remap_file": null, + "repository": null, + "revision": null, + "scored_positions_total": 252, + "scoring_window": { + "dropped_positions_total": 0, + "min_left_context_tokens": 1, + "policy": "every causal prediction position of every window is scored; nothing is dropped", + "score_from": 0, + "windowed": false + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } + }, + "runtime": { + "backend_identity_sha256": null, + "file": "runtime/capture-runtime.json", + "file_sha256": "5b627d516f779bb56427e7c47e92f988636771a861296b6d736635b3cbae3b04", + "lane": "other", + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "lane_inferred": false, + "runtime_reader_sha256": null, + "source": "native", + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd" + }, + "schema": "malaiwah.fidelity-dataset.v1", + "scope": { + "assignments": [ + { + "bits_per_weight": 4, + "format": "modelopt-nvfp4", + "layer_range": "all", + "note": "4 tensors: model.layers.N.self_attn.o_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "attn.o", + "treatment": "quantized" + }, + { + "bits_per_weight": null, + "format": "mixed", + "layer_range": "0-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 12 x native:bf16@16 (model.layers.N.self_attn.indexer.k_norm.bias, model.layers.N.self_attn.indexer.k_norm.weight, model.layers.N.self_attn.kv_a_layernorm.weight); 6 x quantized:modelopt-nvfp4@4 (model.layers.N.self_attn.indexer.weights_proj.weight, model.layers.N.self_attn.indexer.wk.weight, model.layers.N.self_attn.indexer.wq_b.weight). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "attn.other", + "treatment": "quantized" + }, + { + "bits_per_weight": 4, + "format": "modelopt-nvfp4", + "layer_range": "all", + "note": "16 tensors: model.layers.N.self_attn.kv_a_proj_with_mqa.weight, model.layers.N.self_attn.kv_b_proj.weight, model.layers.N.self_attn.q_a_proj.weight, model.layers.N.self_attn.q_b_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "attn.qkv", + "treatment": "quantized" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": "all", + "note": "1 tensors: model.embed_tokens.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "embed_tokens", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": "all", + "note": "1 tensors: lm_head.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "lm_head", + "treatment": "native" + }, + { + "bits_per_weight": 4, + "format": "modelopt-nvfp4", + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.down_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "mlp.down", + "treatment": "quantized" + }, + { + "bits_per_weight": 4, + "format": "modelopt-nvfp4", + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.gate_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "mlp.gate", + "treatment": "quantized" + }, + { + "bits_per_weight": 4, + "format": "modelopt-nvfp4", + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "mlp.up", + "treatment": "quantized" + }, + { + "bits_per_weight": 4, + "format": "modelopt-nvfp4", + "layer_range": "all", + "note": "72 tensors: model.layers.N.mlp.experts.E.down_proj.weight, model.layers.N.mlp.experts.E.gate_proj.weight, model.layers.N.mlp.experts.E.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "moe.experts", + "treatment": "quantized" + }, + { + "bits_per_weight": null, + "format": "mixed", + "layer_range": "1-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 3 x native:bf16@16 (model.layers.N.mlp.gate.weight); 3 x native:fp32@32 (model.layers.N.mlp.gate.e_score_correction_bias). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "moe.router", + "treatment": "native" + }, + { + "bits_per_weight": 4, + "format": "modelopt-nvfp4", + "layer_range": "all", + "note": "9 tensors: model.layers.N.mlp.shared_experts.down_proj.weight, model.layers.N.mlp.shared_experts.gate_proj.weight, model.layers.N.mlp.shared_experts.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "moe.shared_expert", + "treatment": "quantized" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": "all", + "note": "9 tensors: model.layers.N.input_layernorm.weight, model.layers.N.post_attention_layernorm.weight, model.norm.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim", + "tensor_class": "norm", + "treatment": "native" + } + ], + "head_policy": "native", + "kv_cache_dtype": "bf16", + "policy": "mixed", + "scope_digest": "attn.o=quantized:modelopt-nvfp4@4|attn.other=quantized:mixed|attn.qkv=quantized:modelopt-nvfp4@4|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=quantized:modelopt-nvfp4@4|mlp.gate=quantized:modelopt-nvfp4@4|mlp.up=quantized:modelopt-nvfp4@4|moe.experts=quantized:modelopt-nvfp4@4|moe.router=native:mixed|moe.shared_expert=quantized:modelopt-nvfp4@4|norm=native:bf16@16|head=native|kv=bf16" + }, + "seal": { + "checksums_file": "checksums.txt", + "checksums_format": "sha256sum", + "checksums_sha256": "e3eb417ccf2d617559fb939ac1109132978827a3b4acafe5dee52ae9dac1ca98", + "covers": [ + "every published file except checksums.txt and fidelity-dataset.json, via checksums.txt", + "fidelity-dataset.json itself, via the self-blanked seal", + "every capture tensor a second time by CONTENT, via capture.capture_content_digest" + ], + "excludes": [ + "checksums.txt", + "fidelity-dataset.json" + ], + "external_anchor": null, + "method": "self_blanked_canonical_json_sha256", + "seal_field": "dataset_sha256" + }, + "upstream_receipts": [], + "weights": { + "artifact_ref": null, + "checkpoint_identity_sha256": "2fb12f3cf616cdb60b7003e9900d0cbc659c01df01c34cd0ae67f7ad5ad4bb6b", + "codec": "nvfp4", + "config_sha256": "932f17d4ee472ee814a296cfa3b521bf0b9daefc57cef0f3406995fdb341e7fe", + "declared_bits": 4.0, + "declared_head_bits": 16, + "index_sha256": null, + "model_ref": null, + "model_revision": null, + "quantized": true, + "repository": "/tmp/qfs-quant-microfloat-release/stage-main/modelopt-nvfp4", + "revision": null + } +} diff --git a/raw/candidates/modelopt-nvfp4/evidence/candidate/head/head.json b/raw/candidates/modelopt-nvfp4/evidence/candidate/head/head.json new file mode 100644 index 0000000000000000000000000000000000000000..cfb1d748d203487673352f1ad645cb98a49c4002 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/candidate/head/head.json @@ -0,0 +1,34 @@ +{ + "applied_in_capture": false, + "bias": null, + "bits": 16, + "compat_tensor_key": "weight", + "dtype": "BF16", + "equality_receipt": null, + "file": "head/weight.safetensors", + "file_sha256": "07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913", + "final_norm": { + "applied_at_replay": false, + "applied_in_capture": true, + "dtype": null, + "file": null, + "file_sha256": null, + "shape": null, + "tensor_content_sha256": null, + "tensor_key": null + }, + "format_version": 1, + "note": "the head is shipped verbatim from the checkpoint so a third party can replay logits = hidden @ head^T without the weights", + "present": true, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "receipt_sha256": "2da3cfbfc607296b3bb32eb6fec1f122e4ce30fe9ea96653e5bb1b4ebab6514f", + "schema": "malaiwah.fidelity-head-identity.v1", + "shape": [ + 260, + 64 + ], + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "tensor_key": "lm_head.weight" +} diff --git a/raw/candidates/modelopt-nvfp4/evidence/candidate/head/weight.safetensors b/raw/candidates/modelopt-nvfp4/evidence/candidate/head/weight.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..abe6e7c215a73bc88e85042067923bf943118086 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/candidate/head/weight.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913 +size 33365 diff --git a/raw/candidates/modelopt-nvfp4/evidence/candidate/panel/masks/context-0000.npy b/raw/candidates/modelopt-nvfp4/evidence/candidate/panel/masks/context-0000.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/candidate/panel/masks/context-0000.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/modelopt-nvfp4/evidence/candidate/panel/masks/context-0001.npy b/raw/candidates/modelopt-nvfp4/evidence/candidate/panel/masks/context-0001.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/candidate/panel/masks/context-0001.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/modelopt-nvfp4/evidence/candidate/panel/masks/context-0002.npy b/raw/candidates/modelopt-nvfp4/evidence/candidate/panel/masks/context-0002.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/candidate/panel/masks/context-0002.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/modelopt-nvfp4/evidence/candidate/panel/masks/context-0003.npy b/raw/candidates/modelopt-nvfp4/evidence/candidate/panel/masks/context-0003.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/candidate/panel/masks/context-0003.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/modelopt-nvfp4/evidence/candidate/panel/panel-receipt.json b/raw/candidates/modelopt-nvfp4/evidence/candidate/panel/panel-receipt.json new file mode 100644 index 0000000000000000000000000000000000000000..fbc2ce3e8e9602a492d83ae681817e0fa02e4173 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/candidate/panel/panel-receipt.json @@ -0,0 +1,376 @@ +{ + "corpus": { + "documents_considered": 4, + "documents_selected": 4, + "path_prefix": "embedded-synthetic/", + "repository": null, + "revision": null, + "source": "Synthetic texts embedded verbatim in this sealed receipt and builder." + }, + "created_utc": "2026-09-07T00:00:00Z", + "created_utc_policy": "Fixed artifact epoch for deterministic bytes; not an execution timestamp.", + "documents": [ + { + "bytes": 135, + "document": "garden.txt", + "document_sha256": "2aca14290cd4753c3b15d8a20aaa7a6963d2cb48d78e8538a4ce34d4665dcb94", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "garden", + "text_utf8": "The small garden has red flowers, green leaves, and a stone path. A gentle breeze moves the branches while a robin sings near the gate.", + "tokens_total": 137, + "window_id": "final-0000" + }, + { + "bytes": 144, + "document": "arithmetic.txt", + "document_sha256": "b867a2e8cbe81cc8d5781bfe6718a43e171fb5c7c138b9ed6ac86bebc24bca83", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "arithmetic", + "text_utf8": "A shelf holds three blue boxes and five red boxes. There are eight boxes in total. Move two boxes to the desk and count the six boxes remaining.", + "tokens_total": 146, + "window_id": "final-0001" + }, + { + "bytes": 162, + "document": "code.txt", + "document_sha256": "08c8f75f45899cbc9656a7a3fcdbf3092abfa7bc97fe353957b08d7e9660240b", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "code", + "text_utf8": "def add_values(left, right):\n return left + right\n\nresult = add_values(7, 9)\nprint(result)\n# This readable snippet is synthetic input, not a coding benchmark.\n", + "tokens_total": 164, + "window_id": "final-0002" + }, + { + "bytes": 140, + "document": "instructions.txt", + "document_sha256": "1dba5052b28929f94f322ad9e8c0b238bcbd653d6fae54ebaea8e5e3f6073378", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "instructions", + "text_utf8": "First place a clean cup on the table. Next pour cool water into the cup. Finally put the bottle away and write a short note about the steps.", + "tokens_total": 142, + "window_id": "final-0003" + } + ], + "environment": { + "numpy": "2.5.3", + "tokenizers": "0.23.2", + "transformers": "5.16.1" + }, + "format_builder": "engines/tools/build_token_panel.py", + "format_builder_sha256": "30eb4d4d7e465aaa8d9ef2d947a0ac7fd42ec45388f20c8b6db242c88dc2d851", + "format_version": 1, + "panel_id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "panel_name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "parameters": { + "context_length": 64, + "generation_seed": null, + "generation_seed_policy": "No RNG is used.", + "prediction_positions_per_window": 63, + "scored_positions_total": 252, + "strata": [ + "garden", + "arithmetic", + "code", + "instructions" + ], + "windows_per_stratum": 1, + "windows_total": 4 + }, + "receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "resolver_sha256": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "schema": "malaiwah.token-panel-build-receipt.v1", + "selection_rule": "Four embedded readable synthetic documents in declared order; native tokenizer with add_special_tokens=True, truncation=True, max_length=64, padding=False; each encoded window must be exactly 64 tokens; no chat template; all 63 shifted next-token positions scored; no RNG.", + "separation": { + "checked": false, + "method": "No contamination scan or benchmark selection.", + "note": "Authored synthetic CPU smoke inputs for a random-init model; not a benchmark, held-out quality claim, or registry-row submission." + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "add_special_tokens": true, + "chat_template_applied": false, + "class": "TokenizersBackend", + "files_sha256": { + "config.json": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "generation_config.json": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "tokenizer.json": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "tokenizer_config.json": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + }, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "local_files_only": true, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "trust_remote_code": false, + "vocab_size": 260 + }, + "tool": "build_panel.py", + "tool_sha256": "f17b17262816676d6ededcc969756ac07ff991eab73117040ec41005f6ff63f3" +} diff --git a/raw/candidates/modelopt-nvfp4/evidence/candidate/panel/panel.json b/raw/candidates/modelopt-nvfp4/evidence/candidate/panel/panel.json new file mode 100644 index 0000000000000000000000000000000000000000..cedb9d5e3c635860791c55451fde6dc9e37cddb9 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/candidate/panel/panel.json @@ -0,0 +1,298 @@ +{ + "contamination": { + "checked": false, + "hits": null, + "method": "not established", + "receipt": null + }, + "context_length": 64, + "contexts": 4, + "format_version": 1, + "name": "token panel panel--panel", + "panel_id": "panel--panel", + "panel_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "panel_token_sha256_legacy": "3c9467c85be43d238926f6d18bf825c2e4748814c95b8b0e8b8f1420546c3089", + "positions_per_context": 63, + "receipt_sha256": "8a4e27a74ca6ce39569b78c3d972077ab7966f6da118110b3b08adca1e284c6f", + "records": [ + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0000.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 0, + "document_id": "embedded-synthetic/garden.txt", + "domain": "garden", + "index": 0, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0000.json", + "token_ids_first16": [ + 1, + 55, + 75, + 72, + 224, + 86, + 80, + 68, + 79, + 79, + 224, + 74, + 68, + 85, + 71, + 72 + ], + "token_ids_json_sha256": "08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315", + "token_ids_last16": [ + 224, + 68, + 81, + 71, + 224, + 68, + 224, + 86, + 87, + 82, + 81, + 72, + 224, + 83, + 68, + 2 + ], + "token_ids_sha256_legacy": "9d5378f0316be57e37f80d2bae7895ba4a1140c302c87ff8cce2fbd9afc83b77", + "window_id": "final-0000", + "window_index": 0 + }, + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0001.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 1, + "document_id": "embedded-synthetic/arithmetic.txt", + "domain": "arithmetic", + "index": 1, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0001.json", + "token_ids_first16": [ + 1, + 36, + 224, + 86, + 75, + 72, + 79, + 73, + 224, + 75, + 82, + 79, + 71, + 86, + 224, + 87 + ], + "token_ids_json_sha256": "5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46", + "token_ids_last16": [ + 72, + 86, + 17, + 224, + 55, + 75, + 72, + 85, + 72, + 224, + 68, + 85, + 72, + 224, + 72, + 2 + ], + "token_ids_sha256_legacy": "e0f95114b71a46cb489539dc38909fb67fb378f25fafbb513e32690cc7f11b37", + "window_id": "final-0001", + "window_index": 1 + }, + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0002.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 2, + "document_id": "embedded-synthetic/code.txt", + "domain": "code", + "index": 2, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0002.json", + "token_ids_first16": [ + 1, + 71, + 72, + 73, + 224, + 68, + 71, + 71, + 66, + 89, + 68, + 79, + 88, + 72, + 86, + 11 + ], + "token_ids_json_sha256": "51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07", + "token_ids_last16": [ + 85, + 76, + 74, + 75, + 87, + 202, + 202, + 85, + 72, + 86, + 88, + 79, + 87, + 224, + 32, + 2 + ], + "token_ids_sha256_legacy": "482b890c7b0e2f7400257c43680093b7f2b90d6df5361c6de3ae97ddfdd2504e", + "window_id": "final-0002", + "window_index": 2 + }, + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0003.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 3, + "document_id": "embedded-synthetic/instructions.txt", + "domain": "instructions", + "index": 3, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0003.json", + "token_ids_first16": [ + 1, + 41, + 76, + 85, + 86, + 87, + 224, + 83, + 79, + 68, + 70, + 72, + 224, + 68, + 224, + 70 + ], + "token_ids_json_sha256": "8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d", + "token_ids_last16": [ + 224, + 70, + 82, + 82, + 79, + 224, + 90, + 68, + 87, + 72, + 85, + 224, + 76, + 81, + 87, + 2 + ], + "token_ids_sha256_legacy": "12e01edd3900ff2ca82621feb5504f24b003a53c0afe98a9ee0b490eb93141d4", + "window_id": "final-0003", + "window_index": 3 + } + ], + "repository": null, + "revision": null, + "schema": "malaiwah.fidelity-panel-binding.v1", + "scored_positions_total": 252, + "scoring_window": { + "dropped_positions_total": 0, + "min_left_context_tokens": 1, + "policy": "every causal prediction position of every window is scored; nothing is dropped", + "score_from": 0, + "windowed": false + }, + "strata": {}, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "token_digest_algorithm": { + "aggregate": "sha256('\\n'.join(per_record_hex).encode('ascii'))", + "legacy_aggregate": "sha256(''.join(per_record_hex).encode('utf-8'))", + "legacy_per_record": "sha256(json.dumps(ids).encode('utf-8'))", + "per_record": "sha256(json.dumps(ids, separators=(',',':')).encode('utf-8'))" + }, + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } +} diff --git a/raw/candidates/modelopt-nvfp4/evidence/candidate/panel/tokens/context-0000.json b/raw/candidates/modelopt-nvfp4/evidence/candidate/panel/tokens/context-0000.json new file mode 100644 index 0000000000000000000000000000000000000000..c55b788f77dcb26a8c56fe6a7593353d57abb70f --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/candidate/panel/tokens/context-0000.json @@ -0,0 +1 @@ +[1,55,75,72,224,86,80,68,79,79,224,74,68,85,71,72,81,224,75,68,86,224,85,72,71,224,73,79,82,90,72,85,86,15,224,74,85,72,72,81,224,79,72,68,89,72,86,15,224,68,81,71,224,68,224,86,87,82,81,72,224,83,68,2] \ No newline at end of file diff --git a/raw/candidates/modelopt-nvfp4/evidence/candidate/panel/tokens/context-0001.json b/raw/candidates/modelopt-nvfp4/evidence/candidate/panel/tokens/context-0001.json new file mode 100644 index 0000000000000000000000000000000000000000..8304be93e5387811e155f869e175c0bfca57ca76 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/candidate/panel/tokens/context-0001.json @@ -0,0 +1 @@ +[1,36,224,86,75,72,79,73,224,75,82,79,71,86,224,87,75,85,72,72,224,69,79,88,72,224,69,82,91,72,86,224,68,81,71,224,73,76,89,72,224,85,72,71,224,69,82,91,72,86,17,224,55,75,72,85,72,224,68,85,72,224,72,2] \ No newline at end of file diff --git a/raw/candidates/modelopt-nvfp4/evidence/candidate/panel/tokens/context-0002.json b/raw/candidates/modelopt-nvfp4/evidence/candidate/panel/tokens/context-0002.json new file mode 100644 index 0000000000000000000000000000000000000000..2a1413e634823a039c4ede6b463b549207c4c8fb --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/candidate/panel/tokens/context-0002.json @@ -0,0 +1 @@ +[1,71,72,73,224,68,71,71,66,89,68,79,88,72,86,11,79,72,73,87,15,224,85,76,74,75,87,12,29,202,224,224,224,224,85,72,87,88,85,81,224,79,72,73,87,224,14,224,85,76,74,75,87,202,202,85,72,86,88,79,87,224,32,2] \ No newline at end of file diff --git a/raw/candidates/modelopt-nvfp4/evidence/candidate/panel/tokens/context-0003.json b/raw/candidates/modelopt-nvfp4/evidence/candidate/panel/tokens/context-0003.json new file mode 100644 index 0000000000000000000000000000000000000000..7978732d7bf3bfc5fed35c837bc69d9d66371c4f --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/candidate/panel/tokens/context-0003.json @@ -0,0 +1 @@ +[1,41,76,85,86,87,224,83,79,68,70,72,224,68,224,70,79,72,68,81,224,70,88,83,224,82,81,224,87,75,72,224,87,68,69,79,72,17,224,49,72,91,87,224,83,82,88,85,224,70,82,82,79,224,90,68,87,72,85,224,76,81,87,2] \ No newline at end of file diff --git a/raw/candidates/modelopt-nvfp4/evidence/candidate/runtime/capture-runtime.json b/raw/candidates/modelopt-nvfp4/evidence/candidate/runtime/capture-runtime.json new file mode 100644 index 0000000000000000000000000000000000000000..1c9aa5325ccf2a0d1323bb8cc33367a457994f43 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/candidate/runtime/capture-runtime.json @@ -0,0 +1,284 @@ +{ + "capture_tool": { + "expert_fill": { + "bytes_filled": 294912, + "declined": {}, + "decoded_slices": 72, + "identity": "a byte copy into the fused parameter's slice; bin/selftest_layer_outer.py L4/L6 assert equality with from_pretrained and with the converter path", + "layers_filled": 3, + "mode": "direct", + "reference": "transformers.core_model_loading.MergeModulelist(dim=0) + Concatenate(dim=1)", + "slices_filled": 72, + "staged_slices": 0, + "staging": "pageable", + "targets_filled": 6 + }, + "file": "engines/tools/hf_capture.py", + "head_module_path": "lm_head", + "head_resolution": "lm_head", + "layer_residency": "stream", + "mechanism": "transformers forward pass, layer-outer/window-inner schedule: for each decoder layer the model's own forward is run once per window with the layers below replaying their memoised output and the layers above suspending, so each layer's weights are materialised once for the whole panel. Windows are pushed through sequentially, never batched. Forward pre-hook on model.get_output_embeddings(), fired by the model's own epilogue after the last layer", + "model_view": null, + "parallel_plan_dropped": false, + "resolved_classes": { + "config": "transformers.models.glm_moe_dsa.configuration_glm_moe_dsa.GlmMoeDsaConfig", + "model": "transformers.models.glm_moe_dsa.modeling_glm_moe_dsa.GlmMoeDsaForCausalLM" + }, + "resolved_panel_binding": { + "binding": { + "content": { + "archive": { + "algorithm": "sha256(ustar: sorted regular files; mode=0644; uid=gid=mtime=0)", + "bytes": 20480, + "compression": "none", + "format": "ustar", + "sha256": "389706dfa3335a75ec70a40d079995af1a60c05512334125dbd336790f12702f" + }, + "manifest": [ + { + "bytes": 192, + "path": "arrays/causal-mask-64.npy", + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02" + }, + { + "bytes": 384, + "path": "arrays/final-0000.tokens.npy", + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af" + }, + { + "bytes": 384, + "path": "arrays/final-0001.tokens.npy", + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea" + }, + { + "bytes": 384, + "path": "arrays/final-0002.tokens.npy", + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c" + }, + { + "bytes": 384, + "path": "arrays/final-0003.tokens.npy", + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a" + }, + { + "bytes": 4195, + "path": "panel.json", + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6" + }, + { + "bytes": 7808, + "path": "panel.receipt.json", + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263" + } + ], + "manifest_sha256": "e5f2d6410a6290da1197016c5b57ae522a3570665215ddc23e2a0bd45f912181" + }, + "panel": { + "bytes": 4195, + "context_length": 64, + "contexts": 4, + "file": "panel.json", + "id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "positions_per_context": 63, + "role": "final", + "scored_positions_total": 252, + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6", + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36" + }, + "receipt": { + "bytes": 7808, + "declared_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "file": "panel.receipt.json", + "receipt_file_sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "receipt_seal_mode": "self-blank" + }, + "schema": "malaiwah.resolved-panel.v1", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } + }, + "binding_file": "panel-binding.json", + "binding_file_sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "tokenizer_equivalences": [] + }, + "schedule": "layer-outer", + "sha256": "44afcdac9f7c9cb26a35a2b7d9c1aed562344b76c8045a753651d2f2dbae99d0", + "unexpected_tensor_allowlist": null, + "verified_code": null, + "version": "hf_capture/1", + "weights_decode": { + "activation_quantization": null, + "checkpoint_bytes_read": 136664, + "comparison_class": "advisory", + "components_consumed": 330, + "components_not_consumed": [], + "components_planned": 330, + "formats_decoded": { + "modelopt-nvfp4": 110 + }, + "method": "microfloat-weight-reconstruction", + "modules_decoded": 110, + "modules_not_decoded": [], + "modules_planned": 110, + "output_dtype": "bfloat16", + "quantization_config": { + "group_size": 16, + "num_bits": 4, + "quant_algo": "NVFP4", + "quant_method": "modelopt", + "with_input_scale": false + }, + "reader_evidence": { + "decode_plan_sha256": "bbdc8be9985af40d3a7adbcf3c895e105558d28af93c1b018b08d9e500a5c15e", + "gate_header_barrier": false, + "source_files": { + "engines/tools/affine_surface.py": "37e7074797d53ae836e0af12fdbd2dc36c88778098aa44c72c1cd936d2b4c053", + "engines/tools/microscale_surface.py": "588923f0a4700436221923c794a8c112971d9f08e75c746742b0f0ede7921682", + "engines/tools/nvfp4_surface.py": "044b6fd2ee22d58512476e96060f7fa09030212a33736da1393c0103eb73e0c8", + "engines/tools/quant_stream.py": "7c6cc4cbe399d066eaff80ccf1e3d3190185f194644f738a404d3c537ad8e1ab" + } + }, + "reference": "compressed-tensors@0.18.0; DeepSeek-V4-Flash@60d8d70770c6776ff598c94bb586a859a38244f1/inference/kernel.py; nvidia/Qwen3.8-Flash-Next-NVFP4@fc694b54fb0174e0913e6adf86691ef85a4ead47/config.json+headers", + "scientific_disclosure": "Stored-weight reconstruction only; no native quantized GEMM, activation arithmetic, or quantizer optimization quality claim.", + "scope": "weights_reconstructed" + }, + "weights_license": null, + "wraps": [] + }, + "container": { + "image_digest": null, + "image_reference": null, + "image_repository_digest": null + }, + "format_version": 1, + "lane": "other", + "lane_identity_inputs": [ + "torch_version", + "cuda_runtime_version", + "device_name", + "grouped_mm_kernel", + "numeric_policy", + "attention_backend", + "experts_implementation", + "parallelism", + "ep_emulate", + "reduce_order" + ], + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "lane_inferred": false, + "receipt_sha256": "b7d98e1afb63bebfb2b06f0c22dc1238c84073f5d88d4ff7af6fbefb5e598bb4", + "resources": { + "bytes": { + "checkpoint_read": 208056, + "hidden_d2h": 36616, + "weights_h2d": null + }, + "checkpoint_bytes": 249401, + "checkpoint_files": 2, + "device_name": null, + "forward_timing": "wall-clock", + "note": "provenance, not identity: peaks and stage seconds this run measured; forward_sum is device time under cuda-events, wall time otherwise; seal covers head serialisation up to this block's assembly", + "peak_cuda_allocated_bytes": null, + "peak_cuda_reserved_bytes": null, + "peak_resident_weight_bytes": 208032, + "peak_rss_bytes": 367505408, + "rss_units_source": "Linux ru_maxrss", + "seconds": { + "decode_sum": 0.113, + "elapsed": 5.344, + "fill_sum": 0.0, + "forward_sum": 0.185, + "identity": 0.003, + "layer_load_max": 0.058, + "layer_load_sum": 0.159, + "layer_loads": 4, + "resident_load": 4.014, + "seal": 0.013 + } + }, + "runtime_environment": { + "cold_run": "20260907T165248Z-2063951", + "numeric_policy_observed": { + "NVIDIA_TF32_OVERRIDE": null, + "allow_tf32_cudnn": true, + "allow_tf32_matmul": false, + "deviates_from_default": false, + "float32_matmul_precision": "highest", + "observed_at": "seal time, after the forward" + }, + "python": "3.12.14" + }, + "schema": "malaiwah.fidelity-capture-runtime.v1", + "source_files": { + "bin/fidelity/codepin.py": "ce2a2c04d64adf7a268978a7ffe163c7d4cb5b675d5dc8e156f8a26a3b7bb5fd", + "bin/fidelity/panel.py": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "engines/tools/affine_surface.py": "37e7074797d53ae836e0af12fdbd2dc36c88778098aa44c72c1cd936d2b4c053", + "engines/tools/hf_capture.py": "44afcdac9f7c9cb26a35a2b7d9c1aed562344b76c8045a753651d2f2dbae99d0", + "engines/tools/layer_outer.py": "e3ea5715112663b1b60cf596eeffc2140e49b399809ece89a174bce41a969274", + "engines/tools/microscale_surface.py": "588923f0a4700436221923c794a8c112971d9f08e75c746742b0f0ede7921682", + "engines/tools/nvfp4_surface.py": "044b6fd2ee22d58512476e96060f7fa09030212a33736da1393c0103eb73e0c8", + "engines/tools/quant_stream.py": "7c6cc4cbe399d066eaff80ccf1e3d3190185f194644f738a404d3c537ad8e1ab" + }, + "stack_fingerprint": { + "attention_backend": "model default", + "cuda_runtime_version": null, + "device": "cpu", + "device_name": null, + "engine": "transformers-eager", + "numeric_policy": "default torch matmul precision; no TF32 override applied", + "schema": "malaiwah.stack-fingerprint.v1", + "torch_version": "2.11.0+cpu", + "transformers_version": "5.16.1" + }, + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd", + "upstream_receipts": [], + "weights": { + "checkpoint_files": [ + { + "name": "config.json", + "sha256": "932f17d4ee472ee814a296cfa3b521bf0b9daefc57cef0f3406995fdb341e7fe", + "size": 1641 + }, + { + "name": "model.safetensors", + "sha256": "07cf6fbb7ad67852d9fc66c58d94e7d9e09dafc04f1358523a80cd1478c58004", + "size": 247760 + } + ], + "checkpoint_identity_algorithm": "sha256 over the canonical JSON {\"algorithm\": , \"files\": [{\"name\", \"size\", \"sha256\"}, ...]} of every *.safetensors shard plus config.json in the checkpoint directory, sorted by name; for a llama.cpp GGUF tree the shards are every *.gguf of the one build directory (name = /) and config.json is the official release's copy beside it", + "checkpoint_identity_sha256": "2fb12f3cf616cdb60b7003e9900d0cbc659c01df01c34cd0ae67f7ad5ad4bb6b", + "model_revision": null, + "repository": "/tmp/qfs-quant-microfloat-release/stage-main/modelopt-nvfp4", + "revision": null + } +} diff --git a/raw/candidates/modelopt-nvfp4/evidence/candidate/validation/structural-validation.json b/raw/candidates/modelopt-nvfp4/evidence/candidate/validation/structural-validation.json new file mode 100644 index 0000000000000000000000000000000000000000..5ee8ffba0107cb5416cba5d6184f9ed9b330943d --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/candidate/validation/structural-validation.json @@ -0,0 +1,14 @@ +{ + "checks_run": [ + "pre-seal" + ], + "error_count": 0, + "errors": [], + "format_version": 1, + "receipt_sha256": "df49786fa6ab7b99b4ccb964492beb1dfda015c837b9483c9f730bf69e82513c", + "schema": "malaiwah.fidelity-structural-validation.v1", + "structural_status": "sealed", + "subject": "dataset:fidelity--quant-integration.candidate", + "warning_count": 0, + "warnings": [] +} diff --git a/raw/candidates/modelopt-nvfp4/evidence/capture-candidate.stderr.log b/raw/candidates/modelopt-nvfp4/evidence/capture-candidate.stderr.log new file mode 100644 index 0000000000000000000000000000000000000000..a6ee6b3dcc02f6ec7f6afa639925a0285a8fb365 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/capture-candidate.stderr.log @@ -0,0 +1,15 @@ + +Loading weights: 0%| | 0/6 [00:00 same_stack", + "overridden_by": null, + "passed": true + } + }, + "high_kld_contexts": [ + { + "allocation_stratum": null, + "domain": "arithmetic", + "index": 1, + "max": 0.004945147794329851, + "mean": 0.0008272302007558791, + "scored_rows": 63, + "window_id": "final-0001" + }, + { + "allocation_stratum": null, + "domain": "garden", + "index": 0, + "max": 0.004230627466273054, + "mean": 0.0007779256719891563, + "scored_rows": 63, + "window_id": "final-0000" + }, + { + "allocation_stratum": null, + "domain": "code", + "index": 2, + "max": 0.003938298992766018, + "mean": 0.0007539554085041749, + "scored_rows": 63, + "window_id": "final-0002" + }, + { + "allocation_stratum": null, + "domain": "instructions", + "index": 3, + "max": 0.003036525606699991, + "mean": 0.0007512614765653545, + "scored_rows": 63, + "window_id": "final-0003" + } + ], + "kl": { + "max": 0.004945147794329851, + "mean": 0.0007775931894536412, + "median": 0.0005914912359593341, + "p95": 0.002143777137203301, + "p99": 0.003478394565872352, + "p99_9": 0.0047658031919875915 + }, + "kl_macro_stratum_mean": null, + "kl_micro_token_mean": 0.0007775931894536412, + "measurement_scope": { + "contexts": 4, + "covers_full_panel": true, + "position_filter": "all", + "positions_per_context": 63, + "scored_positions": 252, + "subset_detail": null + }, + "metric": { + "direction": "reference_to_candidate", + "direction_label": "KL(reference || candidate)", + "higher_is_better": false, + "name": "mean_tokenwise_kld", + "units": "nats", + "value": 0.0007775931894536412 + }, + "panel": { + "context_length": 64, + "contexts": 4, + "panel_id": "panel--panel", + "panel_token_sha256_legacy": "3c9467c85be43d238926f6d18bf825c2e4748814c95b8b0e8b8f1420546c3089", + "scored_positions": 252, + "scoring_window": { + "dropped_positions_total": 0, + "min_left_context_tokens": 1, + "policy": "every causal prediction position of every window is scored; nothing is dropped", + "score_from": 0, + "windowed": false + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + }, + "tokenizer_candidate": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + }, + "tokenizer_identity_equal": true, + "tokenizer_reference": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } + }, + "per_context": [ + { + "allocation_stratum": null, + "domain": "garden", + "index": 0, + "max": 0.004230627466273054, + "mean": 0.0007779256719891563, + "scored_rows": 63, + "window_id": "final-0000" + }, + { + "allocation_stratum": null, + "domain": "arithmetic", + "index": 1, + "max": 0.004945147794329851, + "mean": 0.0008272302007558791, + "scored_rows": 63, + "window_id": "final-0001" + }, + { + "allocation_stratum": null, + "domain": "code", + "index": 2, + "max": 0.003938298992766018, + "mean": 0.0007539554085041749, + "scored_rows": 63, + "window_id": "final-0002" + }, + { + "allocation_stratum": null, + "domain": "instructions", + "index": 3, + "max": 0.003036525606699991, + "mean": 0.0007512614765653545, + "scored_rows": 63, + "window_id": "final-0003" + } + ], + "per_domain": { + "arithmetic": 0.0008272302007558791, + "code": 0.0007539554085041749, + "garden": 0.0007779256719891563, + "instructions": 0.0007512614765653545 + }, + "per_stratum": null, + "receipt_sha256": "2754e69a13fd1c956e51dff2a807ccaf069a5d4a848ac0d00664e2e33c559298", + "reference": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "dataset_id": "fidelity--quant-integration.root", + "dataset_sha256": "f543851092efdaf6c5cd3b5b467295c3960f884b090cd4667e70114be35939ab", + "form": "hidden", + "head": { + "bits": 16, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510" + }, + "label": "reference", + "lane": "other", + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "repository": null, + "revision": null, + "role": "root", + "scope_digest": "attn.o=native:bf16@16|attn.qkv=native:bf16@16|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=native:bf16@16|mlp.gate=native:bf16@16|mlp.up=native:bf16@16|moe.experts=native:bf16@16|norm=native:bf16@16|head=native|kv=bf16", + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd", + "weights": { + "artifact_ref": null, + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "codec": null, + "config_sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "declared_bits": null, + "declared_head_bits": 16, + "index_sha256": null, + "model_ref": null, + "model_revision": null, + "quantized": false, + "repository": "/tmp/qfs-complete-tiny-fixture/model", + "revision": null + } + }, + "schema": "malaiwah.fidelity-comparison-receipt.v1", + "self_compare": null, + "submission": { + "emitted": false, + "path": null, + "receipt_sha256": null, + "refusal": null, + "submission_schema": null + }, + "tokenwise": { + "bytes": 2144, + "path": "tokenwise-kld.npy", + "sha256": "f2f79e8dcdb0b258d751ff25789d977f83e967073034bc2f5c18dae4eb0c0d46" + }, + "top1_agreement": 0.6626984126984127, + "top1_discordant_contexts": [], + "uncertainty": { + "ci95_high": null, + "ci95_low": null, + "cluster_unit": null, + "clusters": null, + "method": "none", + "samples": null, + "seed": null + } +} diff --git a/raw/candidates/modelopt-nvfp4/evidence/comparison/tokenwise-kld.npy b/raw/candidates/modelopt-nvfp4/evidence/comparison/tokenwise-kld.npy new file mode 100644 index 0000000000000000000000000000000000000000..306aaa0f6556c6bdc48a26ce5285c43a60394f20 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/comparison/tokenwise-kld.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f2f79e8dcdb0b258d751ff25789d977f83e967073034bc2f5c18dae4eb0c0d46 +size 2144 diff --git a/raw/candidates/modelopt-nvfp4/evidence/panel-binding.json b/raw/candidates/modelopt-nvfp4/evidence/panel-binding.json new file mode 100644 index 0000000000000000000000000000000000000000..573cea0b332c636bdda89b150f95cda307b89194 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/panel-binding.json @@ -0,0 +1,102 @@ +{ + "content": { + "archive": { + "algorithm": "sha256(ustar: sorted regular files; mode=0644; uid=gid=mtime=0)", + "bytes": 20480, + "compression": "none", + "format": "ustar", + "sha256": "389706dfa3335a75ec70a40d079995af1a60c05512334125dbd336790f12702f" + }, + "manifest": [ + { + "bytes": 192, + "path": "arrays/causal-mask-64.npy", + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02" + }, + { + "bytes": 384, + "path": "arrays/final-0000.tokens.npy", + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af" + }, + { + "bytes": 384, + "path": "arrays/final-0001.tokens.npy", + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea" + }, + { + "bytes": 384, + "path": "arrays/final-0002.tokens.npy", + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c" + }, + { + "bytes": 384, + "path": "arrays/final-0003.tokens.npy", + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a" + }, + { + "bytes": 4195, + "path": "panel.json", + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6" + }, + { + "bytes": 7808, + "path": "panel.receipt.json", + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263" + } + ], + "manifest_sha256": "e5f2d6410a6290da1197016c5b57ae522a3570665215ddc23e2a0bd45f912181" + }, + "panel": { + "bytes": 4195, + "context_length": 64, + "contexts": 4, + "file": "panel.json", + "id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "positions_per_context": 63, + "role": "final", + "scored_positions_total": 252, + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6", + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36" + }, + "receipt": { + "bytes": 7808, + "declared_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "file": "panel.receipt.json", + "receipt_file_sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "receipt_seal_mode": "self-blank" + }, + "schema": "malaiwah.resolved-panel.v1", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } +} diff --git a/raw/candidates/modelopt-nvfp4/evidence/root/README.md b/raw/candidates/modelopt-nvfp4/evidence/root/README.md new file mode 100644 index 0000000000000000000000000000000000000000..710dc82d0a53fe4dd29dbf797a459cab544ac9ed --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/root/README.md @@ -0,0 +1,95 @@ +--- +license: mit +tags: +- fidelity +- kl-divergence +- fidelity-provenance +- fidelity-dataset +- fidelity-root +x_fidelity: + spec: https://github.com/malaiwah/quant-fidelity-suite/blob/main/docs/FIDELITY-DATASET-SPEC.md + spec_version: fidelity-provenance/v1 + role: fidelity-dataset + captured_model: + repository: /tmp/qfs-complete-tiny-fixture/model + revision: null + role: root + form: hidden + lane: other + panel: + panel_id: panel--panel + suite_token_hash_sha256: 525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36 + contexts: 4 + scored_positions: 252 + repository: null + revision: null + head: + policy: native + quantized: false + bits: 16 + lm_head_tensor_content_sha256: 2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510 + lm_head_file_sha256: 07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913 + final_norm_tensor_content_sha256: null + final_norm_file_sha256: null + equality_receipt: null + replay_permitted: true + scope_digest: attn.o=native:bf16@16|attn.qkv=native:bf16@16|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=native:bf16@16|mlp.gate=native:bf16@16|mlp.up=native:bf16@16|moe.experts=native:bf16@16|norm=native:bf16@16|head=native|kv=bf16 + seal: + manifest: fidelity-dataset.json + dataset_sha256: null + checksums: checksums.txt + checksums_sha256: '0000000000000000000000000000000000000000000000000000000000000000' + note: 'written before the seal: dataset_sha256 and checksums_sha256 are digests of the tree this file + is inside, so they cannot appear in it. Read them from fidelity-dataset.json.' + interop: + compatible_with: + - kimi-k3-distribution-fidelity/1 + k3_compat_emitted: false + registry: + dataset: malaiwah/quant-fidelity-registry + schema_version: quant-fidelity-registry/v1 + artifact_id: null + measurement_ids: [] + snapshot: null + fidelity_dataset: + repository: null + revision: null + dataset_sha256: null + capture_content_digest: d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39 + form: hidden + role: root + measurements: [] +--- +# Local quant integration root + +A **root** fidelity dataset in **hidden form**, produced by `engines/tools/hf_capture.py` from `/tmp/qfs-complete-tiny-fixture/model`. + +## The cut + +the final hidden state handed to lm_head -- after the text model's final norm and immediately before the head matmul -- captured as the head module's input via torch.nn.Module.register_forward_pre_hook; replay applies the head ONLY (no final norm at replay time: the capture already sits after it). Same cut as engines/tools/hidden_replay.py and as Festr's kimi-k3 hidden-replay qualification. + +## What is here + +| | | +|---|---| +| records | 4 | +| scored positions | 252 | +| context length | 64 | +| hidden width | 64 | +| vocab size | 260 | +| capture bytes (hidden form) | 33348 | +| the same capture in logit form would be | 262080 bytes (8x) | +| scope policy | native | +| lane | other | + +## Does the model still generate sensibly + +`The capital of France is` -> `�` (p=0.0067, entropy 5.548 of a possible 5.561 nats). Recorded, not enforced. One extra window through the same schedule; its hidden state was discarded and is not part of this dataset. + +## How to check it + +``` +bin/fidelity-dataset verify +``` + +Full specification: diff --git a/raw/candidates/modelopt-nvfp4/evidence/root/capture/hidden_0000.safetensors b/raw/candidates/modelopt-nvfp4/evidence/root/capture/hidden_0000.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..95fb97de3216b24522039bdcd94971f0d8c58ed3 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/root/capture/hidden_0000.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:35644ef03cebd9198c2e2454f2fda21bb096455091a2f2bc808abc5f3c6efdd3 +size 8337 diff --git a/raw/candidates/modelopt-nvfp4/evidence/root/capture/hidden_0001.safetensors b/raw/candidates/modelopt-nvfp4/evidence/root/capture/hidden_0001.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..ef3505678e32cd93fce8bcc780e600b98fd5bb89 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/root/capture/hidden_0001.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9094ab9af1fdcf560bc7f7455692599ca9668314681eaa40f19b079400fba447 +size 8337 diff --git a/raw/candidates/modelopt-nvfp4/evidence/root/capture/hidden_0002.safetensors b/raw/candidates/modelopt-nvfp4/evidence/root/capture/hidden_0002.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..6b3b8a24ca46c671a2cd39d083b7054a7c926bfd --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/root/capture/hidden_0002.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eef84a1a12323c4de257ea4d787fbc9255e298253385dbb80b19e96491a18460 +size 8337 diff --git a/raw/candidates/modelopt-nvfp4/evidence/root/capture/hidden_0003.safetensors b/raw/candidates/modelopt-nvfp4/evidence/root/capture/hidden_0003.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..0b3eec3086e46f0a4b9e1202d98f6f86cf1fdde0 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/root/capture/hidden_0003.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:efad24b8ba179b06415dfe2af31f61c4bef63135a07bd33f46b4750c083a5025 +size 8337 diff --git a/raw/candidates/modelopt-nvfp4/evidence/root/capture/manifest.json b/raw/candidates/modelopt-nvfp4/evidence/root/capture/manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..50d790ff8828384afe9f9e0016a3ba258747f81b --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/root/capture/manifest.json @@ -0,0 +1,159 @@ +{ + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "context_length": 64, + "coverage": { + "complete": true, + "declared_records": 4, + "index_range": [ + 0, + 3 + ], + "missing_indices_sample": [], + "present_records": 4, + "shard_of": null, + "subset_detail": null + }, + "created_utc": "2026-09-07T16:52:44Z", + "dtype": "BF16", + "dtype_lossless": true, + "form": "hidden", + "format_version": 1, + "hidden_width": 64, + "receipt_sha256": "961b4bd1102e770b9a4e5ddb11ac2a53bdaedaf2f8a83357d6e28e5a4007a044", + "records": [ + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 0, + "document_id": "embedded-synthetic/garden.txt", + "domain": "garden", + "dtype": "BF16", + "elapsed_seconds": 0.043, + "file": "hidden_0000.safetensors", + "index": 0, + "key": "hidden_states", + "payload_sha256": "80897a67cfdc22f410255f2463193e7d765de5500d62da2c13aacbd3b9507083", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "35644ef03cebd9198c2e2454f2fda21bb096455091a2f2bc808abc5f3c6efdd3", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "80897a67cfdc22f410255f2463193e7d765de5500d62da2c13aacbd3b9507083", + "token_ids_json_sha256": "08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315", + "token_ids_sha256_legacy": "9d5378f0316be57e37f80d2bae7895ba4a1140c302c87ff8cce2fbd9afc83b77", + "window_id": "final-0000", + "window_index": 0 + }, + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 1, + "document_id": "embedded-synthetic/arithmetic.txt", + "domain": "arithmetic", + "dtype": "BF16", + "elapsed_seconds": 0.037, + "file": "hidden_0001.safetensors", + "index": 1, + "key": "hidden_states", + "payload_sha256": "1fc13aaf069c53d5592198daeacfc5f652abf5b9ba552213859596c32e7c4046", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "9094ab9af1fdcf560bc7f7455692599ca9668314681eaa40f19b079400fba447", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "1fc13aaf069c53d5592198daeacfc5f652abf5b9ba552213859596c32e7c4046", + "token_ids_json_sha256": "5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46", + "token_ids_sha256_legacy": "e0f95114b71a46cb489539dc38909fb67fb378f25fafbb513e32690cc7f11b37", + "window_id": "final-0001", + "window_index": 1 + }, + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 2, + "document_id": "embedded-synthetic/code.txt", + "domain": "code", + "dtype": "BF16", + "elapsed_seconds": 0.036, + "file": "hidden_0002.safetensors", + "index": 2, + "key": "hidden_states", + "payload_sha256": "98b8d9e1ccb196898fda27cb5f625f348aa0046121c39484a4af7cb042e1be92", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "eef84a1a12323c4de257ea4d787fbc9255e298253385dbb80b19e96491a18460", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "98b8d9e1ccb196898fda27cb5f625f348aa0046121c39484a4af7cb042e1be92", + "token_ids_json_sha256": "51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07", + "token_ids_sha256_legacy": "482b890c7b0e2f7400257c43680093b7f2b90d6df5361c6de3ae97ddfdd2504e", + "window_id": "final-0002", + "window_index": 2 + }, + { + "allocation_stratum": null, + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 3, + "document_id": "embedded-synthetic/instructions.txt", + "domain": "instructions", + "dtype": "BF16", + "elapsed_seconds": 0.038, + "file": "hidden_0003.safetensors", + "index": 3, + "key": "hidden_states", + "payload_sha256": "01646a47a79cc47760fc0645c30bc9e37a930c26ac84cd3d1a1d5077a2f48df8", + "prediction_positions": 63, + "raw_chunks_retained": false, + "request_id": null, + "role": "final", + "scored_rows": 63, + "semantic_class": null, + "sha256": "efad24b8ba179b06415dfe2af31f61c4bef63135a07bd33f46b4750c083a5025", + "shape": [ + 63, + 64 + ], + "size_bytes": 8337, + "source_cluster_id": null, + "tensor_content_sha256": "01646a47a79cc47760fc0645c30bc9e37a930c26ac84cd3d1a1d5077a2f48df8", + "token_ids_json_sha256": "8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d", + "token_ids_sha256_legacy": "12e01edd3900ff2ca82621feb5504f24b003a53c0afe98a9ee0b490eb93141d4", + "window_id": "final-0003", + "window_index": 3 + } + ], + "run_name": "hf-capture", + "runtime_manifest": "../runtime/capture-runtime.json", + "runtime_manifest_sha256": "12e5a219cfd5d0b892e6e992b5fa1cf804dac8763383feeb854530390e63c7f4", + "schema": "malaiwah.fidelity-capture-manifest.v1", + "scored_rows_per_context": 63, + "semantic_point": "after_final_rmsnorm_before_lm_head", + "tensor_key": "hidden_states", + "total_scored_rows": 252, + "total_size_bytes": 33348, + "vocab_size": 260 +} diff --git a/raw/candidates/modelopt-nvfp4/evidence/root/checksums.txt b/raw/candidates/modelopt-nvfp4/evidence/root/checksums.txt new file mode 100644 index 0000000000000000000000000000000000000000..da2d7a492c719865d787580c1abb7f1648d090ea --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/root/checksums.txt @@ -0,0 +1,20 @@ +df28a18b7e9c0d39ac079235136da25818038cc09314a890063058e94bf1c226 README.md +35644ef03cebd9198c2e2454f2fda21bb096455091a2f2bc808abc5f3c6efdd3 capture/hidden_0000.safetensors +9094ab9af1fdcf560bc7f7455692599ca9668314681eaa40f19b079400fba447 capture/hidden_0001.safetensors +eef84a1a12323c4de257ea4d787fbc9255e298253385dbb80b19e96491a18460 capture/hidden_0002.safetensors +efad24b8ba179b06415dfe2af31f61c4bef63135a07bd33f46b4750c083a5025 capture/hidden_0003.safetensors +06407746aa2ffd5f58a8b22055be6c4676783e40806d9f84f95d5ea3db829a41 capture/manifest.json +777b038f747bed25d1f5db8adbfd2a78c7762fb5c870ff8c3c785a984d48a168 head/head.json +07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913 head/weight.safetensors +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0000.npy +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0001.npy +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0002.npy +a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 panel/masks/context-0003.npy +b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263 panel/panel-receipt.json +68efa258ea3c5d4ba759c3c15aadd6e8c984711831bea3f335903109345cdcef panel/panel.json +08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315 panel/tokens/context-0000.json +5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46 panel/tokens/context-0001.json +51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07 panel/tokens/context-0002.json +8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d panel/tokens/context-0003.json +12e5a219cfd5d0b892e6e992b5fa1cf804dac8763383feeb854530390e63c7f4 runtime/capture-runtime.json +769c103cf430360bf1b79a4d027f5bd073ce3f61204d9da77adf3ad494c27e73 validation/structural-validation.json diff --git a/raw/candidates/modelopt-nvfp4/evidence/root/fidelity-dataset.json b/raw/candidates/modelopt-nvfp4/evidence/root/fidelity-dataset.json new file mode 100644 index 0000000000000000000000000000000000000000..9964b0d7f627993a94a5f7abbf8a33d5b40d5e67 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/root/fidelity-dataset.json @@ -0,0 +1,389 @@ +{ + "capture": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "dtype": "BF16", + "dtype_lossless": true, + "form": "hidden", + "head_not_separable_reason": null, + "head_separable": true, + "hidden_width": 64, + "lossy_codec": null, + "manifest_file": "capture/manifest.json", + "manifest_file_sha256": "06407746aa2ffd5f58a8b22055be6c4676783e40806d9f84f95d5ea3db829a41", + "records_count": 4, + "scored_rows_total": 252, + "semantic_point": "after_final_rmsnorm_before_lm_head", + "tensor_key": "hidden_states", + "total_size_bytes": 33348, + "vocab_size": 260 + }, + "coverage": { + "complete": true, + "declared_records": 4, + "index_range": [ + 0, + 3 + ], + "missing_indices_sample": [], + "present_records": 4, + "shard_of": null, + "subset_detail": null + }, + "created_utc": "2026-09-07T16:52:44Z", + "dataset": { + "author": { + "handle": null, + "is_registry_maintainer": false, + "name": "malaiwah", + "role": "capture-author", + "url": null + }, + "base_capture": null, + "id": "fidelity--quant-integration.root", + "license": "mit", + "name": "Local quant integration root", + "qualification": null, + "repository": null, + "revision": null, + "role": "root", + "structural_status": "sealed" + }, + "dataset_sha256": "f543851092efdaf6c5cd3b5b467295c3960f884b090cd4667e70114be35939ab", + "determinism": { + "cold_start_per_run": true, + "distinct_evidence_hash_count": 1, + "evidence_hashes": [ + "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39" + ], + "evidence_kind": "hidden_state_tensor_sha256", + "identical_across_runs": null, + "note": "a single cold capture; cross-run determinism is NOT asserted here. Capture a second cold run and run `fidelity-dataset compare --self-compare` -- an exactly 0.0 result is the SC-1 reproduction confirmation.", + "repeat_noise": null, + "repeats": [], + "run_count": 1 + }, + "disclosures": [ + { + "affects_comparability": false, + "code": "rtn_format_fixture", + "detail": "Local RTN-format fixture; optimizer-not-run; no model-quality or serving-kernel equivalence claim.", + "severity": "info" + }, + { + "affects_comparability": false, + "code": "reduced_run_count", + "detail": "this dataset is ONE cold capture (run_count 1, the DET-D4 floor is 5). Cross-run determinism is not asserted by the dataset; it is established by a second cold capture plus `fidelity-dataset compare --self-compare`, whose exactly-0.0 result is the SC-1 reproduction confirmation.", + "severity": "caveat" + } + ], + "format_version": 1, + "generation_sanity_probe": { + "degenerate": false, + "enforced": false, + "entropy_nats": 5.548019647470335, + "expect": null, + "logit_spread": 0.986328125, + "note": "one extra window through the same schedule; its hidden state is discarded and never enters the dataset.", + "prompt": "The capital of France is", + "schema": "malaiwah.generation-sanity-probe.v1", + "status": "recorded", + "top1_id": 113, + "top1_probability": 0.006720104384265371, + "top1_text": "�", + "top_k": [ + { + "id": 113, + "probability": 0.006720104384265371, + "text": "�" + }, + { + "id": 237, + "probability": 0.006412368399474785, + "text": "�" + }, + { + "id": 193, + "probability": 0.006035639491843906, + "text": "\u0001" + }, + { + "id": 236, + "probability": 0.0055386141320063614, + "text": "�" + }, + { + "id": 44, + "probability": 0.0054740873228682424, + "text": "I" + } + ], + "uniform_entropy_nats": 5.560681631015528, + "vocab_size": 260 + }, + "head": { + "applied_in_capture": false, + "bias": null, + "bits": 16, + "compat_tensor_key": "weight", + "dtype": "BF16", + "equality_receipt": null, + "file": "head/weight.safetensors", + "file_sha256": "07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913", + "final_norm": { + "applied_at_replay": false, + "applied_in_capture": true, + "dtype": null, + "file": null, + "file_sha256": null, + "shape": null, + "tensor_content_sha256": null, + "tensor_key": null + }, + "head_json": "head/head.json", + "present": true, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "shape": [ + 260, + 64 + ], + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "tensor_key": "lm_head.weight" + }, + "interop": { + "adapted_from": null, + "compatible_with": [ + "kimi-k3-distribution-fidelity/1" + ], + "divergences": [ + { + "field": "head", + "id": "D-1", + "reason": "every capture declares its OWN head identity by tensor content digest; the comparator refuses a hidden-form comparison across differing heads." + }, + { + "field": "runtime.lane", + "id": "D-2", + "reason": "lane is required and gated at compare time so registry BIAS-006 is checked before a number exists, not at submission." + }, + { + "field": "panel.scoring_window", + "id": "D-3", + "reason": "scoring_window is part of panel identity, not a comparator flag: a score_from=1024 number is a different panel, not a variant." + }, + { + "field": "comparison_kind", + "id": "D-4", + "reason": "self-compare is a first-class mode asserting exactly 0.0." + }, + { + "field": "estimator.accumulation_dtype", + "id": "D-5", + "reason": "required, fp64 default; an fp32 estimator lands in a different comparability class on the same data and that must be visible." + }, + { + "field": "coverage", + "id": "D-6", + "reason": "declared vs present record counts with shard_of; fixes our own manifest that claimed 5,120 captures in a 512-file repository." + }, + { + "field": "panel", + "id": "D-7", + "reason": "the panel is a separately referenceable object, which is what makes a candidate capture publishable standalone." + }, + { + "field": "capture.lossy_codec", + "id": "D-8", + "reason": "lets a llama.cpp .kld be ingested without laundering a lossy capture as exact." + }, + { + "field": "capture.records[].attention_mask_sha256", + "id": "D-9", + "reason": "our packed and streaming lanes vary mask construction; a single-request capture path makes it invariant and has no equivalent field." + }, + { + "field": "capture.head_separable", + "id": "D-10", + "reason": "hidden form is the default; logit form must declare head_separable:false with a reason." + } + ], + "k3_compat_emitted": false, + "note": null + }, + "panel": { + "contamination": { + "checked": false, + "hits": null, + "method": "not established", + "receipt": null + }, + "context_length": 64, + "contexts": 4, + "panel_file": "panel/panel.json", + "panel_file_sha256": "68efa258ea3c5d4ba759c3c15aadd6e8c984711831bea3f335903109345cdcef", + "panel_id": "panel--panel", + "panel_receipt_file": "panel/panel-receipt.json", + "panel_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "panel_token_sha256_legacy": "3c9467c85be43d238926f6d18bf825c2e4748814c95b8b0e8b8f1420546c3089", + "remap_file": null, + "repository": null, + "revision": null, + "scored_positions_total": 252, + "scoring_window": { + "dropped_positions_total": 0, + "min_left_context_tokens": 1, + "policy": "every causal prediction position of every window is scored; nothing is dropped", + "score_from": 0, + "windowed": false + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } + }, + "runtime": { + "backend_identity_sha256": null, + "file": "runtime/capture-runtime.json", + "file_sha256": "12e5a219cfd5d0b892e6e992b5fa1cf804dac8763383feeb854530390e63c7f4", + "lane": "other", + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "lane_inferred": false, + "runtime_reader_sha256": null, + "source": "native", + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd" + }, + "schema": "malaiwah.fidelity-dataset.v1", + "scope": { + "assignments": [ + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "embed_tokens", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "attn.qkv", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "attn.o", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "mlp.gate", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "mlp.up", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "mlp.down", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "moe.experts", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "norm", + "treatment": "native" + }, + { + "bits_per_weight": 16, + "format": "bf16", + "layer_range": null, + "tensor_class": "lm_head", + "treatment": "native" + } + ], + "head_policy": "native", + "kv_cache_dtype": "bf16", + "policy": "native", + "scope_digest": "attn.o=native:bf16@16|attn.qkv=native:bf16@16|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=native:bf16@16|mlp.gate=native:bf16@16|mlp.up=native:bf16@16|moe.experts=native:bf16@16|norm=native:bf16@16|head=native|kv=bf16" + }, + "seal": { + "checksums_file": "checksums.txt", + "checksums_format": "sha256sum", + "checksums_sha256": "402a57b711097b609002c640dd2f3b6f7453f1e393d3caea3af9cd4c1d2ec38f", + "covers": [ + "every published file except checksums.txt and fidelity-dataset.json, via checksums.txt", + "fidelity-dataset.json itself, via the self-blanked seal", + "every capture tensor a second time by CONTENT, via capture.capture_content_digest" + ], + "excludes": [ + "checksums.txt", + "fidelity-dataset.json" + ], + "external_anchor": null, + "method": "self_blanked_canonical_json_sha256", + "seal_field": "dataset_sha256" + }, + "upstream_receipts": [], + "weights": { + "artifact_ref": null, + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "codec": null, + "config_sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "declared_bits": null, + "declared_head_bits": 16, + "index_sha256": null, + "model_ref": null, + "model_revision": null, + "quantized": false, + "repository": "/tmp/qfs-complete-tiny-fixture/model", + "revision": null + } +} diff --git a/raw/candidates/modelopt-nvfp4/evidence/root/head/head.json b/raw/candidates/modelopt-nvfp4/evidence/root/head/head.json new file mode 100644 index 0000000000000000000000000000000000000000..cfb1d748d203487673352f1ad645cb98a49c4002 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/root/head/head.json @@ -0,0 +1,34 @@ +{ + "applied_in_capture": false, + "bias": null, + "bits": 16, + "compat_tensor_key": "weight", + "dtype": "BF16", + "equality_receipt": null, + "file": "head/weight.safetensors", + "file_sha256": "07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913", + "final_norm": { + "applied_at_replay": false, + "applied_in_capture": true, + "dtype": null, + "file": null, + "file_sha256": null, + "shape": null, + "tensor_content_sha256": null, + "tensor_key": null + }, + "format_version": 1, + "note": "the head is shipped verbatim from the checkpoint so a third party can replay logits = hidden @ head^T without the weights", + "present": true, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "receipt_sha256": "2da3cfbfc607296b3bb32eb6fec1f122e4ce30fe9ea96653e5bb1b4ebab6514f", + "schema": "malaiwah.fidelity-head-identity.v1", + "shape": [ + 260, + 64 + ], + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "tensor_key": "lm_head.weight" +} diff --git a/raw/candidates/modelopt-nvfp4/evidence/root/head/weight.safetensors b/raw/candidates/modelopt-nvfp4/evidence/root/head/weight.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..abe6e7c215a73bc88e85042067923bf943118086 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/root/head/weight.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913 +size 33365 diff --git a/raw/candidates/modelopt-nvfp4/evidence/root/panel/masks/context-0000.npy b/raw/candidates/modelopt-nvfp4/evidence/root/panel/masks/context-0000.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/root/panel/masks/context-0000.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/modelopt-nvfp4/evidence/root/panel/masks/context-0001.npy b/raw/candidates/modelopt-nvfp4/evidence/root/panel/masks/context-0001.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/root/panel/masks/context-0001.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/modelopt-nvfp4/evidence/root/panel/masks/context-0002.npy b/raw/candidates/modelopt-nvfp4/evidence/root/panel/masks/context-0002.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/root/panel/masks/context-0002.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/modelopt-nvfp4/evidence/root/panel/masks/context-0003.npy b/raw/candidates/modelopt-nvfp4/evidence/root/panel/masks/context-0003.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/root/panel/masks/context-0003.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/modelopt-nvfp4/evidence/root/panel/panel-receipt.json b/raw/candidates/modelopt-nvfp4/evidence/root/panel/panel-receipt.json new file mode 100644 index 0000000000000000000000000000000000000000..fbc2ce3e8e9602a492d83ae681817e0fa02e4173 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/root/panel/panel-receipt.json @@ -0,0 +1,376 @@ +{ + "corpus": { + "documents_considered": 4, + "documents_selected": 4, + "path_prefix": "embedded-synthetic/", + "repository": null, + "revision": null, + "source": "Synthetic texts embedded verbatim in this sealed receipt and builder." + }, + "created_utc": "2026-09-07T00:00:00Z", + "created_utc_policy": "Fixed artifact epoch for deterministic bytes; not an execution timestamp.", + "documents": [ + { + "bytes": 135, + "document": "garden.txt", + "document_sha256": "2aca14290cd4753c3b15d8a20aaa7a6963d2cb48d78e8538a4ce34d4665dcb94", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "garden", + "text_utf8": "The small garden has red flowers, green leaves, and a stone path. A gentle breeze moves the branches while a robin sings near the gate.", + "tokens_total": 137, + "window_id": "final-0000" + }, + { + "bytes": 144, + "document": "arithmetic.txt", + "document_sha256": "b867a2e8cbe81cc8d5781bfe6718a43e171fb5c7c138b9ed6ac86bebc24bca83", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "arithmetic", + "text_utf8": "A shelf holds three blue boxes and five red boxes. There are eight boxes in total. Move two boxes to the desk and count the six boxes remaining.", + "tokens_total": 146, + "window_id": "final-0001" + }, + { + "bytes": 162, + "document": "code.txt", + "document_sha256": "08c8f75f45899cbc9656a7a3fcdbf3092abfa7bc97fe353957b08d7e9660240b", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "code", + "text_utf8": "def add_values(left, right):\n return left + right\n\nresult = add_values(7, 9)\nprint(result)\n# This readable snippet is synthetic input, not a coding benchmark.\n", + "tokens_total": 164, + "window_id": "final-0002" + }, + { + "bytes": 140, + "document": "instructions.txt", + "document_sha256": "1dba5052b28929f94f322ad9e8c0b238bcbd653d6fae54ebaea8e5e3f6073378", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "instructions", + "text_utf8": "First place a clean cup on the table. Next pour cool water into the cup. Finally put the bottle away and write a short note about the steps.", + "tokens_total": 142, + "window_id": "final-0003" + } + ], + "environment": { + "numpy": "2.5.3", + "tokenizers": "0.23.2", + "transformers": "5.16.1" + }, + "format_builder": "engines/tools/build_token_panel.py", + "format_builder_sha256": "30eb4d4d7e465aaa8d9ef2d947a0ac7fd42ec45388f20c8b6db242c88dc2d851", + "format_version": 1, + "panel_id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "panel_name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "parameters": { + "context_length": 64, + "generation_seed": null, + "generation_seed_policy": "No RNG is used.", + "prediction_positions_per_window": 63, + "scored_positions_total": 252, + "strata": [ + "garden", + "arithmetic", + "code", + "instructions" + ], + "windows_per_stratum": 1, + "windows_total": 4 + }, + "receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "resolver_sha256": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "schema": "malaiwah.token-panel-build-receipt.v1", + "selection_rule": "Four embedded readable synthetic documents in declared order; native tokenizer with add_special_tokens=True, truncation=True, max_length=64, padding=False; each encoded window must be exactly 64 tokens; no chat template; all 63 shifted next-token positions scored; no RNG.", + "separation": { + "checked": false, + "method": "No contamination scan or benchmark selection.", + "note": "Authored synthetic CPU smoke inputs for a random-init model; not a benchmark, held-out quality claim, or registry-row submission." + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "add_special_tokens": true, + "chat_template_applied": false, + "class": "TokenizersBackend", + "files_sha256": { + "config.json": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "generation_config.json": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "tokenizer.json": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "tokenizer_config.json": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + }, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "local_files_only": true, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "trust_remote_code": false, + "vocab_size": 260 + }, + "tool": "build_panel.py", + "tool_sha256": "f17b17262816676d6ededcc969756ac07ff991eab73117040ec41005f6ff63f3" +} diff --git a/raw/candidates/modelopt-nvfp4/evidence/root/panel/panel.json b/raw/candidates/modelopt-nvfp4/evidence/root/panel/panel.json new file mode 100644 index 0000000000000000000000000000000000000000..cedb9d5e3c635860791c55451fde6dc9e37cddb9 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/root/panel/panel.json @@ -0,0 +1,298 @@ +{ + "contamination": { + "checked": false, + "hits": null, + "method": "not established", + "receipt": null + }, + "context_length": 64, + "contexts": 4, + "format_version": 1, + "name": "token panel panel--panel", + "panel_id": "panel--panel", + "panel_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "panel_token_sha256_legacy": "3c9467c85be43d238926f6d18bf825c2e4748814c95b8b0e8b8f1420546c3089", + "positions_per_context": 63, + "receipt_sha256": "8a4e27a74ca6ce39569b78c3d972077ab7966f6da118110b3b08adca1e284c6f", + "records": [ + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0000.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 0, + "document_id": "embedded-synthetic/garden.txt", + "domain": "garden", + "index": 0, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0000.json", + "token_ids_first16": [ + 1, + 55, + 75, + 72, + 224, + 86, + 80, + 68, + 79, + 79, + 224, + 74, + 68, + 85, + 71, + 72 + ], + "token_ids_json_sha256": "08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315", + "token_ids_last16": [ + 224, + 68, + 81, + 71, + 224, + 68, + 224, + 86, + 87, + 82, + 81, + 72, + 224, + 83, + 68, + 2 + ], + "token_ids_sha256_legacy": "9d5378f0316be57e37f80d2bae7895ba4a1140c302c87ff8cce2fbd9afc83b77", + "window_id": "final-0000", + "window_index": 0 + }, + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0001.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 1, + "document_id": "embedded-synthetic/arithmetic.txt", + "domain": "arithmetic", + "index": 1, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0001.json", + "token_ids_first16": [ + 1, + 36, + 224, + 86, + 75, + 72, + 79, + 73, + 224, + 75, + 82, + 79, + 71, + 86, + 224, + 87 + ], + "token_ids_json_sha256": "5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46", + "token_ids_last16": [ + 72, + 86, + 17, + 224, + 55, + 75, + 72, + 85, + 72, + 224, + 68, + 85, + 72, + 224, + 72, + 2 + ], + "token_ids_sha256_legacy": "e0f95114b71a46cb489539dc38909fb67fb378f25fafbb513e32690cc7f11b37", + "window_id": "final-0001", + "window_index": 1 + }, + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0002.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 2, + "document_id": "embedded-synthetic/code.txt", + "domain": "code", + "index": 2, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0002.json", + "token_ids_first16": [ + 1, + 71, + 72, + 73, + 224, + 68, + 71, + 71, + 66, + 89, + 68, + 79, + 88, + 72, + 86, + 11 + ], + "token_ids_json_sha256": "51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07", + "token_ids_last16": [ + 85, + 76, + 74, + 75, + 87, + 202, + 202, + 85, + 72, + 86, + 88, + 79, + 87, + 224, + 32, + 2 + ], + "token_ids_sha256_legacy": "482b890c7b0e2f7400257c43680093b7f2b90d6df5361c6de3ae97ddfdd2504e", + "window_id": "final-0002", + "window_index": 2 + }, + { + "allocation_stratum": null, + "attention_mask_file": "panel/masks/context-0003.npy", + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "context_index": 3, + "document_id": "embedded-synthetic/instructions.txt", + "domain": "instructions", + "index": 3, + "num_tokens": 64, + "partition": null, + "prediction_positions": 63, + "role": "final", + "semantic_class": null, + "sentinel": false, + "source_cluster_id": null, + "token_file": "panel/tokens/context-0003.json", + "token_ids_first16": [ + 1, + 41, + 76, + 85, + 86, + 87, + 224, + 83, + 79, + 68, + 70, + 72, + 224, + 68, + 224, + 70 + ], + "token_ids_json_sha256": "8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d", + "token_ids_last16": [ + 224, + 70, + 82, + 82, + 79, + 224, + 90, + 68, + 87, + 72, + 85, + 224, + 76, + 81, + 87, + 2 + ], + "token_ids_sha256_legacy": "12e01edd3900ff2ca82621feb5504f24b003a53c0afe98a9ee0b490eb93141d4", + "window_id": "final-0003", + "window_index": 3 + } + ], + "repository": null, + "revision": null, + "schema": "malaiwah.fidelity-panel-binding.v1", + "scored_positions_total": 252, + "scoring_window": { + "dropped_positions_total": 0, + "min_left_context_tokens": 1, + "policy": "every causal prediction position of every window is scored; nothing is dropped", + "score_from": 0, + "windowed": false + }, + "strata": {}, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "token_digest_algorithm": { + "aggregate": "sha256('\\n'.join(per_record_hex).encode('ascii'))", + "legacy_aggregate": "sha256(''.join(per_record_hex).encode('utf-8'))", + "legacy_per_record": "sha256(json.dumps(ids).encode('utf-8'))", + "per_record": "sha256(json.dumps(ids, separators=(',',':')).encode('utf-8'))" + }, + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } +} diff --git a/raw/candidates/modelopt-nvfp4/evidence/root/panel/tokens/context-0000.json b/raw/candidates/modelopt-nvfp4/evidence/root/panel/tokens/context-0000.json new file mode 100644 index 0000000000000000000000000000000000000000..c55b788f77dcb26a8c56fe6a7593353d57abb70f --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/root/panel/tokens/context-0000.json @@ -0,0 +1 @@ +[1,55,75,72,224,86,80,68,79,79,224,74,68,85,71,72,81,224,75,68,86,224,85,72,71,224,73,79,82,90,72,85,86,15,224,74,85,72,72,81,224,79,72,68,89,72,86,15,224,68,81,71,224,68,224,86,87,82,81,72,224,83,68,2] \ No newline at end of file diff --git a/raw/candidates/modelopt-nvfp4/evidence/root/panel/tokens/context-0001.json b/raw/candidates/modelopt-nvfp4/evidence/root/panel/tokens/context-0001.json new file mode 100644 index 0000000000000000000000000000000000000000..8304be93e5387811e155f869e175c0bfca57ca76 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/root/panel/tokens/context-0001.json @@ -0,0 +1 @@ +[1,36,224,86,75,72,79,73,224,75,82,79,71,86,224,87,75,85,72,72,224,69,79,88,72,224,69,82,91,72,86,224,68,81,71,224,73,76,89,72,224,85,72,71,224,69,82,91,72,86,17,224,55,75,72,85,72,224,68,85,72,224,72,2] \ No newline at end of file diff --git a/raw/candidates/modelopt-nvfp4/evidence/root/panel/tokens/context-0002.json b/raw/candidates/modelopt-nvfp4/evidence/root/panel/tokens/context-0002.json new file mode 100644 index 0000000000000000000000000000000000000000..2a1413e634823a039c4ede6b463b549207c4c8fb --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/root/panel/tokens/context-0002.json @@ -0,0 +1 @@ +[1,71,72,73,224,68,71,71,66,89,68,79,88,72,86,11,79,72,73,87,15,224,85,76,74,75,87,12,29,202,224,224,224,224,85,72,87,88,85,81,224,79,72,73,87,224,14,224,85,76,74,75,87,202,202,85,72,86,88,79,87,224,32,2] \ No newline at end of file diff --git a/raw/candidates/modelopt-nvfp4/evidence/root/panel/tokens/context-0003.json b/raw/candidates/modelopt-nvfp4/evidence/root/panel/tokens/context-0003.json new file mode 100644 index 0000000000000000000000000000000000000000..7978732d7bf3bfc5fed35c837bc69d9d66371c4f --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/root/panel/tokens/context-0003.json @@ -0,0 +1 @@ +[1,41,76,85,86,87,224,83,79,68,70,72,224,68,224,70,79,72,68,81,224,70,88,83,224,82,81,224,87,75,72,224,87,68,69,79,72,17,224,49,72,91,87,224,83,82,88,85,224,70,82,82,79,224,90,68,87,72,85,224,76,81,87,2] \ No newline at end of file diff --git a/raw/candidates/modelopt-nvfp4/evidence/root/runtime/capture-runtime.json b/raw/candidates/modelopt-nvfp4/evidence/root/runtime/capture-runtime.json new file mode 100644 index 0000000000000000000000000000000000000000..f226767580fa2c8b7dec84a2136182705187821d --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/root/runtime/capture-runtime.json @@ -0,0 +1,245 @@ +{ + "capture_tool": { + "expert_fill": { + "bytes_filled": 294912, + "declined": {}, + "decoded_slices": 0, + "identity": "a byte copy into the fused parameter's slice; bin/selftest_layer_outer.py L4/L6 assert equality with from_pretrained and with the converter path", + "layers_filled": 3, + "mode": "direct", + "reference": "transformers.core_model_loading.MergeModulelist(dim=0) + Concatenate(dim=1)", + "slices_filled": 72, + "staged_slices": 72, + "staging": "pageable", + "targets_filled": 6 + }, + "file": "engines/tools/hf_capture.py", + "head_module_path": "lm_head", + "head_resolution": "lm_head", + "layer_residency": "stream", + "mechanism": "transformers forward pass, layer-outer/window-inner schedule: for each decoder layer the model's own forward is run once per window with the layers below replaying their memoised output and the layers above suspending, so each layer's weights are materialised once for the whole panel. Windows are pushed through sequentially, never batched. Forward pre-hook on model.get_output_embeddings(), fired by the model's own epilogue after the last layer", + "model_view": null, + "parallel_plan_dropped": false, + "resolved_classes": { + "config": "transformers.models.glm_moe_dsa.configuration_glm_moe_dsa.GlmMoeDsaConfig", + "model": "transformers.models.glm_moe_dsa.modeling_glm_moe_dsa.GlmMoeDsaForCausalLM" + }, + "resolved_panel_binding": { + "binding": { + "content": { + "archive": { + "algorithm": "sha256(ustar: sorted regular files; mode=0644; uid=gid=mtime=0)", + "bytes": 20480, + "compression": "none", + "format": "ustar", + "sha256": "389706dfa3335a75ec70a40d079995af1a60c05512334125dbd336790f12702f" + }, + "manifest": [ + { + "bytes": 192, + "path": "arrays/causal-mask-64.npy", + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02" + }, + { + "bytes": 384, + "path": "arrays/final-0000.tokens.npy", + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af" + }, + { + "bytes": 384, + "path": "arrays/final-0001.tokens.npy", + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea" + }, + { + "bytes": 384, + "path": "arrays/final-0002.tokens.npy", + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c" + }, + { + "bytes": 384, + "path": "arrays/final-0003.tokens.npy", + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a" + }, + { + "bytes": 4195, + "path": "panel.json", + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6" + }, + { + "bytes": 7808, + "path": "panel.receipt.json", + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263" + } + ], + "manifest_sha256": "e5f2d6410a6290da1197016c5b57ae522a3570665215ddc23e2a0bd45f912181" + }, + "panel": { + "bytes": 4195, + "context_length": 64, + "contexts": 4, + "file": "panel.json", + "id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "positions_per_context": 63, + "role": "final", + "scored_positions_total": 252, + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6", + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36" + }, + "receipt": { + "bytes": 7808, + "declared_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "file": "panel.receipt.json", + "receipt_file_sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "receipt_seal_mode": "self-blank" + }, + "schema": "malaiwah.resolved-panel.v1", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } + }, + "binding_file": "panel-binding.json", + "binding_file_sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "tokenizer_equivalences": [] + }, + "schedule": "layer-outer", + "sha256": "44afcdac9f7c9cb26a35a2b7d9c1aed562344b76c8045a753651d2f2dbae99d0", + "unexpected_tensor_allowlist": null, + "verified_code": null, + "version": "hf_capture/1", + "weights_decode": null, + "weights_license": null, + "wraps": [] + }, + "container": { + "image_digest": null, + "image_reference": null, + "image_repository_digest": null + }, + "format_version": 1, + "lane": "other", + "lane_identity_inputs": [ + "torch_version", + "cuda_runtime_version", + "device_name", + "grouped_mm_kernel", + "numeric_policy", + "attention_backend", + "experts_implementation", + "parallelism", + "ep_emulate", + "reduce_order" + ], + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "lane_inferred": false, + "receipt_sha256": "9202586e2bd4d7371fd0b55b84da2390fc32524f09ed1e56b3b59ea4af7b2bc9", + "resources": { + "bytes": { + "checkpoint_read": 555744, + "hidden_d2h": 36616, + "weights_h2d": null + }, + "checkpoint_bytes": 572479, + "checkpoint_files": 2, + "device_name": null, + "forward_timing": "wall-clock", + "note": "provenance, not identity: peaks and stage seconds this run measured; forward_sum is device time under cuda-events, wall time otherwise; seal covers head serialisation up to this block's assembly", + "peak_cuda_allocated_bytes": null, + "peak_cuda_reserved_bytes": null, + "peak_resident_weight_bytes": 208032, + "peak_rss_bytes": 367116288, + "rss_units_source": "Linux ru_maxrss", + "seconds": { + "decode_sum": null, + "elapsed": 4.517, + "fill_sum": 0.008, + "forward_sum": 0.18, + "identity": 0.005, + "layer_load_max": 0.019, + "layer_load_sum": 0.061, + "layer_loads": 4, + "resident_load": 3.475, + "seal": 0.006 + } + }, + "runtime_environment": { + "cold_run": "20260907T165240Z-2062931", + "numeric_policy_observed": { + "NVIDIA_TF32_OVERRIDE": null, + "allow_tf32_cudnn": true, + "allow_tf32_matmul": false, + "deviates_from_default": false, + "float32_matmul_precision": "highest", + "observed_at": "seal time, after the forward" + }, + "python": "3.12.14" + }, + "schema": "malaiwah.fidelity-capture-runtime.v1", + "source_files": { + "bin/fidelity/codepin.py": "ce2a2c04d64adf7a268978a7ffe163c7d4cb5b675d5dc8e156f8a26a3b7bb5fd", + "bin/fidelity/panel.py": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "engines/tools/hf_capture.py": "44afcdac9f7c9cb26a35a2b7d9c1aed562344b76c8045a753651d2f2dbae99d0", + "engines/tools/layer_outer.py": "e3ea5715112663b1b60cf596eeffc2140e49b399809ece89a174bce41a969274" + }, + "stack_fingerprint": { + "attention_backend": "model default", + "cuda_runtime_version": null, + "device": "cpu", + "device_name": null, + "engine": "transformers-eager", + "numeric_policy": "default torch matmul precision; no TF32 override applied", + "schema": "malaiwah.stack-fingerprint.v1", + "torch_version": "2.11.0+cpu", + "transformers_version": "5.16.1" + }, + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd", + "upstream_receipts": [], + "weights": { + "checkpoint_files": [ + { + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "size": 1479 + }, + { + "name": "model.safetensors", + "sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1", + "size": 571000 + } + ], + "checkpoint_identity_algorithm": "sha256 over the canonical JSON {\"algorithm\": , \"files\": [{\"name\", \"size\", \"sha256\"}, ...]} of every *.safetensors shard plus config.json in the checkpoint directory, sorted by name; for a llama.cpp GGUF tree the shards are every *.gguf of the one build directory (name = /) and config.json is the official release's copy beside it", + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "model_revision": null, + "repository": "/tmp/qfs-complete-tiny-fixture/model", + "revision": null + } +} diff --git a/raw/candidates/modelopt-nvfp4/evidence/root/validation/structural-validation.json b/raw/candidates/modelopt-nvfp4/evidence/root/validation/structural-validation.json new file mode 100644 index 0000000000000000000000000000000000000000..fc9e935fa9555c9e78a2d9c830d09603008aea2a --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/root/validation/structural-validation.json @@ -0,0 +1,14 @@ +{ + "checks_run": [ + "pre-seal" + ], + "error_count": 0, + "errors": [], + "format_version": 1, + "receipt_sha256": "e119c65652612ff67b867992ad3c228bc641ef07313779c4f7fb572e2d4603f4", + "schema": "malaiwah.fidelity-structural-validation.v1", + "structural_status": "sealed", + "subject": "dataset:fidelity--quant-integration.root", + "warning_count": 0, + "warnings": [] +} diff --git a/raw/candidates/modelopt-nvfp4/evidence/smoke-evidence.json b/raw/candidates/modelopt-nvfp4/evidence/smoke-evidence.json new file mode 100644 index 0000000000000000000000000000000000000000..9e0fc45fa3298d7e8872a855d096df280494824f --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/evidence/smoke-evidence.json @@ -0,0 +1,40 @@ +{ + "kld_nats": 0.0007775931894536412, + "decode": { + "activation_quantization": null, + "checkpoint_bytes_read": 136664, + "comparison_class": "advisory", + "components_consumed": 330, + "components_not_consumed": [], + "components_planned": 330, + "formats_decoded": { + "modelopt-nvfp4": 110 + }, + "method": "microfloat-weight-reconstruction", + "modules_decoded": 110, + "modules_not_decoded": [], + "modules_planned": 110, + "output_dtype": "bfloat16", + "quantization_config": { + "group_size": 16, + "num_bits": 4, + "quant_algo": "NVFP4", + "quant_method": "modelopt", + "with_input_scale": false + }, + "reader_evidence": { + "decode_plan_sha256": "bbdc8be9985af40d3a7adbcf3c895e105558d28af93c1b018b08d9e500a5c15e", + "gate_header_barrier": false, + "source_files": { + "engines/tools/affine_surface.py": "37e7074797d53ae836e0af12fdbd2dc36c88778098aa44c72c1cd936d2b4c053", + "engines/tools/microscale_surface.py": "588923f0a4700436221923c794a8c112971d9f08e75c746742b0f0ede7921682", + "engines/tools/nvfp4_surface.py": "044b6fd2ee22d58512476e96060f7fa09030212a33736da1393c0103eb73e0c8", + "engines/tools/quant_stream.py": "7c6cc4cbe399d066eaff80ccf1e3d3190185f194644f738a404d3c537ad8e1ab" + } + }, + "reference": "compressed-tensors@0.18.0; DeepSeek-V4-Flash@60d8d70770c6776ff598c94bb586a859a38244f1/inference/kernel.py; nvidia/Qwen3.8-Flash-Next-NVFP4@fc694b54fb0174e0913e6adf86691ef85a4ead47/config.json+headers", + "scientific_disclosure": "Stored-weight reconstruction only; no native quantized GEMM, activation arithmetic, or quantizer optimization quality claim.", + "scope": "weights_reconstructed" + }, + "comparison_class": "advisory" +} diff --git a/raw/candidates/modelopt-nvfp4/model/LICENSE b/raw/candidates/modelopt-nvfp4/model/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..71f32fb2284323cef90b3e784a7655747c8ae683 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/model/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Michel Belleau + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/raw/candidates/modelopt-nvfp4/model/build-manifest.json b/raw/candidates/modelopt-nvfp4/model/build-manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..539ac3c8e8430caad8e5c81ca4d23dce391cac14 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/model/build-manifest.json @@ -0,0 +1,1561 @@ +{ + "architecture_inspiration": "GLM-5.2-SIQ-Fruit-bf16 geometry and dense/MoE plus full/shared DSA schedules; no Fruit or GLM model weights reused.", + "files": { + "config.json": { + "bytes": 1479, + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + "generation_config.json": { + "bytes": 216, + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + "model.safetensors": { + "bytes": 571000, + "sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1" + }, + "tokenizer.json": { + "bytes": 6763, + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + "tokenizer_config.json": { + "bytes": 236, + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + }, + "generation": "Native GlmMoeDsaForCausalLM random initialization in FP32, rounded to the published BF16 artifact; native router correction buffers retained FP32.", + "generator_sha256": "19c3489f1bc7e8e9323cb26afbead562816a6918d6823af252eb6d04dff8e81e", + "limitations": [ + "Random initialization; not trained or distilled.", + "Not a quantization or behavioral approximation of a released GLM model.", + "MTP intentionally absent (zero next-n-prediction layers); no unmatched MTP tensors.", + "This build manifest describes generated bytes, not proof of clean loading or capture; see separately measured verification evidence." + ], + "parameter_count": 277824, + "schema": "malaiwah.glm-moe-dsa-tiny-build.v1", + "seed": 20260907, + "stored_elements": 277848, + "tensor_count": 139, + "tensors": [ + { + "bytes": 33280, + "dtype": "torch.bfloat16", + "elements": 16640, + "name": "lm_head.weight", + "sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "shape": [ + 260, + 64 + ] + }, + { + "bytes": 33280, + "dtype": "torch.bfloat16", + "elements": 16640, + "name": "model.embed_tokens.weight", + "sha256": "18df1b3a5f263a31f5bd4225c3c4629573b75e47b7e28b6e73501586bb47d6f1", + "shape": [ + 260, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.0.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 16384, + "dtype": "torch.bfloat16", + "elements": 8192, + "name": "model.layers.0.mlp.down_proj.weight", + "sha256": "101a9db78e4e21058dcb6f5240e751bcaf3bd662b98696a63a719f86ecabf787", + "shape": [ + 64, + 128 + ] + }, + { + "bytes": 16384, + "dtype": "torch.bfloat16", + "elements": 8192, + "name": "model.layers.0.mlp.gate_proj.weight", + "sha256": "ef5262b354f74dce3a9dc4c3134e4db8cbf63f03ed8a1cd78ebb3e9a05af97cc", + "shape": [ + 128, + 64 + ] + }, + { + "bytes": 16384, + "dtype": "torch.bfloat16", + "elements": 8192, + "name": "model.layers.0.mlp.up_proj.weight", + "sha256": "359b4dac1da3e3956583050af84147aef2f41b8680a85b32083ffd0e1847d997", + "shape": [ + 128, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.0.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.0.self_attn.indexer.k_norm.bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 16 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.0.self_attn.indexer.k_norm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 512, + "dtype": "torch.bfloat16", + "elements": 256, + "name": "model.layers.0.self_attn.indexer.weights_proj.weight", + "sha256": "50ca7a10fe9a0556d8c3ad38bd3f715ee6c6e13084b4cb6b51b2ef78f57c53b2", + "shape": [ + 4, + 64 + ] + }, + { + "bytes": 2048, + "dtype": "torch.bfloat16", + "elements": 1024, + "name": "model.layers.0.self_attn.indexer.wk.weight", + "sha256": "f724d0b2c09ba9ae41cfc3fbe4e458bd7f644e5f0fb8c1446e19b3cf8c650274", + "shape": [ + 16, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.0.self_attn.indexer.wq_b.weight", + "sha256": "048349f93320b7625130fa5abc86dbcc89715b9f02d6853284563e765eb7bc11", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.0.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.0.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "5ad58e7c4515d8c4e84ecf10ecfa7aacb3c39ee1d6a3219307036bd8b59f529d", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.0.self_attn.kv_b_proj.weight", + "sha256": "9a8cfdd6e51c3868d27f147509d24549480e70f278758a8c16adf1ea5c197938", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.0.self_attn.o_proj.weight", + "sha256": "734b1edea5c19958ab29dfba4314ab5a5a25280be3db3de20b82b2e7c78c35ff", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.0.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.0.self_attn.q_a_proj.weight", + "sha256": "6d6e018ec4d4251755a002469f0778accef3b7628062f82a5d292d4130fd4c85", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.0.self_attn.q_b_proj.weight", + "sha256": "28ef2f379f06054843ff97f99d63f515a2f583059dd49fd894a53d04733f0650", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.1.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.0.down_proj.weight", + "sha256": "a0378aa3bb69ed49af25a51d57476ef63ccf5dc98bc4d3008d28660e16f82492", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.0.gate_proj.weight", + "sha256": "e6c7b0ce29c7e6ea16adfd8423cd9a8a27f1be217a2061a635468c9e5603439c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.0.up_proj.weight", + "sha256": "528f777edc3fc406c76dc1e150a648c23009c701134a3a86dcbdeb15f8ddc4bb", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.1.down_proj.weight", + "sha256": "c966c5eed64d8bb32ff5cf25587fc4eb714b7536b6f670725efb136acc6ca26c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.1.gate_proj.weight", + "sha256": "e55ceb89e6891b34fb67fe5c99b529a1cab9729bea2f6ef08be6af7eefcf6c2e", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.1.up_proj.weight", + "sha256": "46b43c2f3a025bab46be05795bb60916e592bb58d4fdf2a18d2e88d37a7a4fb8", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.2.down_proj.weight", + "sha256": "a649be4fd07f95d770fbe14e87561a13f62f155d2053b8a35fa6962b5d5e8c8d", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.2.gate_proj.weight", + "sha256": "5560e590344e57ff54425f4aa6c07edaaade8c73343e32c27199f1c0dc61fe51", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.2.up_proj.weight", + "sha256": "35a639103a8a914203b4dde3f87d197515879ae6ca72557cde8ea9dea6e6e0d2", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.3.down_proj.weight", + "sha256": "0969db499dfe821348b3c06873d36635f7216f1f595968ad43ae984b57565205", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.3.gate_proj.weight", + "sha256": "75c5c77c39a77a4a6dbe7b601a88814bca9cae6fcde0069ff2ca86352e6c13e7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.3.up_proj.weight", + "sha256": "241533cb545cfed7685091b023213c9d530cb54431a712eba7bf3aaebdae3b53", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.4.down_proj.weight", + "sha256": "ca1273d291e431a10b8d8c2170031b29440c2bec8bc1d7f46353990c7fe1a03f", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.4.gate_proj.weight", + "sha256": "69dc9149cbfd65fb10bd6c11f99357d279d471e5874cf19dbef7cfd8ee4d796c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.4.up_proj.weight", + "sha256": "81cb04732e3cc53acb1152c7fc06a6399af18a5f282762cb72abb56b1e6b7c6f", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.5.down_proj.weight", + "sha256": "ebd8e01f9c2daf657e915575afb3ff5ba261a2a83c25c9c50818319dd587a2f2", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.5.gate_proj.weight", + "sha256": "bc70a7d1a5263ca17d00766bb2dc48e1debb815344150741e55dea48af4d75c0", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.5.up_proj.weight", + "sha256": "f84a95d64728067676d4f7b61ac4a589fa11e45226a8996a4719d65f0b018dbf", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.6.down_proj.weight", + "sha256": "00535633e5d98b7a527cc1198d572a9104405e2aff7ee303ae60195654fb24c2", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.6.gate_proj.weight", + "sha256": "2bb299a5e306108c7af11aa5c6114abeb4d06bde9001e6f7644e0d9dca184dc5", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.6.up_proj.weight", + "sha256": "72df8a498b866a242abc9383b16c5b4428feadab02c7f274afa28653e8586107", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.7.down_proj.weight", + "sha256": "90331ab3da1e867c32d3db1aac94c69c86349dbb539400ed9e0c19c148bf5e43", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.7.gate_proj.weight", + "sha256": "576a9df3d1d72f7323e8a8490118821d826f50c9403ca7ecbe196277e62c7730", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.7.up_proj.weight", + "sha256": "3869533066e5bca84402355c6b80b177424f2d79d2b97cbb9cff30eee748135f", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.float32", + "elements": 8, + "name": "model.layers.1.mlp.gate.e_score_correction_bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 8 + ] + }, + { + "bytes": 1024, + "dtype": "torch.bfloat16", + "elements": 512, + "name": "model.layers.1.mlp.gate.weight", + "sha256": "7d1dbc5cc90900cdc1f9d4a241c8b62d0ad50de09231f9f036cce33982cfdfe7", + "shape": [ + 8, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.shared_experts.down_proj.weight", + "sha256": "eb5297f619dfdfb40419b3330406e8ff43cb0fe35797911f2de6ebff4b95690a", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.shared_experts.gate_proj.weight", + "sha256": "eeeff2280eef91eac1215b28717f2b7fdee09fdbfd484ff44855e7e7cdd11718", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.shared_experts.up_proj.weight", + "sha256": "dab5aeab83d842104e1c5557b9b6d6cb5fe519284b909e8c0c975c752dc92d41", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.1.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.1.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.1.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "bff5998ab14190d56392c70e92927904d84a2b9d04ee222967d774a5bb5eecc4", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.1.self_attn.kv_b_proj.weight", + "sha256": "876302ef3f8bba74a997f973913ca4b802aa488d27b46747c470062c9a7ebee5", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.1.self_attn.o_proj.weight", + "sha256": "ecda88672dc8fbc3bac348fa6118010e51b170d8fe3596a811bc9aa95f71915c", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.1.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.self_attn.q_a_proj.weight", + "sha256": "29fc979642704e621b0b6b59a24c13d6900782bfa9655ea9a3311c1d4c69770a", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.self_attn.q_b_proj.weight", + "sha256": "01bae246d61c4d08e751e42e6a03315b55266ae46bd15b34bd343f606a538349", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.2.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.0.down_proj.weight", + "sha256": "8c1c19d08541dc9251736b480f53cfefd21bfbcb0b4e9f725dc66e6c52d7705c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.0.gate_proj.weight", + "sha256": "8c326913b2ef159b507b584c1ae018619573a09b6f41ab687df629d3685884c4", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.0.up_proj.weight", + "sha256": "8611bc004f735fbc1c14a9c9c23f4150c7e754127e44926a44efd0b767a653ed", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.1.down_proj.weight", + "sha256": "1d4d668c4c8183e5991eefe780a138eda70578a4740c07df5b386f233cb4e5c3", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.1.gate_proj.weight", + "sha256": "21224f6173f4785ff6252dd0c1f7a6937b36bbd5bc1c20d25feecc85d6d25f3e", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.1.up_proj.weight", + "sha256": "05542672d0174f9ddfee4bd385b56455c004532da88bf34363b1e543948bf899", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.2.down_proj.weight", + "sha256": "7330dee9a6a416e9922f61d10ee0507584e007cbdd349131471b43a745b6fed8", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.2.gate_proj.weight", + "sha256": "eca5904e6634e97ca89e7dfb1f12774f78adb33b78256136e7e8ee522af92d96", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.2.up_proj.weight", + "sha256": "5a90748752e46844a0cf0efd84c16ec2db25315ffa7a13b9c4bff2697d00bbf6", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.3.down_proj.weight", + "sha256": "a42569462225d60158dfaf24406463f135b632fe258e66ae2e521efed502a37c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.3.gate_proj.weight", + "sha256": "8cf448df350984fe0429a1ca3b2081315b594e50ce85fbc2e9f63eafb8a896b7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.3.up_proj.weight", + "sha256": "54a1269ba638d42c7d6d3926826b04d52310c82804fddcd73c253680a4270032", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.4.down_proj.weight", + "sha256": "5a236edfdc8fc79f687cec866d13724515b8f26465dca2ffde051d0870d5d0ac", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.4.gate_proj.weight", + "sha256": "6c18140a11c9986f99b7c269da01a8f69f1b5215c41be1801d6900eb511bdc76", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.4.up_proj.weight", + "sha256": "7b964f5c207a6bbeaa589a6c07f9665967aca4e7c57148190ed6a6f12e0ca572", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.5.down_proj.weight", + "sha256": "74c2633e7d3b0bf844d3e3812533774fc09b6552435e778e68b442ad161c0985", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.5.gate_proj.weight", + "sha256": "6177166c1bc51e03fde63b60d85347f5a5412446df5b4dd893817d18fcf0d56c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.5.up_proj.weight", + "sha256": "7bb8e1f65a918589a1593926dc93bf3fa1329f5d31f16266c3ad6fe0fd390d47", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.6.down_proj.weight", + "sha256": "af74e303b86b1aec96fd69b64d39848d7d08f255822739cf7d5f4456de67f010", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.6.gate_proj.weight", + "sha256": "c4fc94863e17270bf8cb5a18d3a125bea82d04bfb38457fd27896a00ddeea056", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.6.up_proj.weight", + "sha256": "4e92bebe11c518a225d75d4d7de7b85f9a82baad7a961ac090dd7343a612b577", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.7.down_proj.weight", + "sha256": "8971d6a869ba59445fe28163bd73c74c8338e0b8b675f008277b5a8973967bb2", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.7.gate_proj.weight", + "sha256": "3f90ff90c18d50349a50d11c472d48c6b297496ba5bedfe4ff0da257e1e2fdef", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.7.up_proj.weight", + "sha256": "5a2fcecdbb84a9138b4dd32da15793393aeaee1d00da95ed3d55803b1f45cc86", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.float32", + "elements": 8, + "name": "model.layers.2.mlp.gate.e_score_correction_bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 8 + ] + }, + { + "bytes": 1024, + "dtype": "torch.bfloat16", + "elements": 512, + "name": "model.layers.2.mlp.gate.weight", + "sha256": "aa35eb60ee6dd8e32728c95210b15016120675b111542f36ee1b1cca64668f9d", + "shape": [ + 8, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.shared_experts.down_proj.weight", + "sha256": "e8a1e6e8db3b1996aad9cd457ae20aa5aaac876d400fd6e8d764f543ff7833b9", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.shared_experts.gate_proj.weight", + "sha256": "c5b456aab9a02d3828987060b24d24c07e7b611d3036f0d5c28662c922d1238d", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.shared_experts.up_proj.weight", + "sha256": "6a84e814bd21fcc17878151b94508853dd70099787ef5303cdc06f90b6cd7092", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.2.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.2.self_attn.indexer.k_norm.bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 16 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.2.self_attn.indexer.k_norm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 512, + "dtype": "torch.bfloat16", + "elements": 256, + "name": "model.layers.2.self_attn.indexer.weights_proj.weight", + "sha256": "d65c6e5c3f34fcad47b7137c46dd3bcd6d5cf24ce508df7fad9d20788d3a18b8", + "shape": [ + 4, + 64 + ] + }, + { + "bytes": 2048, + "dtype": "torch.bfloat16", + "elements": 1024, + "name": "model.layers.2.self_attn.indexer.wk.weight", + "sha256": "917ff454cb253fa0e5d3d68bf15e716401bb928fbd7cd260a348afec25b1b2c8", + "shape": [ + 16, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.self_attn.indexer.wq_b.weight", + "sha256": "3fe5b407fe2d74a0dda78b6cb7ae3f65066a781fd5f81971b83be600fc911d14", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.2.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.2.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "26cecf47e8fb14a837f760549a9b9dd8589c37dc76870f8b115d4ab634b853ab", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.2.self_attn.kv_b_proj.weight", + "sha256": "23447f5f72c55b0cd7acd571ff1317c16c8097e9f0de4cc9b66101b51f7988c1", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.2.self_attn.o_proj.weight", + "sha256": "a1a0c84b3214c9b7b00c438754280833964cdc719aadeff64358b3d09b2063d8", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.2.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.self_attn.q_a_proj.weight", + "sha256": "3eda4fc6a047b282d63ad2884d870ee8150a99f3c71d21031ea71e749cf39815", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.self_attn.q_b_proj.weight", + "sha256": "58ecb919757c3c93d6a43b9344236d9abd32870e68907f37cb8db779d2c93fff", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.3.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.0.down_proj.weight", + "sha256": "e8c77c987baa36019ce1adf05e02e2a31395286e584428b2049e06331848c216", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.0.gate_proj.weight", + "sha256": "69871151865d8a23e2cc39b9fe5da60eb4f41cb6c053520f29d7c7b58e6fa5e0", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.0.up_proj.weight", + "sha256": "12df1ea42b96e959785c09427c3ca3bcdc53aa7942d15187c7b1e19bdd66d08a", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.1.down_proj.weight", + "sha256": "5feaa5de7da59348b465458b8aff5373b11dae8b5150f8e7bb8015acc172e3ff", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.1.gate_proj.weight", + "sha256": "e907e6e36b7266d56e190c1e56551e0a40d64741ce668328d898c17b488ec6c9", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.1.up_proj.weight", + "sha256": "c0062ef6004073cbabf3098703b5f565f0e973e094d90c3eba36c7be471f947e", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.2.down_proj.weight", + "sha256": "efec1e8a6a5e12a6db226699e10a6d346fa95c453009f148fe304d378567f5fe", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.2.gate_proj.weight", + "sha256": "7722cc87a7696f53e7f1e0d741230a7db18d2c324f7faec742a9621c75189cb7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.2.up_proj.weight", + "sha256": "5917df5932d0ce4854458ce357a8a2c3384bc463531996875d1c68c6ea17734c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.3.down_proj.weight", + "sha256": "fd331dc77911f8d80ddfdee938993a08b3715d06767901879c5a55700dbb8961", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.3.gate_proj.weight", + "sha256": "1e8aa3749cdc3d21baf7108c47bb69ad4a532c1f41c0556ca8d68ca2c226a7a8", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.3.up_proj.weight", + "sha256": "858e72360951a5073d117a75b2cd759bc3503c6c270388b30fe73d7554f54dae", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.4.down_proj.weight", + "sha256": "b80cf998a1db7569ca4600388bbe4c6d20bd7fe7209c4e37b5de015041d01423", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.4.gate_proj.weight", + "sha256": "b39a0f5b9cd6f9175e7fa29b342772476caf8a76dad1c34d88075988c1894853", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.4.up_proj.weight", + "sha256": "cef4d7b5fb77e750e91c17cae1622a6362ba204b1b30bf5ed7b65f9e6ed15ff1", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.5.down_proj.weight", + "sha256": "65a04840ec88842630cc6f120899a3bfa6151990d7411bfe44839727648e4d03", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.5.gate_proj.weight", + "sha256": "101836900c549af917f8392a6b1428e2f14e4e1f1ef0fdd9b04e79b98c1c3d02", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.5.up_proj.weight", + "sha256": "4fc8edda4b1a92a43be268a8b249274dd5f4370fd6ea6a3134b8c2c4cf730d95", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.6.down_proj.weight", + "sha256": "fd3a10e1464c20bf5e575c105f39882bcbddcab892ef36f24e5a852d597ee7ef", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.6.gate_proj.weight", + "sha256": "8211aaeed6f1ea2711aa1865309d2d36742c0b41021eea1e00fcac45dc353b4b", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.6.up_proj.weight", + "sha256": "ec4f5d1acc5d045de6ae4106bc8f52d17d64ac355c910f12fac8b1b0b573296d", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.7.down_proj.weight", + "sha256": "03c257936ec78df3f941fe0ca4ce5aad636654cf2a351b64515ac07ad8871cae", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.7.gate_proj.weight", + "sha256": "67c1e28fd0a028104b9c76279a3c473f50452633c8a4feabda637e5f5b71f797", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.7.up_proj.weight", + "sha256": "1b18f8b452b71ca57fec09892a48df2ee2108067f97f62b76a3817c9bea91708", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.float32", + "elements": 8, + "name": "model.layers.3.mlp.gate.e_score_correction_bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 8 + ] + }, + { + "bytes": 1024, + "dtype": "torch.bfloat16", + "elements": 512, + "name": "model.layers.3.mlp.gate.weight", + "sha256": "7e86bda3f7704f19dc2a3f6a0ca22b0df554723adf0cf3add837a1e497ad4d3a", + "shape": [ + 8, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.shared_experts.down_proj.weight", + "sha256": "110ad4d8dd59a5ec2b0d4c2e0a79d022bcdba240a4998ff84ad2590dd32fce2c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.shared_experts.gate_proj.weight", + "sha256": "cca5d02ac9eccab3ee8be47f55ef4d59750dd311800e25c22cc3f22b437ffd8b", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.shared_experts.up_proj.weight", + "sha256": "c8fe3987299d1526946a87facc4d3f99300fafbac552471ed826454c41ed31e5", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.3.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.3.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.3.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "5c230cafd4add95096f53702bab8ef1673993cca9433de8c874638958a61995a", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.3.self_attn.kv_b_proj.weight", + "sha256": "ff432280fe1fbbc2a5b7fee7fb18f6de59d675d2d7d0eec0d769a5fd012699a9", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.3.self_attn.o_proj.weight", + "sha256": "59e2e2ee8f9cba29e9cf3e6098539ddca5811d35d3df3c860488f348d6be9584", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.3.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.self_attn.q_a_proj.weight", + "sha256": "172aae8ff1a79376bf65182f5e92c06da2f9b307c15f214a20597491729aa0d7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.self_attn.q_b_proj.weight", + "sha256": "5d917d8c510906982c609808f1eb0d16da467976550e3a063637f1fde013cbdb", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.norm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + } + ], + "tokenizer": { + "kind": "byte-level BPE without merges", + "special_token_ids": { + "": 1, + "": 2, + "": 0, + "": 3 + }, + "vocab_size": 260 + }, + "versions": { + "safetensors": "0.8.0", + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "transformers": "5.16.1" + } +} diff --git a/raw/candidates/modelopt-nvfp4/model/config.json b/raw/candidates/modelopt-nvfp4/model/config.json new file mode 100644 index 0000000000000000000000000000000000000000..d4bdb9fe2932c487fe178e4b53bf1aa38f1259b2 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/model/config.json @@ -0,0 +1,75 @@ +{ + "architectures": [ + "GlmMoeDsaForCausalLM" + ], + "attention_bias": false, + "attention_dropout": 0.0, + "bos_token_id": 1, + "dtype": "bfloat16", + "eos_token_id": 2, + "first_k_dense_replace": 1, + "head_dim": 8, + "hidden_act": "silu", + "hidden_size": 64, + "index_head_dim": 16, + "index_n_heads": 4, + "index_topk": 8, + "indexer_types": [ + "full", + "shared", + "full", + "shared" + ], + "initializer_range": 0.02, + "intermediate_size": 128, + "kv_lora_rank": 16, + "layer_types": [ + "deepseek_sparse_attention", + "deepseek_sparse_attention", + "deepseek_sparse_attention", + "deepseek_sparse_attention" + ], + "max_position_embeddings": 256, + "mlp_bias": false, + "mlp_layer_types": [ + "dense", + "sparse", + "sparse", + "sparse" + ], + "model_type": "glm_moe_dsa", + "moe_intermediate_size": 32, + "n_group": 1, + "n_routed_experts": 8, + "n_shared_experts": 1, + "norm_topk_prob": true, + "num_attention_heads": 4, + "num_experts_per_tok": 2, + "num_hidden_layers": 4, + "num_key_value_heads": 4, + "num_nextn_predict_layers": 0, + "pad_token_id": 0, + "q_lora_rank": 32, + "qk_head_dim": 16, + "qk_nope_head_dim": 8, + "qk_rope_head_dim": 8, + "rms_norm_eps": 1e-05, + "rope_parameters": { + "rope_theta": 10000.0, + "rope_type": "default" + }, + "routed_scaling_factor": 2.5, + "tie_word_embeddings": false, + "topk_group": 1, + "transformers_version": "5.16.1", + "use_cache": true, + "v_head_dim": 16, + "vocab_size": 260, + "quantization_config": { + "quant_method": "modelopt", + "quant_algo": "NVFP4", + "group_size": 16, + "num_bits": 4, + "with_input_scale": false + } +} diff --git a/raw/candidates/modelopt-nvfp4/model/cpu-comparison-receipt.json b/raw/candidates/modelopt-nvfp4/model/cpu-comparison-receipt.json new file mode 100644 index 0000000000000000000000000000000000000000..f0585d9ad8ac65ceca940a79603f522a1f534f5c --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/model/cpu-comparison-receipt.json @@ -0,0 +1,458 @@ +{ + "candidate": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "dataset_id": "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "dataset_sha256": "c3ff6c32dc57502825d3ca3ac2133ed6a4c31e7bc7602191d595ee044ebe9048", + "form": "hidden", + "head": { + "bits": 16, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510" + }, + "label": "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d", + "lane": "other", + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "repository": "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "revision": null, + "role": "root", + "scope_digest": "attn.o=native:bf16@16|attn.qkv=native:bf16@16|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=native:bf16@16|mlp.gate=native:bf16@16|mlp.up=native:bf16@16|moe.experts=native:bf16@16|norm=native:bf16@16|head=native|kv=bf16", + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd", + "weights": { + "artifact_ref": null, + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "codec": null, + "config_sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "declared_bits": null, + "declared_head_bits": 16, + "index_sha256": null, + "model_ref": null, + "model_revision": "45563636ef723acfb826755493447dc40c7a0c37", + "quantized": false, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37" + } + }, + "comparability": { + "bias": null, + "class": "strict", + "key": null, + "key_inputs": null, + "same_lane": true, + "usable_as_floor": true + }, + "comparator": { + "accumulation_dtype": "float64", + "bf16_reduced_precision_reduction": false, + "cublas_workspace_config": null, + "deterministic_algorithms": true, + "device": "cpu", + "estimator_backend": "torch:k6_kld_report._token_kld", + "head_applied_candidate_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "head_applied_reference_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "head_applied_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "logprob_dtype": "float64", + "position_block": 128, + "replay_backend": "numpy:cpu:float32", + "replay_env": { + "blas_configuration": "OpenBLAS 0.3.34.106.0 USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell MAX_THREADS=64", + "blas_name": "scipy-openblas", + "blas_threads": 2, + "blas_threads_source": "ctypes:scipy_openblas_get_num_threads64_", + "blas_version": "0.3.34.106.0", + "cpu_model": "Intel(R) Xeon(R) CPU X5570 @ 2.93GHz", + "library": "numpy", + "numpy_version": "2.5.3", + "replay_dtype": "float32" + }, + "replay_peak_device_bytes": null, + "short_circuited": true, + "source_file_hashes_verified": true, + "tensor_content_digests_verified": true, + "tf32": false, + "tool": { + "entrypoint": "bin/fidelity-dataset compare", + "note": "the fp64 estimator is k6_kld_report._token_kld, imported not copied, whenever torch is importable; estimator_backend records which path ran." + }, + "two_pass": true, + "vocab_chunk": 8192 + }, + "comparison_kind": "reproduction_confirmation", + "context_depth_buckets": null, + "created_utc": "2026-09-07T12:39:47Z", + "determinism": { + "cold_start_per_run": null, + "distinct_evidence_hash_count": 1, + "evidence_hashes": [ + "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39" + ], + "evidence_kind": "hidden_state_tensor_sha256", + "identical_across_runs": null, + "max_run_mean": 0.0, + "min_run_mean": 0.0, + "note": "one comparison of two sealed captures. identical_across_runs is null, not true: that claim needs two independently produced captures of the SAME weights (SC-2), which is a different receipt.", + "population_stddev_of_run_means": 0.0, + "run_count": 1, + "run_means": [ + 0.0 + ] + }, + "disclosures": [ + { + "affects_comparability": false, + "code": "shared_reference_head", + "detail": "HEAD-1a: both captures declare the same lm_head tensor content digest (2364995d4009); one head applied to both sides is a shared APPLICATION of identical WEIGHTS.", + "severity": "info" + } + ], + "estimator": { + "accumulation_dtype": "float64", + "head_policy": "shared_reference_head", + "hidden_dtype": "bf16", + "logits_dtype": "float32", + "softmax_note": "full vocabulary, torch.log_softmax in float64; no truncation, no top-k, no clamp. A non-finite intermediate is a hard refusal.", + "stack_relation": "same_stack", + "two_pass": true, + "vocab_chunk": 8192, + "zero_handling": "exact zero asserted, not rounded" + }, + "format_version": 1, + "gates": { + "coverage": { + "detail": "4 of 4/4 declared records shared", + "overridden_by": null, + "passed": true + }, + "decode": { + "detail": "self-compare: both sides are the same artifact; the weights-decode caveats apply to a measurement against a reference, not to SC-1", + "overridden_by": null, + "passed": true + }, + "form": { + "detail": "hidden vs hidden", + "overridden_by": null, + "passed": true + }, + "geometry": { + "detail": "vocab_size 260 equal; hidden_width 64", + "overridden_by": null, + "passed": true + }, + "head": { + "detail": "HEAD-1a: identical head content digest on both sides", + "overridden_by": null, + "passed": true + }, + "lane": { + "detail": "lane=other vs other", + "overridden_by": null, + "passed": true + }, + "lossy": { + "detail": "lossy_codec null on both sides", + "overridden_by": null, + "passed": true + }, + "panel": { + "detail": "suite_token_hash_sha256 equal; 4 shared records; per-record token and mask digests equal; scoring_window equal", + "overridden_by": null, + "passed": true + }, + "seal": { + "detail": "both manifests self-seal and checksums.txt verified; every tensor_content_sha256 recomputed", + "overridden_by": null, + "passed": true + }, + "stack": { + "detail": "lane_identity equal / stack_fingerprint equal -> same_stack", + "overridden_by": null, + "passed": true + } + }, + "high_kld_contexts": [ + { + "allocation_stratum": null, + "domain": "garden", + "index": 0, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0000" + }, + { + "allocation_stratum": null, + "domain": "arithmetic", + "index": 1, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0001" + }, + { + "allocation_stratum": null, + "domain": "code", + "index": 2, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0002" + }, + { + "allocation_stratum": null, + "domain": "instructions", + "index": 3, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0003" + } + ], + "kl": { + "max": 0.0, + "mean": 0.0, + "median": 0.0, + "p95": 0.0, + "p99": 0.0, + "p99_9": 0.0 + }, + "kl_macro_stratum_mean": null, + "kl_micro_token_mean": 0.0, + "measurement_scope": { + "contexts": 4, + "covers_full_panel": true, + "position_filter": "all", + "positions_per_context": 63, + "scored_positions": 252, + "subset_detail": null + }, + "metric": { + "direction": "reference_to_candidate", + "direction_label": "KL(reference || candidate)", + "higher_is_better": false, + "name": "mean_tokenwise_kld", + "units": "nats", + "value": 0.0 + }, + "panel": { + "context_length": 64, + "contexts": 4, + "panel_id": "panel--panel", + "panel_token_sha256_legacy": "3c9467c85be43d238926f6d18bf825c2e4748814c95b8b0e8b8f1420546c3089", + "scored_positions": 252, + "scoring_window": { + "dropped_positions_total": 0, + "min_left_context_tokens": 1, + "policy": "every causal prediction position of every window is scored; nothing is dropped", + "score_from": 0, + "windowed": false + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + }, + "tokenizer_candidate": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + }, + "tokenizer_identity_equal": true, + "tokenizer_reference": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } + }, + "per_context": [ + { + "allocation_stratum": null, + "domain": "garden", + "index": 0, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0000" + }, + { + "allocation_stratum": null, + "domain": "arithmetic", + "index": 1, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0001" + }, + { + "allocation_stratum": null, + "domain": "code", + "index": 2, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0002" + }, + { + "allocation_stratum": null, + "domain": "instructions", + "index": 3, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0003" + } + ], + "per_domain": null, + "per_stratum": null, + "receipt_sha256": "4910833e5cc175ea351055e567c5d896475b4020598359291aedc958d8ada382", + "reference": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "dataset_id": "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "dataset_sha256": "56588f20f9cf055301f83a828fa75fa94c1e26593e64a07c5c6c4e38e9454563", + "form": "hidden", + "head": { + "bits": 16, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510" + }, + "label": "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "lane": "other", + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "repository": "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "revision": null, + "role": "root", + "scope_digest": "attn.o=native:bf16@16|attn.qkv=native:bf16@16|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=native:bf16@16|mlp.gate=native:bf16@16|mlp.up=native:bf16@16|moe.experts=native:bf16@16|norm=native:bf16@16|head=native|kv=bf16", + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd", + "weights": { + "artifact_ref": null, + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "codec": null, + "config_sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "declared_bits": null, + "declared_head_bits": 16, + "index_sha256": null, + "model_ref": null, + "model_revision": "45563636ef723acfb826755493447dc40c7a0c37", + "quantized": false, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37" + } + }, + "schema": "malaiwah.fidelity-comparison-receipt.v1", + "self_compare": { + "asserted_exact_zero": true, + "capture_content_digest_equal": true, + "expected_tokenwise_bytes": 2144, + "expected_tokenwise_sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d", + "force_compute_agreed": true, + "head_digest_equal": true, + "weights_identity_equal": true + }, + "submission": { + "emitted": false, + "path": null, + "receipt_sha256": null, + "refusal": "comparison_kind is reproduction_confirmation, not measurement; bin/fidelity/receipt.py::_scan_for_unsubmittable is the second, independent refusal axis.", + "submission_schema": null + }, + "tokenwise": { + "bytes": 2144, + "path": "tokenwise-kld.npy", + "sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d" + }, + "top1_agreement": 1.0, + "top1_discordant_contexts": [], + "uncertainty": { + "ci95_high": null, + "ci95_low": null, + "cluster_unit": null, + "clusters": null, + "method": "none", + "samples": null, + "seed": null + } +} diff --git a/raw/candidates/modelopt-nvfp4/model/cpu-reproduction-summary.json b/raw/candidates/modelopt-nvfp4/model/cpu-reproduction-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..7fe4e433fbfabcad4ab3781b796fbd3439d5db17 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/model/cpu-reproduction-summary.json @@ -0,0 +1,851 @@ +{ + "captures": { + "first": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "cold_run": "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "dataset_sha256": "56588f20f9cf055301f83a828fa75fa94c1e26593e64a07c5c6c4e38e9454563", + "generation_sanity_probe": { + "degenerate": false, + "enforced": false, + "entropy_nats": 5.548019647470335, + "expect": null, + "logit_spread": 0.986328125, + "note": "one extra window through the same schedule; its hidden state is discarded and never enters the dataset.", + "prompt": "The capital of France is", + "schema": "malaiwah.generation-sanity-probe.v1", + "status": "recorded", + "top1_id": 113, + "top1_probability": 0.006720104384265371, + "top1_text": "�", + "top_k": [ + { + "id": 113, + "probability": 0.006720104384265371, + "text": "�" + }, + { + "id": 237, + "probability": 0.006412368399474785, + "text": "�" + }, + { + "id": 193, + "probability": 0.006035639491843906, + "text": "\u0001" + }, + { + "id": 236, + "probability": 0.0055386141320063614, + "text": "�" + }, + { + "id": 44, + "probability": 0.0054740873228682424, + "text": "I" + } + ], + "uniform_entropy_nats": 5.560681631015528, + "vocab_size": 260 + }, + "head_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "memory_report": { + "context_length": 64, + "decoder_layers": null, + "device": "cpu", + "hidden_size": 64, + "layer_residency": null, + "model": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "peak_resident_weight_bytes": 555776, + "peak_resident_weight_detail": { + "buffers": 128, + "parameters": 555648, + "total": 555776 + }, + "peak_resident_weight_gb": 0.001, + "peak_rss_bytes": 367374336, + "peak_rss_gb": 0.367, + "resident_weight_note": "the maximum, over the run, of the materialised parameter+buffer bytes. On the CPU path peak_rss_bytes ALSO counts the safetensors mmap page cache, which is evictable and is not held by the schedule; this figure is not confounded by it. On CUDA, peak_cuda_allocated_bytes is the authoritative number because it includes activations and workspace and has no page cache.", + "rss_units_source": "Linux ru_maxrss", + "schedule": "window-outer", + "vocab_size": 260, + "windows": 4 + }, + "path": "first", + "pid": 406991, + "resources": { + "bytes": { + "checkpoint_read": 572479, + "hidden_d2h": 36616, + "weights_h2d": null + }, + "checkpoint_bytes": 572479, + "checkpoint_files": 2, + "device_name": null, + "forward_timing": "wall-clock", + "note": "provenance, not identity: peaks and stage seconds this run measured; forward_sum is device time under cuda-events, wall time otherwise; seal covers head serialisation up to this block's assembly", + "peak_cuda_allocated_bytes": null, + "peak_cuda_reserved_bytes": null, + "peak_resident_weight_bytes": 555776, + "peak_rss_bytes": 367374336, + "rss_units_source": "Linux ru_maxrss", + "seconds": { + "decode_sum": null, + "elapsed": 2.448, + "fill_sum": null, + "forward_sum": 0.126, + "identity": 0.005, + "layer_load_max": null, + "layer_load_sum": null, + "layer_loads": null, + "resident_load": 2.283, + "seal": 0.007 + } + }, + "runtime_versions": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 406991, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd" + }, + "repeat": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "cold_run": "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d", + "dataset_sha256": "c3ff6c32dc57502825d3ca3ac2133ed6a4c31e7bc7602191d595ee044ebe9048", + "generation_sanity_probe": { + "degenerate": false, + "enforced": false, + "entropy_nats": 5.548019647470335, + "expect": null, + "logit_spread": 0.986328125, + "note": "one extra window through the same schedule; its hidden state is discarded and never enters the dataset.", + "prompt": "The capital of France is", + "schema": "malaiwah.generation-sanity-probe.v1", + "status": "recorded", + "top1_id": 113, + "top1_probability": 0.006720104384265371, + "top1_text": "�", + "top_k": [ + { + "id": 113, + "probability": 0.006720104384265371, + "text": "�" + }, + { + "id": 237, + "probability": 0.006412368399474785, + "text": "�" + }, + { + "id": 193, + "probability": 0.006035639491843906, + "text": "\u0001" + }, + { + "id": 236, + "probability": 0.0055386141320063614, + "text": "�" + }, + { + "id": 44, + "probability": 0.0054740873228682424, + "text": "I" + } + ], + "uniform_entropy_nats": 5.560681631015528, + "vocab_size": 260 + }, + "head_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "memory_report": { + "context_length": 64, + "decoder_layers": null, + "device": "cpu", + "hidden_size": 64, + "layer_residency": null, + "model": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "peak_resident_weight_bytes": 555776, + "peak_resident_weight_detail": { + "buffers": 128, + "parameters": 555648, + "total": 555776 + }, + "peak_resident_weight_gb": 0.001, + "peak_rss_bytes": 367198208, + "peak_rss_gb": 0.367, + "resident_weight_note": "the maximum, over the run, of the materialised parameter+buffer bytes. On the CPU path peak_rss_bytes ALSO counts the safetensors mmap page cache, which is evictable and is not held by the schedule; this figure is not confounded by it. On CUDA, peak_cuda_allocated_bytes is the authoritative number because it includes activations and workspace and has no page cache.", + "rss_units_source": "Linux ru_maxrss", + "schedule": "window-outer", + "vocab_size": 260, + "windows": 4 + }, + "path": "repeat", + "pid": 409089, + "resources": { + "bytes": { + "checkpoint_read": 572479, + "hidden_d2h": 36616, + "weights_h2d": null + }, + "checkpoint_bytes": 572479, + "checkpoint_files": 2, + "device_name": null, + "forward_timing": "wall-clock", + "note": "provenance, not identity: peaks and stage seconds this run measured; forward_sum is device time under cuda-events, wall time otherwise; seal covers head serialisation up to this block's assembly", + "peak_cuda_allocated_bytes": null, + "peak_cuda_reserved_bytes": null, + "peak_resident_weight_bytes": 555776, + "peak_rss_bytes": 367198208, + "rss_units_source": "Linux ru_maxrss", + "seconds": { + "decode_sum": null, + "elapsed": 2.619, + "fill_sum": null, + "forward_sum": 0.128, + "identity": 0.004, + "layer_load_max": null, + "layer_load_sum": null, + "layer_loads": null, + "resident_load": 2.453, + "seal": 0.005 + } + }, + "runtime_versions": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 409089, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd" + } + }, + "commands": [ + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--model", + "/tmp/qfs-complete-tiny-fixture/model", + "--weights-repository", + "malaiwah/glm-moe-dsa-tiny-random-bf16", + "--model-revision", + "45563636ef723acfb826755493447dc40c7a0c37", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-complete-tiny-fixture/reproduction/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--role", + "root", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--schedule", + "window-outer", + "--dataset-id", + "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "--dataset-name", + "GLM MoE DSA tiny random CPU root", + "--repository", + "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "--author", + "malaiwah", + "--disclosures", + "[{\"code\":\"random_init_cpu_fixture\",\"severity\":\"info\",\"affects_comparability\":false,\"detail\":\"Complete randomly initialized tiny glm_moe_dsa checkpoint; CPU smoke fixture only, not trained quality evidence or a registry measurement. Lane other denotes CPU, not local-cuda-budget.\"}]", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--run-name", + "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "--cold-run", + "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "--memory-report", + "/tmp/qfs-complete-tiny-fixture/reproduction/first.memory.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 6.485651439987123, + "name": "capture-first", + "pid": 406991, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 406991, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "capture-first.stderr.log", + "stdout": "capture-first.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "verify", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/first.verify.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.575829998124391, + "name": "verify-first", + "pid": 408026, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 408026, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "verify-first.stderr.log", + "stdout": "verify-first.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "validate", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--strict", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/first.strict.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.8252810118719935, + "name": "strict-first", + "pid": 408494, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 408494, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "strict-first.stderr.log", + "stdout": "strict-first.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--model", + "/tmp/qfs-complete-tiny-fixture/model", + "--weights-repository", + "malaiwah/glm-moe-dsa-tiny-random-bf16", + "--model-revision", + "45563636ef723acfb826755493447dc40c7a0c37", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-complete-tiny-fixture/reproduction/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--role", + "root", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--schedule", + "window-outer", + "--dataset-id", + "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "--dataset-name", + "GLM MoE DSA tiny random CPU root", + "--repository", + "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "--author", + "malaiwah", + "--disclosures", + "[{\"code\":\"random_init_cpu_fixture\",\"severity\":\"info\",\"affects_comparability\":false,\"detail\":\"Complete randomly initialized tiny glm_moe_dsa checkpoint; CPU smoke fixture only, not trained quality evidence or a registry measurement. Lane other denotes CPU, not local-cuda-budget.\"}]", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--run-name", + "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d", + "--cold-run", + "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d", + "--memory-report", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat.memory.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 6.431767418049276, + "name": "capture-repeat", + "pid": 409089, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 409089, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "capture-repeat.stderr.log", + "stdout": "capture-repeat.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "verify", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat.verify.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.7754629959817976, + "name": "verify-repeat", + "pid": 409951, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 409951, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "verify-repeat.stderr.log", + "stdout": "verify-repeat.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "validate", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--strict", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat.strict.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.423026765929535, + "name": "strict-repeat", + "pid": 410549, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 410549, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "strict-repeat.stderr.log", + "stdout": "strict-repeat.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "compare", + "--reference", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--candidate", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction/comparison", + "--self-compare", + "--force-compute", + "--device", + "cpu", + "--replay-device", + "numpy", + "--replay-dtype", + "float32", + "--vocab-chunk", + "8192", + "--chunk-positions", + "128", + "--verify-tensors", + "--reference-label", + "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "--candidate-label", + "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.7282893639057875, + "name": "compare", + "pid": 411043, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 411043, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "compare.stderr.log", + "stdout": "compare.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "validate", + "--receipt", + "/tmp/qfs-complete-tiny-fixture/reproduction/comparison/comparison-receipt.json", + "--strict", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/comparison.validate.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.424050308065489, + "name": "validate-comparison", + "pid": 411487, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 411487, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "validate-comparison.stderr.log", + "stdout": "validate-comparison.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + } + ], + "comparison": { + "comparator": { + "accumulation_dtype": "float64", + "bf16_reduced_precision_reduction": false, + "cublas_workspace_config": null, + "deterministic_algorithms": true, + "device": "cpu", + "estimator_backend": "torch:k6_kld_report._token_kld", + "head_applied_candidate_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "head_applied_reference_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "head_applied_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "logprob_dtype": "float64", + "position_block": 128, + "replay_backend": "numpy:cpu:float32", + "replay_env": { + "blas_configuration": "OpenBLAS 0.3.34.106.0 USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell MAX_THREADS=64", + "blas_name": "scipy-openblas", + "blas_threads": 2, + "blas_threads_source": "ctypes:scipy_openblas_get_num_threads64_", + "blas_version": "0.3.34.106.0", + "cpu_model": "Intel(R) Xeon(R) CPU X5570 @ 2.93GHz", + "library": "numpy", + "numpy_version": "2.5.3", + "replay_dtype": "float32" + }, + "replay_peak_device_bytes": null, + "short_circuited": true, + "source_file_hashes_verified": true, + "tensor_content_digests_verified": true, + "tf32": false, + "tool": { + "entrypoint": "bin/fidelity-dataset compare", + "note": "the fp64 estimator is k6_kld_report._token_kld, imported not copied, whenever torch is importable; estimator_backend records which path ran." + }, + "two_pass": true, + "vocab_chunk": 8192 + }, + "comparison_kind": "reproduction_confirmation", + "kl": { + "max": 0.0, + "mean": 0.0, + "median": 0.0, + "p95": 0.0, + "p99": 0.0, + "p99_9": 0.0 + }, + "measurement_scope": { + "contexts": 4, + "covers_full_panel": true, + "position_filter": "all", + "positions_per_context": 63, + "scored_positions": 252, + "subset_detail": null + }, + "metric": { + "direction": "reference_to_candidate", + "direction_label": "KL(reference || candidate)", + "higher_is_better": false, + "name": "mean_tokenwise_kld", + "units": "nats", + "value": 0.0 + }, + "note": "QFS retains its hash-proof result and top-1 value for reproduction confirmations; --force-compute independently runs the estimator and requires its tokenwise KL array to agree exactly. short_circuited=true therefore does not mean replay was skipped.", + "receipt": "comparison/comparison-receipt.json", + "receipt_sha256": "4910833e5cc175ea351055e567c5d896475b4020598359291aedc958d8ada382", + "self_compare": { + "asserted_exact_zero": true, + "capture_content_digest_equal": true, + "expected_tokenwise_bytes": 2144, + "expected_tokenwise_sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d", + "force_compute_agreed": true, + "head_digest_equal": true, + "weights_identity_equal": true + }, + "tokenwise": { + "bytes": 2144, + "path": "tokenwise-kld.npy", + "sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d" + }, + "top1_agreement": 1.0 + }, + "cpu_threads": 2, + "dataset_id": "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "dataset_repository": "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "device": "cpu", + "driver_argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "/tmp/qfs-complete-tiny-fixture/verify_cpu.py", + "--model-dir", + "/tmp/qfs-complete-tiny-fixture/model", + "--model-repository", + "malaiwah/glm-moe-dsa-tiny-random-bf16", + "--model-revision", + "45563636ef723acfb826755493447dc40c7a0c37", + "--panel-dir", + "/tmp/qfs-complete-tiny-fixture/panel", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction", + "--qfs-root", + "/tmp/qfs-explorer-development" + ], + "driver_sha256": "2e507993f0085a72d5236527942a7143fd036d56b82223b26e90889de5cd9f98", + "dtype": "bfloat16", + "elapsed_seconds": 34.85638747992925, + "lane": "other", + "lane_description": "local CPU random-init fixture", + "model_repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "model_revision": "45563636ef723acfb826755493447dc40c7a0c37", + "panel_binding": "panel-binding.json", + "panel_binding_sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "provenance_note": "Local QFS source bytes are hashed; no source commit is asserted. The caller supplies an immutable model pin; QFS hashes the local checkpoint. This script does not independently prove Hub-to-local weight equality.", + "qfs_source_files": { + "bin/fidelity/dscompare.py": "4a53f735e1e3fb8bd739854451b57f34e8369bffa9fd4f7b7fd935fb2e7d52df", + "bin/fidelity/dsvalidate.py": "a9d6cd57e801e3ef044a37635e24518c83dbc6d1ec8a4c0b4b5d1b24483ca8d1", + "bin/fidelity/panel.py": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "bin/fidelity_dataset.py": "ac62b63bbfde67e4d5cacecf9cd417193c50f417a6749cc15ee6f1610c153a4e", + "engines/tools/hf_capture.py": "200ba12ca74fb97531307965cbbaa5c10553a5c26e008e524ea2d8aecb005b95" + }, + "schema": "malaiwah.glm-moe-dsa-tiny-cpu-reproduction.v1", + "scope": "Random-init CPU reproduction only; no quality claim or registry submission.", + "status": "passed" +} diff --git a/raw/candidates/modelopt-nvfp4/model/generation_config.json b/raw/candidates/modelopt-nvfp4/model/generation_config.json new file mode 100644 index 0000000000000000000000000000000000000000..59bd0680606c94f6570a92e60fa4acd2e2170f70 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/model/generation_config.json @@ -0,0 +1,10 @@ +{ + "_from_model_config": true, + "bos_token_id": 1, + "eos_token_id": 2, + "output_attentions": false, + "output_hidden_states": false, + "pad_token_id": 0, + "transformers_version": "5.16.1", + "use_cache": true +} diff --git a/raw/candidates/modelopt-nvfp4/model/hub-checkpoint-verification.json b/raw/candidates/modelopt-nvfp4/model/hub-checkpoint-verification.json new file mode 100644 index 0000000000000000000000000000000000000000..b9648c8ae18de0fb86ce18398175c6686afbd7b2 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/model/hub-checkpoint-verification.json @@ -0,0 +1,32 @@ +{ + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "downloaded_from_hub": true, + "files": { + "config.json": { + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "bytes": 1479, + "matches_build": true + }, + "generation_config.json": { + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "bytes": 216, + "matches_build": true + }, + "model.safetensors": { + "sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1", + "bytes": 571000, + "matches_build": true + }, + "tokenizer.json": { + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "bytes": 6763, + "matches_build": true + }, + "tokenizer_config.json": { + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63", + "bytes": 236, + "matches_build": true + } + } +} diff --git a/raw/candidates/modelopt-nvfp4/model/loader-verification.json b/raw/candidates/modelopt-nvfp4/model/loader-verification.json new file mode 100644 index 0000000000000000000000000000000000000000..871fc889a9d3a025569770a96e83ff5f0a2fb420 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/model/loader-verification.json @@ -0,0 +1,60 @@ +{ + "schema": "malaiwah.tiny-fixture-loader-check.v1", + "checkpoint_sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1", + "runtime": { + "torch": "2.11.0+cpu", + "transformers": "5.16.1", + "device": "cpu", + "threads": 2 + }, + "qfs_load_report": { + "observed": true, + "conversion_errors_visible": true, + "missing_keys": [], + "unexpected_keys": [], + "mismatched_keys": [], + "error_msgs": [], + "conversion_errors": {} + }, + "native_save_reload_tensor_equality": true, + "independent_build_files_byte_equal": true, + "tokenizer_roundtrip_examples": [ + "The CPU fixture carries a complete output head and real sparse attention.", + "Small deterministic tensors make a repeatable pipeline experiment.", + "Unicode roundtrip: caf\u00e9, snow \u96ea, punctuation!", + "The same bytes must survive saving and loading without repair." + ], + "forward_shape": [ + 4, + 64, + 260 + ], + "forward_all_finite": true, + "forward_logit_std": 0.16186420619487762, + "load_seconds": 2.1670503590721637, + "batch_forward_seconds": 0.05775680090300739, + "greedy_generation_seconds": 0.04374621692113578, + "generated_token_ids": [ + 1, + 55, + 75, + 72, + 224, + 38, + 51, + 56, + 224, + 73, + 76, + 91, + 87, + 88, + 85, + 72, + 171, + 105, + 156, + 236 + ], + "peak_process_rss_mib": 351.9296875 +} diff --git a/raw/candidates/modelopt-nvfp4/model/model.safetensors b/raw/candidates/modelopt-nvfp4/model/model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..a6a4fb4ea87db7219e8a46d6451bd25882e76e69 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/model/model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07cf6fbb7ad67852d9fc66c58d94e7d9e09dafc04f1358523a80cd1478c58004 +size 247760 diff --git a/raw/candidates/modelopt-nvfp4/model/model.safetensors.index.json b/raw/candidates/modelopt-nvfp4/model/model.safetensors.index.json new file mode 100644 index 0000000000000000000000000000000000000000..6a33ef548795544aba218572520740ed4dc5cf6d --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/model/model.safetensors.index.json @@ -0,0 +1,366 @@ +{ + "metadata": { + "total_size": 208056 + }, + "weight_map": { + "model.layers.1.mlp.gate.e_score_correction_bias": "model.safetensors", + "model.layers.2.mlp.gate.e_score_correction_bias": "model.safetensors", + "model.layers.3.mlp.gate.e_score_correction_bias": "model.safetensors", + "lm_head.weight": "model.safetensors", + "model.embed_tokens.weight": "model.safetensors", + "model.layers.0.input_layernorm.weight": "model.safetensors", + "model.layers.0.mlp.down_proj.weight": "model.safetensors", + "model.layers.0.mlp.down_proj.weight_scale": "model.safetensors", + "model.layers.0.mlp.down_proj.weight_scale_2": "model.safetensors", + "model.layers.0.mlp.gate_proj.weight": "model.safetensors", + "model.layers.0.mlp.gate_proj.weight_scale": "model.safetensors", + "model.layers.0.mlp.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.0.mlp.up_proj.weight": "model.safetensors", + "model.layers.0.mlp.up_proj.weight_scale": "model.safetensors", + "model.layers.0.mlp.up_proj.weight_scale_2": "model.safetensors", + "model.layers.0.post_attention_layernorm.weight": "model.safetensors", + "model.layers.0.self_attn.indexer.k_norm.bias": "model.safetensors", + "model.layers.0.self_attn.indexer.k_norm.weight": "model.safetensors", + "model.layers.0.self_attn.indexer.weights_proj.weight": "model.safetensors", + "model.layers.0.self_attn.indexer.weights_proj.weight_scale": "model.safetensors", + "model.layers.0.self_attn.indexer.weights_proj.weight_scale_2": "model.safetensors", + "model.layers.0.self_attn.indexer.wk.weight": "model.safetensors", + "model.layers.0.self_attn.indexer.wk.weight_scale": "model.safetensors", + "model.layers.0.self_attn.indexer.wk.weight_scale_2": "model.safetensors", + "model.layers.0.self_attn.indexer.wq_b.weight": "model.safetensors", + "model.layers.0.self_attn.indexer.wq_b.weight_scale": "model.safetensors", + "model.layers.0.self_attn.indexer.wq_b.weight_scale_2": "model.safetensors", + "model.layers.0.self_attn.kv_a_layernorm.weight": "model.safetensors", + "model.layers.0.self_attn.kv_a_proj_with_mqa.weight": "model.safetensors", + "model.layers.0.self_attn.kv_a_proj_with_mqa.weight_scale": "model.safetensors", + "model.layers.0.self_attn.kv_a_proj_with_mqa.weight_scale_2": "model.safetensors", + "model.layers.0.self_attn.kv_b_proj.weight": "model.safetensors", + "model.layers.0.self_attn.kv_b_proj.weight_scale": "model.safetensors", + "model.layers.0.self_attn.kv_b_proj.weight_scale_2": "model.safetensors", + "model.layers.0.self_attn.o_proj.weight": "model.safetensors", + "model.layers.0.self_attn.o_proj.weight_scale": "model.safetensors", + "model.layers.0.self_attn.o_proj.weight_scale_2": "model.safetensors", + "model.layers.0.self_attn.q_a_layernorm.weight": "model.safetensors", + "model.layers.0.self_attn.q_a_proj.weight": "model.safetensors", + "model.layers.0.self_attn.q_a_proj.weight_scale": "model.safetensors", + "model.layers.0.self_attn.q_a_proj.weight_scale_2": "model.safetensors", + "model.layers.0.self_attn.q_b_proj.weight": "model.safetensors", + "model.layers.0.self_attn.q_b_proj.weight_scale": "model.safetensors", + "model.layers.0.self_attn.q_b_proj.weight_scale_2": "model.safetensors", + "model.layers.1.input_layernorm.weight": "model.safetensors", + "model.layers.1.mlp.experts.0.down_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.0.down_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.0.down_proj.weight_scale_2": "model.safetensors", + "model.layers.1.mlp.experts.0.gate_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.0.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.0.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.1.mlp.experts.0.up_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.0.up_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.0.up_proj.weight_scale_2": "model.safetensors", + "model.layers.1.mlp.experts.1.down_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.1.down_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.1.down_proj.weight_scale_2": "model.safetensors", + "model.layers.1.mlp.experts.1.gate_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.1.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.1.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.1.mlp.experts.1.up_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.1.up_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.1.up_proj.weight_scale_2": "model.safetensors", + "model.layers.1.mlp.experts.2.down_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.2.down_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.2.down_proj.weight_scale_2": "model.safetensors", + "model.layers.1.mlp.experts.2.gate_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.2.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.2.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.1.mlp.experts.2.up_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.2.up_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.2.up_proj.weight_scale_2": "model.safetensors", + "model.layers.1.mlp.experts.3.down_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.3.down_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.3.down_proj.weight_scale_2": "model.safetensors", + "model.layers.1.mlp.experts.3.gate_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.3.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.3.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.1.mlp.experts.3.up_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.3.up_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.3.up_proj.weight_scale_2": "model.safetensors", + "model.layers.1.mlp.experts.4.down_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.4.down_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.4.down_proj.weight_scale_2": "model.safetensors", + "model.layers.1.mlp.experts.4.gate_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.4.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.4.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.1.mlp.experts.4.up_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.4.up_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.4.up_proj.weight_scale_2": "model.safetensors", + "model.layers.1.mlp.experts.5.down_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.5.down_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.5.down_proj.weight_scale_2": "model.safetensors", + "model.layers.1.mlp.experts.5.gate_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.5.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.5.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.1.mlp.experts.5.up_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.5.up_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.5.up_proj.weight_scale_2": "model.safetensors", + "model.layers.1.mlp.experts.6.down_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.6.down_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.6.down_proj.weight_scale_2": "model.safetensors", + "model.layers.1.mlp.experts.6.gate_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.6.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.6.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.1.mlp.experts.6.up_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.6.up_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.6.up_proj.weight_scale_2": "model.safetensors", + "model.layers.1.mlp.experts.7.down_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.7.down_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.7.down_proj.weight_scale_2": "model.safetensors", + "model.layers.1.mlp.experts.7.gate_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.7.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.7.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.1.mlp.experts.7.up_proj.weight": "model.safetensors", + "model.layers.1.mlp.experts.7.up_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.experts.7.up_proj.weight_scale_2": "model.safetensors", + "model.layers.1.mlp.gate.weight": "model.safetensors", + "model.layers.1.mlp.shared_experts.down_proj.weight": "model.safetensors", + "model.layers.1.mlp.shared_experts.down_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.shared_experts.down_proj.weight_scale_2": "model.safetensors", + "model.layers.1.mlp.shared_experts.gate_proj.weight": "model.safetensors", + "model.layers.1.mlp.shared_experts.gate_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.shared_experts.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.1.mlp.shared_experts.up_proj.weight": "model.safetensors", + "model.layers.1.mlp.shared_experts.up_proj.weight_scale": "model.safetensors", + "model.layers.1.mlp.shared_experts.up_proj.weight_scale_2": "model.safetensors", + "model.layers.1.post_attention_layernorm.weight": "model.safetensors", + "model.layers.1.self_attn.kv_a_layernorm.weight": "model.safetensors", + "model.layers.1.self_attn.kv_a_proj_with_mqa.weight": "model.safetensors", + "model.layers.1.self_attn.kv_a_proj_with_mqa.weight_scale": "model.safetensors", + "model.layers.1.self_attn.kv_a_proj_with_mqa.weight_scale_2": "model.safetensors", + "model.layers.1.self_attn.kv_b_proj.weight": "model.safetensors", + "model.layers.1.self_attn.kv_b_proj.weight_scale": "model.safetensors", + "model.layers.1.self_attn.kv_b_proj.weight_scale_2": "model.safetensors", + "model.layers.1.self_attn.o_proj.weight": "model.safetensors", + "model.layers.1.self_attn.o_proj.weight_scale": "model.safetensors", + "model.layers.1.self_attn.o_proj.weight_scale_2": "model.safetensors", + "model.layers.1.self_attn.q_a_layernorm.weight": "model.safetensors", + "model.layers.1.self_attn.q_a_proj.weight": "model.safetensors", + "model.layers.1.self_attn.q_a_proj.weight_scale": "model.safetensors", + "model.layers.1.self_attn.q_a_proj.weight_scale_2": "model.safetensors", + "model.layers.1.self_attn.q_b_proj.weight": "model.safetensors", + "model.layers.1.self_attn.q_b_proj.weight_scale": "model.safetensors", + "model.layers.1.self_attn.q_b_proj.weight_scale_2": "model.safetensors", + "model.layers.2.input_layernorm.weight": "model.safetensors", + "model.layers.2.mlp.experts.0.down_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.0.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.0.down_proj.weight_scale_2": "model.safetensors", + "model.layers.2.mlp.experts.0.gate_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.0.gate_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.0.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.2.mlp.experts.0.up_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.0.up_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.0.up_proj.weight_scale_2": "model.safetensors", + "model.layers.2.mlp.experts.1.down_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.1.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.1.down_proj.weight_scale_2": "model.safetensors", + "model.layers.2.mlp.experts.1.gate_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.1.gate_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.1.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.2.mlp.experts.1.up_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.1.up_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.1.up_proj.weight_scale_2": "model.safetensors", + "model.layers.2.mlp.experts.2.down_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.2.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.2.down_proj.weight_scale_2": "model.safetensors", + "model.layers.2.mlp.experts.2.gate_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.2.gate_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.2.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.2.mlp.experts.2.up_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.2.up_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.2.up_proj.weight_scale_2": "model.safetensors", + "model.layers.2.mlp.experts.3.down_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.3.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.3.down_proj.weight_scale_2": "model.safetensors", + "model.layers.2.mlp.experts.3.gate_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.3.gate_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.3.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.2.mlp.experts.3.up_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.3.up_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.3.up_proj.weight_scale_2": "model.safetensors", + "model.layers.2.mlp.experts.4.down_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.4.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.4.down_proj.weight_scale_2": "model.safetensors", + "model.layers.2.mlp.experts.4.gate_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.4.gate_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.4.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.2.mlp.experts.4.up_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.4.up_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.4.up_proj.weight_scale_2": "model.safetensors", + "model.layers.2.mlp.experts.5.down_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.5.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.5.down_proj.weight_scale_2": "model.safetensors", + "model.layers.2.mlp.experts.5.gate_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.5.gate_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.5.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.2.mlp.experts.5.up_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.5.up_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.5.up_proj.weight_scale_2": "model.safetensors", + "model.layers.2.mlp.experts.6.down_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.6.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.6.down_proj.weight_scale_2": "model.safetensors", + "model.layers.2.mlp.experts.6.gate_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.6.gate_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.6.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.2.mlp.experts.6.up_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.6.up_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.6.up_proj.weight_scale_2": "model.safetensors", + "model.layers.2.mlp.experts.7.down_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.7.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.7.down_proj.weight_scale_2": "model.safetensors", + "model.layers.2.mlp.experts.7.gate_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.7.gate_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.7.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.2.mlp.experts.7.up_proj.weight": "model.safetensors", + "model.layers.2.mlp.experts.7.up_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.experts.7.up_proj.weight_scale_2": "model.safetensors", + "model.layers.2.mlp.gate.weight": "model.safetensors", + "model.layers.2.mlp.shared_experts.down_proj.weight": "model.safetensors", + "model.layers.2.mlp.shared_experts.down_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.shared_experts.down_proj.weight_scale_2": "model.safetensors", + "model.layers.2.mlp.shared_experts.gate_proj.weight": "model.safetensors", + "model.layers.2.mlp.shared_experts.gate_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.shared_experts.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.2.mlp.shared_experts.up_proj.weight": "model.safetensors", + "model.layers.2.mlp.shared_experts.up_proj.weight_scale": "model.safetensors", + "model.layers.2.mlp.shared_experts.up_proj.weight_scale_2": "model.safetensors", + "model.layers.2.post_attention_layernorm.weight": "model.safetensors", + "model.layers.2.self_attn.indexer.k_norm.bias": "model.safetensors", + "model.layers.2.self_attn.indexer.k_norm.weight": "model.safetensors", + "model.layers.2.self_attn.indexer.weights_proj.weight": "model.safetensors", + "model.layers.2.self_attn.indexer.weights_proj.weight_scale": "model.safetensors", + "model.layers.2.self_attn.indexer.weights_proj.weight_scale_2": "model.safetensors", + "model.layers.2.self_attn.indexer.wk.weight": "model.safetensors", + "model.layers.2.self_attn.indexer.wk.weight_scale": "model.safetensors", + "model.layers.2.self_attn.indexer.wk.weight_scale_2": "model.safetensors", + "model.layers.2.self_attn.indexer.wq_b.weight": "model.safetensors", + "model.layers.2.self_attn.indexer.wq_b.weight_scale": "model.safetensors", + "model.layers.2.self_attn.indexer.wq_b.weight_scale_2": "model.safetensors", + "model.layers.2.self_attn.kv_a_layernorm.weight": "model.safetensors", + "model.layers.2.self_attn.kv_a_proj_with_mqa.weight": "model.safetensors", + "model.layers.2.self_attn.kv_a_proj_with_mqa.weight_scale": "model.safetensors", + "model.layers.2.self_attn.kv_a_proj_with_mqa.weight_scale_2": "model.safetensors", + "model.layers.2.self_attn.kv_b_proj.weight": "model.safetensors", + "model.layers.2.self_attn.kv_b_proj.weight_scale": "model.safetensors", + "model.layers.2.self_attn.kv_b_proj.weight_scale_2": "model.safetensors", + "model.layers.2.self_attn.o_proj.weight": "model.safetensors", + "model.layers.2.self_attn.o_proj.weight_scale": "model.safetensors", + "model.layers.2.self_attn.o_proj.weight_scale_2": "model.safetensors", + "model.layers.2.self_attn.q_a_layernorm.weight": "model.safetensors", + "model.layers.2.self_attn.q_a_proj.weight": "model.safetensors", + "model.layers.2.self_attn.q_a_proj.weight_scale": "model.safetensors", + "model.layers.2.self_attn.q_a_proj.weight_scale_2": "model.safetensors", + "model.layers.2.self_attn.q_b_proj.weight": "model.safetensors", + "model.layers.2.self_attn.q_b_proj.weight_scale": "model.safetensors", + "model.layers.2.self_attn.q_b_proj.weight_scale_2": "model.safetensors", + "model.layers.3.input_layernorm.weight": "model.safetensors", + "model.layers.3.mlp.experts.0.down_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.0.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.0.down_proj.weight_scale_2": "model.safetensors", + "model.layers.3.mlp.experts.0.gate_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.0.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.0.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.3.mlp.experts.0.up_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.0.up_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.0.up_proj.weight_scale_2": "model.safetensors", + "model.layers.3.mlp.experts.1.down_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.1.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.1.down_proj.weight_scale_2": "model.safetensors", + "model.layers.3.mlp.experts.1.gate_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.1.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.1.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.3.mlp.experts.1.up_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.1.up_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.1.up_proj.weight_scale_2": "model.safetensors", + "model.layers.3.mlp.experts.2.down_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.2.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.2.down_proj.weight_scale_2": "model.safetensors", + "model.layers.3.mlp.experts.2.gate_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.2.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.2.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.3.mlp.experts.2.up_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.2.up_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.2.up_proj.weight_scale_2": "model.safetensors", + "model.layers.3.mlp.experts.3.down_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.3.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.3.down_proj.weight_scale_2": "model.safetensors", + "model.layers.3.mlp.experts.3.gate_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.3.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.3.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.3.mlp.experts.3.up_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.3.up_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.3.up_proj.weight_scale_2": "model.safetensors", + "model.layers.3.mlp.experts.4.down_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.4.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.4.down_proj.weight_scale_2": "model.safetensors", + "model.layers.3.mlp.experts.4.gate_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.4.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.4.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.3.mlp.experts.4.up_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.4.up_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.4.up_proj.weight_scale_2": "model.safetensors", + "model.layers.3.mlp.experts.5.down_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.5.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.5.down_proj.weight_scale_2": "model.safetensors", + "model.layers.3.mlp.experts.5.gate_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.5.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.5.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.3.mlp.experts.5.up_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.5.up_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.5.up_proj.weight_scale_2": "model.safetensors", + "model.layers.3.mlp.experts.6.down_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.6.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.6.down_proj.weight_scale_2": "model.safetensors", + "model.layers.3.mlp.experts.6.gate_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.6.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.6.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.3.mlp.experts.6.up_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.6.up_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.6.up_proj.weight_scale_2": "model.safetensors", + "model.layers.3.mlp.experts.7.down_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.7.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.7.down_proj.weight_scale_2": "model.safetensors", + "model.layers.3.mlp.experts.7.gate_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.7.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.7.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.3.mlp.experts.7.up_proj.weight": "model.safetensors", + "model.layers.3.mlp.experts.7.up_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.experts.7.up_proj.weight_scale_2": "model.safetensors", + "model.layers.3.mlp.gate.weight": "model.safetensors", + "model.layers.3.mlp.shared_experts.down_proj.weight": "model.safetensors", + "model.layers.3.mlp.shared_experts.down_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.shared_experts.down_proj.weight_scale_2": "model.safetensors", + "model.layers.3.mlp.shared_experts.gate_proj.weight": "model.safetensors", + "model.layers.3.mlp.shared_experts.gate_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.shared_experts.gate_proj.weight_scale_2": "model.safetensors", + "model.layers.3.mlp.shared_experts.up_proj.weight": "model.safetensors", + "model.layers.3.mlp.shared_experts.up_proj.weight_scale": "model.safetensors", + "model.layers.3.mlp.shared_experts.up_proj.weight_scale_2": "model.safetensors", + "model.layers.3.post_attention_layernorm.weight": "model.safetensors", + "model.layers.3.self_attn.kv_a_layernorm.weight": "model.safetensors", + "model.layers.3.self_attn.kv_a_proj_with_mqa.weight": "model.safetensors", + "model.layers.3.self_attn.kv_a_proj_with_mqa.weight_scale": "model.safetensors", + "model.layers.3.self_attn.kv_a_proj_with_mqa.weight_scale_2": "model.safetensors", + "model.layers.3.self_attn.kv_b_proj.weight": "model.safetensors", + "model.layers.3.self_attn.kv_b_proj.weight_scale": "model.safetensors", + "model.layers.3.self_attn.kv_b_proj.weight_scale_2": "model.safetensors", + "model.layers.3.self_attn.o_proj.weight": "model.safetensors", + "model.layers.3.self_attn.o_proj.weight_scale": "model.safetensors", + "model.layers.3.self_attn.o_proj.weight_scale_2": "model.safetensors", + "model.layers.3.self_attn.q_a_layernorm.weight": "model.safetensors", + "model.layers.3.self_attn.q_a_proj.weight": "model.safetensors", + "model.layers.3.self_attn.q_a_proj.weight_scale": "model.safetensors", + "model.layers.3.self_attn.q_a_proj.weight_scale_2": "model.safetensors", + "model.layers.3.self_attn.q_b_proj.weight": "model.safetensors", + "model.layers.3.self_attn.q_b_proj.weight_scale": "model.safetensors", + "model.layers.3.self_attn.q_b_proj.weight_scale_2": "model.safetensors", + "model.norm.weight": "model.safetensors" + } +} diff --git a/raw/candidates/modelopt-nvfp4/model/panel.binding.json b/raw/candidates/modelopt-nvfp4/model/panel.binding.json new file mode 100644 index 0000000000000000000000000000000000000000..573cea0b332c636bdda89b150f95cda307b89194 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/model/panel.binding.json @@ -0,0 +1,102 @@ +{ + "content": { + "archive": { + "algorithm": "sha256(ustar: sorted regular files; mode=0644; uid=gid=mtime=0)", + "bytes": 20480, + "compression": "none", + "format": "ustar", + "sha256": "389706dfa3335a75ec70a40d079995af1a60c05512334125dbd336790f12702f" + }, + "manifest": [ + { + "bytes": 192, + "path": "arrays/causal-mask-64.npy", + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02" + }, + { + "bytes": 384, + "path": "arrays/final-0000.tokens.npy", + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af" + }, + { + "bytes": 384, + "path": "arrays/final-0001.tokens.npy", + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea" + }, + { + "bytes": 384, + "path": "arrays/final-0002.tokens.npy", + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c" + }, + { + "bytes": 384, + "path": "arrays/final-0003.tokens.npy", + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a" + }, + { + "bytes": 4195, + "path": "panel.json", + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6" + }, + { + "bytes": 7808, + "path": "panel.receipt.json", + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263" + } + ], + "manifest_sha256": "e5f2d6410a6290da1197016c5b57ae522a3570665215ddc23e2a0bd45f912181" + }, + "panel": { + "bytes": 4195, + "context_length": 64, + "contexts": 4, + "file": "panel.json", + "id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "positions_per_context": 63, + "role": "final", + "scored_positions_total": 252, + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6", + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36" + }, + "receipt": { + "bytes": 7808, + "declared_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "file": "panel.receipt.json", + "receipt_file_sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "receipt_seal_mode": "self-blank" + }, + "schema": "malaiwah.resolved-panel.v1", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } +} diff --git a/raw/candidates/modelopt-nvfp4/model/panel.sha256.json b/raw/candidates/modelopt-nvfp4/model/panel.sha256.json new file mode 100644 index 0000000000000000000000000000000000000000..30e122a1cc6d1937fecc0d31e38e468bceefc9de --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/model/panel.sha256.json @@ -0,0 +1,83 @@ +{ + "binding_file": "panel.binding.json", + "binding_sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "context_length": 64, + "contexts": 4, + "model_repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "model_revision": "45563636ef723acfb826755493447dc40c7a0c37", + "panel_archive": { + "algorithm": "sha256(ustar: sorted regular files; mode=0644; uid=gid=mtime=0)", + "bytes": 20480, + "compression": "none", + "format": "ustar", + "sha256": "389706dfa3335a75ec70a40d079995af1a60c05512334125dbd336790f12702f" + }, + "panel_directory": "panel", + "panel_files": [ + { + "bytes": 192, + "path": "arrays/causal-mask-64.npy", + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02" + }, + { + "bytes": 384, + "path": "arrays/final-0000.tokens.npy", + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af" + }, + { + "bytes": 384, + "path": "arrays/final-0001.tokens.npy", + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea" + }, + { + "bytes": 384, + "path": "arrays/final-0002.tokens.npy", + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c" + }, + { + "bytes": 384, + "path": "arrays/final-0003.tokens.npy", + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a" + }, + { + "bytes": 4195, + "path": "panel.json", + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6" + }, + { + "bytes": 7808, + "path": "panel.receipt.json", + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263" + } + ], + "panel_id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "panel_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "purpose": "Synthetic CPU smoke only, not a quality benchmark.", + "revision_verification": "Caller-supplied published commit; local files byte-verified offline.", + "scored_positions_total": 252, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer_files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "tokenizer_files_verified": true, + "tokenizer_identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1" +} diff --git a/raw/candidates/modelopt-nvfp4/model/provenance.json b/raw/candidates/modelopt-nvfp4/model/provenance.json new file mode 100644 index 0000000000000000000000000000000000000000..f09dc757c3ab53d14254adc93196b2c8e62290dc --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/model/provenance.json @@ -0,0 +1,266 @@ +{ + "source": { + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "a1a973330e4e912678adbd8ea41e8b86b1c9dccb" + }, + "format": "modelopt-nvfp4", + "algorithm": "Build tiny FORMAT fixtures, optionally capture via integrated QFS layer-outer.\n\nNo optimizer-quality claim: deterministic CPU minmax/conservative-scale RTN.\nMXFP4 uses ceil(log2(group_max/6)); this is NOT CT's MX observer or Kimi QAT.\nNVFP4 uses a tensor maximum global, rounded E4M3 group scales, then E2M1\nnearest-even RTN. FP8 uses ceil(log2(block_max/448)) UE8M0 + E4M3 RTN.\nNo calibration, activation quantization, kernel parity, training or model code.\n", + "claim": "FORMAT fixture, not Kimi QAT/ModelOpt calibration/CT observer quality", + "reconstruction_scope": { + "scope": "weights-reconstructed/advisory; activation-not-captured", + "applied_to_weights": false, + "declared": null, + "kv_cache_scheme": null, + "stored_components": [] + }, + "encoded_tensors": { + "model.layers.0.mlp.down_proj.weight": 0.010242283344268799, + "model.layers.0.mlp.gate_proj.weight": 0.0093470998108387, + "model.layers.0.mlp.up_proj.weight": 0.008300784975290298, + "model.layers.0.self_attn.indexer.weights_proj.weight": 0.007568359375, + "model.layers.0.self_attn.indexer.wk.weight": 0.008004322648048401, + "model.layers.0.self_attn.indexer.wq_b.weight": 0.0080915167927742, + "model.layers.0.self_attn.kv_a_proj_with_mqa.weight": 0.0090680792927742, + "model.layers.0.self_attn.kv_b_proj.weight": 0.0077776238322257996, + "model.layers.0.self_attn.o_proj.weight": 0.0087890625, + "model.layers.0.self_attn.q_a_proj.weight": 0.0084170401096344, + "model.layers.0.self_attn.q_b_proj.weight": 0.0084984190762043, + "model.layers.1.mlp.experts.0.down_proj.weight": 0.0086030513048172, + "model.layers.1.mlp.experts.0.gate_proj.weight": 0.007498607039451599, + "model.layers.1.mlp.experts.0.up_proj.weight": 0.0090680792927742, + "model.layers.1.mlp.experts.1.down_proj.weight": 0.0089634470641613, + "model.layers.1.mlp.experts.1.gate_proj.weight": 0.00760323740541935, + "model.layers.1.mlp.experts.1.up_proj.weight": 0.009591236710548401, + "model.layers.1.mlp.experts.2.down_proj.weight": 0.0084286630153656, + "model.layers.1.mlp.experts.2.gate_proj.weight": 0.008196152746677399, + "model.layers.1.mlp.experts.2.up_proj.weight": 0.013671882450580597, + "model.layers.1.mlp.experts.3.down_proj.weight": 0.008789058774709702, + "model.layers.1.mlp.experts.3.gate_proj.weight": 0.00739397294819355, + "model.layers.1.mlp.experts.3.up_proj.weight": 0.008126392960548401, + "model.layers.1.mlp.experts.4.down_proj.weight": 0.009312227368354797, + "model.layers.1.mlp.experts.4.gate_proj.weight": 0.009137839078903198, + "model.layers.1.mlp.experts.4.up_proj.weight": 0.009416848421096802, + "model.layers.1.mlp.experts.5.down_proj.weight": 0.009695872664451599, + "model.layers.1.mlp.experts.5.gate_proj.weight": 0.009033203125, + "model.layers.1.mlp.experts.5.up_proj.weight": 0.0095912404358387, + "model.layers.1.mlp.experts.6.down_proj.weight": 0.00830078125, + "model.layers.1.mlp.experts.6.gate_proj.weight": 0.008405409753322601, + "model.layers.1.mlp.experts.6.up_proj.weight": 0.0085100457072258, + "model.layers.1.mlp.experts.7.down_proj.weight": 0.0085100457072258, + "model.layers.1.mlp.experts.7.gate_proj.weight": 0.010091148316860199, + "model.layers.1.mlp.experts.7.up_proj.weight": 0.0093122199177742, + "model.layers.1.mlp.shared_experts.down_proj.weight": 0.0098005011677742, + "model.layers.1.mlp.shared_experts.gate_proj.weight": 0.0104282908141613, + "model.layers.1.mlp.shared_experts.up_proj.weight": 0.0092308409512043, + "model.layers.1.self_attn.kv_a_proj_with_mqa.weight": 0.0081496462225914, + "model.layers.1.self_attn.kv_b_proj.weight": 0.0082659050822258, + "model.layers.1.self_attn.o_proj.weight": 0.0096028633415699, + "model.layers.1.self_attn.q_a_proj.weight": 0.0083705373108387, + "model.layers.1.self_attn.q_b_proj.weight": 0.008544921875, + "model.layers.2.mlp.experts.0.down_proj.weight": 0.009521484375, + "model.layers.2.mlp.experts.0.gate_proj.weight": 0.010009765625, + "model.layers.2.mlp.experts.0.up_proj.weight": 0.007498603314161301, + "model.layers.2.mlp.experts.1.down_proj.weight": 0.0089634470641613, + "model.layers.2.mlp.experts.1.gate_proj.weight": 0.0083240307867527, + "model.layers.2.mlp.experts.1.up_proj.weight": 0.009660996496677399, + "model.layers.2.mlp.experts.2.down_proj.weight": 0.009591236710548401, + "model.layers.2.mlp.experts.2.gate_proj.weight": 0.008056640625, + "model.layers.2.mlp.experts.2.up_proj.weight": 0.0083937868475914, + "model.layers.2.mlp.experts.3.down_proj.weight": 0.0109049491584301, + "model.layers.2.mlp.experts.3.gate_proj.weight": 0.0081612728536129, + "model.layers.2.mlp.experts.3.up_proj.weight": 0.009068083018064499, + "model.layers.2.mlp.experts.4.down_proj.weight": 0.008544921875, + "model.layers.2.mlp.experts.4.gate_proj.weight": 0.0082775317132473, + "model.layers.2.mlp.experts.4.up_proj.weight": 0.0082310251891613, + "model.layers.2.mlp.experts.5.down_proj.weight": 0.009521484375, + "model.layers.2.mlp.experts.5.gate_proj.weight": 0.0079868845641613, + "model.layers.2.mlp.experts.5.up_proj.weight": 0.0102887824177742, + "model.layers.2.mlp.experts.6.down_proj.weight": 0.0083705373108387, + "model.layers.2.mlp.experts.6.gate_proj.weight": 0.0093587227165699, + "model.layers.2.mlp.experts.6.up_proj.weight": 0.0079403817653656, + "model.layers.2.mlp.experts.7.down_proj.weight": 0.0081380195915699, + "model.layers.2.mlp.experts.7.gate_proj.weight": 0.008056640625, + "model.layers.2.mlp.experts.7.up_proj.weight": 0.008475169539451599, + "model.layers.2.mlp.shared_experts.down_proj.weight": 0.0085565485060215, + "model.layers.2.mlp.shared_experts.gate_proj.weight": 0.0085797980427742, + "model.layers.2.mlp.shared_experts.up_proj.weight": 0.0080915167927742, + "model.layers.2.self_attn.indexer.weights_proj.weight": 0.007638111710548401, + "model.layers.2.self_attn.indexer.wk.weight": 0.008649557828903198, + "model.layers.2.self_attn.indexer.wq_b.weight": 0.0104631707072258, + "model.layers.2.self_attn.kv_a_proj_with_mqa.weight": 0.0092424675822258, + "model.layers.2.self_attn.kv_b_proj.weight": 0.0081263966858387, + "model.layers.2.self_attn.o_proj.weight": 0.0085797980427742, + "model.layers.2.self_attn.q_a_proj.weight": 0.0104166679084301, + "model.layers.2.self_attn.q_b_proj.weight": 0.008626304566860199, + "model.layers.3.mlp.experts.0.down_proj.weight": 0.008544921875, + "model.layers.3.mlp.experts.0.gate_proj.weight": 0.0082310251891613, + "model.layers.3.mlp.experts.0.up_proj.weight": 0.008335664868354797, + "model.layers.3.mlp.experts.1.down_proj.weight": 0.0092424675822258, + "model.layers.3.mlp.experts.1.gate_proj.weight": 0.0094633549451828, + "model.layers.3.mlp.experts.1.up_proj.weight": 0.007219582796096802, + "model.layers.3.mlp.experts.2.down_proj.weight": 0.010428294539451599, + "model.layers.3.mlp.experts.2.gate_proj.weight": 0.010393410921096802, + "model.layers.3.mlp.experts.2.up_proj.weight": 0.0089867003262043, + "model.layers.3.mlp.experts.3.down_proj.weight": 0.008265901356935501, + "model.layers.3.mlp.experts.3.gate_proj.weight": 0.008126392960548401, + "model.layers.3.mlp.experts.3.up_proj.weight": 0.0098353810608387, + "model.layers.3.mlp.experts.4.down_proj.weight": 0.008196152746677399, + "model.layers.3.mlp.experts.4.gate_proj.weight": 0.0088820680975914, + "model.layers.3.mlp.experts.4.up_proj.weight": 0.008126392960548401, + "model.layers.3.mlp.experts.5.down_proj.weight": 0.0095912404358387, + "model.layers.3.mlp.experts.5.gate_proj.weight": 0.007899697870016098, + "model.layers.3.mlp.experts.5.up_proj.weight": 0.0101841501891613, + "model.layers.3.mlp.experts.6.down_proj.weight": 0.007568359375, + "model.layers.3.mlp.experts.6.gate_proj.weight": 0.0095796138048172, + "model.layers.3.mlp.experts.6.up_proj.weight": 0.0084519162774086, + "model.layers.3.mlp.experts.7.down_proj.weight": 0.0084402896463871, + "model.layers.3.mlp.experts.7.gate_proj.weight": 0.0099748894572258, + "model.layers.3.mlp.experts.7.up_proj.weight": 0.009626112878322601, + "model.layers.3.mlp.shared_experts.down_proj.weight": 0.008870445191860199, + "model.layers.3.mlp.shared_experts.gate_proj.weight": 0.0085914246737957, + "model.layers.3.mlp.shared_experts.up_proj.weight": 0.0083937868475914, + "model.layers.3.self_attn.kv_a_proj_with_mqa.weight": 0.0074753537774086, + "model.layers.3.self_attn.kv_b_proj.weight": 0.008475169539451599, + "model.layers.3.self_attn.o_proj.weight": 0.009765625, + "model.layers.3.self_attn.q_a_proj.weight": 0.0089401975274086, + "model.layers.3.self_attn.q_b_proj.weight": 0.0091262087225914 + }, + "encoded_formats": { + "model.layers.0.mlp.down_proj.weight": "modelopt-nvfp4", + "model.layers.0.mlp.gate_proj.weight": "modelopt-nvfp4", + "model.layers.0.mlp.up_proj.weight": "modelopt-nvfp4", + "model.layers.0.self_attn.indexer.weights_proj.weight": "modelopt-nvfp4", + "model.layers.0.self_attn.indexer.wk.weight": "modelopt-nvfp4", + "model.layers.0.self_attn.indexer.wq_b.weight": "modelopt-nvfp4", + "model.layers.0.self_attn.kv_a_proj_with_mqa.weight": "modelopt-nvfp4", + "model.layers.0.self_attn.kv_b_proj.weight": "modelopt-nvfp4", + "model.layers.0.self_attn.o_proj.weight": "modelopt-nvfp4", + "model.layers.0.self_attn.q_a_proj.weight": "modelopt-nvfp4", + "model.layers.0.self_attn.q_b_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.0.down_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.0.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.0.up_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.1.down_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.1.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.1.up_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.2.down_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.2.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.2.up_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.3.down_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.3.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.3.up_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.4.down_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.4.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.4.up_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.5.down_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.5.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.5.up_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.6.down_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.6.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.6.up_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.7.down_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.7.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.7.up_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.shared_experts.down_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.shared_experts.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.shared_experts.up_proj.weight": "modelopt-nvfp4", + "model.layers.1.self_attn.kv_a_proj_with_mqa.weight": "modelopt-nvfp4", + "model.layers.1.self_attn.kv_b_proj.weight": "modelopt-nvfp4", + "model.layers.1.self_attn.o_proj.weight": "modelopt-nvfp4", + "model.layers.1.self_attn.q_a_proj.weight": "modelopt-nvfp4", + "model.layers.1.self_attn.q_b_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.0.down_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.0.gate_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.0.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.1.down_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.1.gate_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.1.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.2.down_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.2.gate_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.2.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.3.down_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.3.gate_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.3.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.4.down_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.4.gate_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.4.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.5.down_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.5.gate_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.5.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.6.down_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.6.gate_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.6.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.7.down_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.7.gate_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.7.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.shared_experts.down_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.shared_experts.gate_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.shared_experts.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.self_attn.indexer.weights_proj.weight": "modelopt-nvfp4", + "model.layers.2.self_attn.indexer.wk.weight": "modelopt-nvfp4", + "model.layers.2.self_attn.indexer.wq_b.weight": "modelopt-nvfp4", + "model.layers.2.self_attn.kv_a_proj_with_mqa.weight": "modelopt-nvfp4", + "model.layers.2.self_attn.kv_b_proj.weight": "modelopt-nvfp4", + "model.layers.2.self_attn.o_proj.weight": "modelopt-nvfp4", + "model.layers.2.self_attn.q_a_proj.weight": "modelopt-nvfp4", + "model.layers.2.self_attn.q_b_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.0.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.0.gate_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.0.up_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.1.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.1.gate_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.1.up_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.2.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.2.gate_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.2.up_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.3.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.3.gate_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.3.up_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.4.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.4.gate_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.4.up_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.5.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.5.gate_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.5.up_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.6.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.6.gate_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.6.up_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.7.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.7.gate_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.7.up_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.shared_experts.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.shared_experts.gate_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.shared_experts.up_proj.weight": "modelopt-nvfp4", + "model.layers.3.self_attn.kv_a_proj_with_mqa.weight": "modelopt-nvfp4", + "model.layers.3.self_attn.kv_b_proj.weight": "modelopt-nvfp4", + "model.layers.3.self_attn.o_proj.weight": "modelopt-nvfp4", + "model.layers.3.self_attn.q_a_proj.weight": "modelopt-nvfp4", + "model.layers.3.self_attn.q_b_proj.weight": "modelopt-nvfp4" + }, + "source_sha256": { + "config.json": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "model.safetensors": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1" + }, + "output_sha256": { + "scope.json": "5e1d9091e1fe20d5f4e87d1f0d0c4deda441a099ba485105315c9f21a16cc822", + "model.safetensors.index.json": "2d67927b83c1396fade9bd12166cfc81edb525d62cb3378ae7b4b472c00a8b12", + "model.safetensors": "07cf6fbb7ad67852d9fc66c58d94e7d9e09dafc04f1358523a80cd1478c58004", + "config.json": "932f17d4ee472ee814a296cfa3b521bf0b9daefc57cef0f3406995fdb341e7fe", + "panel.binding.json": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "qfs-source.json": "624fc5b9568aa8bf12b1fc5cb3d54aef94d5e5ad72d73a55bd761dd6ca659cae", + "loader-verification.json": "086b7c5481cfbae5ee958b3bdeb85264128c59142fb005611bd837533fbdf7b0", + "tokenizer.json": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "cpu-reproduction-summary.json": "41f8263ddacbac1379c67637f83fdef2ed843ca4973179817531855939866a55", + "hub-checkpoint-verification.json": "3a4681f9c2876da6ae303592ede176ab17c6abdface107683fa2fe8386de7d36", + "tokenizer_config.json": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63", + "panel.sha256.json": "7fbfbaa8a3b1d7533177e1c2e774f5686e6a3f6b9564be7f2a99d0f66bff92fd", + "build-manifest.json": "57d74b2e6dcc8a789f51f86d251e51b2ec73c6772c329ad56f6132e08626eced", + "generation_config.json": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "cpu-comparison-receipt.json": "fcfcee1383dc0d50b42bbd97c9f2fc5ebe127c97cab791eeac01bf530d06f178", + "LICENSE": "6456969dd395bff476628945088b4cbd9d9c761b01a64e281c07b09daf9f94c3" + }, + "tool_sha256": "9fae546b8cb91df32468bcc7019c0bfbf10e41569526c7f55384f27afafe8699", + "reader_sha256": "588923f0a4700436221923c794a8c112971d9f08e75c746742b0f0ede7921682", + "reference": "compressed-tensors@0.18.0; DeepSeek-V4-Flash@60d8d70770c6776ff598c94bb586a859a38244f1/inference/kernel.py; nvidia/Qwen3.8-Flash-Next-NVFP4@fc694b54fb0174e0913e6adf86691ef85a4ead47/config.json+headers", + "verification": "independent CPU FP32 encoder reconstruction per encoded weight; no GPU parity" +} diff --git a/raw/candidates/modelopt-nvfp4/model/qfs-source.json b/raw/candidates/modelopt-nvfp4/model/qfs-source.json new file mode 100644 index 0000000000000000000000000000000000000000..3c71d8671dcbe3678b71a2efe59e0ca341bebdc0 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/model/qfs-source.json @@ -0,0 +1,11 @@ +{ + "repository": "https://github.com/malaiwah/quant-fidelity-suite", + "revision": "a903cddb078c2eda8c65d6e6c875a09ac932df49", + "source_files": { + "bin/fidelity/dscompare.py": "4a53f735e1e3fb8bd739854451b57f34e8369bffa9fd4f7b7fd935fb2e7d52df", + "bin/fidelity/dsvalidate.py": "a9d6cd57e801e3ef044a37635e24518c83dbc6d1ec8a4c0b4b5d1b24483ca8d1", + "bin/fidelity/panel.py": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "bin/fidelity_dataset.py": "ac62b63bbfde67e4d5cacecf9cd417193c50f417a6749cc15ee6f1610c153a4e", + "engines/tools/hf_capture.py": "200ba12ca74fb97531307965cbbaa5c10553a5c26e008e524ea2d8aecb005b95" + } +} diff --git a/raw/candidates/modelopt-nvfp4/model/scope.json b/raw/candidates/modelopt-nvfp4/model/scope.json new file mode 100644 index 0000000000000000000000000000000000000000..a815a87b8bc40a22b30343252c59e95853cb4cf2 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/model/scope.json @@ -0,0 +1,105 @@ +{ + "policy": "mixed", + "head_policy": "native", + "kv_cache_dtype": "bf16", + "mtp_included": false, + "activation_quantization": null, + "assignments": [ + { + "tensor_class": "attn.o", + "treatment": "quantized", + "format": "modelopt-nvfp4", + "bits_per_weight": 4, + "layer_range": "all", + "note": "4 tensors: model.layers.N.self_attn.o_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "attn.other", + "treatment": "quantized", + "format": "mixed", + "bits_per_weight": null, + "layer_range": "0-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 12 x native:bf16@16 (model.layers.N.self_attn.indexer.k_norm.bias, model.layers.N.self_attn.indexer.k_norm.weight, model.layers.N.self_attn.kv_a_layernorm.weight); 6 x quantized:modelopt-nvfp4@4 (model.layers.N.self_attn.indexer.weights_proj.weight, model.layers.N.self_attn.indexer.wk.weight, model.layers.N.self_attn.indexer.wq_b.weight). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "attn.qkv", + "treatment": "quantized", + "format": "modelopt-nvfp4", + "bits_per_weight": 4, + "layer_range": "all", + "note": "16 tensors: model.layers.N.self_attn.kv_a_proj_with_mqa.weight, model.layers.N.self_attn.kv_b_proj.weight, model.layers.N.self_attn.q_a_proj.weight, model.layers.N.self_attn.q_b_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "embed_tokens", + "treatment": "native", + "format": "bf16", + "bits_per_weight": 16, + "layer_range": "all", + "note": "1 tensors: model.embed_tokens.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "lm_head", + "treatment": "native", + "format": "bf16", + "bits_per_weight": 16, + "layer_range": "all", + "note": "1 tensors: lm_head.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "mlp.down", + "treatment": "quantized", + "format": "modelopt-nvfp4", + "bits_per_weight": 4, + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.down_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "mlp.gate", + "treatment": "quantized", + "format": "modelopt-nvfp4", + "bits_per_weight": 4, + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.gate_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "mlp.up", + "treatment": "quantized", + "format": "modelopt-nvfp4", + "bits_per_weight": 4, + "layer_range": "all", + "note": "1 tensors: model.layers.N.mlp.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "moe.experts", + "treatment": "quantized", + "format": "modelopt-nvfp4", + "bits_per_weight": 4, + "layer_range": "all", + "note": "72 tensors: model.layers.N.mlp.experts.E.down_proj.weight, model.layers.N.mlp.experts.E.gate_proj.weight, model.layers.N.mlp.experts.E.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "moe.router", + "treatment": "native", + "format": "mixed", + "bits_per_weight": null, + "layer_range": "1-3", + "note": "class mixes formats on the same layers (SCOPE-004 admits one row per class and layer_range): 3 x native:bf16@16 (model.layers.N.mlp.gate.weight); 3 x native:fp32@32 (model.layers.N.mlp.gate.e_score_correction_bias). FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "moe.shared_expert", + "treatment": "quantized", + "format": "modelopt-nvfp4", + "bits_per_weight": 4, + "layer_range": "all", + "note": "9 tensors: model.layers.N.mlp.shared_experts.down_proj.weight, model.layers.N.mlp.shared_experts.gate_proj.weight, model.layers.N.mlp.shared_experts.up_proj.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + }, + { + "tensor_class": "norm", + "treatment": "native", + "format": "bf16", + "bits_per_weight": 16, + "layer_range": "all", + "note": "9 tensors: model.layers.N.input_layernorm.weight, model.layers.N.post_attention_layernorm.weight, model.norm.weight. FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim" + } + ] +} diff --git a/raw/candidates/modelopt-nvfp4/model/tokenizer.json b/raw/candidates/modelopt-nvfp4/model/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..5ad9cccfc9ab5ed66f1c38db328de07cbe4939a9 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/model/tokenizer.json @@ -0,0 +1,404 @@ +{ + "version": "1.0", + "truncation": null, + "padding": null, + "added_tokens": [ + { + "id": 0, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 1, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 2, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 3, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + } + ], + "normalizer": null, + "pre_tokenizer": { + "type": "ByteLevel", + "add_prefix_space": false, + "trim_offsets": true, + "use_regex": false + }, + "post_processor": { + "type": "TemplateProcessing", + "single": [ + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + }, + { + "Sequence": { + "id": "A", + "type_id": 0 + } + }, + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + } + ], + "pair": [ + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + }, + { + "Sequence": { + "id": "A", + "type_id": 0 + } + }, + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + }, + { + "Sequence": { + "id": "B", + "type_id": 1 + } + }, + { + "SpecialToken": { + "id": "", + "type_id": 1 + } + } + ], + "special_tokens": { + "": { + "id": "", + "ids": [ + 1 + ], + "tokens": [ + "" + ] + }, + "": { + "id": "", + "ids": [ + 2 + ], + "tokens": [ + "" + ] + } + } + }, + "decoder": { + "type": "ByteLevel", + "add_prefix_space": true, + "trim_offsets": true, + "use_regex": true + }, + "model": { + "type": "BPE", + "dropout": null, + "unk_token": "", + "continuing_subword_prefix": null, + "end_of_word_suffix": null, + "fuse_unk": false, + "byte_fallback": false, + "ignore_merges": false, + "vocab": { + "": 0, + "": 1, + "": 2, + "": 3, + "!": 4, + "\"": 5, + "#": 6, + "$": 7, + "%": 8, + "&": 9, + "'": 10, + "(": 11, + ")": 12, + "*": 13, + "+": 14, + ",": 15, + "-": 16, + ".": 17, + "/": 18, + "0": 19, + "1": 20, + "2": 21, + "3": 22, + "4": 23, + "5": 24, + "6": 25, + "7": 26, + "8": 27, + "9": 28, + ":": 29, + ";": 30, + "<": 31, + "=": 32, + ">": 33, + "?": 34, + "@": 35, + "A": 36, + "B": 37, + "C": 38, + "D": 39, + "E": 40, + "F": 41, + "G": 42, + "H": 43, + "I": 44, + "J": 45, + "K": 46, + "L": 47, + "M": 48, + "N": 49, + "O": 50, + "P": 51, + "Q": 52, + "R": 53, + "S": 54, + "T": 55, + "U": 56, + "V": 57, + "W": 58, + "X": 59, + "Y": 60, + "Z": 61, + "[": 62, + "\\": 63, + "]": 64, + "^": 65, + "_": 66, + "`": 67, + "a": 68, + "b": 69, + "c": 70, + "d": 71, + "e": 72, + "f": 73, + "g": 74, + "h": 75, + "i": 76, + "j": 77, + "k": 78, + "l": 79, + "m": 80, + "n": 81, + "o": 82, + "p": 83, + "q": 84, + "r": 85, + "s": 86, + "t": 87, + "u": 88, + "v": 89, + "w": 90, + "x": 91, + "y": 92, + "z": 93, + "{": 94, + "|": 95, + "}": 96, + "~": 97, + "¡": 98, + "¢": 99, + "£": 100, + "¤": 101, + "¥": 102, + "¦": 103, + "§": 104, + "¨": 105, + "©": 106, + "ª": 107, + "«": 108, + "¬": 109, + "®": 110, + "¯": 111, + "°": 112, + "±": 113, + "²": 114, + "³": 115, + "´": 116, + "µ": 117, + "¶": 118, + "·": 119, + "¸": 120, + "¹": 121, + "º": 122, + "»": 123, + "¼": 124, + "½": 125, + "¾": 126, + "¿": 127, + "À": 128, + "Á": 129, + "Â": 130, + "Ã": 131, + "Ä": 132, + "Å": 133, + "Æ": 134, + "Ç": 135, + "È": 136, + "É": 137, + "Ê": 138, + "Ë": 139, + "Ì": 140, + "Í": 141, + "Î": 142, + "Ï": 143, + "Ð": 144, + "Ñ": 145, + "Ò": 146, + "Ó": 147, + "Ô": 148, + "Õ": 149, + "Ö": 150, + "×": 151, + "Ø": 152, + "Ù": 153, + "Ú": 154, + "Û": 155, + "Ü": 156, + "Ý": 157, + "Þ": 158, + "ß": 159, + "à": 160, + "á": 161, + "â": 162, + "ã": 163, + "ä": 164, + "å": 165, + "æ": 166, + "ç": 167, + "è": 168, + "é": 169, + "ê": 170, + "ë": 171, + "ì": 172, + "í": 173, + "î": 174, + "ï": 175, + "ð": 176, + "ñ": 177, + "ò": 178, + "ó": 179, + "ô": 180, + "õ": 181, + "ö": 182, + "÷": 183, + "ø": 184, + "ù": 185, + "ú": 186, + "û": 187, + "ü": 188, + "ý": 189, + "þ": 190, + "ÿ": 191, + "Ā": 192, + "ā": 193, + "Ă": 194, + "ă": 195, + "Ą": 196, + "ą": 197, + "Ć": 198, + "ć": 199, + "Ĉ": 200, + "ĉ": 201, + "Ċ": 202, + "ċ": 203, + "Č": 204, + "č": 205, + "Ď": 206, + "ď": 207, + "Đ": 208, + "đ": 209, + "Ē": 210, + "ē": 211, + "Ĕ": 212, + "ĕ": 213, + "Ė": 214, + "ė": 215, + "Ę": 216, + "ę": 217, + "Ě": 218, + "ě": 219, + "Ĝ": 220, + "ĝ": 221, + "Ğ": 222, + "ğ": 223, + "Ġ": 224, + "ġ": 225, + "Ģ": 226, + "ģ": 227, + "Ĥ": 228, + "ĥ": 229, + "Ħ": 230, + "ħ": 231, + "Ĩ": 232, + "ĩ": 233, + "Ī": 234, + "ī": 235, + "Ĭ": 236, + "ĭ": 237, + "Į": 238, + "į": 239, + "İ": 240, + "ı": 241, + "IJ": 242, + "ij": 243, + "Ĵ": 244, + "ĵ": 245, + "Ķ": 246, + "ķ": 247, + "ĸ": 248, + "Ĺ": 249, + "ĺ": 250, + "Ļ": 251, + "ļ": 252, + "Ľ": 253, + "ľ": 254, + "Ŀ": 255, + "ŀ": 256, + "Ł": 257, + "ł": 258, + "Ń": 259 + }, + "merges": [] + } +} \ No newline at end of file diff --git a/raw/candidates/modelopt-nvfp4/model/tokenizer_config.json b/raw/candidates/modelopt-nvfp4/model/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..df4d789a0874511220f5e2676081000298ad025d --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/model/tokenizer_config.json @@ -0,0 +1,10 @@ +{ + "backend": "tokenizers", + "bos_token": "", + "clean_up_tokenization_spaces": false, + "eos_token": "", + "model_max_length": 256, + "pad_token": "", + "tokenizer_class": "TokenizersBackend", + "unk_token": "" +} diff --git a/raw/candidates/modelopt-nvfp4/source-pin-evidence.json b/raw/candidates/modelopt-nvfp4/source-pin-evidence.json new file mode 100644 index 0000000000000000000000000000000000000000..f09dc757c3ab53d14254adc93196b2c8e62290dc --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/source-pin-evidence.json @@ -0,0 +1,266 @@ +{ + "source": { + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "a1a973330e4e912678adbd8ea41e8b86b1c9dccb" + }, + "format": "modelopt-nvfp4", + "algorithm": "Build tiny FORMAT fixtures, optionally capture via integrated QFS layer-outer.\n\nNo optimizer-quality claim: deterministic CPU minmax/conservative-scale RTN.\nMXFP4 uses ceil(log2(group_max/6)); this is NOT CT's MX observer or Kimi QAT.\nNVFP4 uses a tensor maximum global, rounded E4M3 group scales, then E2M1\nnearest-even RTN. FP8 uses ceil(log2(block_max/448)) UE8M0 + E4M3 RTN.\nNo calibration, activation quantization, kernel parity, training or model code.\n", + "claim": "FORMAT fixture, not Kimi QAT/ModelOpt calibration/CT observer quality", + "reconstruction_scope": { + "scope": "weights-reconstructed/advisory; activation-not-captured", + "applied_to_weights": false, + "declared": null, + "kv_cache_scheme": null, + "stored_components": [] + }, + "encoded_tensors": { + "model.layers.0.mlp.down_proj.weight": 0.010242283344268799, + "model.layers.0.mlp.gate_proj.weight": 0.0093470998108387, + "model.layers.0.mlp.up_proj.weight": 0.008300784975290298, + "model.layers.0.self_attn.indexer.weights_proj.weight": 0.007568359375, + "model.layers.0.self_attn.indexer.wk.weight": 0.008004322648048401, + "model.layers.0.self_attn.indexer.wq_b.weight": 0.0080915167927742, + "model.layers.0.self_attn.kv_a_proj_with_mqa.weight": 0.0090680792927742, + "model.layers.0.self_attn.kv_b_proj.weight": 0.0077776238322257996, + "model.layers.0.self_attn.o_proj.weight": 0.0087890625, + "model.layers.0.self_attn.q_a_proj.weight": 0.0084170401096344, + "model.layers.0.self_attn.q_b_proj.weight": 0.0084984190762043, + "model.layers.1.mlp.experts.0.down_proj.weight": 0.0086030513048172, + "model.layers.1.mlp.experts.0.gate_proj.weight": 0.007498607039451599, + "model.layers.1.mlp.experts.0.up_proj.weight": 0.0090680792927742, + "model.layers.1.mlp.experts.1.down_proj.weight": 0.0089634470641613, + "model.layers.1.mlp.experts.1.gate_proj.weight": 0.00760323740541935, + "model.layers.1.mlp.experts.1.up_proj.weight": 0.009591236710548401, + "model.layers.1.mlp.experts.2.down_proj.weight": 0.0084286630153656, + "model.layers.1.mlp.experts.2.gate_proj.weight": 0.008196152746677399, + "model.layers.1.mlp.experts.2.up_proj.weight": 0.013671882450580597, + "model.layers.1.mlp.experts.3.down_proj.weight": 0.008789058774709702, + "model.layers.1.mlp.experts.3.gate_proj.weight": 0.00739397294819355, + "model.layers.1.mlp.experts.3.up_proj.weight": 0.008126392960548401, + "model.layers.1.mlp.experts.4.down_proj.weight": 0.009312227368354797, + "model.layers.1.mlp.experts.4.gate_proj.weight": 0.009137839078903198, + "model.layers.1.mlp.experts.4.up_proj.weight": 0.009416848421096802, + "model.layers.1.mlp.experts.5.down_proj.weight": 0.009695872664451599, + "model.layers.1.mlp.experts.5.gate_proj.weight": 0.009033203125, + "model.layers.1.mlp.experts.5.up_proj.weight": 0.0095912404358387, + "model.layers.1.mlp.experts.6.down_proj.weight": 0.00830078125, + "model.layers.1.mlp.experts.6.gate_proj.weight": 0.008405409753322601, + "model.layers.1.mlp.experts.6.up_proj.weight": 0.0085100457072258, + "model.layers.1.mlp.experts.7.down_proj.weight": 0.0085100457072258, + "model.layers.1.mlp.experts.7.gate_proj.weight": 0.010091148316860199, + "model.layers.1.mlp.experts.7.up_proj.weight": 0.0093122199177742, + "model.layers.1.mlp.shared_experts.down_proj.weight": 0.0098005011677742, + "model.layers.1.mlp.shared_experts.gate_proj.weight": 0.0104282908141613, + "model.layers.1.mlp.shared_experts.up_proj.weight": 0.0092308409512043, + "model.layers.1.self_attn.kv_a_proj_with_mqa.weight": 0.0081496462225914, + "model.layers.1.self_attn.kv_b_proj.weight": 0.0082659050822258, + "model.layers.1.self_attn.o_proj.weight": 0.0096028633415699, + "model.layers.1.self_attn.q_a_proj.weight": 0.0083705373108387, + "model.layers.1.self_attn.q_b_proj.weight": 0.008544921875, + "model.layers.2.mlp.experts.0.down_proj.weight": 0.009521484375, + "model.layers.2.mlp.experts.0.gate_proj.weight": 0.010009765625, + "model.layers.2.mlp.experts.0.up_proj.weight": 0.007498603314161301, + "model.layers.2.mlp.experts.1.down_proj.weight": 0.0089634470641613, + "model.layers.2.mlp.experts.1.gate_proj.weight": 0.0083240307867527, + "model.layers.2.mlp.experts.1.up_proj.weight": 0.009660996496677399, + "model.layers.2.mlp.experts.2.down_proj.weight": 0.009591236710548401, + "model.layers.2.mlp.experts.2.gate_proj.weight": 0.008056640625, + "model.layers.2.mlp.experts.2.up_proj.weight": 0.0083937868475914, + "model.layers.2.mlp.experts.3.down_proj.weight": 0.0109049491584301, + "model.layers.2.mlp.experts.3.gate_proj.weight": 0.0081612728536129, + "model.layers.2.mlp.experts.3.up_proj.weight": 0.009068083018064499, + "model.layers.2.mlp.experts.4.down_proj.weight": 0.008544921875, + "model.layers.2.mlp.experts.4.gate_proj.weight": 0.0082775317132473, + "model.layers.2.mlp.experts.4.up_proj.weight": 0.0082310251891613, + "model.layers.2.mlp.experts.5.down_proj.weight": 0.009521484375, + "model.layers.2.mlp.experts.5.gate_proj.weight": 0.0079868845641613, + "model.layers.2.mlp.experts.5.up_proj.weight": 0.0102887824177742, + "model.layers.2.mlp.experts.6.down_proj.weight": 0.0083705373108387, + "model.layers.2.mlp.experts.6.gate_proj.weight": 0.0093587227165699, + "model.layers.2.mlp.experts.6.up_proj.weight": 0.0079403817653656, + "model.layers.2.mlp.experts.7.down_proj.weight": 0.0081380195915699, + "model.layers.2.mlp.experts.7.gate_proj.weight": 0.008056640625, + "model.layers.2.mlp.experts.7.up_proj.weight": 0.008475169539451599, + "model.layers.2.mlp.shared_experts.down_proj.weight": 0.0085565485060215, + "model.layers.2.mlp.shared_experts.gate_proj.weight": 0.0085797980427742, + "model.layers.2.mlp.shared_experts.up_proj.weight": 0.0080915167927742, + "model.layers.2.self_attn.indexer.weights_proj.weight": 0.007638111710548401, + "model.layers.2.self_attn.indexer.wk.weight": 0.008649557828903198, + "model.layers.2.self_attn.indexer.wq_b.weight": 0.0104631707072258, + "model.layers.2.self_attn.kv_a_proj_with_mqa.weight": 0.0092424675822258, + "model.layers.2.self_attn.kv_b_proj.weight": 0.0081263966858387, + "model.layers.2.self_attn.o_proj.weight": 0.0085797980427742, + "model.layers.2.self_attn.q_a_proj.weight": 0.0104166679084301, + "model.layers.2.self_attn.q_b_proj.weight": 0.008626304566860199, + "model.layers.3.mlp.experts.0.down_proj.weight": 0.008544921875, + "model.layers.3.mlp.experts.0.gate_proj.weight": 0.0082310251891613, + "model.layers.3.mlp.experts.0.up_proj.weight": 0.008335664868354797, + "model.layers.3.mlp.experts.1.down_proj.weight": 0.0092424675822258, + "model.layers.3.mlp.experts.1.gate_proj.weight": 0.0094633549451828, + "model.layers.3.mlp.experts.1.up_proj.weight": 0.007219582796096802, + "model.layers.3.mlp.experts.2.down_proj.weight": 0.010428294539451599, + "model.layers.3.mlp.experts.2.gate_proj.weight": 0.010393410921096802, + "model.layers.3.mlp.experts.2.up_proj.weight": 0.0089867003262043, + "model.layers.3.mlp.experts.3.down_proj.weight": 0.008265901356935501, + "model.layers.3.mlp.experts.3.gate_proj.weight": 0.008126392960548401, + "model.layers.3.mlp.experts.3.up_proj.weight": 0.0098353810608387, + "model.layers.3.mlp.experts.4.down_proj.weight": 0.008196152746677399, + "model.layers.3.mlp.experts.4.gate_proj.weight": 0.0088820680975914, + "model.layers.3.mlp.experts.4.up_proj.weight": 0.008126392960548401, + "model.layers.3.mlp.experts.5.down_proj.weight": 0.0095912404358387, + "model.layers.3.mlp.experts.5.gate_proj.weight": 0.007899697870016098, + "model.layers.3.mlp.experts.5.up_proj.weight": 0.0101841501891613, + "model.layers.3.mlp.experts.6.down_proj.weight": 0.007568359375, + "model.layers.3.mlp.experts.6.gate_proj.weight": 0.0095796138048172, + "model.layers.3.mlp.experts.6.up_proj.weight": 0.0084519162774086, + "model.layers.3.mlp.experts.7.down_proj.weight": 0.0084402896463871, + "model.layers.3.mlp.experts.7.gate_proj.weight": 0.0099748894572258, + "model.layers.3.mlp.experts.7.up_proj.weight": 0.009626112878322601, + "model.layers.3.mlp.shared_experts.down_proj.weight": 0.008870445191860199, + "model.layers.3.mlp.shared_experts.gate_proj.weight": 0.0085914246737957, + "model.layers.3.mlp.shared_experts.up_proj.weight": 0.0083937868475914, + "model.layers.3.self_attn.kv_a_proj_with_mqa.weight": 0.0074753537774086, + "model.layers.3.self_attn.kv_b_proj.weight": 0.008475169539451599, + "model.layers.3.self_attn.o_proj.weight": 0.009765625, + "model.layers.3.self_attn.q_a_proj.weight": 0.0089401975274086, + "model.layers.3.self_attn.q_b_proj.weight": 0.0091262087225914 + }, + "encoded_formats": { + "model.layers.0.mlp.down_proj.weight": "modelopt-nvfp4", + "model.layers.0.mlp.gate_proj.weight": "modelopt-nvfp4", + "model.layers.0.mlp.up_proj.weight": "modelopt-nvfp4", + "model.layers.0.self_attn.indexer.weights_proj.weight": "modelopt-nvfp4", + "model.layers.0.self_attn.indexer.wk.weight": "modelopt-nvfp4", + "model.layers.0.self_attn.indexer.wq_b.weight": "modelopt-nvfp4", + "model.layers.0.self_attn.kv_a_proj_with_mqa.weight": "modelopt-nvfp4", + "model.layers.0.self_attn.kv_b_proj.weight": "modelopt-nvfp4", + "model.layers.0.self_attn.o_proj.weight": "modelopt-nvfp4", + "model.layers.0.self_attn.q_a_proj.weight": "modelopt-nvfp4", + "model.layers.0.self_attn.q_b_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.0.down_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.0.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.0.up_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.1.down_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.1.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.1.up_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.2.down_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.2.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.2.up_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.3.down_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.3.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.3.up_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.4.down_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.4.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.4.up_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.5.down_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.5.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.5.up_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.6.down_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.6.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.6.up_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.7.down_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.7.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.experts.7.up_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.shared_experts.down_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.shared_experts.gate_proj.weight": "modelopt-nvfp4", + "model.layers.1.mlp.shared_experts.up_proj.weight": "modelopt-nvfp4", + "model.layers.1.self_attn.kv_a_proj_with_mqa.weight": "modelopt-nvfp4", + "model.layers.1.self_attn.kv_b_proj.weight": "modelopt-nvfp4", + "model.layers.1.self_attn.o_proj.weight": "modelopt-nvfp4", + "model.layers.1.self_attn.q_a_proj.weight": "modelopt-nvfp4", + "model.layers.1.self_attn.q_b_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.0.down_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.0.gate_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.0.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.1.down_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.1.gate_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.1.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.2.down_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.2.gate_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.2.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.3.down_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.3.gate_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.3.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.4.down_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.4.gate_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.4.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.5.down_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.5.gate_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.5.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.6.down_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.6.gate_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.6.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.7.down_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.7.gate_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.experts.7.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.shared_experts.down_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.shared_experts.gate_proj.weight": "modelopt-nvfp4", + "model.layers.2.mlp.shared_experts.up_proj.weight": "modelopt-nvfp4", + "model.layers.2.self_attn.indexer.weights_proj.weight": "modelopt-nvfp4", + "model.layers.2.self_attn.indexer.wk.weight": "modelopt-nvfp4", + "model.layers.2.self_attn.indexer.wq_b.weight": "modelopt-nvfp4", + "model.layers.2.self_attn.kv_a_proj_with_mqa.weight": "modelopt-nvfp4", + "model.layers.2.self_attn.kv_b_proj.weight": "modelopt-nvfp4", + "model.layers.2.self_attn.o_proj.weight": "modelopt-nvfp4", + "model.layers.2.self_attn.q_a_proj.weight": "modelopt-nvfp4", + "model.layers.2.self_attn.q_b_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.0.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.0.gate_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.0.up_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.1.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.1.gate_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.1.up_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.2.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.2.gate_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.2.up_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.3.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.3.gate_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.3.up_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.4.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.4.gate_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.4.up_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.5.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.5.gate_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.5.up_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.6.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.6.gate_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.6.up_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.7.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.7.gate_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.experts.7.up_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.shared_experts.down_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.shared_experts.gate_proj.weight": "modelopt-nvfp4", + "model.layers.3.mlp.shared_experts.up_proj.weight": "modelopt-nvfp4", + "model.layers.3.self_attn.kv_a_proj_with_mqa.weight": "modelopt-nvfp4", + "model.layers.3.self_attn.kv_b_proj.weight": "modelopt-nvfp4", + "model.layers.3.self_attn.o_proj.weight": "modelopt-nvfp4", + "model.layers.3.self_attn.q_a_proj.weight": "modelopt-nvfp4", + "model.layers.3.self_attn.q_b_proj.weight": "modelopt-nvfp4" + }, + "source_sha256": { + "config.json": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "model.safetensors": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1" + }, + "output_sha256": { + "scope.json": "5e1d9091e1fe20d5f4e87d1f0d0c4deda441a099ba485105315c9f21a16cc822", + "model.safetensors.index.json": "2d67927b83c1396fade9bd12166cfc81edb525d62cb3378ae7b4b472c00a8b12", + "model.safetensors": "07cf6fbb7ad67852d9fc66c58d94e7d9e09dafc04f1358523a80cd1478c58004", + "config.json": "932f17d4ee472ee814a296cfa3b521bf0b9daefc57cef0f3406995fdb341e7fe", + "panel.binding.json": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "qfs-source.json": "624fc5b9568aa8bf12b1fc5cb3d54aef94d5e5ad72d73a55bd761dd6ca659cae", + "loader-verification.json": "086b7c5481cfbae5ee958b3bdeb85264128c59142fb005611bd837533fbdf7b0", + "tokenizer.json": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "cpu-reproduction-summary.json": "41f8263ddacbac1379c67637f83fdef2ed843ca4973179817531855939866a55", + "hub-checkpoint-verification.json": "3a4681f9c2876da6ae303592ede176ab17c6abdface107683fa2fe8386de7d36", + "tokenizer_config.json": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63", + "panel.sha256.json": "7fbfbaa8a3b1d7533177e1c2e774f5686e6a3f6b9564be7f2a99d0f66bff92fd", + "build-manifest.json": "57d74b2e6dcc8a789f51f86d251e51b2ec73c6772c329ad56f6132e08626eced", + "generation_config.json": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "cpu-comparison-receipt.json": "fcfcee1383dc0d50b42bbd97c9f2fc5ebe127c97cab791eeac01bf530d06f178", + "LICENSE": "6456969dd395bff476628945088b4cbd9d9c761b01a64e281c07b09daf9f94c3" + }, + "tool_sha256": "9fae546b8cb91df32468bcc7019c0bfbf10e41569526c7f55384f27afafe8699", + "reader_sha256": "588923f0a4700436221923c794a8c112971d9f08e75c746742b0f0ede7921682", + "reference": "compressed-tensors@0.18.0; DeepSeek-V4-Flash@60d8d70770c6776ff598c94bb586a859a38244f1/inference/kernel.py; nvidia/Qwen3.8-Flash-Next-NVFP4@fc694b54fb0174e0913e6adf86691ef85a4ead47/config.json+headers", + "verification": "independent CPU FP32 encoder reconstruction per encoded weight; no GPU parity" +} diff --git a/raw/candidates/modelopt-nvfp4/source/LICENSE b/raw/candidates/modelopt-nvfp4/source/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..71f32fb2284323cef90b3e784a7655747c8ae683 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/source/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Michel Belleau + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/raw/candidates/modelopt-nvfp4/source/README.md b/raw/candidates/modelopt-nvfp4/source/README.md new file mode 100644 index 0000000000000000000000000000000000000000..84524ad288d3abdc9da67201d2e6389b3968319b --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/source/README.md @@ -0,0 +1,202 @@ +--- +license: mit +library_name: transformers +pipeline_tag: text-generation +tags: + - glm_moe_dsa + - fixture + - testing + - random-initialization + - cpu + - bfloat16 + - reproducibility +datasets: + - malaiwah/glm-moe-dsa-tiny-cpu-repro-v1 +--- + +# Complete tiny GLM MoE DSA fixture — CPU, BF16, reproducible + +**A runnable random-init architecture fixture, not a language model quality claim.** +It is not trained, distilled, or a quantization of GLM/Fruit. Generated text is meaningless. + +This checkpoint is constructed and saved by the native Transformers +`GlmMoeDsaForCausalLM` implementation. It includes the complete MLA attention path, +DSA indexers, dense/MoE weights, router buffers, independent `lm_head`, and a working +byte-level tokenizer. There is no `trust_remote_code` requirement and no missing-weight +or mismatched-size override. + +Inspired by [GLM-5.2-SIQ-Fruit-bf16](https://huggingface.co/malaiwah/GLM-5.2-SIQ-Fruit-bf16)'s +architecture and dense/MoE plus full/shared-indexer schedules. **No Fruit or other GLM +weights were reused.** Fruit is about 10.1 GB; this checkpoint is **571,000 bytes**. + +## Geometry + +| Property | Value | +|---|---:| +| Trainable parameters | 277,824 | +| Additional stored router-buffer elements | 24, FP32 | +| Stored tensors | 139 (native saving expands fused experts into per-expert keys) | +| Decoder layers / hidden width | 4 / 64 | +| Dense/MoE schedule | dense, sparse, sparse, sparse | +| Routed experts / active experts / shared experts | 8 / 2 / 1 | +| Attention heads / key-value heads | 4 / 4 | +| Query LoRA rank / KV LoRA rank | 32 / 16 | +| QK non-RoPE / RoPE / value head dimensions | 8 / 8 / 16 | +| DSA indexer heads / head dimension / token top-k | 4 / 16 / 8 | +| DSA indexer schedule | full, shared, full, shared | +| Vocabulary | 260: 256 byte symbols + pad/BOS/EOS/unknown | +| Maximum context | 256 tokens | +| Output head | Complete, untied, 260 x 64 BF16 | +| Weight dtype | BF16; native router correction buffers retained FP32 | +| MTP | Intentionally absent: zero next-n-prediction layers, no orphan MTP tensors | + +The shared DSA layers correctly reuse the preceding full indexer's selection. +The published artifact is deliberately BF16, matching QFS's lossless BF16 hidden-capture +contract. Initialization starts in FP32 and is rounded during **artifact construction**, +not silently inside a capture labelled lossless. + +## What was actually verified + +Tested on Linux x86-64, Intel Xeon X5570, Python 3.12.14, **two CPU threads**, no CUDA, +with PyTorch **2.11.0+cpu** and Transformers **5.16.1**. The exact package environment is +in [requirements-cpu.txt](requirements-cpu.txt). + +- Native save/reload preserved every in-memory state tensor's value and dtype. +- QFS loading report: **zero missing, unexpected, mismatched, or conversion-error weights**. +- Two independent generator processes produced byte-identical checkpoint/config/tokenizer files. +- Tokenizer roundtrips include ASCII, accented text, and non-Latin UTF-8 text. +- A real four-by-64-token CPU forward produced finite, nonconstant logits of shape `[4,64,260]`. +- Greedy cached generation executed successfully on CPU. +- **Two fresh QFS capture processes** covered four 64-token windows, **252 scored positions**. +- Both complete captures passed QFS tensor verification and strict dataset validation. +- Their checkpoint, head, stack and capture-content digests agree. +- `fidelity-dataset compare --self-compare --force-compute` returned **exactly 0.0 nats**; + the saved tokenwise array contains **252 literal positive float64 zeros**. +- The comparison receipt passed strict validation. Its reported top-1 agreement is **1.0**. + +QFS retains its reproduction hash-proof result (`short_circuited: true`) even when +forced arithmetic runs. **`self_compare.force_compute_agreed: true` proves that the +independently executed numerical KL replay agreed with those zeros.** The receipt's +top-1 value comes from the identity proof, not a separate top-1 benchmark. + +This is a reproduction confirmation, **not registry admission, a qualified production +reference, or evidence of quantization quality**. The comparison receipt's generic +`determinism.run_count` is one comparison and its `identical_across_runs` field remains +null; the separate evidence summary records the two actual fresh capture processes +and equal tensor digests. No registry row was submitted. + +### Measured resource use + +| Operation | Measured result | +|---|---:| +| First fresh QFS capture, including process startup | 6.49 s | +| Second fresh QFS capture, including process startup | 6.43 s | +| Forced comparison command, including process startup | 3.73 s | +| Full two-capture + verification + comparison driver | 34.86 s | +| Peak capture process RSS | 367,374,336 bytes (about 350 MiB) | +| Materialized model parameters + runtime buffers | 555,776 bytes | + +These are local two-thread CPU observations, **not a benchmark of HF CPU Basic** or a +latency guarantee for another machine. They make this fixture a practical candidate +for a bounded CPU-only demo without downloading large GLM weights. + +## Immutable identities and evidence + +Checkpoint/config/tokenizer revision used for the captures: + +```text +45563636ef723acfb826755493447dc40c7a0c37 +``` + +Checkpoint file SHA-256: + +```text +9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1 +``` + +Both independent captures' content digest: + +```text +d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39 +``` + +- [Build manifest and all tensor hashes](build-manifest.json) +- [Clean loader, tokenizer, forward and generation evidence](loader-verification.json) +- [Fresh Hub-download byte verification](hub-checkpoint-verification.json) +- [CPU reproduction summary](cpu-reproduction-summary.json) +- [Forced zero-KL comparison receipt](cpu-comparison-receipt.json) +- [Full capture/replay evidence bundle](https://huggingface.co/datasets/malaiwah/glm-moe-dsa-tiny-cpu-repro-v1) +- [Pinned QFS source identity](qfs-source.json) + +The evidence dataset is a **bundle**: `first/` and `repeat/` are separate conformant +fidelity dataset trees, while `comparison/` contains the computed comparison. Download +the bundle and use these local subdirectories; its repository root is not itself a +single root-format fidelity dataset. Original sealed capture files are not rewritten. + +## Load and run on CPU + +Use a Python 3.12 Linux environment with the recorded CPU packages. At minimum: + +```bash +pip install 'torch==2.11.0+cpu' --index-url https://download.pytorch.org/whl/cpu +pip install 'transformers==5.16.1' 'tokenizers==0.23.2' 'safetensors==0.8.0' +``` + +```python +import torch +from transformers import AutoModelForCausalLM, AutoTokenizer + +repo = "malaiwah/glm-moe-dsa-tiny-random-bf16" +revision = "45563636ef723acfb826755493447dc40c7a0c37" +torch.set_num_threads(2) +tokenizer = AutoTokenizer.from_pretrained(repo, revision=revision, trust_remote_code=False) +model = AutoModelForCausalLM.from_pretrained( + repo, revision=revision, dtype=torch.bfloat16, trust_remote_code=False +).to("cpu").eval() +inputs = tokenizer("A tiny, complete CPU fixture.", return_tensors="pt", + return_token_type_ids=False) +with torch.inference_mode(): + logits = model(**inputs, use_cache=False).logits +print(logits.shape, torch.isfinite(logits).all().item()) +``` + +## Reproduce the full QFS zero-KL check + +In a fresh Python 3.12 Linux environment, install the HF CLI if needed, then: + +```bash +pip install 'huggingface_hub==1.30.0' +hf download malaiwah/glm-moe-dsa-tiny-random-bf16 \ + --revision 45563636ef723acfb826755493447dc40c7a0c37 --local-dir tiny +pip install -r tiny/requirements-cpu.txt + +git clone https://github.com/malaiwah/quant-fidelity-suite.git qfs +git -C qfs checkout a903cddb078c2eda8c65d6e6c875a09ac932df49 + +python tiny/build_panel.py --model-dir tiny \ + --model-repository malaiwah/glm-moe-dsa-tiny-random-bf16 \ + --model-revision 45563636ef723acfb826755493447dc40c7a0c37 \ + --out tiny-panel --qfs-root qfs + +python tiny/verify_cpu.py --model-dir tiny \ + --model-repository malaiwah/glm-moe-dsa-tiny-random-bf16 \ + --model-revision 45563636ef723acfb826755493447dc40c7a0c37 \ + --panel-dir tiny-panel --out cpu-proof --qfs-root qfs +``` + +Both tools refuse existing output directories. No GPU, cloud API, registry changes, +missing-weight exception, or disabled sanity probe is used. The lane is the schema's +`other`, explicitly disclosed as CPU; it is never mislabelled `local-cuda-budget`. +The synthetic panel is independent of the large-vocabulary GLM benchmark panels and +cannot be used to rank real GLM quantizations. + +To regenerate the native checkpoint itself with the recorded build versions: + +```bash +python tiny/build_fixture.py --out regenerated-tiny +``` + +The fixed seed is **20260907**. The generator checks native save/reload equality; +[build-manifest.json](build-manifest.json) provides the expected file/tensor hashes. +Byte-identical generation was measured in this pinned CPU environment, not asserted +across arbitrary future PyTorch releases or hardware architectures. diff --git a/raw/candidates/modelopt-nvfp4/source/build-manifest.json b/raw/candidates/modelopt-nvfp4/source/build-manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..539ac3c8e8430caad8e5c81ca4d23dce391cac14 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/source/build-manifest.json @@ -0,0 +1,1561 @@ +{ + "architecture_inspiration": "GLM-5.2-SIQ-Fruit-bf16 geometry and dense/MoE plus full/shared DSA schedules; no Fruit or GLM model weights reused.", + "files": { + "config.json": { + "bytes": 1479, + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + "generation_config.json": { + "bytes": 216, + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + "model.safetensors": { + "bytes": 571000, + "sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1" + }, + "tokenizer.json": { + "bytes": 6763, + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + "tokenizer_config.json": { + "bytes": 236, + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + }, + "generation": "Native GlmMoeDsaForCausalLM random initialization in FP32, rounded to the published BF16 artifact; native router correction buffers retained FP32.", + "generator_sha256": "19c3489f1bc7e8e9323cb26afbead562816a6918d6823af252eb6d04dff8e81e", + "limitations": [ + "Random initialization; not trained or distilled.", + "Not a quantization or behavioral approximation of a released GLM model.", + "MTP intentionally absent (zero next-n-prediction layers); no unmatched MTP tensors.", + "This build manifest describes generated bytes, not proof of clean loading or capture; see separately measured verification evidence." + ], + "parameter_count": 277824, + "schema": "malaiwah.glm-moe-dsa-tiny-build.v1", + "seed": 20260907, + "stored_elements": 277848, + "tensor_count": 139, + "tensors": [ + { + "bytes": 33280, + "dtype": "torch.bfloat16", + "elements": 16640, + "name": "lm_head.weight", + "sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "shape": [ + 260, + 64 + ] + }, + { + "bytes": 33280, + "dtype": "torch.bfloat16", + "elements": 16640, + "name": "model.embed_tokens.weight", + "sha256": "18df1b3a5f263a31f5bd4225c3c4629573b75e47b7e28b6e73501586bb47d6f1", + "shape": [ + 260, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.0.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 16384, + "dtype": "torch.bfloat16", + "elements": 8192, + "name": "model.layers.0.mlp.down_proj.weight", + "sha256": "101a9db78e4e21058dcb6f5240e751bcaf3bd662b98696a63a719f86ecabf787", + "shape": [ + 64, + 128 + ] + }, + { + "bytes": 16384, + "dtype": "torch.bfloat16", + "elements": 8192, + "name": "model.layers.0.mlp.gate_proj.weight", + "sha256": "ef5262b354f74dce3a9dc4c3134e4db8cbf63f03ed8a1cd78ebb3e9a05af97cc", + "shape": [ + 128, + 64 + ] + }, + { + "bytes": 16384, + "dtype": "torch.bfloat16", + "elements": 8192, + "name": "model.layers.0.mlp.up_proj.weight", + "sha256": "359b4dac1da3e3956583050af84147aef2f41b8680a85b32083ffd0e1847d997", + "shape": [ + 128, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.0.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.0.self_attn.indexer.k_norm.bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 16 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.0.self_attn.indexer.k_norm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 512, + "dtype": "torch.bfloat16", + "elements": 256, + "name": "model.layers.0.self_attn.indexer.weights_proj.weight", + "sha256": "50ca7a10fe9a0556d8c3ad38bd3f715ee6c6e13084b4cb6b51b2ef78f57c53b2", + "shape": [ + 4, + 64 + ] + }, + { + "bytes": 2048, + "dtype": "torch.bfloat16", + "elements": 1024, + "name": "model.layers.0.self_attn.indexer.wk.weight", + "sha256": "f724d0b2c09ba9ae41cfc3fbe4e458bd7f644e5f0fb8c1446e19b3cf8c650274", + "shape": [ + 16, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.0.self_attn.indexer.wq_b.weight", + "sha256": "048349f93320b7625130fa5abc86dbcc89715b9f02d6853284563e765eb7bc11", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.0.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.0.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "5ad58e7c4515d8c4e84ecf10ecfa7aacb3c39ee1d6a3219307036bd8b59f529d", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.0.self_attn.kv_b_proj.weight", + "sha256": "9a8cfdd6e51c3868d27f147509d24549480e70f278758a8c16adf1ea5c197938", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.0.self_attn.o_proj.weight", + "sha256": "734b1edea5c19958ab29dfba4314ab5a5a25280be3db3de20b82b2e7c78c35ff", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.0.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.0.self_attn.q_a_proj.weight", + "sha256": "6d6e018ec4d4251755a002469f0778accef3b7628062f82a5d292d4130fd4c85", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.0.self_attn.q_b_proj.weight", + "sha256": "28ef2f379f06054843ff97f99d63f515a2f583059dd49fd894a53d04733f0650", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.1.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.0.down_proj.weight", + "sha256": "a0378aa3bb69ed49af25a51d57476ef63ccf5dc98bc4d3008d28660e16f82492", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.0.gate_proj.weight", + "sha256": "e6c7b0ce29c7e6ea16adfd8423cd9a8a27f1be217a2061a635468c9e5603439c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.0.up_proj.weight", + "sha256": "528f777edc3fc406c76dc1e150a648c23009c701134a3a86dcbdeb15f8ddc4bb", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.1.down_proj.weight", + "sha256": "c966c5eed64d8bb32ff5cf25587fc4eb714b7536b6f670725efb136acc6ca26c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.1.gate_proj.weight", + "sha256": "e55ceb89e6891b34fb67fe5c99b529a1cab9729bea2f6ef08be6af7eefcf6c2e", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.1.up_proj.weight", + "sha256": "46b43c2f3a025bab46be05795bb60916e592bb58d4fdf2a18d2e88d37a7a4fb8", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.2.down_proj.weight", + "sha256": "a649be4fd07f95d770fbe14e87561a13f62f155d2053b8a35fa6962b5d5e8c8d", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.2.gate_proj.weight", + "sha256": "5560e590344e57ff54425f4aa6c07edaaade8c73343e32c27199f1c0dc61fe51", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.2.up_proj.weight", + "sha256": "35a639103a8a914203b4dde3f87d197515879ae6ca72557cde8ea9dea6e6e0d2", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.3.down_proj.weight", + "sha256": "0969db499dfe821348b3c06873d36635f7216f1f595968ad43ae984b57565205", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.3.gate_proj.weight", + "sha256": "75c5c77c39a77a4a6dbe7b601a88814bca9cae6fcde0069ff2ca86352e6c13e7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.3.up_proj.weight", + "sha256": "241533cb545cfed7685091b023213c9d530cb54431a712eba7bf3aaebdae3b53", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.4.down_proj.weight", + "sha256": "ca1273d291e431a10b8d8c2170031b29440c2bec8bc1d7f46353990c7fe1a03f", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.4.gate_proj.weight", + "sha256": "69dc9149cbfd65fb10bd6c11f99357d279d471e5874cf19dbef7cfd8ee4d796c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.4.up_proj.weight", + "sha256": "81cb04732e3cc53acb1152c7fc06a6399af18a5f282762cb72abb56b1e6b7c6f", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.5.down_proj.weight", + "sha256": "ebd8e01f9c2daf657e915575afb3ff5ba261a2a83c25c9c50818319dd587a2f2", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.5.gate_proj.weight", + "sha256": "bc70a7d1a5263ca17d00766bb2dc48e1debb815344150741e55dea48af4d75c0", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.5.up_proj.weight", + "sha256": "f84a95d64728067676d4f7b61ac4a589fa11e45226a8996a4719d65f0b018dbf", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.6.down_proj.weight", + "sha256": "00535633e5d98b7a527cc1198d572a9104405e2aff7ee303ae60195654fb24c2", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.6.gate_proj.weight", + "sha256": "2bb299a5e306108c7af11aa5c6114abeb4d06bde9001e6f7644e0d9dca184dc5", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.6.up_proj.weight", + "sha256": "72df8a498b866a242abc9383b16c5b4428feadab02c7f274afa28653e8586107", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.7.down_proj.weight", + "sha256": "90331ab3da1e867c32d3db1aac94c69c86349dbb539400ed9e0c19c148bf5e43", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.7.gate_proj.weight", + "sha256": "576a9df3d1d72f7323e8a8490118821d826f50c9403ca7ecbe196277e62c7730", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.experts.7.up_proj.weight", + "sha256": "3869533066e5bca84402355c6b80b177424f2d79d2b97cbb9cff30eee748135f", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.float32", + "elements": 8, + "name": "model.layers.1.mlp.gate.e_score_correction_bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 8 + ] + }, + { + "bytes": 1024, + "dtype": "torch.bfloat16", + "elements": 512, + "name": "model.layers.1.mlp.gate.weight", + "sha256": "7d1dbc5cc90900cdc1f9d4a241c8b62d0ad50de09231f9f036cce33982cfdfe7", + "shape": [ + 8, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.shared_experts.down_proj.weight", + "sha256": "eb5297f619dfdfb40419b3330406e8ff43cb0fe35797911f2de6ebff4b95690a", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.shared_experts.gate_proj.weight", + "sha256": "eeeff2280eef91eac1215b28717f2b7fdee09fdbfd484ff44855e7e7cdd11718", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.mlp.shared_experts.up_proj.weight", + "sha256": "dab5aeab83d842104e1c5557b9b6d6cb5fe519284b909e8c0c975c752dc92d41", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.1.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.1.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.1.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "bff5998ab14190d56392c70e92927904d84a2b9d04ee222967d774a5bb5eecc4", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.1.self_attn.kv_b_proj.weight", + "sha256": "876302ef3f8bba74a997f973913ca4b802aa488d27b46747c470062c9a7ebee5", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.1.self_attn.o_proj.weight", + "sha256": "ecda88672dc8fbc3bac348fa6118010e51b170d8fe3596a811bc9aa95f71915c", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.1.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.self_attn.q_a_proj.weight", + "sha256": "29fc979642704e621b0b6b59a24c13d6900782bfa9655ea9a3311c1d4c69770a", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.1.self_attn.q_b_proj.weight", + "sha256": "01bae246d61c4d08e751e42e6a03315b55266ae46bd15b34bd343f606a538349", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.2.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.0.down_proj.weight", + "sha256": "8c1c19d08541dc9251736b480f53cfefd21bfbcb0b4e9f725dc66e6c52d7705c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.0.gate_proj.weight", + "sha256": "8c326913b2ef159b507b584c1ae018619573a09b6f41ab687df629d3685884c4", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.0.up_proj.weight", + "sha256": "8611bc004f735fbc1c14a9c9c23f4150c7e754127e44926a44efd0b767a653ed", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.1.down_proj.weight", + "sha256": "1d4d668c4c8183e5991eefe780a138eda70578a4740c07df5b386f233cb4e5c3", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.1.gate_proj.weight", + "sha256": "21224f6173f4785ff6252dd0c1f7a6937b36bbd5bc1c20d25feecc85d6d25f3e", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.1.up_proj.weight", + "sha256": "05542672d0174f9ddfee4bd385b56455c004532da88bf34363b1e543948bf899", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.2.down_proj.weight", + "sha256": "7330dee9a6a416e9922f61d10ee0507584e007cbdd349131471b43a745b6fed8", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.2.gate_proj.weight", + "sha256": "eca5904e6634e97ca89e7dfb1f12774f78adb33b78256136e7e8ee522af92d96", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.2.up_proj.weight", + "sha256": "5a90748752e46844a0cf0efd84c16ec2db25315ffa7a13b9c4bff2697d00bbf6", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.3.down_proj.weight", + "sha256": "a42569462225d60158dfaf24406463f135b632fe258e66ae2e521efed502a37c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.3.gate_proj.weight", + "sha256": "8cf448df350984fe0429a1ca3b2081315b594e50ce85fbc2e9f63eafb8a896b7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.3.up_proj.weight", + "sha256": "54a1269ba638d42c7d6d3926826b04d52310c82804fddcd73c253680a4270032", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.4.down_proj.weight", + "sha256": "5a236edfdc8fc79f687cec866d13724515b8f26465dca2ffde051d0870d5d0ac", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.4.gate_proj.weight", + "sha256": "6c18140a11c9986f99b7c269da01a8f69f1b5215c41be1801d6900eb511bdc76", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.4.up_proj.weight", + "sha256": "7b964f5c207a6bbeaa589a6c07f9665967aca4e7c57148190ed6a6f12e0ca572", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.5.down_proj.weight", + "sha256": "74c2633e7d3b0bf844d3e3812533774fc09b6552435e778e68b442ad161c0985", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.5.gate_proj.weight", + "sha256": "6177166c1bc51e03fde63b60d85347f5a5412446df5b4dd893817d18fcf0d56c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.5.up_proj.weight", + "sha256": "7bb8e1f65a918589a1593926dc93bf3fa1329f5d31f16266c3ad6fe0fd390d47", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.6.down_proj.weight", + "sha256": "af74e303b86b1aec96fd69b64d39848d7d08f255822739cf7d5f4456de67f010", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.6.gate_proj.weight", + "sha256": "c4fc94863e17270bf8cb5a18d3a125bea82d04bfb38457fd27896a00ddeea056", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.6.up_proj.weight", + "sha256": "4e92bebe11c518a225d75d4d7de7b85f9a82baad7a961ac090dd7343a612b577", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.7.down_proj.weight", + "sha256": "8971d6a869ba59445fe28163bd73c74c8338e0b8b675f008277b5a8973967bb2", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.7.gate_proj.weight", + "sha256": "3f90ff90c18d50349a50d11c472d48c6b297496ba5bedfe4ff0da257e1e2fdef", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.experts.7.up_proj.weight", + "sha256": "5a2fcecdbb84a9138b4dd32da15793393aeaee1d00da95ed3d55803b1f45cc86", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.float32", + "elements": 8, + "name": "model.layers.2.mlp.gate.e_score_correction_bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 8 + ] + }, + { + "bytes": 1024, + "dtype": "torch.bfloat16", + "elements": 512, + "name": "model.layers.2.mlp.gate.weight", + "sha256": "aa35eb60ee6dd8e32728c95210b15016120675b111542f36ee1b1cca64668f9d", + "shape": [ + 8, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.shared_experts.down_proj.weight", + "sha256": "e8a1e6e8db3b1996aad9cd457ae20aa5aaac876d400fd6e8d764f543ff7833b9", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.shared_experts.gate_proj.weight", + "sha256": "c5b456aab9a02d3828987060b24d24c07e7b611d3036f0d5c28662c922d1238d", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.mlp.shared_experts.up_proj.weight", + "sha256": "6a84e814bd21fcc17878151b94508853dd70099787ef5303cdc06f90b6cd7092", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.2.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.2.self_attn.indexer.k_norm.bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 16 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.2.self_attn.indexer.k_norm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 512, + "dtype": "torch.bfloat16", + "elements": 256, + "name": "model.layers.2.self_attn.indexer.weights_proj.weight", + "sha256": "d65c6e5c3f34fcad47b7137c46dd3bcd6d5cf24ce508df7fad9d20788d3a18b8", + "shape": [ + 4, + 64 + ] + }, + { + "bytes": 2048, + "dtype": "torch.bfloat16", + "elements": 1024, + "name": "model.layers.2.self_attn.indexer.wk.weight", + "sha256": "917ff454cb253fa0e5d3d68bf15e716401bb928fbd7cd260a348afec25b1b2c8", + "shape": [ + 16, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.self_attn.indexer.wq_b.weight", + "sha256": "3fe5b407fe2d74a0dda78b6cb7ae3f65066a781fd5f81971b83be600fc911d14", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.2.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.2.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "26cecf47e8fb14a837f760549a9b9dd8589c37dc76870f8b115d4ab634b853ab", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.2.self_attn.kv_b_proj.weight", + "sha256": "23447f5f72c55b0cd7acd571ff1317c16c8097e9f0de4cc9b66101b51f7988c1", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.2.self_attn.o_proj.weight", + "sha256": "a1a0c84b3214c9b7b00c438754280833964cdc719aadeff64358b3d09b2063d8", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.2.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.self_attn.q_a_proj.weight", + "sha256": "3eda4fc6a047b282d63ad2884d870ee8150a99f3c71d21031ea71e749cf39815", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.2.self_attn.q_b_proj.weight", + "sha256": "58ecb919757c3c93d6a43b9344236d9abd32870e68907f37cb8db779d2c93fff", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.3.input_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.0.down_proj.weight", + "sha256": "e8c77c987baa36019ce1adf05e02e2a31395286e584428b2049e06331848c216", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.0.gate_proj.weight", + "sha256": "69871151865d8a23e2cc39b9fe5da60eb4f41cb6c053520f29d7c7b58e6fa5e0", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.0.up_proj.weight", + "sha256": "12df1ea42b96e959785c09427c3ca3bcdc53aa7942d15187c7b1e19bdd66d08a", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.1.down_proj.weight", + "sha256": "5feaa5de7da59348b465458b8aff5373b11dae8b5150f8e7bb8015acc172e3ff", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.1.gate_proj.weight", + "sha256": "e907e6e36b7266d56e190c1e56551e0a40d64741ce668328d898c17b488ec6c9", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.1.up_proj.weight", + "sha256": "c0062ef6004073cbabf3098703b5f565f0e973e094d90c3eba36c7be471f947e", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.2.down_proj.weight", + "sha256": "efec1e8a6a5e12a6db226699e10a6d346fa95c453009f148fe304d378567f5fe", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.2.gate_proj.weight", + "sha256": "7722cc87a7696f53e7f1e0d741230a7db18d2c324f7faec742a9621c75189cb7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.2.up_proj.weight", + "sha256": "5917df5932d0ce4854458ce357a8a2c3384bc463531996875d1c68c6ea17734c", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.3.down_proj.weight", + "sha256": "fd331dc77911f8d80ddfdee938993a08b3715d06767901879c5a55700dbb8961", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.3.gate_proj.weight", + "sha256": "1e8aa3749cdc3d21baf7108c47bb69ad4a532c1f41c0556ca8d68ca2c226a7a8", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.3.up_proj.weight", + "sha256": "858e72360951a5073d117a75b2cd759bc3503c6c270388b30fe73d7554f54dae", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.4.down_proj.weight", + "sha256": "b80cf998a1db7569ca4600388bbe4c6d20bd7fe7209c4e37b5de015041d01423", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.4.gate_proj.weight", + "sha256": "b39a0f5b9cd6f9175e7fa29b342772476caf8a76dad1c34d88075988c1894853", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.4.up_proj.weight", + "sha256": "cef4d7b5fb77e750e91c17cae1622a6362ba204b1b30bf5ed7b65f9e6ed15ff1", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.5.down_proj.weight", + "sha256": "65a04840ec88842630cc6f120899a3bfa6151990d7411bfe44839727648e4d03", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.5.gate_proj.weight", + "sha256": "101836900c549af917f8392a6b1428e2f14e4e1f1ef0fdd9b04e79b98c1c3d02", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.5.up_proj.weight", + "sha256": "4fc8edda4b1a92a43be268a8b249274dd5f4370fd6ea6a3134b8c2c4cf730d95", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.6.down_proj.weight", + "sha256": "fd3a10e1464c20bf5e575c105f39882bcbddcab892ef36f24e5a852d597ee7ef", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.6.gate_proj.weight", + "sha256": "8211aaeed6f1ea2711aa1865309d2d36742c0b41021eea1e00fcac45dc353b4b", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.6.up_proj.weight", + "sha256": "ec4f5d1acc5d045de6ae4106bc8f52d17d64ac355c910f12fac8b1b0b573296d", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.7.down_proj.weight", + "sha256": "03c257936ec78df3f941fe0ca4ce5aad636654cf2a351b64515ac07ad8871cae", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.7.gate_proj.weight", + "sha256": "67c1e28fd0a028104b9c76279a3c473f50452633c8a4feabda637e5f5b71f797", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.experts.7.up_proj.weight", + "sha256": "1b18f8b452b71ca57fec09892a48df2ee2108067f97f62b76a3817c9bea91708", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.float32", + "elements": 8, + "name": "model.layers.3.mlp.gate.e_score_correction_bias", + "sha256": "66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", + "shape": [ + 8 + ] + }, + { + "bytes": 1024, + "dtype": "torch.bfloat16", + "elements": 512, + "name": "model.layers.3.mlp.gate.weight", + "sha256": "7e86bda3f7704f19dc2a3f6a0ca22b0df554723adf0cf3add837a1e497ad4d3a", + "shape": [ + 8, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.shared_experts.down_proj.weight", + "sha256": "110ad4d8dd59a5ec2b0d4c2e0a79d022bcdba240a4998ff84ad2590dd32fce2c", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.shared_experts.gate_proj.weight", + "sha256": "cca5d02ac9eccab3ee8be47f55ef4d59750dd311800e25c22cc3f22b437ffd8b", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.mlp.shared_experts.up_proj.weight", + "sha256": "c8fe3987299d1526946a87facc4d3f99300fafbac552471ed826454c41ed31e5", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.layers.3.post_attention_layernorm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + }, + { + "bytes": 32, + "dtype": "torch.bfloat16", + "elements": 16, + "name": "model.layers.3.self_attn.kv_a_layernorm.weight", + "sha256": "a214ae5c03e0c56b5540a2f2e924a30f3a059d4d38c2b8c62b9182a78e8afb24", + "shape": [ + 16 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.3.self_attn.kv_a_proj_with_mqa.weight", + "sha256": "5c230cafd4add95096f53702bab8ef1673993cca9433de8c874638958a61995a", + "shape": [ + 24, + 64 + ] + }, + { + "bytes": 3072, + "dtype": "torch.bfloat16", + "elements": 1536, + "name": "model.layers.3.self_attn.kv_b_proj.weight", + "sha256": "ff432280fe1fbbc2a5b7fee7fb18f6de59d675d2d7d0eec0d769a5fd012699a9", + "shape": [ + 96, + 16 + ] + }, + { + "bytes": 8192, + "dtype": "torch.bfloat16", + "elements": 4096, + "name": "model.layers.3.self_attn.o_proj.weight", + "sha256": "59e2e2ee8f9cba29e9cf3e6098539ddca5811d35d3df3c860488f348d6be9584", + "shape": [ + 64, + 64 + ] + }, + { + "bytes": 64, + "dtype": "torch.bfloat16", + "elements": 32, + "name": "model.layers.3.self_attn.q_a_layernorm.weight", + "sha256": "26ab507cf4bbb401acc7bebf555f8cd2130512b6c6ba2eb38e94aafcaeae114a", + "shape": [ + 32 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.self_attn.q_a_proj.weight", + "sha256": "172aae8ff1a79376bf65182f5e92c06da2f9b307c15f214a20597491729aa0d7", + "shape": [ + 32, + 64 + ] + }, + { + "bytes": 4096, + "dtype": "torch.bfloat16", + "elements": 2048, + "name": "model.layers.3.self_attn.q_b_proj.weight", + "sha256": "5d917d8c510906982c609808f1eb0d16da467976550e3a063637f1fde013cbdb", + "shape": [ + 64, + 32 + ] + }, + { + "bytes": 128, + "dtype": "torch.bfloat16", + "elements": 64, + "name": "model.norm.weight", + "sha256": "e72710531b01d91ee76a2457cdc9c6c89a197db47da8ebd4ae672e13ddd668cd", + "shape": [ + 64 + ] + } + ], + "tokenizer": { + "kind": "byte-level BPE without merges", + "special_token_ids": { + "": 1, + "": 2, + "": 0, + "": 3 + }, + "vocab_size": 260 + }, + "versions": { + "safetensors": "0.8.0", + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "transformers": "5.16.1" + } +} diff --git a/raw/candidates/modelopt-nvfp4/source/build_fixture.py b/raw/candidates/modelopt-nvfp4/source/build_fixture.py new file mode 100644 index 0000000000000000000000000000000000000000..c86f3466f6c2ac6df7f31bb4ac5ca8bbcaeebf2c --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/source/build_fixture.py @@ -0,0 +1,145 @@ +#!/usr/bin/env python3 +"""Build a complete, untrained GLM MoE DSA checkpoint for CPU pipeline checks. + +No source model weights, remote Python code, training data or paid compute are used. +Reproducibility is asserted only for the recorded dependency versions on CPU. +""" +from __future__ import annotations + +import argparse +import hashlib +import json +from pathlib import Path +import shutil + +SEED = 20260907 +SPECIAL_TOKENS = ["", "", "", ""] +VERSIONS = {"torch": "2.11.0+cpu", "transformers": "5.16.1", "tokenizers": "0.23.2", "safetensors": "0.8.0"} + + +def write_json(path, value): + path.write_text(json.dumps(value, sort_keys=True, indent=2, ensure_ascii=False, allow_nan=False) + "\n", encoding="utf-8") + + +def build(destination): + import torch + import transformers + import tokenizers + import safetensors + from tokenizers import Tokenizer, decoders, models, pre_tokenizers, processors + from transformers import GlmMoeDsaConfig, GlmMoeDsaForCausalLM, PreTrainedTokenizerFast + + observed = {"torch": torch.__version__, "transformers": transformers.__version__, + "tokenizers": tokenizers.__version__, "safetensors": safetensors.__version__} + if observed != VERSIONS: + raise ValueError("Use the recorded CPU build environment: expected %s; observed %s" % (VERSIONS, observed)) + if destination.exists(): + raise ValueError("Refusing to overwrite an existing destination: %s" % destination) + destination.mkdir(parents=True) + torch.set_num_threads(2) + torch.set_num_interop_threads(1) + torch.manual_seed(SEED) + torch.use_deterministic_algorithms(True) + + alphabet = sorted(pre_tokenizers.ByteLevel.alphabet()) + if len(alphabet) != 256: + raise ValueError("The byte alphabet must contain exactly 256 symbols") + vocabulary = {token: index for index, token in enumerate(SPECIAL_TOKENS + alphabet)} + backend = Tokenizer(models.BPE(vocab=vocabulary, merges=[], unk_token="")) + backend.pre_tokenizer = pre_tokenizers.ByteLevel(add_prefix_space=False, use_regex=False) + backend.decoder = decoders.ByteLevel() + backend.post_processor = processors.TemplateProcessing( + single=" $A ", pair=" $A $B:1 :1", + special_tokens=[("", 1), ("", 2)]) + tokenizer = PreTrainedTokenizerFast( + tokenizer_object=backend, pad_token="", bos_token="", + eos_token="", unk_token="", model_max_length=256, + clean_up_tokenization_spaces=False) + tokenizer.save_pretrained(destination) + + config = GlmMoeDsaConfig( + vocab_size=len(tokenizer), hidden_size=64, intermediate_size=128, + moe_intermediate_size=32, num_hidden_layers=4, + num_attention_heads=4, num_key_value_heads=4, + n_shared_experts=1, n_routed_experts=8, num_experts_per_tok=2, + n_group=1, topk_group=1, norm_topk_prob=True, routed_scaling_factor=2.5, + q_lora_rank=32, kv_lora_rank=16, qk_nope_head_dim=8, + qk_rope_head_dim=8, v_head_dim=16, + index_n_heads=4, index_head_dim=16, index_topk=8, + indexer_types=["full", "shared", "full", "shared"], + first_k_dense_replace=1, mlp_layer_types=["dense", "sparse", "sparse", "sparse"], + num_nextn_predict_layers=0, max_position_embeddings=256, + rope_parameters={"rope_type": "default", "rope_theta": 10000.0}, + pad_token_id=0, bos_token_id=1, eos_token_id=2, tie_word_embeddings=False, + attention_bias=False, attention_dropout=0.0, mlp_bias=False, + initializer_range=0.02, rms_norm_eps=1e-5, dtype="bfloat16", + ) + # Construct the native class, never hand-author a subset of state_dict keys. + # Initialize in FP32, then deliberately define the published artifact in BF16. + model = GlmMoeDsaForCausalLM(config).to(device="cpu", dtype=torch.bfloat16).eval() + # The native BF16 loader strictly retains router correction buffers in FP32. + # Store that exception explicitly; the rest reloads without dtype changes. + for module in model.modules(): + if hasattr(module, "e_score_correction_bias"): + module.e_score_correction_bias = module.e_score_correction_bias.float() + if model.get_output_embeddings().weight.data_ptr() == model.get_input_embeddings().weight.data_ptr(): + raise ValueError("Fixture must contain a complete, independent output head") + for name, tensor in model.state_dict().items(): + if tensor.is_floating_point() and not torch.isfinite(tensor).all(): + raise ValueError("Non-finite initialized tensor: " + name) + model.save_pretrained(destination, safe_serialization=True, max_shard_size="10MB") + + from safetensors import safe_open + tensors = [] + with safe_open(destination / "model.safetensors", framework="pt", device="cpu") as saved: + for name in sorted(saved.keys()): + tensor = saved.get_tensor(name) + raw = tensor.contiguous().view(torch.uint8).numpy().tobytes() + tensors.append({"name": name, "shape": list(tensor.shape), "dtype": str(tensor.dtype), + "elements": tensor.numel(), "bytes": len(raw), + "sha256": hashlib.sha256(raw).hexdigest()}) + # Native saving expands fused expert tensors into canonical per-expert + # checkpoint keys. Verify their semantic roundtrip, not name equality between + # the storage representation and the in-memory fused representation. + reloaded = transformers.AutoModelForCausalLM.from_pretrained( + destination, dtype=torch.bfloat16, local_files_only=True, trust_remote_code=False) + expected_state, observed_state = model.state_dict(), reloaded.state_dict() + if expected_state.keys() != observed_state.keys(): + raise ValueError("Native state keys changed across save/reload") + for name, tensor in expected_state.items(): + if tensor.dtype != observed_state[name].dtype or not torch.equal(tensor, observed_state[name]): + raise ValueError("Tensor changed across native save/reload: " + name) + files = {} + for name in ("config.json", "generation_config.json", "model.safetensors", "tokenizer.json", "tokenizer_config.json"): + raw = (destination / name).read_bytes() + files[name] = {"bytes": len(raw), "sha256": hashlib.sha256(raw).hexdigest()} + manifest = { + "schema": "malaiwah.glm-moe-dsa-tiny-build.v1", + "seed": SEED, "versions": observed, + "generator_sha256": hashlib.sha256(Path(__file__).read_bytes()).hexdigest(), + "generation": "Native GlmMoeDsaForCausalLM random initialization in FP32, rounded to the published BF16 artifact; native router correction buffers retained FP32.", + "parameter_count": sum(p.numel() for p in model.parameters()), + "tensor_count": len(tensors), "stored_elements": sum(t["elements"] for t in tensors), + "files": files, "tensors": tensors, + "tokenizer": {"kind": "byte-level BPE without merges", "vocab_size": len(tokenizer), + "special_token_ids": {token: tokenizer.convert_tokens_to_ids(token) for token in SPECIAL_TOKENS}}, + "architecture_inspiration": "GLM-5.2-SIQ-Fruit-bf16 geometry and dense/MoE plus full/shared DSA schedules; no Fruit or GLM model weights reused.", + "limitations": ["Random initialization; not trained or distilled.", "Not a quantization or behavioral approximation of a released GLM model.", + "MTP intentionally absent (zero next-n-prediction layers); no unmatched MTP tensors.", + "This build manifest describes generated bytes, not proof of clean loading or capture; see separately measured verification evidence."], + } + write_json(destination / "build-manifest.json", manifest) + shutil.copyfile(__file__, destination / "build_fixture.py") + print(json.dumps({"destination": str(destination), "parameter_count": manifest["parameter_count"], + "tensor_count": len(tensors), "weight_file": files["model.safetensors"]}, indent=2)) + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--out", required=True, type=Path) + args = parser.parse_args() + build(args.out) + + +if __name__ == "__main__": + main() diff --git a/raw/candidates/modelopt-nvfp4/source/build_panel.py b/raw/candidates/modelopt-nvfp4/source/build_panel.py new file mode 100644 index 0000000000000000000000000000000000000000..258be1a623b3009940fb0b1417c5be9ea02904be --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/source/build_panel.py @@ -0,0 +1,232 @@ +#!/usr/bin/env python3 +"""Build the tiny GLM-MoE-DSA synthetic CPU smoke panel, not a benchmark. + +The QFS panel directory has an exact sealed file closure. Its resolved binding +and SHA report are therefore written beside --out, never inside it. The caller +must supply the genuine published model commit; this offline builder verifies +local bytes, not their remote availability at that commit. +""" +from __future__ import annotations + +import argparse +import importlib.util +import json +from pathlib import Path +import re +import sys + + +PANEL_ID = "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1" +PANEL_NAME = "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)" +CONTEXT_LENGTH = 64 +VOCAB_SIZE = 260 +ARTIFACT_EPOCH = "2026-09-07T00:00:00Z" +# Authored synthetic inputs, embedded verbatim in the receipt for reconstruction. +TEXTS = ( + ("garden", "The small garden has red flowers, green leaves, and a stone path. " + "A gentle breeze moves the branches while a robin sings near the gate."), + ("arithmetic", "A shelf holds three blue boxes and five red boxes. There are eight " + "boxes in total. Move two boxes to the desk and count the six boxes remaining."), + ("code", "def add_values(left, right):\n return left + right\n\n" + "result = add_values(7, 9)\nprint(result)\n" + "# This readable snippet is synthetic input, not a coding benchmark.\n"), + ("instructions", "First place a clean cup on the table. Next pour cool water into " + "the cup. Finally put the bottle away and write a short note about the steps."), +) +TOKENIZER_FILES = ( + "config.json", "generation_config.json", "tokenizer.json", "tokenizer_config.json", + "special_tokens_map.json", "added_tokens.json", "vocab.json", "merges.txt", + "tokenizer.model", "spiece.model", "sentencepiece.bpe.model", "chat_template.jinja", +) + + +def write_json(path: Path, value: object) -> None: + with path.open("x", encoding="utf-8", newline="\n") as handle: + handle.write(json.dumps(value, indent=2, sort_keys=True, + ensure_ascii=False, allow_nan=False) + "\n") + + +def main(argv: list[str] | None = None) -> int: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--model-dir", required=True, type=Path) + parser.add_argument("--model-repository", required=True) + parser.add_argument("--model-revision", required=True, + help="genuine immutable published model commit (40 lowercase hex)") + parser.add_argument("--out", required=True, type=Path, + help="new sealed panel directory; binding/report are sibling files") + parser.add_argument("--qfs-root", required=True, type=Path, + help="QFS checkout containing bin/fidelity and engines/tools") + args = parser.parse_args(argv) + if re.fullmatch(r"[0-9a-f]{40}", args.model_revision) is None: + parser.error("--model-revision must be an immutable 40-character lowercase hex commit") + if re.fullmatch(r"[A-Za-z0-9][A-Za-z0-9._-]*/[A-Za-z0-9][A-Za-z0-9._-]*", + args.model_repository) is None: + parser.error("--model-repository must be a Hugging Face owner/repository ID") + model_dir = args.model_dir.resolve() + qfs_root = args.qfs_root.resolve() + out = args.out.resolve() + binding_path = out.with_name(out.name + ".binding.json") + report_path = out.with_name(out.name + ".sha256.json") + if not model_dir.is_dir(): + parser.error("--model-dir must already contain the saved model and native tokenizer") + for destination in (out, binding_path, report_path): + if destination.exists() or destination.is_symlink(): + parser.error("refusing to overwrite %s" % destination) + if destination.is_relative_to(model_dir) or destination.is_relative_to(qfs_root): + parser.error("output must be outside the model directory and QFS checkout") + builder_path = qfs_root / "engines/tools/build_token_panel.py" + resolver_path = qfs_root / "bin/fidelity/panel.py" + if not builder_path.is_file() or not resolver_path.is_file(): + parser.error("--qfs-root lacks the existing token-panel builder or resolver") + + # Reuse the existing format's seal and token preimages. Its CLI cannot meet + # this contract: it hardcodes add_special_tokens=False and not local-only. + spec = importlib.util.spec_from_file_location("qfs_token_panel_builder", builder_path) + if spec is None or spec.loader is None: + raise RuntimeError("cannot import the QFS token-panel builder") + builder = importlib.util.module_from_spec(spec) + spec.loader.exec_module(builder) + sys.path.insert(0, str(qfs_root / "bin")) + from fidelity import panel as panel_contract + import numpy as np + import tokenizers + import transformers + from transformers import AutoTokenizer + + for name in ("config.json", "tokenizer.json", "tokenizer_config.json"): + if not (model_dir / name).is_file(): + raise ValueError("required native tokenizer/model file missing: " + name) + config = json.loads((model_dir / "config.json").read_text(encoding="utf-8")) + if config.get("model_type") != "glm_moe_dsa" or config.get("vocab_size") != VOCAB_SIZE: + raise ValueError("expected glm_moe_dsa model with vocabulary size 260") + if config.get("max_position_embeddings", 0) < CONTEXT_LENGTH: + raise ValueError("model context limit cannot accommodate 64-token windows") + file_hashes = {name: builder.sha256_file(model_dir / name) + for name in sorted(TOKENIZER_FILES) if (model_dir / name).is_file()} + tokenizer = AutoTokenizer.from_pretrained( + model_dir, local_files_only=True, trust_remote_code=False) + if len(tokenizer) != VOCAB_SIZE or tokenizer.vocab_size != VOCAB_SIZE: + raise ValueError("expected exactly 260 native tokenizer entries, including special tokens") + if set(tokenizer.get_vocab().values()) != set(range(VOCAB_SIZE)): + raise ValueError("tokenizer IDs must cover the contiguous interval [0,260)") + expected_specials = {"pad_token_id": 0, "bos_token_id": 1, + "eos_token_id": 2, "unk_token_id": 3} + for name, expected in expected_specials.items(): + if getattr(tokenizer, name, None) != expected: + raise ValueError("unexpected tokenizer special ID for " + name) + + encoded_windows = [] + sources = [] + for index, (domain, text) in enumerate(TEXTS): + encoded = tokenizer(text, add_special_tokens=True, truncation=True, + max_length=CONTEXT_LENGTH, padding=False, + return_attention_mask=True, return_special_tokens_mask=True) + ids = encoded["input_ids"] + mask = encoded["attention_mask"] + special_mask = encoded["special_tokens_mask"] + if (len(ids) != CONTEXT_LENGTH or len(mask) != CONTEXT_LENGTH + or len(special_mask) != CONTEXT_LENGTH + or any(type(value) is not int or not 0 <= value < VOCAB_SIZE for value in ids) + or mask != [1] * CONTEXT_LENGTH): + raise ValueError("tokenizer produced invalid token IDs or 64-token/mask shape") + if (any(value not in (0, 1) for value in special_mask) + or not any(special_mask) + or not all(ids[pos] in tokenizer.all_special_ids + for pos, marked in enumerate(special_mask) if marked)): + raise ValueError("native tokenizer did not apply a valid special-token template") + window_id = "final-%04d" % index + encoded_windows.append((window_id, domain, ids)) + raw = text.encode("utf-8") + sources.append({"stratum": domain, "document": domain + ".txt", + "document_sha256": builder.sha256_bytes(raw), "bytes": len(raw), + "text_utf8": text, "selected": True, "window_id": window_id, + "tokens_total": len(tokenizer(text, add_special_tokens=True)["input_ids"]), + "num_tokens": len(ids), "special_tokens_mask": special_mask}) + + arrays = out / "arrays" + arrays.mkdir(parents=True, exist_ok=False) + mask_path = arrays / "causal-mask-64.npy" + np.save(mask_path, np.ones(CONTEXT_LENGTH, dtype=np.uint8), allow_pickle=False) + mask_sha = builder.sha256_file(mask_path) + windows = [] + for window_id, domain, ids in encoded_windows: + token_path = arrays / (window_id + ".tokens.npy") + np.save(token_path, np.asarray(ids, dtype=" same_stack", + "overridden_by": null, + "passed": true + } + }, + "high_kld_contexts": [ + { + "allocation_stratum": null, + "domain": "garden", + "index": 0, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0000" + }, + { + "allocation_stratum": null, + "domain": "arithmetic", + "index": 1, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0001" + }, + { + "allocation_stratum": null, + "domain": "code", + "index": 2, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0002" + }, + { + "allocation_stratum": null, + "domain": "instructions", + "index": 3, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0003" + } + ], + "kl": { + "max": 0.0, + "mean": 0.0, + "median": 0.0, + "p95": 0.0, + "p99": 0.0, + "p99_9": 0.0 + }, + "kl_macro_stratum_mean": null, + "kl_micro_token_mean": 0.0, + "measurement_scope": { + "contexts": 4, + "covers_full_panel": true, + "position_filter": "all", + "positions_per_context": 63, + "scored_positions": 252, + "subset_detail": null + }, + "metric": { + "direction": "reference_to_candidate", + "direction_label": "KL(reference || candidate)", + "higher_is_better": false, + "name": "mean_tokenwise_kld", + "units": "nats", + "value": 0.0 + }, + "panel": { + "context_length": 64, + "contexts": 4, + "panel_id": "panel--panel", + "panel_token_sha256_legacy": "3c9467c85be43d238926f6d18bf825c2e4748814c95b8b0e8b8f1420546c3089", + "scored_positions": 252, + "scoring_window": { + "dropped_positions_total": 0, + "min_left_context_tokens": 1, + "policy": "every causal prediction position of every window is scored; nothing is dropped", + "score_from": 0, + "windowed": false + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + }, + "tokenizer_candidate": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + }, + "tokenizer_identity_equal": true, + "tokenizer_reference": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } + }, + "per_context": [ + { + "allocation_stratum": null, + "domain": "garden", + "index": 0, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0000" + }, + { + "allocation_stratum": null, + "domain": "arithmetic", + "index": 1, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0001" + }, + { + "allocation_stratum": null, + "domain": "code", + "index": 2, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0002" + }, + { + "allocation_stratum": null, + "domain": "instructions", + "index": 3, + "max": 0.0, + "mean": 0.0, + "scored_rows": 63, + "window_id": "final-0003" + } + ], + "per_domain": null, + "per_stratum": null, + "receipt_sha256": "4910833e5cc175ea351055e567c5d896475b4020598359291aedc958d8ada382", + "reference": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "dataset_id": "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "dataset_sha256": "56588f20f9cf055301f83a828fa75fa94c1e26593e64a07c5c6c4e38e9454563", + "form": "hidden", + "head": { + "bits": 16, + "quantized": false, + "raw_tensor_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "source": "native", + "tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510" + }, + "label": "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "lane": "other", + "lane_identity_sha256": "34f640ff350d24093734d97a81c1048ce0443d8b3c7bda0953f8283b8ea9269f", + "repository": "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "revision": null, + "role": "root", + "scope_digest": "attn.o=native:bf16@16|attn.qkv=native:bf16@16|embed_tokens=native:bf16@16|lm_head=native:bf16@16|mlp.down=native:bf16@16|mlp.gate=native:bf16@16|mlp.up=native:bf16@16|moe.experts=native:bf16@16|norm=native:bf16@16|head=native|kv=bf16", + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd", + "weights": { + "artifact_ref": null, + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "codec": null, + "config_sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "declared_bits": null, + "declared_head_bits": 16, + "index_sha256": null, + "model_ref": null, + "model_revision": "45563636ef723acfb826755493447dc40c7a0c37", + "quantized": false, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37" + } + }, + "schema": "malaiwah.fidelity-comparison-receipt.v1", + "self_compare": { + "asserted_exact_zero": true, + "capture_content_digest_equal": true, + "expected_tokenwise_bytes": 2144, + "expected_tokenwise_sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d", + "force_compute_agreed": true, + "head_digest_equal": true, + "weights_identity_equal": true + }, + "submission": { + "emitted": false, + "path": null, + "receipt_sha256": null, + "refusal": "comparison_kind is reproduction_confirmation, not measurement; bin/fidelity/receipt.py::_scan_for_unsubmittable is the second, independent refusal axis.", + "submission_schema": null + }, + "tokenwise": { + "bytes": 2144, + "path": "tokenwise-kld.npy", + "sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d" + }, + "top1_agreement": 1.0, + "top1_discordant_contexts": [], + "uncertainty": { + "ci95_high": null, + "ci95_low": null, + "cluster_unit": null, + "clusters": null, + "method": "none", + "samples": null, + "seed": null + } +} diff --git a/raw/candidates/modelopt-nvfp4/source/cpu-reproduction-summary.json b/raw/candidates/modelopt-nvfp4/source/cpu-reproduction-summary.json new file mode 100644 index 0000000000000000000000000000000000000000..7fe4e433fbfabcad4ab3781b796fbd3439d5db17 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/source/cpu-reproduction-summary.json @@ -0,0 +1,851 @@ +{ + "captures": { + "first": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "cold_run": "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "dataset_sha256": "56588f20f9cf055301f83a828fa75fa94c1e26593e64a07c5c6c4e38e9454563", + "generation_sanity_probe": { + "degenerate": false, + "enforced": false, + "entropy_nats": 5.548019647470335, + "expect": null, + "logit_spread": 0.986328125, + "note": "one extra window through the same schedule; its hidden state is discarded and never enters the dataset.", + "prompt": "The capital of France is", + "schema": "malaiwah.generation-sanity-probe.v1", + "status": "recorded", + "top1_id": 113, + "top1_probability": 0.006720104384265371, + "top1_text": "�", + "top_k": [ + { + "id": 113, + "probability": 0.006720104384265371, + "text": "�" + }, + { + "id": 237, + "probability": 0.006412368399474785, + "text": "�" + }, + { + "id": 193, + "probability": 0.006035639491843906, + "text": "\u0001" + }, + { + "id": 236, + "probability": 0.0055386141320063614, + "text": "�" + }, + { + "id": 44, + "probability": 0.0054740873228682424, + "text": "I" + } + ], + "uniform_entropy_nats": 5.560681631015528, + "vocab_size": 260 + }, + "head_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "memory_report": { + "context_length": 64, + "decoder_layers": null, + "device": "cpu", + "hidden_size": 64, + "layer_residency": null, + "model": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "peak_resident_weight_bytes": 555776, + "peak_resident_weight_detail": { + "buffers": 128, + "parameters": 555648, + "total": 555776 + }, + "peak_resident_weight_gb": 0.001, + "peak_rss_bytes": 367374336, + "peak_rss_gb": 0.367, + "resident_weight_note": "the maximum, over the run, of the materialised parameter+buffer bytes. On the CPU path peak_rss_bytes ALSO counts the safetensors mmap page cache, which is evictable and is not held by the schedule; this figure is not confounded by it. On CUDA, peak_cuda_allocated_bytes is the authoritative number because it includes activations and workspace and has no page cache.", + "rss_units_source": "Linux ru_maxrss", + "schedule": "window-outer", + "vocab_size": 260, + "windows": 4 + }, + "path": "first", + "pid": 406991, + "resources": { + "bytes": { + "checkpoint_read": 572479, + "hidden_d2h": 36616, + "weights_h2d": null + }, + "checkpoint_bytes": 572479, + "checkpoint_files": 2, + "device_name": null, + "forward_timing": "wall-clock", + "note": "provenance, not identity: peaks and stage seconds this run measured; forward_sum is device time under cuda-events, wall time otherwise; seal covers head serialisation up to this block's assembly", + "peak_cuda_allocated_bytes": null, + "peak_cuda_reserved_bytes": null, + "peak_resident_weight_bytes": 555776, + "peak_rss_bytes": 367374336, + "rss_units_source": "Linux ru_maxrss", + "seconds": { + "decode_sum": null, + "elapsed": 2.448, + "fill_sum": null, + "forward_sum": 0.126, + "identity": 0.005, + "layer_load_max": null, + "layer_load_sum": null, + "layer_loads": null, + "resident_load": 2.283, + "seal": 0.007 + } + }, + "runtime_versions": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 406991, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd" + }, + "repeat": { + "capture_content_digest": "d3a8907faca213c298b4ff9e77dd5f041bba4353603447a30457e33c33386d39", + "checkpoint_identity_sha256": "800be70604bef0c3adfb429774f44756d60bf23d141e82d24a032ce25ce0451e", + "cold_run": "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d", + "dataset_sha256": "c3ff6c32dc57502825d3ca3ac2133ed6a4c31e7bc7602191d595ee044ebe9048", + "generation_sanity_probe": { + "degenerate": false, + "enforced": false, + "entropy_nats": 5.548019647470335, + "expect": null, + "logit_spread": 0.986328125, + "note": "one extra window through the same schedule; its hidden state is discarded and never enters the dataset.", + "prompt": "The capital of France is", + "schema": "malaiwah.generation-sanity-probe.v1", + "status": "recorded", + "top1_id": 113, + "top1_probability": 0.006720104384265371, + "top1_text": "�", + "top_k": [ + { + "id": 113, + "probability": 0.006720104384265371, + "text": "�" + }, + { + "id": 237, + "probability": 0.006412368399474785, + "text": "�" + }, + { + "id": 193, + "probability": 0.006035639491843906, + "text": "\u0001" + }, + { + "id": 236, + "probability": 0.0055386141320063614, + "text": "�" + }, + { + "id": 44, + "probability": 0.0054740873228682424, + "text": "I" + } + ], + "uniform_entropy_nats": 5.560681631015528, + "vocab_size": 260 + }, + "head_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "memory_report": { + "context_length": 64, + "decoder_layers": null, + "device": "cpu", + "hidden_size": 64, + "layer_residency": null, + "model": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "peak_resident_weight_bytes": 555776, + "peak_resident_weight_detail": { + "buffers": 128, + "parameters": 555648, + "total": 555776 + }, + "peak_resident_weight_gb": 0.001, + "peak_rss_bytes": 367198208, + "peak_rss_gb": 0.367, + "resident_weight_note": "the maximum, over the run, of the materialised parameter+buffer bytes. On the CPU path peak_rss_bytes ALSO counts the safetensors mmap page cache, which is evictable and is not held by the schedule; this figure is not confounded by it. On CUDA, peak_cuda_allocated_bytes is the authoritative number because it includes activations and workspace and has no page cache.", + "rss_units_source": "Linux ru_maxrss", + "schedule": "window-outer", + "vocab_size": 260, + "windows": 4 + }, + "path": "repeat", + "pid": 409089, + "resources": { + "bytes": { + "checkpoint_read": 572479, + "hidden_d2h": 36616, + "weights_h2d": null + }, + "checkpoint_bytes": 572479, + "checkpoint_files": 2, + "device_name": null, + "forward_timing": "wall-clock", + "note": "provenance, not identity: peaks and stage seconds this run measured; forward_sum is device time under cuda-events, wall time otherwise; seal covers head serialisation up to this block's assembly", + "peak_cuda_allocated_bytes": null, + "peak_cuda_reserved_bytes": null, + "peak_resident_weight_bytes": 555776, + "peak_rss_bytes": 367198208, + "rss_units_source": "Linux ru_maxrss", + "seconds": { + "decode_sum": null, + "elapsed": 2.619, + "fill_sum": null, + "forward_sum": 0.128, + "identity": 0.004, + "layer_load_max": null, + "layer_load_sum": null, + "layer_loads": null, + "resident_load": 2.453, + "seal": 0.005 + } + }, + "runtime_versions": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 409089, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stack_fingerprint_sha256": "a83c4de13e06b8727c3a05959e470708b1fa396b0fcbd78c2f9deac666fea6cd" + } + }, + "commands": [ + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--model", + "/tmp/qfs-complete-tiny-fixture/model", + "--weights-repository", + "malaiwah/glm-moe-dsa-tiny-random-bf16", + "--model-revision", + "45563636ef723acfb826755493447dc40c7a0c37", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-complete-tiny-fixture/reproduction/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--role", + "root", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--schedule", + "window-outer", + "--dataset-id", + "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "--dataset-name", + "GLM MoE DSA tiny random CPU root", + "--repository", + "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "--author", + "malaiwah", + "--disclosures", + "[{\"code\":\"random_init_cpu_fixture\",\"severity\":\"info\",\"affects_comparability\":false,\"detail\":\"Complete randomly initialized tiny glm_moe_dsa checkpoint; CPU smoke fixture only, not trained quality evidence or a registry measurement. Lane other denotes CPU, not local-cuda-budget.\"}]", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--run-name", + "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "--cold-run", + "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "--memory-report", + "/tmp/qfs-complete-tiny-fixture/reproduction/first.memory.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 6.485651439987123, + "name": "capture-first", + "pid": 406991, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 406991, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "capture-first.stderr.log", + "stdout": "capture-first.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "verify", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/first.verify.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.575829998124391, + "name": "verify-first", + "pid": 408026, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 408026, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "verify-first.stderr.log", + "stdout": "verify-first.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "validate", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--strict", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/first.strict.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.8252810118719935, + "name": "strict-first", + "pid": 408494, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 408494, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "strict-first.stderr.log", + "stdout": "strict-first.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/engines/tools/hf_capture.py", + "--model", + "/tmp/qfs-complete-tiny-fixture/model", + "--weights-repository", + "malaiwah/glm-moe-dsa-tiny-random-bf16", + "--model-revision", + "45563636ef723acfb826755493447dc40c7a0c37", + "--panel", + "/tmp/qfs-complete-tiny-fixture/panel", + "--panel-role", + "final", + "--panel-binding", + "/tmp/qfs-complete-tiny-fixture/reproduction/panel-binding.json", + "--panel-binding-sha256", + "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "--panel-tokenizer-root", + "/tmp/qfs-complete-tiny-fixture/model", + "--role", + "root", + "--lane", + "other", + "--device", + "cpu", + "--dtype", + "bfloat16", + "--schedule", + "window-outer", + "--dataset-id", + "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "--dataset-name", + "GLM MoE DSA tiny random CPU root", + "--repository", + "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "--author", + "malaiwah", + "--disclosures", + "[{\"code\":\"random_init_cpu_fixture\",\"severity\":\"info\",\"affects_comparability\":false,\"detail\":\"Complete randomly initialized tiny glm_moe_dsa checkpoint; CPU smoke fixture only, not trained quality evidence or a registry measurement. Lane other denotes CPU, not local-cuda-budget.\"}]", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--run-name", + "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d", + "--cold-run", + "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d", + "--memory-report", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat.memory.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 6.431767418049276, + "name": "capture-repeat", + "pid": 409089, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 409089, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "capture-repeat.stderr.log", + "stdout": "capture-repeat.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "verify", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat.verify.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.7754629959817976, + "name": "verify-repeat", + "pid": 409951, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 409951, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "verify-repeat.stderr.log", + "stdout": "verify-repeat.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "validate", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--strict", + "--verify-tensors", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat.strict.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.423026765929535, + "name": "strict-repeat", + "pid": 410549, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 410549, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "strict-repeat.stderr.log", + "stdout": "strict-repeat.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "compare", + "--reference", + "/tmp/qfs-complete-tiny-fixture/reproduction/first", + "--candidate", + "/tmp/qfs-complete-tiny-fixture/reproduction/repeat", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction/comparison", + "--self-compare", + "--force-compute", + "--device", + "cpu", + "--replay-device", + "numpy", + "--replay-dtype", + "float32", + "--vocab-chunk", + "8192", + "--chunk-positions", + "128", + "--verify-tensors", + "--reference-label", + "cpu-first-6d32f30f77d04fa7bb18080922c95ec4", + "--candidate-label", + "cpu-repeat-f2dba0eeb0454393b462443ab6f1382d" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.7282893639057875, + "name": "compare", + "pid": 411043, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 411043, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "compare.stderr.log", + "stdout": "compare.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + }, + { + "argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "-c", + "\nimport json, os, platform, runpy, sys\nimport numpy, torch, transformers, safetensors, tokenizers\nimport huggingface_hub\ntorch.set_num_threads(2)\ntorch.set_num_interop_threads(2)\nprint(json.dumps({\"stage\": \"fixture_child_runtime\", \"pid\": os.getpid(),\n \"python\": sys.version, \"executable\": sys.executable,\n \"platform\": platform.platform(), \"machine\": platform.machine(),\n \"torch\": torch.__version__, \"transformers\": transformers.__version__,\n \"numpy\": numpy.__version__, \"safetensors\": safetensors.__version__,\n \"tokenizers\": tokenizers.__version__, \"huggingface_hub\": huggingface_hub.__version__,\n \"torch_num_threads\": torch.get_num_threads(),\n \"torch_num_interop_threads\": torch.get_num_interop_threads(),\n \"cuda_runtime\": torch.version.cuda,\n \"thread_environment\": {k: os.environ.get(k) for k in\n (\"OMP_NUM_THREADS\", \"MKL_NUM_THREADS\", \"OPENBLAS_NUM_THREADS\",\n \"NUMEXPR_NUM_THREADS\", \"VECLIB_MAXIMUM_THREADS\")}}, sort_keys=True), flush=True)\nsys.argv = sys.argv[1:]\nrunpy.run_path(sys.argv[0], run_name=\"__main__\")\n", + "/tmp/qfs-explorer-development/bin/fidelity_dataset.py", + "validate", + "--receipt", + "/tmp/qfs-complete-tiny-fixture/reproduction/comparison/comparison-receipt.json", + "--strict", + "--json", + "/tmp/qfs-complete-tiny-fixture/reproduction/comparison.validate.json" + ], + "cwd": "/tmp/qfs-explorer-development", + "elapsed_seconds": 3.424050308065489, + "name": "validate-comparison", + "pid": 411487, + "returncode": 0, + "runtime": { + "cuda_runtime": null, + "executable": "/tmp/qfs-tiny-fixture-venv/bin/python", + "huggingface_hub": "1.30.0", + "machine": "x86_64", + "numpy": "2.5.3", + "pid": 411487, + "platform": "Linux-7.0.0-30-generic-x86_64-with-glibc2.43", + "python": "3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ]", + "safetensors": "0.8.0", + "stage": "fixture_child_runtime", + "thread_environment": { + "MKL_NUM_THREADS": "2", + "NUMEXPR_NUM_THREADS": "2", + "OMP_NUM_THREADS": "2", + "OPENBLAS_NUM_THREADS": "2", + "VECLIB_MAXIMUM_THREADS": "2" + }, + "tokenizers": "0.23.2", + "torch": "2.11.0+cpu", + "torch_num_interop_threads": 2, + "torch_num_threads": 2, + "transformers": "5.16.1" + }, + "stderr": "validate-comparison.stderr.log", + "stdout": "validate-comparison.stdout.log", + "timed_out": false, + "timeout_seconds": 300 + } + ], + "comparison": { + "comparator": { + "accumulation_dtype": "float64", + "bf16_reduced_precision_reduction": false, + "cublas_workspace_config": null, + "deterministic_algorithms": true, + "device": "cpu", + "estimator_backend": "torch:k6_kld_report._token_kld", + "head_applied_candidate_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "head_applied_reference_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "head_applied_tensor_content_sha256": "2364995d4009b32279b09045e48bf7cdceefcdaebdba3f70b003919a236f9510", + "logprob_dtype": "float64", + "position_block": 128, + "replay_backend": "numpy:cpu:float32", + "replay_env": { + "blas_configuration": "OpenBLAS 0.3.34.106.0 USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell MAX_THREADS=64", + "blas_name": "scipy-openblas", + "blas_threads": 2, + "blas_threads_source": "ctypes:scipy_openblas_get_num_threads64_", + "blas_version": "0.3.34.106.0", + "cpu_model": "Intel(R) Xeon(R) CPU X5570 @ 2.93GHz", + "library": "numpy", + "numpy_version": "2.5.3", + "replay_dtype": "float32" + }, + "replay_peak_device_bytes": null, + "short_circuited": true, + "source_file_hashes_verified": true, + "tensor_content_digests_verified": true, + "tf32": false, + "tool": { + "entrypoint": "bin/fidelity-dataset compare", + "note": "the fp64 estimator is k6_kld_report._token_kld, imported not copied, whenever torch is importable; estimator_backend records which path ran." + }, + "two_pass": true, + "vocab_chunk": 8192 + }, + "comparison_kind": "reproduction_confirmation", + "kl": { + "max": 0.0, + "mean": 0.0, + "median": 0.0, + "p95": 0.0, + "p99": 0.0, + "p99_9": 0.0 + }, + "measurement_scope": { + "contexts": 4, + "covers_full_panel": true, + "position_filter": "all", + "positions_per_context": 63, + "scored_positions": 252, + "subset_detail": null + }, + "metric": { + "direction": "reference_to_candidate", + "direction_label": "KL(reference || candidate)", + "higher_is_better": false, + "name": "mean_tokenwise_kld", + "units": "nats", + "value": 0.0 + }, + "note": "QFS retains its hash-proof result and top-1 value for reproduction confirmations; --force-compute independently runs the estimator and requires its tokenwise KL array to agree exactly. short_circuited=true therefore does not mean replay was skipped.", + "receipt": "comparison/comparison-receipt.json", + "receipt_sha256": "4910833e5cc175ea351055e567c5d896475b4020598359291aedc958d8ada382", + "self_compare": { + "asserted_exact_zero": true, + "capture_content_digest_equal": true, + "expected_tokenwise_bytes": 2144, + "expected_tokenwise_sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d", + "force_compute_agreed": true, + "head_digest_equal": true, + "weights_identity_equal": true + }, + "tokenwise": { + "bytes": 2144, + "path": "tokenwise-kld.npy", + "sha256": "896ad5b6b732dce1588636c3af3a8a93af8eb1250df72809f6e26fc29914f65d" + }, + "top1_agreement": 1.0 + }, + "cpu_threads": 2, + "dataset_id": "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1", + "dataset_repository": "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1", + "device": "cpu", + "driver_argv": [ + "/tmp/qfs-tiny-fixture-venv/bin/python", + "/tmp/qfs-complete-tiny-fixture/verify_cpu.py", + "--model-dir", + "/tmp/qfs-complete-tiny-fixture/model", + "--model-repository", + "malaiwah/glm-moe-dsa-tiny-random-bf16", + "--model-revision", + "45563636ef723acfb826755493447dc40c7a0c37", + "--panel-dir", + "/tmp/qfs-complete-tiny-fixture/panel", + "--out", + "/tmp/qfs-complete-tiny-fixture/reproduction", + "--qfs-root", + "/tmp/qfs-explorer-development" + ], + "driver_sha256": "2e507993f0085a72d5236527942a7143fd036d56b82223b26e90889de5cd9f98", + "dtype": "bfloat16", + "elapsed_seconds": 34.85638747992925, + "lane": "other", + "lane_description": "local CPU random-init fixture", + "model_repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "model_revision": "45563636ef723acfb826755493447dc40c7a0c37", + "panel_binding": "panel-binding.json", + "panel_binding_sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "provenance_note": "Local QFS source bytes are hashed; no source commit is asserted. The caller supplies an immutable model pin; QFS hashes the local checkpoint. This script does not independently prove Hub-to-local weight equality.", + "qfs_source_files": { + "bin/fidelity/dscompare.py": "4a53f735e1e3fb8bd739854451b57f34e8369bffa9fd4f7b7fd935fb2e7d52df", + "bin/fidelity/dsvalidate.py": "a9d6cd57e801e3ef044a37635e24518c83dbc6d1ec8a4c0b4b5d1b24483ca8d1", + "bin/fidelity/panel.py": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "bin/fidelity_dataset.py": "ac62b63bbfde67e4d5cacecf9cd417193c50f417a6749cc15ee6f1610c153a4e", + "engines/tools/hf_capture.py": "200ba12ca74fb97531307965cbbaa5c10553a5c26e008e524ea2d8aecb005b95" + }, + "schema": "malaiwah.glm-moe-dsa-tiny-cpu-reproduction.v1", + "scope": "Random-init CPU reproduction only; no quality claim or registry submission.", + "status": "passed" +} diff --git a/raw/candidates/modelopt-nvfp4/source/generation_config.json b/raw/candidates/modelopt-nvfp4/source/generation_config.json new file mode 100644 index 0000000000000000000000000000000000000000..59bd0680606c94f6570a92e60fa4acd2e2170f70 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/source/generation_config.json @@ -0,0 +1,10 @@ +{ + "_from_model_config": true, + "bos_token_id": 1, + "eos_token_id": 2, + "output_attentions": false, + "output_hidden_states": false, + "pad_token_id": 0, + "transformers_version": "5.16.1", + "use_cache": true +} diff --git a/raw/candidates/modelopt-nvfp4/source/hub-checkpoint-verification.json b/raw/candidates/modelopt-nvfp4/source/hub-checkpoint-verification.json new file mode 100644 index 0000000000000000000000000000000000000000..b9648c8ae18de0fb86ce18398175c6686afbd7b2 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/source/hub-checkpoint-verification.json @@ -0,0 +1,32 @@ +{ + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "downloaded_from_hub": true, + "files": { + "config.json": { + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "bytes": 1479, + "matches_build": true + }, + "generation_config.json": { + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "bytes": 216, + "matches_build": true + }, + "model.safetensors": { + "sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1", + "bytes": 571000, + "matches_build": true + }, + "tokenizer.json": { + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "bytes": 6763, + "matches_build": true + }, + "tokenizer_config.json": { + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63", + "bytes": 236, + "matches_build": true + } + } +} diff --git a/raw/candidates/modelopt-nvfp4/source/loader-verification.json b/raw/candidates/modelopt-nvfp4/source/loader-verification.json new file mode 100644 index 0000000000000000000000000000000000000000..871fc889a9d3a025569770a96e83ff5f0a2fb420 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/source/loader-verification.json @@ -0,0 +1,60 @@ +{ + "schema": "malaiwah.tiny-fixture-loader-check.v1", + "checkpoint_sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1", + "runtime": { + "torch": "2.11.0+cpu", + "transformers": "5.16.1", + "device": "cpu", + "threads": 2 + }, + "qfs_load_report": { + "observed": true, + "conversion_errors_visible": true, + "missing_keys": [], + "unexpected_keys": [], + "mismatched_keys": [], + "error_msgs": [], + "conversion_errors": {} + }, + "native_save_reload_tensor_equality": true, + "independent_build_files_byte_equal": true, + "tokenizer_roundtrip_examples": [ + "The CPU fixture carries a complete output head and real sparse attention.", + "Small deterministic tensors make a repeatable pipeline experiment.", + "Unicode roundtrip: caf\u00e9, snow \u96ea, punctuation!", + "The same bytes must survive saving and loading without repair." + ], + "forward_shape": [ + 4, + 64, + 260 + ], + "forward_all_finite": true, + "forward_logit_std": 0.16186420619487762, + "load_seconds": 2.1670503590721637, + "batch_forward_seconds": 0.05775680090300739, + "greedy_generation_seconds": 0.04374621692113578, + "generated_token_ids": [ + 1, + 55, + 75, + 72, + 224, + 38, + 51, + 56, + 224, + 73, + 76, + 91, + 87, + 88, + 85, + 72, + 171, + 105, + 156, + 236 + ], + "peak_process_rss_mib": 351.9296875 +} diff --git a/raw/candidates/modelopt-nvfp4/source/model.safetensors b/raw/candidates/modelopt-nvfp4/source/model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..4fb280ef48135a3788c03440ffe9075628c12dfd --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/source/model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1 +size 571000 diff --git a/raw/candidates/modelopt-nvfp4/source/panel.binding.json b/raw/candidates/modelopt-nvfp4/source/panel.binding.json new file mode 100644 index 0000000000000000000000000000000000000000..573cea0b332c636bdda89b150f95cda307b89194 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/source/panel.binding.json @@ -0,0 +1,102 @@ +{ + "content": { + "archive": { + "algorithm": "sha256(ustar: sorted regular files; mode=0644; uid=gid=mtime=0)", + "bytes": 20480, + "compression": "none", + "format": "ustar", + "sha256": "389706dfa3335a75ec70a40d079995af1a60c05512334125dbd336790f12702f" + }, + "manifest": [ + { + "bytes": 192, + "path": "arrays/causal-mask-64.npy", + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02" + }, + { + "bytes": 384, + "path": "arrays/final-0000.tokens.npy", + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af" + }, + { + "bytes": 384, + "path": "arrays/final-0001.tokens.npy", + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea" + }, + { + "bytes": 384, + "path": "arrays/final-0002.tokens.npy", + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c" + }, + { + "bytes": 384, + "path": "arrays/final-0003.tokens.npy", + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a" + }, + { + "bytes": 4195, + "path": "panel.json", + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6" + }, + { + "bytes": 7808, + "path": "panel.receipt.json", + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263" + } + ], + "manifest_sha256": "e5f2d6410a6290da1197016c5b57ae522a3570665215ddc23e2a0bd45f912181" + }, + "panel": { + "bytes": 4195, + "context_length": 64, + "contexts": 4, + "file": "panel.json", + "id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "positions_per_context": 63, + "role": "final", + "scored_positions_total": 252, + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6", + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36" + }, + "receipt": { + "bytes": 7808, + "declared_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "file": "panel.receipt.json", + "receipt_file_sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "receipt_seal_mode": "self-blank" + }, + "schema": "malaiwah.resolved-panel.v1", + "tokenizer": { + "files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "files_verified": true, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1", + "maximum_token_id_exclusive": 260, + "receipt": null, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "vocab_size": 260 + } +} diff --git a/raw/candidates/modelopt-nvfp4/source/panel.sha256.json b/raw/candidates/modelopt-nvfp4/source/panel.sha256.json new file mode 100644 index 0000000000000000000000000000000000000000..30e122a1cc6d1937fecc0d31e38e468bceefc9de --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/source/panel.sha256.json @@ -0,0 +1,83 @@ +{ + "binding_file": "panel.binding.json", + "binding_sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "context_length": 64, + "contexts": 4, + "model_repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "model_revision": "45563636ef723acfb826755493447dc40c7a0c37", + "panel_archive": { + "algorithm": "sha256(ustar: sorted regular files; mode=0644; uid=gid=mtime=0)", + "bytes": 20480, + "compression": "none", + "format": "ustar", + "sha256": "389706dfa3335a75ec70a40d079995af1a60c05512334125dbd336790f12702f" + }, + "panel_directory": "panel", + "panel_files": [ + { + "bytes": 192, + "path": "arrays/causal-mask-64.npy", + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02" + }, + { + "bytes": 384, + "path": "arrays/final-0000.tokens.npy", + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af" + }, + { + "bytes": 384, + "path": "arrays/final-0001.tokens.npy", + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea" + }, + { + "bytes": 384, + "path": "arrays/final-0002.tokens.npy", + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c" + }, + { + "bytes": 384, + "path": "arrays/final-0003.tokens.npy", + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a" + }, + { + "bytes": 4195, + "path": "panel.json", + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6" + }, + { + "bytes": 7808, + "path": "panel.receipt.json", + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263" + } + ], + "panel_id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "panel_receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "purpose": "Synthetic CPU smoke only, not a quality benchmark.", + "revision_verification": "Caller-supplied published commit; local files byte-verified offline.", + "scored_positions_total": 252, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer_files": [ + { + "bytes": 1479, + "name": "config.json", + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7" + }, + { + "bytes": 216, + "name": "generation_config.json", + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34" + }, + { + "bytes": 6763, + "name": "tokenizer.json", + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da" + }, + { + "bytes": 236, + "name": "tokenizer_config.json", + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + } + ], + "tokenizer_files_verified": true, + "tokenizer_identity_sha256": "d352eac9d82f64010d4094b2dc548d67bf6020df8f7fd4f529bb66f22ceaa9b1" +} diff --git a/raw/candidates/modelopt-nvfp4/source/panel/arrays/causal-mask-64.npy b/raw/candidates/modelopt-nvfp4/source/panel/arrays/causal-mask-64.npy new file mode 100644 index 0000000000000000000000000000000000000000..18f211bfbf8c0aa64c57b46c50612db4a7c1faf9 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/source/panel/arrays/causal-mask-64.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02 +size 192 diff --git a/raw/candidates/modelopt-nvfp4/source/panel/arrays/final-0000.tokens.npy b/raw/candidates/modelopt-nvfp4/source/panel/arrays/final-0000.tokens.npy new file mode 100644 index 0000000000000000000000000000000000000000..b53a3cc1093c0363db45470d868194d867ed93cf --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/source/panel/arrays/final-0000.tokens.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af +size 384 diff --git a/raw/candidates/modelopt-nvfp4/source/panel/arrays/final-0001.tokens.npy b/raw/candidates/modelopt-nvfp4/source/panel/arrays/final-0001.tokens.npy new file mode 100644 index 0000000000000000000000000000000000000000..54551046d9609a29e60c1b1460b4927e45b9d785 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/source/panel/arrays/final-0001.tokens.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea +size 384 diff --git a/raw/candidates/modelopt-nvfp4/source/panel/arrays/final-0002.tokens.npy b/raw/candidates/modelopt-nvfp4/source/panel/arrays/final-0002.tokens.npy new file mode 100644 index 0000000000000000000000000000000000000000..557330708fb66b049bf4bb046038e98fafced952 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/source/panel/arrays/final-0002.tokens.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c +size 384 diff --git a/raw/candidates/modelopt-nvfp4/source/panel/arrays/final-0003.tokens.npy b/raw/candidates/modelopt-nvfp4/source/panel/arrays/final-0003.tokens.npy new file mode 100644 index 0000000000000000000000000000000000000000..88ac7b071317640a2ac3432c2cc17a46a2741688 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/source/panel/arrays/final-0003.tokens.npy @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a +size 384 diff --git a/raw/candidates/modelopt-nvfp4/source/panel/panel.json b/raw/candidates/modelopt-nvfp4/source/panel/panel.json new file mode 100644 index 0000000000000000000000000000000000000000..bc0b51f795d2ba81d472c21c88dc52cad9910a41 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/source/panel/panel.json @@ -0,0 +1,197 @@ +{ + "name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "panel_id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "schema": "quant-pipeline.glm53-token-panel.v1", + "sealed_corpus_sha256": null, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "windows": [ + { + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "document_id": "embedded-synthetic/garden.txt", + "domain": "garden", + "num_tokens": 64, + "prediction_positions": 63, + "role": "final", + "token_ids_first16": [ + 1, + 55, + 75, + 72, + 224, + 86, + 80, + 68, + 79, + 79, + 224, + 74, + 68, + 85, + 71, + 72 + ], + "token_ids_json_sha256": "08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315", + "token_ids_last16": [ + 224, + 68, + 81, + 71, + 224, + 68, + 224, + 86, + 87, + 82, + 81, + 72, + 224, + 83, + 68, + 2 + ], + "token_ids_sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af", + "window_id": "final-0000" + }, + { + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "document_id": "embedded-synthetic/arithmetic.txt", + "domain": "arithmetic", + "num_tokens": 64, + "prediction_positions": 63, + "role": "final", + "token_ids_first16": [ + 1, + 36, + 224, + 86, + 75, + 72, + 79, + 73, + 224, + 75, + 82, + 79, + 71, + 86, + 224, + 87 + ], + "token_ids_json_sha256": "5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46", + "token_ids_last16": [ + 72, + 86, + 17, + 224, + 55, + 75, + 72, + 85, + 72, + 224, + 68, + 85, + 72, + 224, + 72, + 2 + ], + "token_ids_sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea", + "window_id": "final-0001" + }, + { + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "document_id": "embedded-synthetic/code.txt", + "domain": "code", + "num_tokens": 64, + "prediction_positions": 63, + "role": "final", + "token_ids_first16": [ + 1, + 71, + 72, + 73, + 224, + 68, + 71, + 71, + 66, + 89, + 68, + 79, + 88, + 72, + 86, + 11 + ], + "token_ids_json_sha256": "51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07", + "token_ids_last16": [ + 85, + 76, + 74, + 75, + 87, + 202, + 202, + 85, + 72, + 86, + 88, + 79, + 87, + 224, + 32, + 2 + ], + "token_ids_sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c", + "window_id": "final-0002" + }, + { + "attention_mask_sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "document_id": "embedded-synthetic/instructions.txt", + "domain": "instructions", + "num_tokens": 64, + "prediction_positions": 63, + "role": "final", + "token_ids_first16": [ + 1, + 41, + 76, + 85, + 86, + 87, + 224, + 83, + 79, + 68, + 70, + 72, + 224, + 68, + 224, + 70 + ], + "token_ids_json_sha256": "8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d", + "token_ids_last16": [ + 224, + 70, + 82, + 82, + 79, + 224, + 90, + 68, + 87, + 72, + 85, + 224, + 76, + 81, + 87, + 2 + ], + "token_ids_sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a", + "window_id": "final-0003" + } + ] +} diff --git a/raw/candidates/modelopt-nvfp4/source/panel/panel.receipt.json b/raw/candidates/modelopt-nvfp4/source/panel/panel.receipt.json new file mode 100644 index 0000000000000000000000000000000000000000..fbc2ce3e8e9602a492d83ae681817e0fa02e4173 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/source/panel/panel.receipt.json @@ -0,0 +1,376 @@ +{ + "corpus": { + "documents_considered": 4, + "documents_selected": 4, + "path_prefix": "embedded-synthetic/", + "repository": null, + "revision": null, + "source": "Synthetic texts embedded verbatim in this sealed receipt and builder." + }, + "created_utc": "2026-09-07T00:00:00Z", + "created_utc_policy": "Fixed artifact epoch for deterministic bytes; not an execution timestamp.", + "documents": [ + { + "bytes": 135, + "document": "garden.txt", + "document_sha256": "2aca14290cd4753c3b15d8a20aaa7a6963d2cb48d78e8538a4ce34d4665dcb94", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "garden", + "text_utf8": "The small garden has red flowers, green leaves, and a stone path. A gentle breeze moves the branches while a robin sings near the gate.", + "tokens_total": 137, + "window_id": "final-0000" + }, + { + "bytes": 144, + "document": "arithmetic.txt", + "document_sha256": "b867a2e8cbe81cc8d5781bfe6718a43e171fb5c7c138b9ed6ac86bebc24bca83", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "arithmetic", + "text_utf8": "A shelf holds three blue boxes and five red boxes. There are eight boxes in total. Move two boxes to the desk and count the six boxes remaining.", + "tokens_total": 146, + "window_id": "final-0001" + }, + { + "bytes": 162, + "document": "code.txt", + "document_sha256": "08c8f75f45899cbc9656a7a3fcdbf3092abfa7bc97fe353957b08d7e9660240b", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "code", + "text_utf8": "def add_values(left, right):\n return left + right\n\nresult = add_values(7, 9)\nprint(result)\n# This readable snippet is synthetic input, not a coding benchmark.\n", + "tokens_total": 164, + "window_id": "final-0002" + }, + { + "bytes": 140, + "document": "instructions.txt", + "document_sha256": "1dba5052b28929f94f322ad9e8c0b238bcbd653d6fae54ebaea8e5e3f6073378", + "num_tokens": 64, + "selected": true, + "special_tokens_mask": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + "stratum": "instructions", + "text_utf8": "First place a clean cup on the table. Next pour cool water into the cup. Finally put the bottle away and write a short note about the steps.", + "tokens_total": 142, + "window_id": "final-0003" + } + ], + "environment": { + "numpy": "2.5.3", + "tokenizers": "0.23.2", + "transformers": "5.16.1" + }, + "format_builder": "engines/tools/build_token_panel.py", + "format_builder_sha256": "30eb4d4d7e465aaa8d9ef2d947a0ac7fd42ec45388f20c8b6db242c88dc2d851", + "format_version": 1, + "panel_id": "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1", + "panel_name": "Tiny random-init GLM-MoE-DSA synthetic CPU smoke (not a benchmark)", + "parameters": { + "context_length": 64, + "generation_seed": null, + "generation_seed_policy": "No RNG is used.", + "prediction_positions_per_window": 63, + "scored_positions_total": 252, + "strata": [ + "garden", + "arithmetic", + "code", + "instructions" + ], + "windows_per_stratum": 1, + "windows_total": 4 + }, + "receipt_sha256": "3432d5ccee92559c0999bc80d976183faaffc1accf7c00d5fdca151b0e357ba5", + "resolver_sha256": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "schema": "malaiwah.token-panel-build-receipt.v1", + "selection_rule": "Four embedded readable synthetic documents in declared order; native tokenizer with add_special_tokens=True, truncation=True, max_length=64, padding=False; each encoded window must be exactly 64 tokens; no chat template; all 63 shifted next-token positions scored; no RNG.", + "separation": { + "checked": false, + "method": "No contamination scan or benchmark selection.", + "note": "Authored synthetic CPU smoke inputs for a random-init model; not a benchmark, held-out quality claim, or registry-row submission." + }, + "suite_token_hash_sha256": "525cb6c625096ddb0ab19771a252e83223de98cc984733ef7da25a5eb076db36", + "tokenizer": { + "add_special_tokens": true, + "chat_template_applied": false, + "class": "TokenizersBackend", + "files_sha256": { + "config.json": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "generation_config.json": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "tokenizer.json": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "tokenizer_config.json": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63" + }, + "id": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "local_files_only": true, + "repository": "malaiwah/glm-moe-dsa-tiny-random-bf16", + "revision": "45563636ef723acfb826755493447dc40c7a0c37", + "trust_remote_code": false, + "vocab_size": 260 + }, + "tool": "build_panel.py", + "tool_sha256": "f17b17262816676d6ededcc969756ac07ff991eab73117040ec41005f6ff63f3" +} diff --git a/raw/candidates/modelopt-nvfp4/source/qfs-source.json b/raw/candidates/modelopt-nvfp4/source/qfs-source.json new file mode 100644 index 0000000000000000000000000000000000000000..3c71d8671dcbe3678b71a2efe59e0ca341bebdc0 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/source/qfs-source.json @@ -0,0 +1,11 @@ +{ + "repository": "https://github.com/malaiwah/quant-fidelity-suite", + "revision": "a903cddb078c2eda8c65d6e6c875a09ac932df49", + "source_files": { + "bin/fidelity/dscompare.py": "4a53f735e1e3fb8bd739854451b57f34e8369bffa9fd4f7b7fd935fb2e7d52df", + "bin/fidelity/dsvalidate.py": "a9d6cd57e801e3ef044a37635e24518c83dbc6d1ec8a4c0b4b5d1b24483ca8d1", + "bin/fidelity/panel.py": "0bf78fca76289920e0dc10d58082f42f24f4f2db6e0ecde61daefa4c22de286d", + "bin/fidelity_dataset.py": "ac62b63bbfde67e4d5cacecf9cd417193c50f417a6749cc15ee6f1610c153a4e", + "engines/tools/hf_capture.py": "200ba12ca74fb97531307965cbbaa5c10553a5c26e008e524ea2d8aecb005b95" + } +} diff --git a/raw/candidates/modelopt-nvfp4/source/requirements-cpu.txt b/raw/candidates/modelopt-nvfp4/source/requirements-cpu.txt new file mode 100644 index 0000000000000000000000000000000000000000..5d504ef63dffa9df18b1e01a3492065235acbe48 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/source/requirements-cpu.txt @@ -0,0 +1,38 @@ +# Tested Linux CPU environment, Python 3.12.14. +--extra-index-url https://download.pytorch.org/whl/cpu +accelerate==1.14.0 +annotated-doc==0.0.5 +anyio==4.15.1 +certifi==2026.7.22 +click==8.5.0 +filelock==3.32.5 +fsspec==2026.7.0 +h11==0.16.0 +hf-xet==1.6.0 +httpcore==1.0.9 +httpx==0.28.1 +huggingface-hub==1.30.0 +idna==3.19 +jinja2==3.1.6 +markdown-it-py==4.2.0 +markupsafe==3.0.3 +mdurl==0.1.2 +mpmath==1.3.0 +networkx==3.6.1 +numpy==2.5.3 +packaging==26.3 +psutil==7.2.2 +pygments==2.21.0 +pyyaml==6.0.3 +regex==2026.9.3 +rich==15.0.0 +safetensors==0.8.0 +setuptools==81.0.0 +shellingham==1.5.4 +sympy==1.14.0 +tokenizers==0.23.2 +torch==2.11.0+cpu +tqdm==4.70.0 +transformers==5.16.1 +typer==0.27.2 +typing-extensions==4.16.0 diff --git a/raw/candidates/modelopt-nvfp4/source/tokenizer.json b/raw/candidates/modelopt-nvfp4/source/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..5ad9cccfc9ab5ed66f1c38db328de07cbe4939a9 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/source/tokenizer.json @@ -0,0 +1,404 @@ +{ + "version": "1.0", + "truncation": null, + "padding": null, + "added_tokens": [ + { + "id": 0, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 1, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 2, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + }, + { + "id": 3, + "content": "", + "single_word": false, + "lstrip": false, + "rstrip": false, + "normalized": false, + "special": true + } + ], + "normalizer": null, + "pre_tokenizer": { + "type": "ByteLevel", + "add_prefix_space": false, + "trim_offsets": true, + "use_regex": false + }, + "post_processor": { + "type": "TemplateProcessing", + "single": [ + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + }, + { + "Sequence": { + "id": "A", + "type_id": 0 + } + }, + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + } + ], + "pair": [ + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + }, + { + "Sequence": { + "id": "A", + "type_id": 0 + } + }, + { + "SpecialToken": { + "id": "", + "type_id": 0 + } + }, + { + "Sequence": { + "id": "B", + "type_id": 1 + } + }, + { + "SpecialToken": { + "id": "", + "type_id": 1 + } + } + ], + "special_tokens": { + "": { + "id": "", + "ids": [ + 1 + ], + "tokens": [ + "" + ] + }, + "": { + "id": "", + "ids": [ + 2 + ], + "tokens": [ + "" + ] + } + } + }, + "decoder": { + "type": "ByteLevel", + "add_prefix_space": true, + "trim_offsets": true, + "use_regex": true + }, + "model": { + "type": "BPE", + "dropout": null, + "unk_token": "", + "continuing_subword_prefix": null, + "end_of_word_suffix": null, + "fuse_unk": false, + "byte_fallback": false, + "ignore_merges": false, + "vocab": { + "": 0, + "": 1, + "": 2, + "": 3, + "!": 4, + "\"": 5, + "#": 6, + "$": 7, + "%": 8, + "&": 9, + "'": 10, + "(": 11, + ")": 12, + "*": 13, + "+": 14, + ",": 15, + "-": 16, + ".": 17, + "/": 18, + "0": 19, + "1": 20, + "2": 21, + "3": 22, + "4": 23, + "5": 24, + "6": 25, + "7": 26, + "8": 27, + "9": 28, + ":": 29, + ";": 30, + "<": 31, + "=": 32, + ">": 33, + "?": 34, + "@": 35, + "A": 36, + "B": 37, + "C": 38, + "D": 39, + "E": 40, + "F": 41, + "G": 42, + "H": 43, + "I": 44, + "J": 45, + "K": 46, + "L": 47, + "M": 48, + "N": 49, + "O": 50, + "P": 51, + "Q": 52, + "R": 53, + "S": 54, + "T": 55, + "U": 56, + "V": 57, + "W": 58, + "X": 59, + "Y": 60, + "Z": 61, + "[": 62, + "\\": 63, + "]": 64, + "^": 65, + "_": 66, + "`": 67, + "a": 68, + "b": 69, + "c": 70, + "d": 71, + "e": 72, + "f": 73, + "g": 74, + "h": 75, + "i": 76, + "j": 77, + "k": 78, + "l": 79, + "m": 80, + "n": 81, + "o": 82, + "p": 83, + "q": 84, + "r": 85, + "s": 86, + "t": 87, + "u": 88, + "v": 89, + "w": 90, + "x": 91, + "y": 92, + "z": 93, + "{": 94, + "|": 95, + "}": 96, + "~": 97, + "¡": 98, + "¢": 99, + "£": 100, + "¤": 101, + "¥": 102, + "¦": 103, + "§": 104, + "¨": 105, + "©": 106, + "ª": 107, + "«": 108, + "¬": 109, + "®": 110, + "¯": 111, + "°": 112, + "±": 113, + "²": 114, + "³": 115, + "´": 116, + "µ": 117, + "¶": 118, + "·": 119, + "¸": 120, + "¹": 121, + "º": 122, + "»": 123, + "¼": 124, + "½": 125, + "¾": 126, + "¿": 127, + "À": 128, + "Á": 129, + "Â": 130, + "Ã": 131, + "Ä": 132, + "Å": 133, + "Æ": 134, + "Ç": 135, + "È": 136, + "É": 137, + "Ê": 138, + "Ë": 139, + "Ì": 140, + "Í": 141, + "Î": 142, + "Ï": 143, + "Ð": 144, + "Ñ": 145, + "Ò": 146, + "Ó": 147, + "Ô": 148, + "Õ": 149, + "Ö": 150, + "×": 151, + "Ø": 152, + "Ù": 153, + "Ú": 154, + "Û": 155, + "Ü": 156, + "Ý": 157, + "Þ": 158, + "ß": 159, + "à": 160, + "á": 161, + "â": 162, + "ã": 163, + "ä": 164, + "å": 165, + "æ": 166, + "ç": 167, + "è": 168, + "é": 169, + "ê": 170, + "ë": 171, + "ì": 172, + "í": 173, + "î": 174, + "ï": 175, + "ð": 176, + "ñ": 177, + "ò": 178, + "ó": 179, + "ô": 180, + "õ": 181, + "ö": 182, + "÷": 183, + "ø": 184, + "ù": 185, + "ú": 186, + "û": 187, + "ü": 188, + "ý": 189, + "þ": 190, + "ÿ": 191, + "Ā": 192, + "ā": 193, + "Ă": 194, + "ă": 195, + "Ą": 196, + "ą": 197, + "Ć": 198, + "ć": 199, + "Ĉ": 200, + "ĉ": 201, + "Ċ": 202, + "ċ": 203, + "Č": 204, + "č": 205, + "Ď": 206, + "ď": 207, + "Đ": 208, + "đ": 209, + "Ē": 210, + "ē": 211, + "Ĕ": 212, + "ĕ": 213, + "Ė": 214, + "ė": 215, + "Ę": 216, + "ę": 217, + "Ě": 218, + "ě": 219, + "Ĝ": 220, + "ĝ": 221, + "Ğ": 222, + "ğ": 223, + "Ġ": 224, + "ġ": 225, + "Ģ": 226, + "ģ": 227, + "Ĥ": 228, + "ĥ": 229, + "Ħ": 230, + "ħ": 231, + "Ĩ": 232, + "ĩ": 233, + "Ī": 234, + "ī": 235, + "Ĭ": 236, + "ĭ": 237, + "Į": 238, + "į": 239, + "İ": 240, + "ı": 241, + "IJ": 242, + "ij": 243, + "Ĵ": 244, + "ĵ": 245, + "Ķ": 246, + "ķ": 247, + "ĸ": 248, + "Ĺ": 249, + "ĺ": 250, + "Ļ": 251, + "ļ": 252, + "Ľ": 253, + "ľ": 254, + "Ŀ": 255, + "ŀ": 256, + "Ł": 257, + "ł": 258, + "Ń": 259 + }, + "merges": [] + } +} \ No newline at end of file diff --git a/raw/candidates/modelopt-nvfp4/source/tokenizer_config.json b/raw/candidates/modelopt-nvfp4/source/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..df4d789a0874511220f5e2676081000298ad025d --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/source/tokenizer_config.json @@ -0,0 +1,10 @@ +{ + "backend": "tokenizers", + "bos_token": "", + "clean_up_tokenization_spaces": false, + "eos_token": "", + "model_max_length": 256, + "pad_token": "", + "tokenizer_class": "TokenizersBackend", + "unk_token": "" +} diff --git a/raw/candidates/modelopt-nvfp4/source/verify_cpu.py b/raw/candidates/modelopt-nvfp4/source/verify_cpu.py new file mode 100644 index 0000000000000000000000000000000000000000..9081677f6d92ed81eec78043634f56eec3e193f5 --- /dev/null +++ b/raw/candidates/modelopt-nvfp4/source/verify_cpu.py @@ -0,0 +1,320 @@ +#!/usr/bin/env python3 +"""Two cold QFS CPU captures, strict verification, and forced numerical replay.""" +from __future__ import annotations + +import argparse +import hashlib +import json +import math +import os +from pathlib import Path +import re +import signal +import subprocess +import sys +import time +import traceback +import uuid + +DATASET_ID = "fidelity--glm-moe-dsa-tiny.malaiwah.cpu-root-v1" +DATASET_REPOSITORY = "malaiwah/glm-moe-dsa-tiny-cpu-repro-v1" +PANEL_ID = "panel--glm-moe-dsa-tiny.malaiwah.cpu-smoke-v1" +TIMEOUT_SECONDS = 300 + +# Execute the real entrypoint without changing its implementation. Set thread +# counts before any model work, and record the observed counts in every child. +CHILD_BOOTSTRAP = r''' +import json, os, platform, runpy, sys +import numpy, torch, transformers, safetensors, tokenizers +import huggingface_hub +torch.set_num_threads(2) +torch.set_num_interop_threads(2) +print(json.dumps({"stage": "fixture_child_runtime", "pid": os.getpid(), + "python": sys.version, "executable": sys.executable, + "platform": platform.platform(), "machine": platform.machine(), + "torch": torch.__version__, "transformers": transformers.__version__, + "numpy": numpy.__version__, "safetensors": safetensors.__version__, + "tokenizers": tokenizers.__version__, "huggingface_hub": huggingface_hub.__version__, + "torch_num_threads": torch.get_num_threads(), + "torch_num_interop_threads": torch.get_num_interop_threads(), + "cuda_runtime": torch.version.cuda, + "thread_environment": {k: os.environ.get(k) for k in + ("OMP_NUM_THREADS", "MKL_NUM_THREADS", "OPENBLAS_NUM_THREADS", + "NUMEXPR_NUM_THREADS", "VECLIB_MAXIMUM_THREADS")}}, sort_keys=True), flush=True) +sys.argv = sys.argv[1:] +runpy.run_path(sys.argv[0], run_name="__main__") +''' + + +def require(condition, message): + if not condition: + raise RuntimeError(message) + + +def read_json(path): + def reject_constant(value): + raise ValueError("Non-finite JSON constant: " + value) + return json.loads(Path(path).read_text(encoding="utf-8"), parse_constant=reject_constant) + + +def write_json(path, value): + Path(path).write_text(json.dumps(value, sort_keys=True, indent=2, + ensure_ascii=False, allow_nan=False) + "\n", + encoding="utf-8") + + +def sha256(path): + with Path(path).open("rb") as stream: + return hashlib.file_digest(stream, "sha256").hexdigest() + + +def positive_zero(value): + return type(value) is float and value == 0.0 and math.copysign(1.0, value) == 1.0 + + +def run_command(name, entrypoint, arguments, *, out, qfs_root, summary): + argv = [sys.executable, "-c", CHILD_BOOTSTRAP, str(entrypoint), *map(str, arguments)] + stdout_path, stderr_path = out / (name + ".stdout.log"), out / (name + ".stderr.log") + environment = os.environ.copy() + environment.update({key: "2" for key in ( + "OMP_NUM_THREADS", "MKL_NUM_THREADS", "OPENBLAS_NUM_THREADS", + "NUMEXPR_NUM_THREADS", "VECLIB_MAXIMUM_THREADS")}) + environment.update({"HF_HUB_OFFLINE": "1", "TRANSFORMERS_OFFLINE": "1", + "TOKENIZERS_PARALLELISM": "false", "PYTHONUNBUFFERED": "1"}) + record = {"name": name, "argv": argv, "cwd": str(qfs_root), + "stdout": stdout_path.name, "stderr": stderr_path.name, + "timeout_seconds": TIMEOUT_SECONDS, "returncode": None, + "timed_out": False} + summary["commands"].append(record) + started = time.monotonic() + try: + with stdout_path.open("xb") as stdout, stderr_path.open("xb") as stderr: + process = subprocess.Popen(argv, cwd=qfs_root, env=environment, + stdout=stdout, stderr=stderr, start_new_session=True) + record["pid"] = process.pid + try: + record["returncode"] = process.wait(timeout=TIMEOUT_SECONDS) + except subprocess.TimeoutExpired: + record["timed_out"] = True + os.killpg(process.pid, signal.SIGKILL) + record["returncode"] = process.wait() + finally: + record["elapsed_seconds"] = time.monotonic() - started + write_json(out / "evidence-summary.json", summary) + # Capture children produce JSONL mixed with human-readable engine output. + with stdout_path.open(encoding="utf-8", errors="replace") as stdout: + for line in stdout: + if not line.startswith("{"): + continue + try: + item = json.loads(line) + except ValueError: + continue + if isinstance(item, dict) and item.get("stage") == "fixture_child_runtime": + record["runtime"] = item + break + require(not record["timed_out"], f"{name} exceeded {TIMEOUT_SECONDS}s; logs preserved") + require(record["returncode"] == 0, + f"{name} exited {record['returncode']}; see {stderr_path.name} and {stdout_path.name}") + require(record.get("runtime", {}).get("torch_num_threads") == 2, + f"{name} did not report two observed CPU threads") + return record + + +def check_report(path): + report = read_json(path) + require(report["structural_status"] == "sealed" and report["error_count"] == 0 + and report["warning_count"] == 0, f"Strict QFS verification failed: {path}") + return report + + +def reproduce(args, out, summary): + qfs_root, model_dir, panel_dir = (Path(value).resolve(strict=True) + for value in (args.qfs_root, args.model_dir, args.panel_dir)) + require(all(path.is_dir() for path in (qfs_root, model_dir, panel_dir)), + "--qfs-root, --model-dir and --panel-dir must be directories") + capture_tool = qfs_root / "engines/tools/hf_capture.py" + dataset_tool = qfs_root / "bin/fidelity_dataset.py" + require(capture_tool.is_file() and dataset_tool.is_file(), "QFS entrypoints not found") + sys.path.insert(0, str(qfs_root / "bin")) + from fidelity import dsformat as F + from fidelity import panel + + binding = panel.resolve_panel(panel_dir, role="final", tokenizer_root=model_dir).to_dict() + tokenizer, dimensions = binding["tokenizer"], binding["panel"] + require(tokenizer["files_verified"] is True, "Panel tokenizer bytes were not verified") + require(tokenizer["repository"] == args.model_repository + and tokenizer["revision"] == args.model_revision, + "Panel tokenizer repository/revision differs from the explicit model pin") + require(tokenizer["vocab_size"] == 260, "Expected byte-level vocabulary of 260 tokens") + require(dimensions["id"] == PANEL_ID and dimensions["role"] == "final" + and dimensions["contexts"] == 4 and dimensions["context_length"] == 64 + and dimensions["positions_per_context"] == 63 + and dimensions["scored_positions_total"] == 252, + "Expected the complete four-window, 64-token, 252-position fixture panel") + require("other" in F.LANES, "QFS no longer permits the honest CPU lane 'other'") + binding_path = out / "panel-binding.json" + write_json(binding_path, binding) + binding_sha = sha256(binding_path) + summary.update({"panel_binding": binding_path.name, "panel_binding_sha256": binding_sha, + "model_repository": args.model_repository, "model_revision": args.model_revision, + "dataset_id": DATASET_ID, "dataset_repository": DATASET_REPOSITORY, + "lane": "other", "lane_description": "local CPU random-init fixture", + "device": "cpu", "dtype": "bfloat16", "cpu_threads": 2, + "qfs_source_files": {str(path.relative_to(qfs_root)): sha256(path) + for path in (capture_tool, dataset_tool, qfs_root / "bin/fidelity/panel.py", + qfs_root / "bin/fidelity/dscompare.py", + qfs_root / "bin/fidelity/dsvalidate.py")}, + "provenance_note": "Local QFS source bytes are hashed; no source commit is asserted. " + "The caller supplies an immutable model pin; QFS hashes the local checkpoint. " + "This script does not independently prove Hub-to-local weight equality.", + "captures": {}}) + disclosure = [{"code": "random_init_cpu_fixture", "severity": "info", + "affects_comparability": False, + "detail": "Complete randomly initialized tiny glm_moe_dsa checkpoint; CPU smoke " + "fixture only, not trained quality evidence or a registry measurement. " + "Lane other denotes CPU, not local-cuda-budget."}] + common = ["--model", model_dir, "--weights-repository", args.model_repository, + "--model-revision", args.model_revision, "--panel", panel_dir, + "--panel-role", "final", "--panel-binding", binding_path, + "--panel-binding-sha256", binding_sha, "--panel-tokenizer-root", model_dir, + "--role", "root", "--lane", "other", "--device", "cpu", + "--dtype", "bfloat16", "--schedule", "window-outer", + "--dataset-id", DATASET_ID, "--dataset-name", "GLM MoE DSA tiny random CPU root", + "--repository", DATASET_REPOSITORY, "--author", "malaiwah", + "--disclosures", json.dumps(disclosure, separators=(",", ":"))] + run = lambda name, tool, argv: run_command(name, tool, argv, out=out, + qfs_root=qfs_root, summary=summary) + cold_labels = {side: f"cpu-{side}-{uuid.uuid4().hex}" for side in ("first", "repeat")} + for side in ("first", "repeat"): + root = out / side + memory_path = out / (side + ".memory.json") + command = run("capture-" + side, capture_tool, + [*common, "--out", root, "--run-name", cold_labels[side], + "--cold-run", cold_labels[side], "--memory-report", memory_path]) + verify_path, strict_path = out / (side + ".verify.json"), out / (side + ".strict.json") + run("verify-" + side, dataset_tool, + ["verify", root, "--verify-tensors", "--json", verify_path]) + run("strict-" + side, dataset_tool, + ["validate", root, "--strict", "--verify-tensors", "--json", strict_path]) + check_report(verify_path) + check_report(strict_path) + manifest = F.load_manifest(str(root)) + runtime = read_json(root / manifest["runtime"]["file"]) + probe = manifest["generation_sanity_probe"] + require(probe["status"] == "recorded" and probe["degenerate"] is False + and probe["expect"] is None and probe["logit_spread"] > 0, + f"{side}: default nondegenerate generation sanity probe did not run") + require(runtime["runtime_environment"]["cold_run"] == cold_labels[side], + f"{side}: cold-run label not recorded") + require(runtime["stack_fingerprint"]["device"] == "cpu" + and manifest["runtime"]["lane"] == "other", f"{side}: not an honest CPU capture") + require(manifest["dataset"]["id"] == DATASET_ID and manifest["dataset"]["role"] == "root" + and manifest["weights"]["revision"] == args.model_revision + and manifest["weights"]["repository"] == args.model_repository, + f"{side}: model/dataset identity mismatch") + require(runtime["capture_tool"]["resolved_panel_binding"]["binding"] == binding, + f"{side}: captured panel binding differs") + require(manifest["capture"]["records_count"] == 4 + and manifest["capture"]["scored_rows_total"] == 252 + and manifest["capture"]["dtype"] == "BF16", f"{side}: incomplete BF16 capture") + summary["captures"][side] = { + "path": side, "cold_run": cold_labels[side], "pid": command["pid"], + "dataset_sha256": manifest[F.SEAL_FIELD], + "capture_content_digest": manifest["capture"]["capture_content_digest"], + "head_tensor_content_sha256": manifest["head"]["tensor_content_sha256"], + "checkpoint_identity_sha256": manifest["weights"]["checkpoint_identity_sha256"], + "stack_fingerprint_sha256": manifest["runtime"]["stack_fingerprint_sha256"], + "resources": runtime["resources"], "memory_report": read_json(memory_path), + "generation_sanity_probe": probe, "runtime_versions": command["runtime"]} + write_json(out / "evidence-summary.json", summary) + + first, repeat = (summary["captures"][side] for side in ("first", "repeat")) + for key in ("capture_content_digest", "head_tensor_content_sha256", + "checkpoint_identity_sha256", "stack_fingerprint_sha256"): + require(first[key] == repeat[key], f"Cold captures disagree: {key}") + comparison_dir = out / "comparison" + run("compare", dataset_tool, + ["compare", "--reference", out / "first", "--candidate", out / "repeat", + "--out", comparison_dir, "--self-compare", "--force-compute", "--device", "cpu", + "--replay-device", "numpy", "--replay-dtype", "float32", "--vocab-chunk", "8192", + "--chunk-positions", "128", "--verify-tensors", + "--reference-label", cold_labels["first"], "--candidate-label", cold_labels["repeat"]]) + receipt_path = comparison_dir / "comparison-receipt.json" + receipt_report = out / "comparison.validate.json" + run("validate-comparison", dataset_tool, + ["validate", "--receipt", receipt_path, "--strict", "--json", receipt_report]) + check_report(receipt_report) + receipt = read_json(receipt_path) + require(receipt["comparison_kind"] == "reproduction_confirmation" + and receipt["comparability"]["class"] == "strict", "Not a strict reproduction") + require(receipt["self_compare"]["force_compute_agreed"] is True + and receipt["self_compare"]["capture_content_digest_equal"] is True, + "Forced numerical replay did not agree with the content hash proof") + require(positive_zero(receipt["metric"]["value"]) + and all(positive_zero(value) for value in receipt["kl"].values()) + and type(receipt["top1_agreement"]) is float and receipt["top1_agreement"] == 1.0, + "Comparison did not report literal +0.0 KL and 1.0 top-1 agreement") + require(receipt["comparator"]["replay_backend"] == "numpy:cpu:float32" + and receipt["comparator"]["tensor_content_digests_verified"] is True + and receipt["measurement_scope"]["scored_positions"] == 252 + and receipt["measurement_scope"]["contexts"] == 4 + and receipt["measurement_scope"]["covers_full_panel"] is True, + "Replay backend, verification, or panel coverage differs") + import numpy as np + tokenwise_path = comparison_dir / receipt["tokenwise"]["path"] + require(sha256(tokenwise_path) == receipt["tokenwise"]["sha256"], "Tokenwise file hash differs") + values = np.load(tokenwise_path, allow_pickle=False) + require(values.dtype == np.dtype("float64") and values.shape == (252,) + and bool(np.all(values == 0.0)) and not bool(np.any(np.signbit(values))), + "Tokenwise artifact is not exactly 252 positive float64 zeros") + summary["comparison"] = { + "receipt": str(receipt_path.relative_to(out)), "receipt_sha256": receipt["receipt_sha256"], + "comparison_kind": receipt["comparison_kind"], "metric": receipt["metric"], + "kl": receipt["kl"], "top1_agreement": receipt["top1_agreement"], + "comparator": receipt["comparator"], "self_compare": receipt["self_compare"], + "tokenwise": receipt["tokenwise"], "measurement_scope": receipt["measurement_scope"], + "note": "QFS retains its hash-proof result and top-1 value for reproduction confirmations; " + "--force-compute independently runs the estimator and requires its tokenwise KL " + "array to agree exactly. short_circuited=true therefore does not mean replay was skipped."} + + +def main(argv=None): + parser = argparse.ArgumentParser(description=__doc__) + for flag in ("model-dir", "model-repository", "model-revision", "panel-dir", "out", "qfs-root"): + parser.add_argument("--" + flag, required=True) + args = parser.parse_args(argv) + if not re.fullmatch(r"[0-9a-f]{40}", args.model_revision): + parser.error("--model-revision must be an actual immutable lowercase 40-hex Hub commit") + if not re.fullmatch(r"[A-Za-z0-9][A-Za-z0-9._-]*/[A-Za-z0-9][A-Za-z0-9._-]*", args.model_repository): + parser.error("--model-repository must be an owner/repository Hub identity") + out = Path(args.out).absolute() + try: + out.mkdir(parents=True, exist_ok=False) + except OSError as exc: + parser.error(f"Refusing output directory {out}: {exc}") + started = time.monotonic() + summary = {"schema": "malaiwah.glm-moe-dsa-tiny-cpu-reproduction.v1", "status": "running", + "commands": [], "driver_argv": [sys.executable, str(Path(__file__).resolve()), + *(sys.argv[1:] if argv is None else argv)], + "driver_sha256": sha256(__file__), + "scope": "Random-init CPU reproduction only; no quality claim or registry submission."} + try: + reproduce(args, out, summary) + summary["status"] = "passed" + code = 0 + except Exception as exc: + summary.update({"status": "failed", "error": f"{type(exc).__name__}: {exc}"}) + (out / "failure.traceback.log").write_text(traceback.format_exc(), encoding="utf-8") + print(summary["error"], file=sys.stderr) + code = 1 + finally: + summary["elapsed_seconds"] = time.monotonic() - started + write_json(out / "evidence-summary.json", summary) + print(json.dumps({"status": summary["status"], "evidence": str(out / "evidence-summary.json")}, + sort_keys=True)) + return code + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/raw/publish_fixtures.py b/raw/publish_fixtures.py new file mode 100644 index 0000000000000000000000000000000000000000..af0e0ebfdd700fd88f24e3b03a9940f628593d04 --- /dev/null +++ b/raw/publish_fixtures.py @@ -0,0 +1,605 @@ +#!/usr/bin/env python3 +"""Manifest-driven private staging, then separately authorized public release. + +No model execution or shell commands. This checks already-produced evidence and +bytes; it does not turn a format fixture into optimizer/kernel qualification. +Run --prepare for local packaging, --stage for private upload, --publish only +with a successful, unchanged stage receipt. Each action requires --plan/--work. +The work directory must be new for prepare/stage. Interrupted publication is +recorded, never automatically rolled back, overwritten, or retried. + +Plan v1 (all paths absolute except paths explicitly relative to evidence.dir): +{ + "schema": "qfs.fixture-publication-plan.v1", + "bundle": "unique-bundle-slug", "owner": "HF-user-name", + "evidence_repo_id": "HF-user-name/unique-evidence-dataset", + "evidence_license": "mit", "title": "Descriptive bundle title", + "retain": [{"path": "/absolute/file-or-directory", "name": "unique-name", + "kind": "script|oracle|dependency|source"}], + "commands": [{"cwd": "/absolute/original-working-directory", + "argv": ["/absolute/python", "/absolute/generator.py", "--out", "..."]}], + "candidates": [{ + "name": "unique-case", "repo_id": "HF-user-name/unique-model-repo", + "model_dir": "/absolute/complete-model-directory", + "source": {"model_dir": "/absolute/actual-reference-checkpoint", + "license": "mit", "license_file": "/absolute/original/LICENSE", + "pin": {"repository": "source-owner/model", "revision": "40-hex-commit"}, + "pin_evidence": null}, + "format": "Exact format and quantizer description", + "classification": "lossy", + "control_max_kld": null, + "architecture_restrictions": ["Actual supported architecture and excluded views"], + "head_policy": "native", + "activation_omissions": ["Actual activation behavior not captured"], + "evidence": {"dir": "/absolute/complete-smoke-output", + "reference": "root", "candidate": "candidate", + "comparison": "comparison/comparison-receipt.json"} + }] +} +source.pin is null for genuinely locally generated sources. +When a local capture omits its known upstream revision, source.pin_evidence may +name an existing generator provenance file: {"path": "/absolute/provenance.json", +"repository_pointer": "/source/repository", "revision_pointer": "/source/revision", +"files_pointer": "/source_sha256"}. It must bind that exact pin to SHA256 hashes +of every actual reference checkpoint shard and config; it is preserved raw. +The runtime revision, when recorded, cannot be overridden by this evidence. +Exact controls use classification=exact-control, control_max_kld=0. Near controls explicitly use +classification=near-control and a finite positive control_max_kld. Both still +require a real complete decoded capture, matching checkpoint identity, passed +tensor checks, own-head application and disclosed advisory reconstruction. +retain must include real generator, runner, dependencies/source snapshots and +independent oracle reports; commands are recorded argv only, NEVER executed. +No plan field can replace sealed raw comparison/capture evidence with a flag. +""" +from __future__ import annotations + +import argparse +from datetime import datetime, timezone +import hashlib +import json +import math +from pathlib import Path, PurePosixPath +import re +import shutil +import sys +import tempfile +import uuid + +IDENTITY_ALGORITHM = ( + 'sha256 over the canonical JSON {"algorithm": , "files": ' + '[{"name", "size", "sha256"}, ...]} of every *.safetensors shard plus ' + 'config.json in the checkpoint directory, sorted by name; for a llama.cpp GGUF ' + 'tree the shards are every *.gguf of the one build directory (name = ' + "/) and config.json is the official release's copy beside it" +) +SLUG = re.compile(r"[A-Za-z0-9][A-Za-z0-9_.-]*\Z") +HEX = re.compile(r"[0-9a-f]{64}\Z") +GATES = ("seal", "form", "panel", "head", "lane", "stack", "geometry", "coverage", "lossy", "decode") +ATTRIBUTES = "*.safetensors filter=lfs diff=lfs merge=lfs -text\n*.gguf filter=lfs diff=lfs merge=lfs -text\n*.npy filter=lfs diff=lfs merge=lfs -text\n" + + +def require(condition, message): + if not condition: + raise ValueError(message) + + +def canonical(obj): + return json.dumps(obj, sort_keys=True, separators=(",", ":"), ensure_ascii=False, allow_nan=False).encode() + + +def sha(path): + with Path(path).open("rb") as handle: + return hashlib.file_digest(handle, "sha256").hexdigest() + + +def load(path): + def pairs(items): + result = {} + for key, value in items: + require(key not in result, "Duplicate JSON key: " + key) + result[key] = value + return result + return json.loads(Path(path).read_text(), object_pairs_hook=pairs, + parse_constant=lambda value: (_ for _ in ()).throw(ValueError("Nonfinite JSON: " + value))) + + +def dump(path, doc): + path = Path(path) + temporary = path.with_name(path.name + ".tmp") + temporary.write_text(json.dumps(doc, indent=2, sort_keys=True, ensure_ascii=False, allow_nan=False) + "\n") + temporary.replace(path) + + +def now(): + return datetime.now(timezone.utc).isoformat() + + +def absolute(value): + require(isinstance(value, str) and Path(value).is_absolute(), "Expected absolute existing path") + path = Path(value) + require(path.exists(), "Missing input: " + value) + return path + + +def inside(root, name): + require(isinstance(name, str) and name and "\\" not in name, "Invalid relative path") + relative = PurePosixPath(name) + require(not relative.is_absolute() and all(p not in (".", "..") for p in relative.parts), "Unsafe relative path: " + name) + path = root / name + require(path.resolve().is_relative_to(root.resolve()), "Path escapes tree: " + name) + return path + + +def tree(root): + require(root.is_dir() and not root.is_symlink(), "Expected real directory: " + str(root)) + files = {} + for path in sorted(root.rglob("*")): + relative = path.relative_to(root).as_posix() + require(not any(p in {".git", ".cache", "__pycache__"} for p in path.relative_to(root).parts), + "Remove caches/control directories from input: " + str(path)) + require(not path.name.startswith((".env", ".token")) and path.name not in {"token", "stored_tokens"}, + "Possible credential file in publication input: " + str(path)) + require(not (path.is_symlink() and path.is_dir()), "Directory symlinks are not accepted") + if path.is_file(): + files[relative] = {"size": path.stat().st_size, "sha256": sha(path)} + else: + require(path.is_dir(), "Unsupported filesystem entry: " + str(path)) + require(files, "Empty directory: " + str(root)) + return files + + +def copy_input(source, destination): + if source.is_dir(): + before = tree(source) + destination.mkdir(parents=True) + for name in before: + output = destination / name + output.parent.mkdir(parents=True, exist_ok=True) + shutil.copyfile(source / name, output) + require(tree(destination) == before == tree(source), "Input changed while copying: " + str(source)) + else: + require(source.is_file(), "Missing retained file") + before = sha(source) + destination.parent.mkdir(parents=True, exist_ok=True) + shutil.copyfile(source, destination) + require(sha(destination) == before == sha(source), "Input changed while copying") + + +def sealed(doc, field): + expected = doc.get(field) + require(isinstance(expected, str) and HEX.fullmatch(expected), "Missing seal: " + field) + body = dict(doc) + body[field] = "" + require(hashlib.sha256(canonical(body)).hexdigest() == expected, "Broken self-seal: " + field) + + +def checkpoint(root): + files = tree(root) + require("config.json" in files and files["config.json"]["size"] > 0, "Missing model config") + require(not any(n.endswith("/config.json") for n in files), "Multiple model configurations in purported model repo") + weights = [n for n in files if ("/" not in n and n.endswith(".safetensors")) + or (n.count("/") <= 1 and n.endswith(".gguf"))] + require(weights and all(files[n]["size"] > 8 for n in weights), "Missing/empty checkpoint weights") + require(not (any(n.endswith(".gguf") for n in weights) and any(n.endswith(".safetensors") for n in weights)), + "Mixed GGUF/safetensors checkpoints are not a single model; separate oracle payloads before capture") + require(any(n in files for n in ("tokenizer.json", "tokenizer.model", "vocab.json")), "Missing tokenizer payload") + if len(weights) > 1 and weights[0].endswith(".gguf"): + parts = [re.fullmatch(r"(.+)-(\d{5})-of-(\d{5})\.gguf", n) for n in weights] + require(all(parts), "Multiple unsplit GGUF models in one purported model repo") + require(len({m[1] for m in parts}) == 1 and {int(m[3]) for m in parts} == {len(parts)} + and {int(m[2]) for m in parts} == set(range(1, len(parts) + 1)), "Incomplete/mixed GGUF split set") + indexes = [n for n in files if n.endswith(".safetensors.index.json")] + require(len(indexes) <= 1, "Multiple safetensors checkpoints") + require(len(weights) == 1 or weights[0].endswith(".gguf") or indexes, "Multiple safetensors files require one complete shard index") + for name in weights: + if name.endswith(".gguf"): + with (root / name).open("rb") as handle: + require(handle.read(4) == b"GGUF", "Not a GGUF weight file: " + name) + for name in indexes: + mapping = load(root / name).get("weight_map") + require(isinstance(mapping, dict) and mapping and set(mapping.values()) == set(weights), "Incomplete safetensors shard index or unindexed extra weights") + census = [{"name": n, **files[n]} for n in sorted(["config.json", *weights])] + identity = hashlib.sha256(json.dumps({"algorithm": IDENTITY_ALGORITHM, "files": census}, + sort_keys=True, separators=(",", ":")).encode()).hexdigest() + return identity, census + + +def capture(root, side, model_root): + manifest = load(root / "fidelity-dataset.json") + sealed(manifest, "dataset_sha256") + require(manifest["dataset_sha256"] == side["dataset_sha256"], "Receipt names another capture") + require(manifest["capture"]["capture_content_digest"] == side["capture_content_digest"], "Capture identity mismatch") + require(manifest.get("coverage", {}).get("complete") is True, "Partial capture") + checksums = inside(root, manifest["seal"]["checksums_file"]) + require(sha(checksums) == manifest["seal"]["checksums_sha256"], "Changed checksum manifest") + listed = set() + for line in checksums.read_text().splitlines(): + expected, name = line.split(" ", 1) + require(name not in listed and HEX.fullmatch(expected), "Invalid checksum inventory") + listed.add(name) + require(sha(inside(root, name)) == expected, "Changed capture evidence: " + name) + inventory = tree(root) + require(set(inventory) == listed | {"fidelity-dataset.json", checksums.relative_to(root).as_posix()}, + "Unsealed or missing capture evidence") + runtime_path = inside(root, manifest["runtime"]["file"]) + require(sha(runtime_path) == manifest["runtime"]["file_sha256"], "Changed runtime receipt") + runtime = load(runtime_path) + sealed(runtime, "receipt_sha256") + weights = runtime["weights"] + identity, census = checkpoint(model_root) + require(weights.get("checkpoint_identity_algorithm") == IDENTITY_ALGORITHM, "Unsupported checkpoint identity algorithm") + require(weights.get("checkpoint_files") == census, "Actual checkpoint files differ from captured census") + require(weights.get("checkpoint_identity_sha256") == identity == side["weights"]["checkpoint_identity_sha256"], + "Actual checkpoint identity differs from comparison") + require(side["weights"].get("config_sha256") == sha(model_root / "config.json"), "Config not comparison's actual config") + return runtime + + +def qualify(candidate): + evidence = candidate["evidence"] + evidence_root = absolute(evidence["dir"]) + model_root = absolute(candidate["model_dir"]) + source_root = absolute(candidate["source"]["model_dir"]) + receipt_path = inside(evidence_root, evidence["comparison"]) + receipt = load(receipt_path) + require(receipt.get("schema") == "malaiwah.fidelity-comparison-receipt.v1", "Unknown comparison schema") + sealed(receipt, "receipt_sha256") + for name in GATES: + gate = receipt.get("gates", {}).get(name, {}) + require(gate.get("passed") is True and gate.get("overridden_by") is None, "Failed/missing/overridden comparison gate: " + name) + comparator = receipt["comparator"] + require(comparator.get("source_file_hashes_verified") is True and comparator.get("tensor_content_digests_verified") is True, + "Passed byte AND tensor checks required") + metric = receipt["metric"] + require(metric.get("name") == "mean_tokenwise_kld" and metric.get("units") == "nats" + and metric.get("direction") == "reference_to_candidate", "Wrong metric") + value = metric["value"] + require(type(value) in (float, int) and math.isfinite(value) and value >= 0, "Invalid KL") + classification = candidate["classification"] + if classification == "lossy": + require(value > 0 and receipt.get("comparison_kind") == "measurement", "Lossy fixtures require strictly positive measured KL") + require(comparator.get("short_circuited") is False, "Lossy measurement was short-circuited") + require(candidate.get("control_max_kld") is None, "Lossy fixture cannot declare control tolerance") + elif classification == "exact-control": + require(value == 0 and candidate["control_max_kld"] == 0, "Exact control is not exact") + elif classification == "near-control": + tolerance = candidate["control_max_kld"] + require(type(tolerance) in (float, int) and math.isfinite(tolerance) and tolerance > 0 and value <= tolerance, + "Near control exceeds explicit finite tolerance") + else: + raise ValueError("Explicit lossy/exact-control/near-control classification required") + if comparator.get("short_circuited"): + require(receipt.get("self_compare", {}).get("force_compute_agreed") is True, "Control requires actual force-compute confirmation") + measured = receipt["measurement_scope"] + require(measured.get("covers_full_panel") is True and measured.get("position_filter") == "all" + and measured.get("scored_positions", 0) > 0 and measured.get("contexts", 0) > 0, "Incomplete measurement scope") + disclosures = receipt.get("disclosures", []) + require(receipt["comparability"]["class"] == "advisory" + and any(d.get("code") == "weights_reconstructed" and d.get("affects_comparability") is True for d in disclosures), + "Missing advisory weight-reconstruction disclosure") + reference_runtime = capture(inside(evidence_root, evidence["reference"]), receipt["reference"], source_root) + runtime = capture(inside(evidence_root, evidence["candidate"]), receipt["candidate"], model_root) + decode = runtime.get("capture_tool", {}).get("weights_decode") + require(isinstance(decode, dict) and any(type(decode.get(k)) is int and decode[k] > 0 + for k in ("modules_decoded", "tensors_decoded")), "No recorded decoder activity") + for key in ("modules_not_decoded", "components_not_consumed", "tensors_not_decoded"): + require(not decode.get(key), "Decoder left planned checkpoint content unconsumed") + for unit in ("modules", "components", "tensors"): + if unit + "_planned" in decode: + consumed_key = unit + ("_consumed" if unit == "components" else "_decoded") + require(decode.get(consumed_key) == decode[unit + "_planned"], "Incomplete decoder coverage") + policy = receipt["estimator"]["head_policy"] + if policy == "shared_reference_head": + a = receipt["reference"]["head"].get("tensor_content_sha256") + b = receipt["candidate"]["head"].get("tensor_content_sha256") + require(a and a == b and comparator.get("head_applied_tensor_content_sha256") == a, + "Shared reference head is not the candidate's identical own head") + else: + require(policy == "native_head", "Not own-head KL") + for side in ("reference", "candidate"): + if receipt[side]["form"] == "hidden": + require(comparator.get("head_applied_" + side + "_tensor_content_sha256") == receipt[side]["head"].get("tensor_content_sha256") + and receipt[side]["head"].get("tensor_content_sha256"), "Wrong head applied") + scope = load(model_root / "scope.json") + require(scope.get("head_policy") == candidate["head_policy"], "Declared head policy differs from model scope") + source = candidate["source"] + license_path = absolute(source["license_file"]) + require(license_path.is_file() and license_path.stat().st_size > 0, "Missing original license") + require((model_root / "LICENSE").is_file() and sha(model_root / "LICENSE") == sha(license_path), "Model must preserve original LICENSE bytes") + require((source_root / "LICENSE").is_file() and sha(source_root / "LICENSE") == sha(license_path), "Source LICENSE differs from declared original license") + pin = source["pin"] + for name in ("provenance.json", "fixture-provenance.json", "build.json"): + if (model_root / name).is_file(): + provenance = load(model_root / name) + known = provenance.get("source") or provenance.get("reference") + if not isinstance(known, dict): + known = {"repository": provenance.get("source_repository"), "revision": provenance.get("source_revision")} + if known.get("repository") and known.get("revision"): + require(pin == {"repository": known["repository"], "revision": known["revision"]}, "Plan omits/changes generator's actual source pin") + recorded = reference_runtime["weights"] + if pin is not None: + require(re.fullmatch(r"[0-9a-f]{40}", pin["revision"]) is not None, "Source must have immutable commit pin") + if recorded.get("revision"): + require(recorded.get("repository") == pin["repository"] and recorded["revision"] == pin["revision"], "Source pin differs from actual captured source") + else: + attestation = source.get("pin_evidence") + require(isinstance(attestation, dict), "Unpinned local capture requires retained source-pin byte provenance") + document = load(absolute(attestation["path"])) + def pointer(key): + value = document + path = attestation[key] + require(path.startswith("/"), "Expected JSON pointer") + for part in path[1:].split("/"): + value = value[part.replace("~1", "/").replace("~0", "~")] + return value + require(pointer("repository_pointer") == pin["repository"] and pointer("revision_pointer") == pin["revision"], "Source provenance pin mismatch") + hashes = pointer("files_pointer") + require(isinstance(hashes, dict), "Source provenance must contain a file SHA256 map") + for entry in recorded["checkpoint_files"]: + require(hashes.get(entry["name"]) == entry["sha256"], "Source pin provenance does not bind actual checkpoint bytes") + else: + require(not recorded.get("revision") and source.get("pin_evidence") is None, "Recorded source pin cannot be omitted") + for key in ("architecture_restrictions", "activation_omissions"): + require(isinstance(candidate[key], list) and candidate[key] and all(isinstance(s, str) and s.strip() for s in candidate[key]), "Explicit " + key + " required") + require(candidate["format"] and candidate["head_policy"] and source["license"], "Missing card metadata") + tokenwise = receipt["tokenwise"] + tokenwise_path = inside(receipt_path.parent, tokenwise["path"]) + require(sha(tokenwise_path) == tokenwise["sha256"] and tokenwise_path.stat().st_size == tokenwise["bytes"], "Changed/missing tokenwise KL evidence") + return {"name": candidate["name"], "kld_nats": value, "classification": classification, + "comparison_receipt_sha256": sha(receipt_path), "checkpoint_identity_sha256": runtime["weights"]["checkpoint_identity_sha256"], + "source_checkpoint_identity_sha256": reference_runtime["weights"]["checkpoint_identity_sha256"], + "decode": decode, "head_application": policy, "disclosures": disclosures, + "measurement_scope": measured, "scope": scope} + + +def card(plan, candidate, proof): + license_id = candidate["source"]["license"] if candidate else plan["evidence_license"] + title = candidate["name"] if candidate else plan["title"] + body = ["---", "license: " + json.dumps(license_id), "tags:", "- format-fixture", "- random-init", "- rtn", "- optimizer-not-run", "---", "", "# " + title, "", + "Complete tiny random FORMAT fixture evidence. Round-to-nearest (RTN) storage/reader exercise only; **optimizer-not-run**. No GPTQ/AWQ/AutoRound optimization, calibrated ModelOpt/CT/QAT quality, trained-model quality ranking, GPU parity, or native serving-kernel correctness claim.", "", + "Reconstructed weights are evaluated by the captured native forward. KL is own-head, full-vocabulary on the recorded panel, not a benchmark of training quality. Advisory reconstruction and activation omissions are retained verbatim in the raw evidence.", ""] + if candidate: + body += ["## Exact scope", "", "```json", json.dumps({k: candidate[k] for k in ("format", "classification", "control_max_kld", "architecture_restrictions", "head_policy", "activation_omissions", "source")}, indent=2), "```", "", + "The original source license is preserved verbatim in `LICENSE`; its license identifier is " + license_id + ". Source paths in the plan are historical execution locations, not remote download links.", "", + "## Observed evidence", "", "```json", json.dumps(proof, indent=2), "```", "", + "Reproducibility dataset: https://huggingface.co/datasets/" + plan["evidence_repo_id"], ""] + else: + body += ["This is a **dataset evidence bundle**, not a multi-model model repository. Each consumer model has its own repository:", ""] + body += ["- https://huggingface.co/" + c["repo_id"] for c in plan["candidates"]] + body += ["", "Raw model/source trees, original cards/licenses, captures, reports and retained scripts are preserved under `raw/`. `qualification.json` records checked results, `source-inventory.json` records every original source byte, and `publication-plan.json` records the exact commands and provenance. Each upstream source retains its own license; the dataset license does not relicense bundled code or checkpoints.", ""] + body += ["## Reproduction commands and source hashes", "", "Commands below are recorded argv, not executed by this publisher. Restore each recorded input from the dataset raw trees and map original absolute paths to your workspace. Retained tools/dependency files and byte hashes are in `source-inventory.json`; do not substitute moving upstream branches.", "", "```json", json.dumps(plan["commands"], indent=2), "```", "", + "The publication receipt is written locally only after anonymous verification of complete remote bytes at exact commits. Publication is not additional model or serving qualification.", ""] + return "\n".join(body) + + +def prepare(plan_path, work): + plan = load(plan_path) + require(plan.get("schema") == "qfs.fixture-publication-plan.v1", "Unknown publication plan schema") + require(SLUG.fullmatch(plan["bundle"]) and SLUG.fullmatch(plan["owner"]), "Invalid bundle/owner") + require(plan["candidates"] and plan["retain"] and plan["commands"], "Candidates, retained reproducibility files and commands required") + require({"script", "oracle", "dependency"}.issubset({item["kind"] for item in plan["retain"]}), "Retain generator/runner scripts, independent oracle reports and dependency pins explicitly") + require(all(item["kind"] in {"script", "oracle", "dependency", "source"} for item in plan["retain"]), "Unknown retained artifact kind") + inputs = [item["path"] for item in plan["retain"]] + inputs += [p for c in plan["candidates"] for p in (c["model_dir"], c["source"]["model_dir"], c["evidence"]["dir"])] + require(all(not absolute(p).is_dir() or not work.resolve().is_relative_to(absolute(p).resolve()) for p in inputs), "Work directory must not be inside any input tree") + repos = [plan["evidence_repo_id"], *[c["repo_id"] for c in plan["candidates"]]] + require(len(set(repos)) == len(repos), "Every model and evidence dataset requires a distinct repo ID") + for repo in repos: + require(repo.startswith(plan["owner"] + "/") and len(repo.split("/")) == 2 and SLUG.fullmatch(repo.split("/")[1]), "Repo IDs must belong to the explicit owner") + names = [c["name"] for c in plan["candidates"]] + require(len(set(names)) == len(names) and all(SLUG.fullmatch(n) for n in names), "Duplicate/invalid candidate name") + require("evidence" not in names, "Candidate name evidence is reserved") + require(len(set(str(absolute(c["model_dir"]).resolve()) for c in plan["candidates"])) == len(names), "Duplicate model directory") + for command in plan["commands"]: + require(absolute(command["cwd"]).is_dir() and isinstance(command["argv"], list) and command["argv"] + and all(isinstance(v, str) and v and "\x00" not in v for v in command["argv"]), "Invalid recorded command") + # Qualify original bytes before creating work; qualify snapshots again below. + proofs = [qualify(c) for c in plan["candidates"]] + work.mkdir(parents=True, exist_ok=False) + evidence = work / "payloads" / "evidence" + evidence.mkdir(parents=True) + source_inventory = {} + for item in plan["retain"]: + name = item["name"] + require(SLUG.fullmatch(name) and name not in source_inventory and name != "publisher", "Duplicate/invalid retained name") + source = absolute(item["path"]) + output = evidence / "raw" / "retained" / name + copy_input(source, output) + source_inventory[name] = {"kind": item["kind"], "original_path": str(source), "files": tree(output) if output.is_dir() else {name: {"size": output.stat().st_size, "sha256": sha(output)}}} + source_inventory["publisher"] = {"original_path": str(Path(__file__).resolve()), "sha256": sha(__file__)} + copy_input(Path(__file__).resolve(), evidence / "raw" / "publish_fixtures.py") + repos_out = [] + for candidate, proof in zip(plan["candidates"], proofs): + raw = evidence / "raw" / "candidates" / candidate["name"] + for key, source in (("model", candidate["model_dir"]), ("source", candidate["source"]["model_dir"]), ("evidence", candidate["evidence"]["dir"])): + copy_input(absolute(source), raw / key) + copied = json.loads(json.dumps(candidate)) + copied["model_dir"] = str(raw / "model") + copied["source"]["model_dir"] = str(raw / "source") + copied["source"]["license_file"] = str(raw / "model" / "LICENSE") + copied["evidence"]["dir"] = str(raw / "evidence") + if candidate["source"].get("pin_evidence"): + pin_file = raw / "source-pin-evidence.json" + copy_input(absolute(candidate["source"]["pin_evidence"]["path"]), pin_file) + copied["source"]["pin_evidence"]["path"] = str(pin_file) + require(qualify(copied) == proof, "Snapshot evidence differs from original") + source_inventory["candidate:" + candidate["name"]] = {"original_model": candidate["model_dir"], "files": tree(raw)} + model = work / "payloads" / candidate["name"] + copy_input(raw / "model", model) + (model / "README.md").write_text(card(plan, candidate, proof)) + (model / ".gitattributes").write_text(ATTRIBUTES) + dump(model / "qualification.json", proof) + dump(model / "publication-plan.json", plan) + repos_out.append({"repo_id": candidate["repo_id"], "repo_type": "model", "directory": model.relative_to(work).as_posix()}) + dump(evidence / "source-inventory.json", source_inventory) + dump(evidence / "qualification.json", proofs) + dump(evidence / "publication-plan.json", plan) + (evidence / "README.md").write_text(card(plan, None, None)) + (evidence / ".gitattributes").write_text(ATTRIBUTES) + for repo in repos_out: + shutil.copyfile(evidence / "source-inventory.json", work / repo["directory"] / "source-inventory.json") + repos_out.append({"repo_id": plan["evidence_repo_id"], "repo_type": "dataset", "directory": evidence.relative_to(work).as_posix()}) + for repo in repos_out: + repo["inventory"] = tree(work / repo["directory"]) + receipt = {"schema": "qfs.fixture-private-stage.v1", "status": "prepared", "created_utc": now(), + "stage_id": str(uuid.uuid4()), "owner": plan["owner"], "plan_sha256": sha(plan_path), + "publisher_sha256": sha(__file__), "repositories": repos_out} + dump(work / "stage-receipt.json", receipt) + return receipt + + +def authenticated_api(): + from huggingface_hub import HfApi, constants + # Deliberately use installed auth, not environment/CLI/plan credentials. + token_path = Path(constants.HF_TOKEN_PATH) + require(token_path.is_file(), "Install Hugging Face authentication with hf auth login first") + token = token_path.read_text().strip() + require(bool(token), "Installed Hugging Face authentication is empty") + return HfApi(token=token) + + +def verify_remote(api, repo, work, *, anonymous): + from huggingface_hub import hf_hub_download + info = api.repo_info(repo["repo_id"], repo_type=repo["repo_type"], revision=repo["commit"]) + require(info.sha == repo["commit"], "Remote immutable commit mismatch") + names = api.list_repo_files(repo["repo_id"], repo_type=repo["repo_type"], revision=repo["commit"]) + require(set(names) == set(repo["inventory"]), "Remote file inventory is incomplete or has unexpected files") + # Fresh cache: every byte must actually be accessible, not a local cache hit. + with tempfile.TemporaryDirectory(prefix="anonymous-" if anonymous else "private-", dir=work) as cache: + for name, expected in repo["inventory"].items(): + path = Path(hf_hub_download(repo["repo_id"], name, repo_type=repo["repo_type"], revision=repo["commit"], + token=False if anonymous else api.token, cache_dir=cache, force_download=True)) + require(path.stat().st_size == expected["size"] and sha(path) == expected["sha256"], "Remote byte mismatch: " + name) + return {"verified_utc": now(), "anonymous": anonymous, "files": len(names), + "bytes": sum(f["size"] for f in repo["inventory"].values()), "commit": repo["commit"]} + + +def unchanged(plan_path, work, receipt): + require(receipt["schema"] == "qfs.fixture-private-stage.v1" and receipt["plan_sha256"] == sha(plan_path) + and receipt["publisher_sha256"] == sha(__file__), "Stage plan/publisher changed") + for repo in receipt["repositories"]: + require(tree(inside(work, repo["directory"])) == repo["inventory"], "Staged payload changed") + + +def stage(plan_path, work): + from huggingface_hub import CommitOperationAdd + receipt = prepare(plan_path, work) + api = authenticated_api() + require(api.whoami()["name"] == receipt["owner"], "Installed auth is not explicit repository owner") + for repo in receipt["repositories"]: + require(not api.repo_exists(repo["repo_id"], repo_type=repo["repo_type"]), "Refusing existing repository (private or public): " + repo["repo_id"]) + try: + for repo in receipt["repositories"]: + unchanged(plan_path, work, receipt) + api.create_repo(repo["repo_id"], repo_type=repo["repo_type"], private=True, exist_ok=False) + repo["created_by_stage"] = receipt["stage_id"] + dump(work / "stage-receipt.json", receipt) + initial = api.repo_info(repo["repo_id"], repo_type=repo["repo_type"]) + require(initial.private is True and not initial.gated, "New stage is not private/ungated") + require(set(api.list_repo_files(repo["repo_id"], repo_type=repo["repo_type"])) <= {".gitattributes"}, "New repository is not empty") + operations = [CommitOperationAdd(path_in_repo=name, path_or_fileobj=str(work / repo["directory"] / name)) for name in repo["inventory"]] + result = api.create_commit(repo["repo_id"], repo_type=repo["repo_type"], operations=operations, + parent_commit=initial.sha, commit_message="Private verified fixture stage " + receipt["stage_id"]) + repo["commit"] = result.oid + dump(work / "stage-receipt.json", receipt) + repo["private_verification"] = verify_remote(api, repo, work, anonymous=False) + current = api.repo_info(repo["repo_id"], repo_type=repo["repo_type"]) + require(current.private is True and current.sha == repo["commit"], "Stage changed during verification") + dump(work / "stage-receipt.json", receipt) + unchanged(plan_path, work, receipt) + receipt["status"] = "private-stage-verified" + receipt["completed_utc"] = now() + receipt["receipt_sha256"] = "" + receipt["receipt_sha256"] = hashlib.sha256(canonical(receipt)).hexdigest() + except Exception as exc: + receipt["status"] = "private-stage-failed" + receipt["failure_type"] = type(exc).__name__ + raise + finally: + dump(work / "stage-receipt.json", receipt) + + +def publish(plan_path, work): + from huggingface_hub import HfApi + receipt_path = work / "stage-receipt.json" + receipt = load(receipt_path) + sealed(receipt, "receipt_sha256") + unchanged(plan_path, work, receipt) + require(receipt["status"] == "private-stage-verified", "Only a successful private stage can be published") + require(not (work / "publication-receipt.json").exists(), "Publication already attempted; manual investigation required") + api = authenticated_api() + require(api.whoami()["name"] == receipt["owner"], "Stage owner differs from installed auth") + + def guard(repo): + require(repo.get("created_by_stage") == receipt["stage_id"] and repo.get("private_verification", {}).get("commit") == repo.get("commit"), "Repository not owned/verified by this stage") + current = api.repo_info(repo["repo_id"], repo_type=repo["repo_type"]) + require(current.private is True and not current.gated and current.sha == repo["commit"], "Refusing nonprivate/gated/changed current repository: " + repo["repo_id"]) + + for repo in receipt["repositories"]: + guard(repo) + verify_remote(api, repo, work, anonymous=False) + unchanged(plan_path, work, receipt) + for repo in receipt["repositories"]: + guard(repo) + publication = {"schema": "qfs.fixture-publication-receipt.v1", "status": "publishing", "stage_id": receipt["stage_id"], + "stage_receipt_sha256": sha(receipt_path), "plan_sha256": receipt["plan_sha256"], + "started_utc": now(), "repositories": []} + dump(work / "publication-receipt.json", publication) + try: + # HF visibility has no commit-CAS API. Guard immediately before and after + # each transition; record any partial release honestly, never roll back. + for repo in receipt["repositories"]: + guard(repo) + row = {"repo_id": repo["repo_id"], "repo_type": repo["repo_type"], "commit": repo["commit"], "inventory": repo["inventory"], "transition": "requested"} + publication["repositories"].append(row) + dump(work / "publication-receipt.json", publication) + api.update_repo_settings(repo["repo_id"], repo_type=repo["repo_type"], private=False) + row["transition"] = "public" + dump(work / "publication-receipt.json", publication) + anonymous_api = HfApi(token=False) + current = anonymous_api.repo_info(repo["repo_id"], repo_type=repo["repo_type"]) + require(current.private is False and not current.gated and current.sha == repo["commit"], "Public current commit changed or access remains restricted") + row["anonymous_verification"] = verify_remote(anonymous_api, repo, work, anonymous=True) + dump(work / "publication-receipt.json", publication) + for repo in receipt["repositories"]: + current = HfApi(token=False).repo_info(repo["repo_id"], repo_type=repo["repo_type"]) + require(current.private is False and not current.gated and current.sha == repo["commit"], "Public final-state drift") + unchanged(plan_path, work, receipt) + publication["status"] = "public-anonymous-bytes-verified" + publication["completed_utc"] = now() + except Exception as exc: + publication["status"] = "failed-possibly-partially-public" + publication["failure_type"] = type(exc).__name__ + raise + finally: + dump(work / "publication-receipt.json", publication) + + +def main(): + parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) + parser.add_argument("--plan", required=True, type=Path) + parser.add_argument("--work", required=True, type=Path) + action = parser.add_mutually_exclusive_group(required=True) + action.add_argument("--prepare", action="store_true", help="Local-only checks/packaging into a new directory") + action.add_argument("--stage", action="store_true", help="Prepare a new work directory and create new private repos") + action.add_argument("--publish", action="store_true", help="Publish only the unchanged successful owned private stage") + args = parser.parse_args() + require(args.work.is_absolute(), "--work must be absolute") + if args.publish: + publish(args.plan, args.work) + elif args.stage: + stage(args.plan, args.work) + else: + prepare(args.plan, args.work) + print(json.dumps({"action": "publish" if args.publish else "stage" if args.stage else "prepare", "work": str(args.work)})) + + +if __name__ == "__main__": + try: + main() + except Exception as error: + # Third-party HTTP exception reprs may contain request details. Never + # serialize them or auth state; local validation messages contain paths. + message = str(error) if type(error) in (ValueError, FileNotFoundError, KeyError) else type(error).__name__ + print("publish_fixtures: refused: " + message, file=sys.stderr) + sys.exit(1) diff --git a/raw/retained/bin--fidelity--dscompare.py b/raw/retained/bin--fidelity--dscompare.py new file mode 100644 index 0000000000000000000000000000000000000000..6dfcdfe7a0a23bfd56ffdbb858c150706b4c56eb --- /dev/null +++ b/raw/retained/bin--fidelity--dscompare.py @@ -0,0 +1,2150 @@ +"""Step 3: compare two fidelity datasets. + +Two halves, deliberately separable: + + * the GATE LADDER (spec section 10.1) -- eleven ordered gates, each with a + named refusal id. Pure stdlib + numpy, no torch, so every refusal is + testable on a stock py3.9 interpreter with no GPU; + * the ESTIMATOR (spec section 10.2) -- full vocabulary, fp64 log_softmax. + When torch is importable this is `kld_report._token_kld`, imported and + called, never reimplemented, so a number produced here is the same number + the sealed pipeline produces. Without torch it falls back to the identical + fp64 formula in numpy and SAYS SO in the receipt + (`comparator.estimator_backend`), because a silent backend swap is exactly + the kind of undeclared difference this whole format exists to stop. + + * the REPLAY (`_replay` / `_TorchReplay`) -- `logits' = hidden @ head.T` for + a hidden-form capture. This is where the wall-clock is: M1 measured one + 512-window comparison at 60m19s against a 335s capture of the same panel, + because the head matmul ran in numpy on the CPU while the GPU already + holding that head for the estimator sat at 0%. `--replay-device cuda` + moves it, and because an fp32 GEMM's accumulation order is the BLAS's + choice, that is a DIFFERENT NUMBER in the last digits, so it is opt-in and + named on the receipt (`comparator.replay_backend`). + +The A == B short-circuit (SC-1) answers by hash proof without a matmul; +`--force-compute` runs the math anyway and asserts bitwise agreement. +""" + +from __future__ import annotations + +import functools +import os +import sys +from typing import Any, Dict, List, Optional, Sequence, Tuple + +from . import dsformat as F +from . import dsvalidate + +_HERE = os.path.dirname(os.path.abspath(__file__)) +_REPO = os.path.dirname(os.path.dirname(_HERE)) +_K6_TOOLS = os.path.join(_REPO, "engines", "tools") + + +class Refusal(Exception): + """A gate said no. + + `override` names the flag that would have allowed it; `remedy` is prose for + the refusals that have NO override, so a caller can tell "you passed the + wrong path" apart from "this is refused by design". + """ + + def __init__(self, gate: str, code: str, message: str, override: Optional[str] = None, + remedy: Optional[str] = None): + self.gate = gate + self.code = code + self.message = message + self.override = override + self.remedy = remedy + super().__init__("%s: %s%s" % (code, message, + (" [override: %s]" % override) if override else "")) + + +# --------------------------------------------------------------------------- +# Dataset handle +# --------------------------------------------------------------------------- + + +class Dataset(object): + """A loaded, seal-verified fidelity dataset.""" + + def __init__(self, root: str, manifest: Dict[str, Any], + capture: Dict[str, Any], panel: Dict[str, Any], + head_doc: Optional[Dict[str, Any]]): + self.root = root + self.manifest = manifest + self.capture_manifest = capture + self.panel_doc = panel + self.head_doc = head_doc + + # -- convenience accessors ------------------------------------------------- + @property + def form(self) -> str: + return self.manifest["capture"]["form"] + + @property + def head(self) -> Dict[str, Any]: + return self.manifest["head"] + + @property + def lane(self) -> str: + return self.manifest["runtime"]["lane"] + + @property + def content_digest(self) -> str: + return self.manifest["capture"]["capture_content_digest"] + + @property + def records(self) -> List[Dict[str, Any]]: + return sorted(self.capture_manifest.get("records") or [], + key=lambda r: int(r["index"])) + + def record_path(self, record: Dict[str, Any]) -> str: + base = os.path.dirname(self.manifest["capture"]["manifest_file"]) + return os.path.join(self.root, base, record["file"]) + + def head_path(self) -> Optional[str]: + rel = self.head.get("file") + if not rel: + return None + full = os.path.join(self.root, rel) + return full if os.path.isfile(full) else None + + def panel_by_index(self) -> Dict[int, Dict[str, Any]]: + return {int(r["index"]): r for r in self.panel_doc.get("records") or []} + + def side_block(self, label: str) -> Dict[str, Any]: + manifest = self.manifest + head = manifest["head"] + return { + "label": label, + "dataset_id": (manifest.get("dataset") or {}).get("id"), + "dataset_sha256": manifest[F.SEAL_FIELD], + "capture_content_digest": self.content_digest, + "role": (manifest.get("dataset") or {}).get("role"), + "form": self.form, + "lane": manifest["runtime"]["lane"], + "repository": (manifest.get("dataset") or {}).get("repository"), + "revision": (manifest.get("dataset") or {}).get("revision"), + "head": { + "tensor_content_sha256": head.get("tensor_content_sha256"), + "raw_tensor_sha256": head.get("raw_tensor_sha256"), + "quantized": head.get("quantized"), + "bits": head.get("bits"), + "source": head.get("source"), + }, + "stack_fingerprint_sha256": manifest["runtime"].get("stack_fingerprint_sha256"), + "lane_identity_sha256": manifest["runtime"].get("lane_identity_sha256"), + "weights": dict(manifest.get("weights") or {}), + "scope_digest": (manifest.get("scope") or {}).get("scope_digest"), + } + + def weights_identity(self) -> Tuple[Any, Any, Any]: + weights = self.manifest.get("weights") or {} + return ( + weights.get("model_revision"), + weights.get("checkpoint_identity_sha256"), + (self.manifest.get("scope") or {}).get("scope_digest"), + ) + + @functools.cached_property + def weights_decode(self) -> Optional[Dict[str, Any]]: + """The decode the capture applied to the checkpoint's bytes before the + forward, from the sealed runtime receipt (`capture_tool.weights_decode`, + written by `layer_outer.weights_decode_evidence`). None for a native + checkpoint, for a runtime receipt that predates the field, and for a + dataset whose runtime file is absent. The runtime file is inside + checksums.txt, so after gate 1 its content is as trusted as the manifest. + """ + rel = (self.manifest.get("runtime") or {}).get("file") + if not rel: + return None + full = os.path.join(self.root, rel) + if not os.path.isfile(full): + return None + tool = (F.read_json(full) or {}).get("capture_tool") or {} + decode = tool.get("weights_decode") + return decode if isinstance(decode, dict) else None + + +def load_dataset(root: str, verify: bool = True, verify_tensors: bool = False, + allow_partial: bool = False) -> Dataset: + """Gate 1: seal. A dataset that does not verify is never compared.""" + if verify: + report = dsvalidate.validate_dataset( + root, verify_tensors=verify_tensors, allow_partial=allow_partial) + if not report.passed: + first = report.errors[0] + raise Refusal("seal", "seal_failed", + "%s did not verify: [%s/%s] %s" + % (root, first["code"], first["rule"], first["message"])) + manifest = F.load_manifest(root) + capture = F.read_json(os.path.join(root, manifest["capture"]["manifest_file"])) + panel = F.read_json(os.path.join(root, manifest["panel"]["panel_file"])) + head_doc = None + if manifest["head"].get("head_json"): + head_path = os.path.join(root, manifest["head"]["head_json"]) + if os.path.isfile(head_path): + head_doc = F.read_json(head_path) + return Dataset(root, manifest, capture, panel, head_doc) + + +# --------------------------------------------------------------------------- +# The gate ladder (spec section 10.1) +# --------------------------------------------------------------------------- + + +PANEL_REMEDY = ( + "none by design (PANEL-D3): a comparison is only meaningful between two captures of the " + "SAME panel, so there is no override flag. Check you passed the paths you meant; " + "otherwise recapture the candidate on the reference's panel.") + + +def _gate(passed: bool, detail: str, overridden_by: Optional[str] = None) -> Dict[str, Any]: + return {"passed": bool(passed), "detail": detail, "overridden_by": overridden_by} + + +# The tokenizer fields that are panel IDENTITY. `vocab_size` is here because a +# different vocabulary is a different distribution; `add_special_tokens` and +# `chat_template_applied` because either one changes what text the ids stand for. +TOKENIZER_IDENTITY_FIELDS = ("id", "repository", "revision", "vocab_size", + "add_special_tokens", "chat_template_applied") + + +def _tokenizer_divergence(a: Optional[Dict[str, Any]], b: Optional[Dict[str, Any]] + ) -> Dict[str, Tuple[Any, Any]]: + """Which identity fields two tokenizer blocks disagree on. + + A field that is absent or null on EITHER side is unknown, not different: an + adapted dataset legitimately cannot name a revision. Only a genuine + disagreement between two stated values is a refusal. + """ + left, right = (a or {}), (b or {}) + out: Dict[str, Tuple[Any, Any]] = {} + for field in TOKENIZER_IDENTITY_FIELDS: + av, bv = left.get(field), right.get(field) + if av is None or bv is None: + continue + if av != bv: + out[field] = (av, bv) + return out + + +def run_gates(reference: Dataset, candidate: Dataset, options: Dict[str, Any] + ) -> Tuple[Dict[str, Any], Dict[str, Any]]: + """Run gates 2-9 in order, stopping at the first refusal. + + Returns (gates, findings). `findings` carries what the receipt needs: + same_lane, stack_relation, head_policy, comparability class, disclosures, + the shared index set, and the head to apply. + """ + gates: Dict[str, Any] = {} + findings: Dict[str, Any] = {"disclosures": [], "class": "strict", + "usable_as_floor": True} + + # --- 2. form ------------------------------------------------------------ + form_a, form_b = reference.form, candidate.form + mixed = form_a != form_b + if mixed and not options.get("allow_mixed_form", True): + raise Refusal("form", "form_mismatch", "%s vs %s" % (form_a, form_b)) + gates["form"] = _gate(True, "%s vs %s" % (form_a, form_b)) + + # --- 2b. provenance: is either side a PREVIEW capture? ------------------ + # + # A race-mode preview root is a real, sealed, verifiable dataset backed by + # ONE cold run, with cross-run determinism NOT demonstrated. It is published + # under its own dataset id -- which is the `reference_id` half of the + # comparability key computed a few hundred lines below -- so a row measured + # against it can never share a table with a row measured against the final. + # That is the identity half. + # + # This is the publishability half. A comparison against a preview is a real + # result and gets a real receipt; what it must never do is become a registry + # row, because the registry's whole contract is that a published number's + # reference is settled. Rather than invent a new refusal, this raises the + # marker the comparator ALREADY refuses on: SC-5 turns any blocking + # disclosure into a `NotAMeasurement` inside `emit_submission`, and DISC-003 + # forces status pending/retracted downstream. One mechanism, already tested. + preview_sides = [] + for label, dataset in (("reference", reference), ("candidate", candidate)): + block = dataset.manifest.get("preview") or {} + if dataset.manifest.get("not_submittable") is True or block: + preview_sides.append((label, dataset, block)) + if preview_sides: + detail = "; ".join( + "%s %s is a PREVIEW capture (%s cold run(s), determinism not " + "demonstrated, superseded by %s)" + % (label, (ds.manifest.get("dataset") or {}).get("id"), + (ds.manifest.get("determinism") or {}).get("run_count"), + block.get("superseded_by") or "an unnamed final capture") + for label, ds, block in preview_sides) + findings["class"] = "advisory" + findings["usable_as_floor"] = False + findings["disclosures"].append({ + "code": "preview_capture", "severity": "blocking", + "affects_comparability": True, + "detail": "%s. The number is a true statement about that PREVIEW dataset and " + "about nothing else: it is not a distance from the final root, and " + "the preview will never be updated in place to become one. Re-run " + "the comparison against the final capture to obtain a publishable " + "row." % detail, + }) + gates["provenance"] = _gate(True, "preview capture on %d side(s); the receipt " + "stands, a registry row does not" + % len(preview_sides)) + else: + gates["provenance"] = _gate(True, "neither side is a preview capture") + + # --- 3. panel ----------------------------------------------------------- + pa, pb = reference.manifest["panel"], candidate.manifest["panel"] + if pa["suite_token_hash_sha256"] != pb["suite_token_hash_sha256"]: + gates["panel"] = _gate(False, "suite_token_hash_sha256 differs") + raise Refusal("panel", "panel_mismatch", + "different panels: %s vs %s" + % (pa["suite_token_hash_sha256"][:12], pb["suite_token_hash_sha256"][:12]), + remedy=PANEL_REMEDY) + if pa["scoring_window"] != pb["scoring_window"]: + gates["panel"] = _gate(False, "scoring_window differs") + raise Refusal("panel", "panel_mismatch", + "scoring_window is part of panel IDENTITY (PANEL-D3): score_from %r vs %r" + % (pa["scoring_window"].get("score_from"), + pb["scoring_window"].get("score_from")), remedy=PANEL_REMEDY) + # PANEL-D6: the tokenizer is panel identity too, and `suite_token_hash_sha256` + # cannot see it -- that digest hashes token IDS, which are integers. Two + # tokenizers can emit the same ids from different text, and one that applies a + # chat template or special tokens has scored a different corpus. + tok_diff = _tokenizer_divergence(pa.get("tokenizer"), pb.get("tokenizer")) + if tok_diff: + gates["panel"] = _gate(False, "tokenizer identity differs: %s" + % ", ".join(sorted(tok_diff))) + # PANEL-D6, third instance (T4Verdict, 2026-09-06). By the time we get + # here `suite_token_hash_sha256` and `scoring_window` have ALREADY + # matched, so the two captures scored the same token ids over the same + # window and only the declared NAME disagrees. That is the common case + # for the Fruit root: it records `glm-5.2-siq-fruit` from its panel + # receipt, while a fresh capture passing `--weights-repository` records + # `malaiwah/GLM-5.2-SIQ-Fruit-bf16`. The comparison is refused, the + # generic remedy says "recapture the candidate on the reference's + # panel" -- which is useless, because the panel was already identical + # -- and the working answer is a flag whose value can only be found by + # reading the published dataset's panel receipt. + # + # So when the disagreement is confined to the two NAME fields, name the + # flag and the reference's value: this function is holding both sides + # and can read it at the moment it refuses. It deliberately does NOT + # offer this when `vocab_size`, `add_special_tokens`, + # `chat_template_applied` or `revision` disagree -- those are evidence + # of a genuinely different tokenization, and suggesting an override + # there would turn an honest refusal into a footgun. + name_only = set(tok_diff) <= {"id", "repository"} + remedy = PANEL_REMEDY + if name_only: + ref_id = (pa.get("tokenizer") or {}).get("id") + remedy = ( + "the token ids and the scoring window already MATCH, so only " + "the declared name differs. If you have established that " + "these are the same tokenizer, recapture with " + "--tokenizer-id %r (the reference's own declared value) -- " + "that flag records a declaration, it does not verify one, so " + "do not pass it to make an unexplained mismatch go away. " + "PANEL-D6." % ref_id) + raise Refusal("panel", "panel_mismatch", + "the two captures declare different tokenizers (PANEL-D6); the token id " + "digest cannot see this because it hashes integers. Differing field(s): %s" + % "; ".join("%s %r vs %r" % (field, a, b) + for field, (a, b) in sorted(tok_diff.items())), + remedy=remedy) + ra = {int(r["index"]): r for r in reference.records} + rb = {int(r["index"]): r for r in candidate.records} + shared = sorted(set(ra) & set(rb)) + # P1-09: an EMPTY intersection is refused before any computation, with no + # override. --allow-partial covers a partial overlap; two datasets that share + # no context index have nothing to score, and letting them through turned + # empty reductions into a plausible metric=0.0 / positions=0 / contexts=0 + # receipt -- a perfect-fidelity artifact about nothing. + if not shared: + gates["coverage"] = _gate(False, "no shared context indices") + raise Refusal("coverage", "empty_intersection", + "the two datasets share NO context indices (reference %d records, " + "candidate %d); there is nothing to score. --allow-partial covers a " + "partial overlap, never a disjoint pair." % (len(ra), len(rb)), + remedy="check that the two captures were taken over the same panel " + "(or overlapping shards of it)") + for index in shared: + if ra[index]["token_ids_json_sha256"] != rb[index]["token_ids_json_sha256"]: + gates["panel"] = _gate(False, "record %d token digest differs" % index) + raise Refusal("panel", "panel_mismatch", + "record %d has different tokens on the two sides (BIND-2)" % index, + remedy=PANEL_REMEDY) + ma, mb = ra[index].get("attention_mask_sha256"), rb[index].get("attention_mask_sha256") + if ma is not None and mb is not None and ma != mb: + gates["panel"] = _gate(False, "record %d attention mask differs" % index) + raise Refusal("panel", "panel_mismatch", + "record %d attention_mask_sha256 differs (BIND-3)" % index, + remedy=PANEL_REMEDY) + if ra[index]["scored_rows"] != rb[index]["scored_rows"]: + gates["panel"] = _gate(False, "record %d scored_rows differs" % index) + raise Refusal("panel", "panel_mismatch", + "record %d scored_rows %r vs %r" + % (index, ra[index]["scored_rows"], rb[index]["scored_rows"]), + remedy=PANEL_REMEDY) + gates["panel"] = _gate(True, "suite_token_hash_sha256 equal; %d shared records; " + "per-record token and mask digests equal; scoring_window equal" + % len(shared)) + + # --- 4. head (HEAD-1..7) ------------------------------------------------ + findings.update(_head_gate(reference, candidate, options, gates, findings)) + + # --- 5. lane ------------------------------------------------------------ + same_lane = reference.lane == candidate.lane + if not same_lane and not options.get("allow_cross_lane"): + gates["lane"] = _gate(False, "%s vs %s" % (reference.lane, candidate.lane)) + raise Refusal("lane", "lane_mismatch", + "lanes differ: %s vs %s" % (reference.lane, candidate.lane), + override="--allow-cross-lane") + gates["lane"] = _gate(True, "lane=%s vs %s" % (reference.lane, candidate.lane), + overridden_by=None if same_lane else "--allow-cross-lane") + findings["same_lane"] = same_lane + if not same_lane: + # BIAS-006: a cross-lane comparison may never be cited as a floor. + findings["class"] = "advisory" + findings["usable_as_floor"] = False + findings["disclosures"].append({ + "code": "cross_engine_capture", "severity": "caveat", + "affects_comparability": True, + "detail": "reference lane %s, candidate lane %s. A cross-lane number carries the " + "lane offset; BIAS-006 forbids citing it as a floor, so usable_as_floor " + "is stamped false and cannot be laundered downstream." + % (reference.lane, candidate.lane), + }) + + # --- 6. stack ----------------------------------------------------------- + la = reference.manifest["runtime"].get("lane_identity_sha256") + lb = candidate.manifest["runtime"].get("lane_identity_sha256") + sa = reference.manifest["runtime"].get("stack_fingerprint_sha256") + sb = candidate.manifest["runtime"].get("stack_fingerprint_sha256") + # A dataset compared with ITSELF is the same stack by construction, whether + # or not `lane_identity_sha256` happens to be recorded. Without this the + # flagship self-compare emits a bias block asserting "the two captures were + # produced by different stacks" about one capture. + same_dataset = bool(reference.manifest.get(F.SEAL_FIELD) + and reference.manifest.get(F.SEAL_FIELD) + == candidate.manifest.get(F.SEAL_FIELD)) + same_stack = same_dataset or bool(la and lb and la == lb and sa and sb and sa == sb) + findings["stack_relation"] = "same_stack" if same_stack else "cross_stack" + gates["stack"] = _gate(True, + "lane_identity %s / stack_fingerprint %s -> %s" + % ("equal" if la == lb else "differ", + "equal" if sa == sb else "differ", + findings["stack_relation"])) + if not same_stack: + findings["class"] = "advisory" + # Symmetric with BIAS-006. The bias block below declares a residual of + # the 1e-2 class with direction `unknown`; a number carrying an unknown + # bias of that size is not a zero-point for anything, for exactly the + # reason a cross-lane number is not. + findings["usable_as_floor"] = False + findings["bias"] = { + # The registry's own enum value (measurement.schema.json); BIAS-001 + # binds it to estimator.stack_relation == cross_stack. + "kind": "cross_stack_capture_replay", + "direction": "unknown", + "estimated_magnitude": None, + "floor_measurement_ref": None, + "detail": "the two captures were produced by different stacks; BIAS-001 requires " + "this block, and a residual of the 1e-2 class is expected from a " + "different kernel, GPU class or torch build alone. usable_as_floor is " + "stamped false for the same reason BIAS-006 stamps it false across " + "lanes: an unknown-direction residual of that size is not a zero-point.", + } + # measurement.schema.json rule 4: a cross-stack row needs the bias block + # AND a comparability-affecting disclosure naming it. The bias block alone + # makes the row schema-invalid the moment it reaches the registry. + findings["disclosures"].append({ + "code": "cross_stack_capture", "severity": "caveat", + "affects_comparability": True, + "detail": "the two captures were produced by different stacks " + "(lane_identity %s, stack_fingerprint %s); the number carries a " + "cross-stack residual of the 1e-2 class in an unknown direction." + % ("differs" if la != lb else "equal on both sides, or unrecorded", + "differs" if sa != sb else "equal on both sides, or unrecorded"), + }) + + # --- 7. geometry -------------------------------------------------------- + ca, cb = reference.manifest["capture"], candidate.manifest["capture"] + if ca["vocab_size"] != cb["vocab_size"]: + gates["geometry"] = _gate(False, "vocab_size differs") + raise Refusal("geometry", "geometry_mismatch", + "vocab_size %r vs %r" % (ca["vocab_size"], cb["vocab_size"])) + if form_a == form_b == "hidden" and ca.get("hidden_width") != cb.get("hidden_width"): + gates["geometry"] = _gate(False, "hidden_width differs") + raise Refusal("geometry", "geometry_mismatch", + "hidden_width %r vs %r" % (ca.get("hidden_width"), cb.get("hidden_width"))) + gates["geometry"] = _gate(True, "vocab_size %d equal; hidden_width %r" + % (ca["vocab_size"], ca.get("hidden_width"))) + + # --- 8. coverage -------------------------------------------------------- + if set(ra) != set(rb): + if not options.get("allow_partial"): + gates["coverage"] = _gate(False, "index sets differ") + raise Refusal("coverage", "coverage_mismatch", + "reference has %d records, candidate %d, %d shared" + % (len(ra), len(rb), len(shared)), + override="--allow-partial") + findings["disclosures"].append({ + "code": "subset_of_panel", "severity": "caveat", "affects_comparability": True, + "detail": "index sets differ; the comparison ran on the %d-record intersection " + "(SCOPE-010)." % len(shared), + }) + covers_full = ( + bool((reference.manifest.get("coverage") or {}).get("complete")) + and bool((candidate.manifest.get("coverage") or {}).get("complete")) + and set(ra) == set(rb) + ) + gates["coverage"] = _gate(True, "%d of %d/%d declared records shared" + % (len(shared), len(ra), len(rb)), + overridden_by=None if set(ra) == set(rb) else "--allow-partial") + findings["shared_indices"] = shared + findings["covers_full_panel"] = covers_full + if not covers_full: + findings["disclosures"].append({ + "code": "subset_of_panel", "severity": "caveat", "affects_comparability": True, + "detail": "at least one side does not cover the full panel; " + "measurement_scope.covers_full_panel is false (SCOPE-010).", + }) if not any(d["code"] == "subset_of_panel" for d in findings["disclosures"]) else None + + # --- 9. lossy ----------------------------------------------------------- + lossy = [side for side, manifest in (("reference", reference.manifest), + ("candidate", candidate.manifest)) + if manifest["capture"].get("lossy_codec")] + if lossy: + findings["class"] = "advisory" + findings["disclosures"].append({ + "code": "lossy_capture_codec", "severity": "caveat", "affects_comparability": True, + "detail": "%s stores values that are not the model's values (D-8); the comparison " + "is advisory." % ", ".join(lossy), + }) + gates["lossy"] = _gate(True, "lossy_codec %s" % ("on " + ", ".join(lossy) if lossy + else "null on both sides")) + for side, manifest in (("reference", reference.manifest), ("candidate", candidate.manifest)): + if manifest["capture"].get("dtype_lossless") is False: + findings["class"] = "advisory" + findings["disclosures"].append({ + "code": "quantized_capture_dtype", "severity": "caveat", + "affects_comparability": True, + "detail": "%s stored its values in a dtype narrower than the forward's " + "(FORM-1)." % side, + }) + + # --- 9b. decode --------------------------------------------------------- + # + # Gate 9 reads `capture.lossy_codec`, which describes the CAPTURE (a + # llama.cpp .kld's uint16 log-probs). It says nothing about the WEIGHTS: + # a trellis or FP8 candidate is captured from a bf16 reconstruction of its + # payloads under the same transformers forward as the reference, and the + # sealed runtime receipt records that decode. Six published GLM-5.3 + # receipts said `class: strict` with only a head disclosure while the + # registry filed the same numbers as advisory (review-science S1-2); the + # receipt is the more visible statement and it was the weaker one. + _decode_gate(reference, candidate, gates, findings, options) + return gates, findings + + +#: Decoder parity evidence against exllamav3 itself +#: (engines/tools/exl3_decoder_parity_vs_exllamav3.py writes it). Absent, or +#: neither `all_bitwise` nor `all_bitwise_pre_hadamard` exactly true, means +#: "no parity": the caveat then says the decoder is this repository's +#: transcription, proven only against in-house routes. +DECODER_PARITY_EVIDENCE = os.path.join( + "engines", "tools", "layer-outer-evidence", "exl3-decoder-parity-vs-exllamav3.json") + + +def _decoder_parity() -> Optional[Dict[str, Any]]: + path = os.path.join(_REPO, DECODER_PARITY_EVIDENCE) + if not os.path.isfile(path): + return None + try: + doc = F.read_json(path) + except Exception: + return None + if not isinstance(doc, dict): + return None + if doc.get("all_bitwise") is True or doc.get("all_bitwise_pre_hadamard") is True: + return doc + return None + + +def _decode_gate(reference: Dataset, candidate: Dataset, gates: Dict[str, Any], + findings: Dict[str, Any], options: Dict[str, Any]) -> None: + """Weights-only reconstruction is a comparability caveat, never strict. + + Either way the number is advisory: a weights-only reconstruction under a + transformers bf16 forward exercises the STORED WEIGHTS, and the served + kernel's own numerics (exllamav3's fp16 activations and on-the-fly dequant, + an FP8 stack's per-token activation quantization, NVFP4's static input + scales) are not in it. Decoder parity evidence against exllamav3 changes + what the caveat can SAY about the decoder (bitwise vs. transcribed), not + the class: the activation term is unmeasured with or without it. + + A SELF-COMPARE is exempt: both sides are the same artifact's two cold + captures, and SC-1 asks whether the capture reproduced, not whether the + weights were reconstructed. The first version of this gate caveated the + self-compare too, the comparator exited 2, and `stage_measure.sh + compare_root` -- which had no exit-2 branch -- died before its marker, so + qualify_root refused every FP8 and trellis candidate at $0 in the contract + harness (and would have on a pod). One disclosure per code: two sides + carrying the same method are named in one detail, not twice. + """ + if options.get("self_compare"): + gates["decode"] = _gate( + True, "self-compare: both sides are the same artifact; the weights-decode " + "caveats apply to a measurement against a reference, not to SC-1") + return + summary = [] + parity = _decoder_parity() + reconstructed = [] + activation = [] + for side, dataset in (("reference", reference), ("candidate", candidate)): + decode = dataset.weights_decode + if not decode: + summary.append("%s none" % side) + continue + method = str(decode.get("method") or "") + summary.append("%s %s" % (side, method or "unnamed")) + if method.startswith("exl3-trellis-") or method in { + "affine-weight-reconstruction", "microfloat-weight-reconstruction", + "fp8-block-dequant-to-bf16", "nvfp4-modelopt-dequant-to-bf16", + "gguf-dequant-to-bf16"} or decode.get("scope") == "weights_reconstructed": + reconstructed.append((side, decode)) + schemes = { + (block.get("quantization_config") or {}).get("activation_scheme") + for block in (decode, decode.get("mixed_fp8") or {}) + if isinstance(block, dict)} + declared = sorted(str(s) for s in schemes if s not in (None, "", "none")) + if decode.get("activation_quantization"): + declared.append("reader-declared activation quantization; see sealed decode evidence") + if declared: + activation.append((side, method, declared)) + if reconstructed: + findings["class"] = "advisory" + findings["disclosures"].append({ + "code": "weights_reconstructed", "severity": "caveat", + "affects_comparability": True, + "detail": " ".join(_reconstruction_detail(side, decode, parity) + for side, decode in reconstructed), + }) + if activation: + findings["class"] = "advisory" + findings["disclosures"].append({ + "code": "activation_quantization_not_captured", "severity": "caveat", + "affects_comparability": True, + "detail": " ".join(_activation_detail(side, method, declared) + for side, method, declared in activation), + }) + gates["decode"] = _gate(True, "weights_decode %s" % "; ".join(summary)) + + +def _activation_detail(side: str, method: str, declared: List[str]) -> str: + if method == "fp8-block-dequant-to-bf16" and "dynamic" in declared: + return ("%s was captured from a bf16 materialisation of its block-scaled " + "FP8 weights (%s); the checkpoint declares activation_scheme: " + "dynamic, so a served W8A8 deployment also quantizes activations " + "per token at runtime. That term is not in this number, which is " + "expected to understate the served divergence; it is not a " + "mathematical bound. The comparison is advisory." % (side, method)) + return ("%s was captured from a bf16 materialisation of its weights (%s); the " + "checkpoint declares activation quantization (%s) that a weights-only " + "capture does not apply, so a served deployment also quantizes " + "activations at runtime. That term is not in this number, which is " + "expected to understate the served divergence; it is not a " + "mathematical bound. The comparison is advisory." + % (side, method, ", ".join(declared))) + + +def _reconstruction_detail(side: str, decode: Dict[str, Any], + parity: Optional[Dict[str, Any]]) -> str: + method = str(decode.get("method")) + modules = decode.get("modules_decoded") + if not method.startswith("exl3-trellis-"): + return ("%s was captured from a WEIGHTS-ONLY RECONSTRUCTION (%s, output %s). " + "The stored weights were decoded before the model forward; native " + "quantized GEMM and serving activation arithmetic are not measured. " + "Decoder provenance is in the sealed runtime receipt. The comparison " + "is advisory." % (side, method, decode.get("output_dtype", "unspecified"))) + histogram = decode.get("k_histogram") or {} + parts = ["%s was captured from a WEIGHTS-ONLY RECONSTRUCTION: %s trellis payload " + "group(s) were decoded to bf16 by engines/tools/exl3hf_surface.py:" + "decode_payload_hf, this repository's transcription of exllamav3's " + "mul1/mcg codebooks (exllamav3_ext/quant/codebook.cuh, pack.cu), before " + "the transformers forward (method %s%s)" + % (side, modules if modules is not None else "the artifact's", method, + ("; K histogram %s" % ", ".join("K%s x %s" % kv for kv in sorted(histogram.items()))) + if histogram else "")] + compose = decode.get("tp_rank_composition") or {} + if compose: + parts.append("%s module(s) stored as tp=%s rank shards were composed in ascending " + "rank order" % (compose.get("modules_composed"), compose.get("tp"))) + padded = decode.get("zero_padded_rows_truncated") or {} + if padded: + parts.append("%s trailing zero row(s) were truncated on %s tensor(s) (%s)" + % (padded.get("rows"), padded.get("count"), padded.get("method"))) + if parity: + version = parity.get("exllamav3_version") or "unversioned" + count = parity.get("modules_compared") or len(parity.get("modules") or []) + if parity.get("all_bitwise") is True: + parts.append("decoder bitwise vs exllamav3 %s on %s real module(s) (%s); " + "served-kernel activations unmeasured" + % (version, count, DECODER_PARITY_EVIDENCE)) + else: + # exllamav3's get_weight_tensor rounds to fp16 four times through + # its Hadamard path where this decoder rounds once; the stage the + # served GEMM consumes -- unpack, codebook, tile layout -- is the + # one proven bitwise, and the fp16 weight differs by at most the + # recorded max_abs_diff. + worst = max((float(m.get("max_abs_diff") or 0.0) + for m in parity.get("modules") or []), default=None) + parts.append("trellis unpack + codebook + tile layout bitwise vs exllamav3 %s " + "exllamav3_ext.reconstruct on %s real module(s) (%s); the fp16 weight " + "after exllamav3's own four-rounding Hadamard path differs by " + "max_abs_diff <= %s; served-kernel activations unmeasured" + % (version, count, DECODER_PARITY_EVIDENCE, + "%.3g" % worst if worst is not None else "unrecorded")) + else: + parts.append("the decoder has NOT been proven bitwise against exllamav3 itself " + "(no %s evidence); it is proven against in-house fp64 routes and real " + "payloads only" % DECODER_PARITY_EVIDENCE) + parts.append("the served exllamav3 kernel's fp16 activations and on-the-fly dequant are " + "not in this number. The comparison is advisory") + return ". ".join(parts) + "." + + +def _head_gate(reference: Dataset, candidate: Dataset, options: Dict[str, Any], + gates: Dict[str, Any], findings: Dict[str, Any]) -> Dict[str, Any]: + """HEAD-1a/1b/2/3/4 at compare time (spec section 8.3).""" + ha, hb = reference.head, candidate.head + da, db = ha.get("tensor_content_sha256"), hb.get("tensor_content_sha256") + form_a, form_b = reference.form, candidate.form + out: Dict[str, Any] = {} + + hidden_involved = "hidden" in (form_a, form_b) + + if hidden_involved: + # HEAD-4: no override. A capture that cannot name its own head cannot + # be scored through anyone's. + for label, form, digest in (("reference", form_a, da), ("candidate", form_b, db)): + if form == "hidden" and not digest: + gates["head"] = _gate(False, "%s has a null head content digest" % label) + raise Refusal("head", "head_mismatch", + "HEAD-4: %s is hidden-form with head.tensor_content_sha256 null; " + "there is no override" % label) + # O-6 / H11: comparing a container digest to a content digest is forbidden. + if ha.get("file_sha256") and hb.get("file_sha256") \ + and ha["file_sha256"] == hb["file_sha256"] and da != db: + gates["head"] = _gate(False, "equal file digests, different tensor content") + raise Refusal("head", "head_mismatch", + "HEAD-IDENT/O-6: the two heads share a file digest but differ in " + "tensor CONTENT; content is normative") + + if form_a == "logit" and form_b == "logit": + # HEAD-2: never refuse. Each capture applied its own head, so head + # quantization error is INSIDE the measurement, which is correct. + out["head_policy"] = "native_head" + out["head_applied"] = None + detail = "HEAD-2: both sides are logit form; each applied its own head, so head error " + if da and db and da != db: + detail += "is inside the measurement (heads differ, correctly)." + elif da and db: + detail += "is inside the measurement (heads are identical)." + else: + detail += "is inside the measurement (at least one head digest is unrecorded)." + findings["class"] = "advisory" + findings["disclosures"].append({ + "code": "estimator_unknown", "severity": "caveat", + "affects_comparability": True, + "detail": "a logit-form capture did not record its head identity; the " + "comparison is advisory (HEAD-2).", + }) + gates["head"] = _gate(True, detail) + return out + + if form_a != form_b: + # HEAD-3: mixed hidden <-> logit. Only legal when the head replayed + # onto the hidden side equals the head that produced the logit side. + if not (da and db and da == db): + gates["head"] = _gate(False, "mixed form with unequal heads") + raise Refusal("head", "head_mismatch", + "HEAD-3: a hidden<->logit comparison needs the replay head to equal " + "the head that produced the logits (%s vs %s)" + % ((da or "null")[:12], (db or "null")[:12])) + out["head_policy"] = "native_head" + out["head_applied"] = da + findings["disclosures"].append({ + "code": "no_known_deviations", "severity": "info", "affects_comparability": False, + "detail": "HEAD-3: the hidden side was replayed through the same head " + "(%s) that produced the logit side." % da[:12], + }) + gates["head"] = _gate(True, "HEAD-3: mixed form, identical head content digest") + return out + + # hidden <-> hidden + if options.get("own_heads"): + # HEAD-1d: each side is replayed through ITS OWN sealed head, which is + # HEAD-2 (logit form, native heads) computed offline from the shipped + # head payloads instead of in the capture. Nothing is substituted, so + # the candidate's head error is INSIDE the number, exactly as under + # HEAD-2; and nothing is erased when the heads happen to be equal, so + # the rule is the same procedure whether da == db or not. HEAD-1c is + # checked in compare(): bitwise-equal hiddens under differing heads + # would make classify() call this a reproduction, which own-head + # replay cannot honour, so it still refuses there. + for label, dataset in (("reference", reference), ("candidate", candidate)): + if dataset.form == "hidden" and not dataset.head_path(): + gates["head"] = _gate(False, "%s ships no head payload to replay" % label) + raise Refusal("head", "head_missing", + "HEAD-1d: --own-heads replays each side through its own head, " + "but the %s dataset ships no head/weight.safetensors" % label) + out["head_policy"] = "native_head" + out["head_applied"] = None + out["head_applied_reference"] = da + out["head_applied_candidate"] = db + findings["disclosures"].append({ + "code": "native_head_replay", "severity": "info", "affects_comparability": False, + "detail": "HEAD-1d: each side replayed through its own sealed head (reference %s, " + "candidate %s); head error is inside the measurement, as under HEAD-2, " + "and nothing is substituted. The heads %s." + % (da[:12], db[:12], + "are content-identical" if da == db else "differ in content"), + }) + gates["head"] = _gate(True, "HEAD-1d: own heads on both sides (%s vs %s)" + % (da[:12], db[:12])) + return out + + if da == db: + # HEAD-1a: ALLOW, and `class` may remain strict. + out["head_policy"] = "shared_reference_head" + out["head_applied"] = da + findings["disclosures"].append({ + "code": "shared_reference_head", "severity": "info", "affects_comparability": False, + "detail": "HEAD-1a: both captures declare the same lm_head tensor content digest " + "(%s); one head applied to both sides is a shared APPLICATION of " + "identical WEIGHTS." % da[:12], + }) + gates["head"] = _gate(True, "HEAD-1a: identical head content digest on both sides") + return out + # HEAD-1b: REFUSE. + if not options.get("disclose_head_substitution"): + gates["head"] = _gate(False, "head content digests differ: %s vs %s" + % (da[:12], db[:12])) + raise Refusal( + "head", "head_mismatch", + "HEAD-1b: head content digests differ (%s vs %s). Replaying one artifact's hidden " + "states through the other's head erases its head-quantization error and flatters " + "it. Both datasets ship their own head: --own-heads replays each side through its " + "own (HEAD-1d, native_head, strict)." % (da[:12], db[:12]), + override="--own-heads (each side through its own sealed head) or " + "--disclose-head-substitution (one head, BLOCKING disclosure)") + applied = options.get("head_content_sha256") or da + out["head_policy"] = "shared_reference_head" + out["head_applied"] = applied + findings["class"] = "advisory" + findings["usable_as_floor"] = False + findings["bias"] = { + "kind": "other", + "direction": "downward", + "estimated_magnitude": None, + "floor_measurement_ref": None, + "detail": "a single head was applied to hidden states captured under two different " + "heads; the candidate's own head-quantization error is erased, biasing the " + "number DOWNWARD (flattering the candidate).", + } + findings["disclosures"].append({ + "code": "head_substituted", "severity": "blocking", "affects_comparability": True, + "detail": "HEAD-1b override: reference head %s, candidate head %s, applied %s. Under " + "DISC-003 a blocking disclosure forces status pending/retracted -- a " + "head-substituted number is not publishable as a measurement." + % (da[:12], db[:12], applied[:12]), + }) + gates["head"] = _gate(True, "HEAD-1b overridden: head substitution disclosed", + overridden_by="--disclose-head-substitution") + return out + + +# --------------------------------------------------------------------------- +# Tensor I/O (numpy, no torch needed to READ) +# --------------------------------------------------------------------------- + + +def load_tensor(path: str, key: str): + """Read one safetensors tensor as float32 numpy, widening bf16 exactly.""" + import numpy as np + + header_len, header = F.read_safetensors_header(path) + if key not in header: + raise Refusal("compute", "bad_tensor_file", + "tensor key %r absent from %s" % (key, path)) + meta = header[key] + start, stop = meta["data_offsets"] + with open(path, "rb") as handle: + handle.seek(8 + header_len + start) + buf = handle.read(stop - start) + dtype = meta["dtype"] + if dtype == "BF16": + wide = np.frombuffer(buf, dtype=" bool: + try: + import torch # noqa: F401 + return True + except Exception: + return False + + +def _as_tensor(array): + """numpy -> torch without the read-only warning, and without a needless copy. + + `load_tensor` hands back `np.frombuffer` views, which are read-only; + `torch.from_numpy` accepts them but warns once per process. Copying only + the read-only case keeps the hot path allocation-free. + """ + import numpy as np + import torch + + block = np.ascontiguousarray(array) + if not block.flags.writeable: + block = block.copy() + return torch.from_numpy(block) + + +def token_kld(reference_logits, candidate_logits, device: str = "cpu"): + """The fp64 full-vocabulary estimator. + + With torch present this IS `kld_report._token_kld` -- imported, not + copied, so a number here equals a number from the sealed pipeline. Without + torch, the identical fp64 formula in numpy, and the receipt says which. + """ + import numpy as np + + if _torch_available(): + import torch + + if _K6_TOOLS not in sys.path: + sys.path.insert(0, _K6_TOOLS) + import kld_report # noqa: WPS433 + + # Already-resident tensors pass straight through: the GPU replay path + # hands this function logits that are ALREADY on the device, and a + # round trip through numpy would undo the whole point of the fix (and + # would also be the one place a host copy could silently re-enter). + a = reference_logits if torch.is_tensor(reference_logits) else _as_tensor(reference_logits) + b = candidate_logits if torch.is_tensor(candidate_logits) else _as_tensor(candidate_logits) + try: + values, matches = kld_report._token_kld(a, b, device) + except SystemExit as exc: + # `kld_report._fail` returns a SystemExit -- correct for a CLI, + # wrong for a library call. Convert it into our own refusal so a + # non-finite logit refuses the COMPARISON rather than killing the + # process, and so the reason survives into the caller. + raise Refusal("compute", "non_finite", + "the fp64 estimator refused these logits (see the kld_report " + "message above; the usual cause is a non-finite value, which is " + "never clamped): %s" % exc) + # PUBLISHED IDENTITY, not a stale name. This string is the + # `estimator_backend` value inside every sealed comparison receipt this + # tool has written -- registry/protocol/*/comparison.*.json carry it + # verbatim, covered by their receipt_sha256. The MODULE was renamed + # k6_kld_report.py -> kld_report.py on 2026-08-31; the backend id was + # not, because renaming it would say a different estimator produced + # numbers that are already out in the world. + return np.asarray(values, dtype=np.float64), int(matches), "torch:k6_kld_report._token_kld" + + a = np.asarray(reference_logits, dtype=np.float64) + b = np.asarray(candidate_logits, dtype=np.float64) + if a.shape != b.shape or a.ndim != 2: + raise Refusal("compute", "geometry_mismatch", "logit geometry mismatch") + if not np.isfinite(a).all() or not np.isfinite(b).all(): + # Never a clamp. A non-finite intermediate is a hard refusal. + raise Refusal("compute", "non_finite", "logits must be finite") + a_logp = a - (a.max(axis=-1, keepdims=True) + + np.log(np.exp(a - a.max(axis=-1, keepdims=True)).sum(axis=-1, keepdims=True))) + b_logp = b - (b.max(axis=-1, keepdims=True) + + np.log(np.exp(b - b.max(axis=-1, keepdims=True)).sum(axis=-1, keepdims=True))) + values = np.sum(np.exp(a_logp) * (a_logp - b_logp), axis=-1) + matches = int(np.count_nonzero(np.argmax(a, axis=-1) == np.argmax(b, axis=-1))) + return values.astype(np.float64), matches, "numpy_fp64" + + +def _replay(hidden32, head32_t, vocab_chunk: Optional[int]): + """logits' = hidden @ head^T, fp32 both sides. + + Mirrors `engines/tools/hidden_replay.py::_replay_logits`, including the + vocab-chunked path used as the invariance probe. + """ + import numpy as np + + # Apple's Accelerate BLAS raises spurious divide-by-zero / overflow / + # invalid FP status flags inside its blocked GEMM even when every input and + # every output is finite (verified: head absmax 0.216, hidden absmax 12.25, + # result finite). Suppress the FLAG, never the CHECK: the result is proven + # finite immediately below, and `token_kld` refuses a non-finite logit + # again before any softmax. + with np.errstate(all="ignore"): + if vocab_chunk is None: + out = hidden32 @ head32_t + else: + pieces = [] + for start in range(0, head32_t.shape[1], vocab_chunk): + pieces.append(hidden32 @ head32_t[:, start:start + vocab_chunk]) + out = np.concatenate(pieces, axis=1) + if not np.isfinite(out).all(): + raise Refusal("compute", "non_finite", + "the hidden->logit replay produced a non-finite value; never clamped") + return out + + +# --------------------------------------------------------------------------- +# Replay backends +# --------------------------------------------------------------------------- +# +# WHY THIS EXISTS. M1 measured it: one 512-window comparison took 60m19s +# against a 335s capture of the same panel on the same box -- 10.8x the capture +# it consumes -- because `_replay` does the language-model head matmul in numpy +# on the CPU while the GPU, which is ALREADY HOLDING THE HEAD for the fp64 KLD +# step, sits at 0%. M2 is a 642.7 GB re-capture with several candidates and M3 +# is 1.5 TB; at those sizes the capture is a rounding error and the candidate +# comparisons are the entire bill. +# +# WHY IT IS NOT THE DEFAULT. An fp32 GEMM is not one function. BLAS +# accumulates in fp32 in an order chosen by the implementation's blocking, so +# `hidden @ head.T` has a different last bit on OpenBLAS, on Accelerate, and on +# cuBLAS. MEASURED on the real published Qwen3.8 root, 32,752 positions, +# numpy-fp32-on-OpenBLAS against cuBLAS-fp32 with TF32 off: max absolute logit +# delta 3.624e-05 (1.360e-06 relative), and +# +# KLD(numpy replay || cuda replay) = 5.237e-12 nats mean, 1.791e-10 max, +# top-1 agreement 1.000000 -- not one argmax flipped. +# +# That is 1.75e-9 relative to the smallest published Qwen3.8 row (FP8, +# 0.002989850396847924) and 2.2e9 times below the streaming lane floor of +# 0.011506, so a row agrees to roughly nine significant figures and differs +# past the tenth. Small, and NOT ZERO: the published values are 16-digit, so +# they would not reproduce. A comparison that produces a different value after +# an optimisation is a broken comparison, not a faster one, so the numpy path +# stays the default and the receipt now names which backend ran +# (`comparator.replay_backend`), because a silent replay-backend swap is +# exactly the class of drift this suite exists to make impossible. +# +# WHAT IS BACKEND-INDEPENDENT, AND IT IS THE ONE THAT MATTERS MOST. The floor. +# A self-compare replays bitwise-equal hidden states through one head on ONE +# backend, so both sides get bitwise-equal logits and the KLD is exactly 0.0 +# on any deterministic backend -- the published `tokenwise-kld.npy` digest +# 8be5dcca... included, since it is the digest of 1,048,064 float64 zeros. +# `bin/selftest_replay_device.py` asserts that, on both backends, as a gate. + + +def _replay_backend_name(replay_device: Optional[str], replay_dtype: str) -> str: + if not replay_device or replay_device == "numpy": + return "numpy:cpu:float32" + return "torch:%s:%s" % (replay_device, replay_dtype) + + +def _cpu_model() -> Optional[str]: + """The CPU the BLAS ran on. `platform.processor()` is empty on Linux.""" + import platform + + try: + with open("/proc/cpuinfo", "r", encoding="utf-8") as handle: + for line in handle: + if line.lower().startswith("model name"): + return line.split(":", 1)[1].strip() + except OSError: + pass + if platform.system() == "Darwin": + import subprocess + + try: + return subprocess.run(["sysctl", "-n", "machdep.cpu.brand_string"], + capture_output=True, text=True, timeout=5, + check=False).stdout.strip() or None + except (OSError, subprocess.SubprocessError): + pass + return platform.processor() or platform.machine() or None + + +def _blas_thread_count(blas_name: Optional[str]) -> Tuple[Optional[int], str]: + """How many threads the BLAS used, and how that was learned. + + threadpoolctl asks the loaded library; without it, the OpenBLAS entry point + is looked up on the libraries already mapped into this process (Linux); + failing both, the answer is null, never a guess from os.cpu_count(). + """ + try: + import threadpoolctl # noqa: WPS433 + + for info in threadpoolctl.threadpool_info(): + if info.get("user_api") == "blas": + return int(info["num_threads"]), "threadpoolctl:%s" % info.get("internal_api") + except ImportError: + pass + except Exception: + pass + if blas_name and "openblas" in blas_name.lower(): + import ctypes + + try: + with open("/proc/self/maps", "r", encoding="utf-8") as handle: + mapped = sorted({line.split()[-1] for line in handle + if "openblas" in line.lower() and "/" in line}) + except OSError: + mapped = [] + for path in mapped: + try: + lib = ctypes.CDLL(path) + except OSError: + continue + for symbol in ("openblas_get_num_threads", "scipy_openblas_get_num_threads64_", + "openblas_get_num_threads64_", "scipy_openblas_get_num_threads"): + fn = getattr(lib, symbol, None) + if fn is not None: + fn.restype = ctypes.c_int + return int(fn()), "ctypes:%s" % symbol + return None, "unresolved" + + +def _numpy_replay_env() -> Dict[str, Any]: + """Name the BLAS and CPU behind `numpy:cpu:float32`, observed not asserted. + + The host term between two numpy replays of the same sealed tensors + (1.8e-10 ... 3.8e-9 nats on the GLM-5.3 rows, workstation vs pod) is fp32 + GEMM accumulation order, which is the BLAS's blocking on this CPU with this + many threads. A receipt that says only `numpy:cpu:float32` leaves that + attributable through prose alone. + """ + import numpy as np + + blas: Dict[str, Any] = {} + try: + config = np.show_config(mode="dicts") + blas = dict((config.get("Build Dependencies") or {}).get("blas") or {}) + except (TypeError, AttributeError, ValueError): + blas = {} + blas_name = blas.get("name") + threads, source = _blas_thread_count(blas_name) + return { + "library": "numpy", + "numpy_version": np.__version__, + "blas_name": blas_name, + "blas_version": blas.get("version"), + "blas_configuration": blas.get("openblas configuration"), + "blas_threads": threads, + "blas_threads_source": source, + "cpu_model": _cpu_model(), + "replay_dtype": "float32", + } + + +def _torch_replay_env(replay_device: str) -> Dict[str, Any]: + """Pin every knob the receipt CLAIMS, and report what was actually set. + + `comparator.tf32` and friends were hardcoded constants in the receipt: + vacuously honest while every matmul ran in numpy, a lie the moment one runs + on a GPU. TF32 truncates the fp32 mantissa to 10 bits, which would put the + replay error two orders of magnitude above the fp32-accumulation term and + below the KLD values being measured. + """ + import torch + + torch.backends.cuda.matmul.allow_tf32 = False + torch.backends.cudnn.allow_tf32 = False + try: + torch.set_float32_matmul_precision("highest") + except Exception: + pass + for flag in ("allow_bf16_reduced_precision_reduction", + "allow_fp16_reduced_precision_reduction"): + try: + setattr(torch.backends.cuda.matmul, flag, False) + except Exception: + pass + observed = { + "tf32": bool(getattr(torch.backends.cuda.matmul, "allow_tf32", False)), + "float32_matmul_precision": getattr(torch, "get_float32_matmul_precision", + lambda: None)(), + "bf16_reduced_precision_reduction": bool( + getattr(torch.backends.cuda.matmul, + "allow_bf16_reduced_precision_reduction", False)), + } + if replay_device.startswith("cuda") and torch.cuda.is_available(): + index = torch.cuda.current_device() + observed["device_name"] = torch.cuda.get_device_name(index) + observed["device_capability"] = "%d.%d" % torch.cuda.get_device_capability(index) + return observed + + +class _TorchReplay(object): + """The head, resident, plus the chunked matmul that consumes it. + + Chunking is value-preserving BY CONSTRUCTION and that is the whole reason + it is allowed here: every output element of `hidden @ head.T` is an + independent dot product over the hidden axis, so splitting the POSITION + axis or the VOCABULARY axis partitions the output without touching any + reduction. Splitting the hidden axis would not be, and is never done. + """ + + def __init__(self, head32_t, replay_device: str, replay_dtype: str, + vocab_chunk: Optional[int]): + import torch + + self.env = _torch_replay_env(replay_device) + self.device = torch.device(replay_device) + self.dtype = torch.float64 if replay_dtype == "float64" else torch.float32 + self.vocab_chunk = vocab_chunk + self.head = _as_tensor(head32_t).to(device=self.device, dtype=self.dtype) + self.head_bytes = int(self.head.element_size() * self.head.nelement()) + + def to_device(self, block): + return _as_tensor(block).to(device=self.device, dtype=self.dtype) + + def replay(self, hidden_block): + """logits' = hidden @ head^T for one block of positions.""" + import torch + + hidden = self.to_device(hidden_block) + if self.vocab_chunk is None: + out = hidden @ self.head + else: + out = torch.cat( + [hidden @ self.head[:, start:start + self.vocab_chunk] + for start in range(0, self.head.shape[1], self.vocab_chunk)], dim=1) + # Same contract as the numpy path: proven finite here, refused -- never + # clamped -- and refused again by the estimator before any softmax. + if not torch.isfinite(out).all(): + raise Refusal("compute", "non_finite", + "the hidden->logit replay produced a non-finite value on %s; " + "never clamped" % self.device) + return out + + def peak_bytes(self) -> Optional[int]: + import torch + + if self.device.type != "cuda": + return None + return int(torch.cuda.max_memory_allocated(self.device)) + + def reset_peak(self) -> None: + import torch + + if self.device.type == "cuda": + torch.cuda.reset_peak_memory_stats(self.device) + + +# --------------------------------------------------------------------------- +# Compute +# --------------------------------------------------------------------------- + + +def compute(reference: Dataset, candidate: Dataset, findings: Dict[str, Any], + options: Dict[str, Any]) -> Dict[str, Any]: + import numpy as np + + vocab = reference.manifest["capture"]["vocab_size"] + vocab_chunk = options.get("vocab_chunk") + if (vocab_chunk is not None + and (isinstance(vocab_chunk, bool) + or not isinstance(vocab_chunk, int) + or vocab_chunk < 1)): + raise Refusal( + "compute", "bad_vocab_chunk", + "--vocab-chunk must be a positive integer; got %r" % vocab_chunk) + # CLI-05. `or 128` also swallowed 0, and nothing bounded the value. A negative + # --chunk-positions made range() empty, the loop below never ran, and `values` -- + # allocated with np.empty -- was published as the headline metric, the per_context + # means, the kl percentiles AND tokenwise-kld.npy, straight from uninitialized heap. + # Measured on a real fixture: metric 2.0 nats against a true 3.688, tokenwise + # [3,2,1,3,2,1], backend null, and both artifacts written to disk before the schema's + # `minimum: 1` caught it. A plausible-looking wrong number from a typo in a flag. + raw_block = options.get("position_block") + position_block = 128 if raw_block is None else int(raw_block) + if position_block < 1: + raise Refusal("compute", "bad_position_block", + "--chunk-positions must be >= 1; got %d" % position_block) + device = options.get("device") or "cpu" + replay_device = options.get("replay_device") or "numpy" + replay_dtype = options.get("replay_dtype") or "float32" + if replay_dtype not in ("float32", "float64"): + raise Refusal("compute", "bad_replay_dtype", + "--replay-dtype must be float32 or float64; got %r" % replay_dtype) + if replay_device != "numpy" and not _torch_available(): + raise Refusal("compute", "replay_backend_unavailable", + "--replay-device %s needs torch, which is not importable here. The " + "default (numpy) is the published path and needs nothing." + % replay_device) + if replay_device != "numpy" and replay_device != device: + # The estimator and the replay on two different devices would move the + # logits across PCIe once per position block -- slower than the numpy + # path it replaces -- and the receipt has one `device` field to name. + raise Refusal("compute", "replay_device_mismatch", + "--replay-device %s and --device %s disagree; the replay must run on " + "the device the estimator consumes, or the logits cross the bus " + "twice per block" % (replay_device, device)) + + def _load_head(head_path: str, want: Optional[str], tensor_key_hint: Optional[str]): + head_key = None + _, header = F.read_safetensors_header(head_path) + for candidate_key in (tensor_key_hint, "lm_head.weight", "weight"): + if candidate_key and candidate_key in header: + head_key = candidate_key + break + if head_key is None: + raise Refusal("compute", "head_missing", "no known head tensor key in %s" % head_path) + got = F.tensor_content_sha256(head_path, head_key) + if want and got != want: + raise Refusal("compute", "head_mismatch", + "the head payload hashes to %s but the gate resolved %s" + % (got[:12], want[:12])) + return np.ascontiguousarray(load_tensor(head_path, head_key).T), got + + # One head per SIDE. Under every rule but HEAD-1d both names point at the + # same array; under HEAD-1d each hidden-form side is replayed through the + # head its own dataset sealed, loaded once when the two digests coincide. + head32_t = None + head32_t_a = head32_t_b = None + head_applied = findings.get("head_applied") + if findings.get("head_policy") == "native_head" and "hidden" in (reference.form, candidate.form) \ + and findings.get("head_applied_reference") is not None: + if options.get("head_path"): + raise Refusal("compute", "head_mismatch", + "--head names one head to apply to both sides; --own-heads replays " + "each side through its own sealed head. Pass one or the other.") + loaded: Dict[str, Any] = {} + for label, dataset, want in (("reference", reference, findings["head_applied_reference"]), + ("candidate", candidate, findings["head_applied_candidate"])): + if dataset.form != "hidden": + continue + if want not in loaded: + loaded[want] = _load_head(dataset.head_path(), want, + dataset.head.get("tensor_key"))[0] + if label == "reference": + head32_t_a = loaded[want] + else: + head32_t_b = loaded[want] + head32_t = head32_t_a if head32_t_a is not None else head32_t_b + elif "hidden" in (reference.form, candidate.form): + head_path = options.get("head_path") + if head_path is None: + for dataset in (reference, candidate): + if dataset.head_path() and dataset.head["tensor_content_sha256"] == head_applied: + head_path = dataset.head_path() + break + if head_path is None: + raise Refusal("compute", "head_missing", + "no head payload available to replay; ship head/weight.safetensors or " + "pass --head") + head32_t, got = _load_head(head_path, head_applied, reference.head.get("tensor_key")) + head32_t_a = head32_t_b = head32_t + findings["head_applied"] = got + + ra = {int(r["index"]): r for r in reference.records} + rb = {int(r["index"]): r for r in candidate.records} + panel = reference.panel_by_index() + + chunks: List[Any] = [] + matches_total = 0 + positions_total = 0 + per_context: List[Dict[str, Any]] = [] + per_domain: Dict[str, List[float]] = {} + per_stratum: Dict[str, List[float]] = {} + depth: Dict[str, List[float]] = {} + backend = None + + replayer = replayer_a = replayer_b = None + if head32_t is not None and replay_device != "numpy": + replayer_a = _TorchReplay(head32_t_a, replay_device, replay_dtype, vocab_chunk) \ + if head32_t_a is not None else None + # The same array is the same resident head: never upload it twice. + if head32_t_b is head32_t_a: + replayer_b = replayer_a + elif head32_t_b is not None: + replayer_b = _TorchReplay(head32_t_b, replay_device, replay_dtype, vocab_chunk) + replayer = replayer_a if replayer_a is not None else replayer_b + replayer.reset_peak() + + for index in findings["shared_indices"]: + rec_a, rec_b = ra[index], rb[index] + left = load_tensor(reference.record_path(rec_a), rec_a["key"]) + right = load_tensor(candidate.record_path(rec_b), rec_b["key"]) + if replayer is None: + if reference.form == "hidden": + left = _replay(left, head32_t_a, vocab_chunk) + if candidate.form == "hidden": + right = _replay(right, head32_t_b, vocab_chunk) + rows_a = left.shape[0] + rows_b = right.shape[0] + width_a = vocab if reference.form == "hidden" and replayer is not None else left.shape[1] + width_b = vocab if candidate.form == "hidden" and replayer is not None else right.shape[1] + if (rows_a, width_a) != (rows_b, width_b): + raise Refusal("compute", "geometry_mismatch", + "record %d: %s vs %s" % (index, (rows_a, width_a), (rows_b, width_b))) + # np.full(nan), not np.empty: an unwritten slot must be detectable rather than + # being whatever the allocator last held. The check after the loop is a Refusal, + # not an assert -- asserts vanish under `python -O`. + values = np.full(rows_a, np.nan, dtype=np.float64) + for start in range(0, rows_a, position_block): + stop = min(start + position_block, rows_a) + if replayer is None: + block_a, block_b = left[start:stop], right[start:stop] + else: + # The fix, in four lines: the head is already resident for the + # fp64 estimator, so the replay happens THERE, one position + # block at a time, and the full [positions x vocab] fp32 logit + # array is never materialised on the host at all. + block_a = (replayer_a.replay(left[start:stop]) if reference.form == "hidden" + else replayer.to_device(left[start:stop])) + block_b = (replayer_b.replay(right[start:stop]) if candidate.form == "hidden" + else replayer.to_device(right[start:stop])) + piece, matched, backend = token_kld(block_a, block_b, device) + values[start:stop] = piece + matches_total += matched + # Belt and braces on the poisoned buffer: token_kld already refuses non-finite + # logits on both the torch and numpy paths, and an fp64 log-softmax difference + # cannot make a non-finite KLD from finite inputs, so this can only fire on a + # genuinely unwritten slot. + if values.size and not np.isfinite(values).all(): + raise Refusal("compute", "incomplete_scan", + "position scan left %d of %d positions unwritten" + % (int((~np.isfinite(values)).sum()), values.size)) + chunks.append(values) + positions_total += values.size + record_panel = panel.get(index) or {} + per_context.append({ + "index": index, + "window_id": rec_a.get("window_id"), + "scored_rows": int(values.size), + "mean": float(values.mean()), + "max": float(values.max()), + "domain": rec_a.get("domain") or record_panel.get("domain"), + "allocation_stratum": rec_a.get("allocation_stratum") + or record_panel.get("allocation_stratum"), + }) + key = per_context[-1]["domain"] + if key: + per_domain.setdefault(key, []).append(float(values.mean())) + key = per_context[-1]["allocation_stratum"] + if key: + per_stratum.setdefault(key, []).append(float(values.mean())) + for name, low, high in F.CONTEXT_DEPTH_BUCKETS: + piece = values[low:min(high, values.size)] + if piece.size: + depth.setdefault(name, []).append(float(piece.mean())) + + tokenwise = np.concatenate(chunks) if chunks else np.zeros(0, dtype=np.float64) + return { + "tokenwise": tokenwise, + "top1_agreement": (matches_total / positions_total) if positions_total else None, + "per_context": per_context, + "per_domain": {k: float(sum(v) / len(v)) for k, v in sorted(per_domain.items())}, + "per_stratum": {k: float(sum(v) / len(v)) for k, v in sorted(per_stratum.items())}, + "context_depth_buckets": {k: float(sum(v) / len(v)) for k, v in sorted(depth.items())}, + "estimator_backend": backend, + "vocab_chunk": vocab_chunk, + "position_block": position_block, + "device": device, + "head_applied": findings.get("head_applied"), + "head_applied_reference": findings.get("head_applied_reference", + findings.get("head_applied")), + "head_applied_candidate": findings.get("head_applied_candidate", + findings.get("head_applied")), + # Named on EVERY receipt, including the numpy default. Two rows are + # only rankable against each other if their replay ran on the same + # backend, and a field that appears only when the non-default path ran + # would make the default look like "unknown" instead of "numpy". + "replay_backend": _replay_backend_name(replay_device, replay_dtype) + if head32_t is not None else None, + # The numpy path names its BLAS, CPU and thread count for the same + # reason the torch path names its device: the host term lives there. + "replay_env": (replayer.env if replayer is not None + else _numpy_replay_env() if head32_t is not None else None), + "replay_head_bytes": replayer.head_bytes if replayer is not None else None, + "replay_peak_device_bytes": replayer.peak_bytes() if replayer is not None else None, + } + + +# --------------------------------------------------------------------------- +# Self-compare (spec section 10.4) +# --------------------------------------------------------------------------- + + +def classify(reference: Dataset, candidate: Dataset, + options: Optional[Dict[str, Any]] = None, + findings: Optional[Dict[str, Any]] = None) -> str: + """SC-1 / SC-2 / measurement. + + A == B by `capture_content_digest` is a REPRODUCTION CONFIRMATION. Equal + weights identity but different capture content is a RUN-TO-RUN FLOOR and is + never called a reproduction: a different grouped-mm kernel, GPU class or + torch build changes the bf16 forward itself, and that class of difference is + what produced our 0.011506 cross-topology floor -- 1e-2 class. + + HEAD-1c is checked HERE and not in the head gate, because it is the one head + condition that only exists once the capture digests are known to be equal. + Under HEAD-1d (`own_heads`) the same condition is a MEASUREMENT: each side + goes through its own head, so identical hiddens under different heads yield + exactly the head-quantization KL -- the quantity a head-only quant (stock + EXL3 head_bits 6-8) needs, and the one case own-head replay exists to + measure. It is recorded on `findings` as `head_only_difference`. + """ + if reference.content_digest == candidate.content_digest: + da = reference.head.get("tensor_content_sha256") + db = candidate.head.get("tensor_content_sha256") + if "hidden" in (reference.form, candidate.form) and da != db: + if (options or {}).get("own_heads") and findings is not None: + findings["disclosures"].append({ + "code": "head_only_difference", "severity": "info", + "affects_comparability": False, + "detail": "the two captures share bitwise-identical hidden states " + "(capture_content_digest %s); the whole of this number is the " + "head difference (%s vs %s), each side replayed through its " + "own sealed head (HEAD-1d)." + % (reference.content_digest[:12], (da or "null")[:12], + (db or "null")[:12]), + }) + return "measurement" + # HEAD-1c: bitwise-equal hiddens under DIFFERENT heads. A head-only + # quant (stock EXL3 head_bits 6-8 is exactly this) changes nothing + # before the final norm, so its post-norm hiddens are bitwise + # identical to the reference's and the capture content digests + # match. Replaying both sides through ONE head then subtracts a + # quantity from itself: the answer is exactly 0.0 and it measures + # nothing. There is no override on the shared-head path, because + # there is no reading of that comparison under which the number + # means anything; --own-heads is the other procedure, not an override. + raise Refusal( + "head", "head_substitution_vacuous", + "HEAD-1c: the two captures are bitwise identical " + "(capture_content_digest %s) but declare DIFFERENT heads (%s vs %s). " + "The head is therefore the whole of the difference between these two " + "artifacts, and hidden replay through a single head erases exactly that " + "-- the result would be 0.0 nats and would read as an exact reproduction. " + "A head-only quantization is measured with --own-heads (HEAD-1d: each side " + "replayed through its own sealed head), or from logit-form captures, where " + "each side applies its own head (HEAD-2)." + % (reference.content_digest[:12], (da or "null")[:12], (db or "null")[:12])) + return "reproduction_confirmation" + if reference.weights_identity() == candidate.weights_identity() \ + and all(v is not None for v in reference.weights_identity()): + return "run_to_run_floor" + return "measurement" + + +def zero_tokenwise(scored_positions: int): + """The T1 hash proof's array: np.save of N float64 zeros.""" + import numpy as np + + return np.zeros(int(scored_positions), dtype=np.float64) + + +def save_tokenwise(path: str, array) -> Dict[str, Any]: + import numpy as np + + np.save(path, array, allow_pickle=False) + return {"path": os.path.basename(path), "bytes": os.path.getsize(path), + "sha256": F.sha256_file(path)} + + +def short_circuit_result(reference: Dataset, candidate: Dataset, + findings: Dict[str, Any]) -> Dict[str, Any]: + """SC-1 without the matmul. + + fp64 log_softmax of bitwise-equal inputs is deterministic and + `t_logp - s_logp` is a subtraction of equal doubles, so every per-token + value is exactly +0.0. + """ + positions = sum(int(r["scored_rows"]) for r in reference.records + if int(r["index"]) in set(findings["shared_indices"])) + array = zero_tokenwise(positions) + per_context = [] + for record in reference.records: + index = int(record["index"]) + if index not in set(findings["shared_indices"]): + continue + per_context.append({ + "index": index, + "window_id": record.get("window_id"), + "scored_rows": int(record["scored_rows"]), + # +0.0, never -0.0. + "mean": 0.0, + "max": 0.0, + "domain": record.get("domain"), + "allocation_stratum": record.get("allocation_stratum"), + }) + return { + "tokenwise": array, + "top1_agreement": 1.0, + "per_context": per_context, + "per_domain": {}, + "per_stratum": {}, + "context_depth_buckets": {}, + "estimator_backend": "hash_proof", + "replay_backend": "none", + "vocab_chunk": None, + "position_block": None, + "device": "none", + "head_applied": findings.get("head_applied"), + "short_circuited": True, + } + + +# --------------------------------------------------------------------------- +# Receipt +# --------------------------------------------------------------------------- + + +def build_receipt(reference: Dataset, candidate: Dataset, gates: Dict[str, Any], + findings: Dict[str, Any], result: Dict[str, Any], + tokenwise_meta: Dict[str, Any], options: Dict[str, Any], + comparison_kind: str) -> Dict[str, Any]: + import numpy as np + + array = result["tokenwise"] + stats = F.stats_block(array) if array.size else { + "mean": 0.0, "median": 0.0, "p95": 0.0, "p99": 0.0, "p99_9": 0.0, "max": 0.0} + if comparison_kind == "reproduction_confirmation": + # SC-1 asserts exactness; never let a formatter round anything in. + stats = {key: 0.0 for key in stats} + panel = reference.manifest["panel"] + head_policy = findings.get("head_policy") or "native_head" + same_lane = findings.get("same_lane", reference.lane == candidate.lane) + usable_as_floor = bool(findings.get("usable_as_floor", True)) and same_lane + klass = findings.get("class", "strict") + capture_dtype = reference.manifest["capture"]["dtype"].lower() + replay_backend = result.get("replay_backend") + replayed = bool(replay_backend) and replay_backend != "none" + logits_dtype = replay_backend.rsplit(":", 1)[-1] if replayed else capture_dtype + hidden_dtype = next((ds.manifest["capture"]["dtype"].lower() + for ds in (reference, candidate) if ds.form == "hidden"), None) + + receipt: Dict[str, Any] = { + "schema": F.RECEIPT_SCHEMA, + "format_version": F.FORMAT_VERSION, + "receipt_sha256": "", + "created_utc": __import__("datetime").datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%SZ"), + "comparison_kind": comparison_kind, + "reference": reference.side_block(options.get("reference_label") or "reference"), + "candidate": candidate.side_block(options.get("candidate_label") or "candidate"), + "panel": { + "panel_id": panel.get("panel_id"), + "suite_token_hash_sha256": panel["suite_token_hash_sha256"], + "panel_token_sha256_legacy": panel.get("panel_token_sha256_legacy"), + "contexts": len(findings["shared_indices"]), + "scored_positions": int(array.size), + "context_length": panel.get("context_length"), + "scoring_window": panel["scoring_window"], + "tokenizer": panel.get("tokenizer"), + # Both sides, always. The gate refuses a genuine disagreement, but a + # receipt that prints only ONE side's block is asserting something it + # did not check whenever a field is null on the other side. + "tokenizer_reference": panel.get("tokenizer"), + "tokenizer_candidate": candidate.manifest["panel"].get("tokenizer"), + "tokenizer_identity_equal": not _tokenizer_divergence( + panel.get("tokenizer"), candidate.manifest["panel"].get("tokenizer")), + }, + "gates": {name: gates[name] for name in + ("seal", "form", "panel", "head", "lane", "stack", + "geometry", "coverage", "lossy", "decode") if name in gates}, + "comparator": { + "device": result.get("device") or "cpu", + "accumulation_dtype": "float64", + "logprob_dtype": "float64", + "two_pass": True, + "vocab_chunk": result.get("vocab_chunk"), + "position_block": result.get("position_block"), + # The replay backend is part of the number, not part of the + # plumbing: an fp32 GEMM accumulates in an order the BLAS chooses, + # so numpy-on-Accelerate, numpy-on-OpenBLAS and cuBLAS give + # different last digits from the same head and the same hidden + # states. Two rows are comparable only if this field matches. + "replay_backend": result.get("replay_backend"), + "replay_env": result.get("replay_env"), + "replay_peak_device_bytes": result.get("replay_peak_device_bytes"), + # Observed, not asserted, whenever a torch device did the replay. + "tf32": (result.get("replay_env") or {}).get("tf32", False), + "deterministic_algorithms": True, + "bf16_reduced_precision_reduction": ( + result.get("replay_env") or {}).get("bf16_reduced_precision_reduction", False), + "cublas_workspace_config": os.environ.get("CUBLAS_WORKSPACE_CONFIG"), + "head_applied_tensor_content_sha256": result.get("head_applied"), + # Additive (2026-09-05): under HEAD-1d each hidden-form side is + # replayed through its OWN sealed head, so the single field above is + # null and these two name what each side actually saw. Under every + # other rule they both equal the single field. + "head_applied_reference_tensor_content_sha256": result.get( + "head_applied_reference", result.get("head_applied")), + "head_applied_candidate_tensor_content_sha256": result.get( + "head_applied_candidate", result.get("head_applied")), + # What was ACTUALLY recomputed, never a constant. The seal covers the + # manifest and checksums.txt on every run; the per-tensor + # `tensor_content_sha256` values are only re-derived when the caller + # asked, and a receipt has to say which of the two it is. + "tensor_content_digests_verified": bool(options.get("verify_tensors")), + "source_file_hashes_verified": bool(options.get("verify_tensors")), + "short_circuited": bool(result.get("short_circuited", False)), + "estimator_backend": result.get("estimator_backend"), + "tool": { + "entrypoint": "bin/fidelity-dataset compare", + # Same reason as the estimator_backend literal above: this + # note is inside sealed receipts, so it keeps the module's + # 2026-08 spelling. Today the file is engines/tools/kld_report.py. + "note": "the fp64 estimator is k6_kld_report._token_kld, imported not copied, " + "whenever torch is importable; estimator_backend records which path ran.", + }, + }, + "metric": { + "name": "mean_tokenwise_kld", + "value": stats["mean"], + "units": "nats", + "direction": "reference_to_candidate", + "direction_label": "KL(reference || candidate)", + "higher_is_better": False, + }, + "kl": stats, + "top1_agreement": result.get("top1_agreement"), + "kl_micro_token_mean": stats["mean"], + "kl_macro_stratum_mean": ( + float(sum(result["per_stratum"].values()) / len(result["per_stratum"])) + if result.get("per_stratum") else None), + "per_stratum": result.get("per_stratum") or None, + "per_domain": result.get("per_domain") or None, + "context_depth_buckets": result.get("context_depth_buckets") or None, + "per_context": result.get("per_context") or None, + "high_kld_contexts": sorted( + [c for c in (result.get("per_context") or [])], + key=lambda c: -c["mean"])[:5], + "top1_discordant_contexts": [], + "uncertainty": {"method": "none", "ci95_low": None, "ci95_high": None, + "clusters": None, "samples": None, "cluster_unit": None, "seed": None}, + "estimator": { + "accumulation_dtype": "float64", + # The dtype the estimator CONSUMED. A hidden-form side is replayed + # (`logits' = hidden @ head.T`) in the replay backend's dtype, so the + # logits are float32 on the published numpy path even though the + # sealed capture is bf16; seven published receipts said "bf16" here + # while their own `replay_backend` said numpy:cpu:float32 (S2-1). + # The capture dtype survives only where no replay happened: a + # logit-form capture, or a hash-proof short circuit. + "logits_dtype": logits_dtype, + "hidden_dtype": hidden_dtype, + "two_pass": True, + "vocab_chunk": result.get("vocab_chunk"), + "stack_relation": findings.get("stack_relation", "same_stack"), + "head_policy": head_policy, + "softmax_note": "full vocabulary, torch.log_softmax in float64; no truncation, no " + "top-k, no clamp. A non-finite intermediate is a hard refusal.", + "zero_handling": ("exact zero asserted, not rounded" + if comparison_kind == "reproduction_confirmation" else None), + }, + "determinism": { + "run_count": 1, + "cold_start_per_run": None, + "run_means": [stats["mean"]], + "population_stddev_of_run_means": 0.0, + "min_run_mean": stats["mean"], + "max_run_mean": stats["mean"], + "identical_across_runs": None, + "evidence_kind": ("hidden_state_tensor_sha256" if reference.form == "hidden" + else "logits_tensor_sha256"), + "evidence_hashes": sorted({reference.content_digest, candidate.content_digest}), + "distinct_evidence_hash_count": + len({reference.content_digest, candidate.content_digest}), + "note": "one comparison of two sealed captures. identical_across_runs is null, not " + "true: that claim needs two independently produced captures of the SAME " + "weights (SC-2), which is a different receipt.", + }, + "measurement_scope": { + "scored_positions": int(array.size), + "contexts": len(findings["shared_indices"]), + "positions_per_context": (int(result["per_context"][0]["scored_rows"]) + if result.get("per_context") else None), + "covers_full_panel": bool(findings.get("covers_full_panel", False)), + "subset_detail": None if findings.get("covers_full_panel") else + "compared on the %d-record intersection of the two captures" + % len(findings["shared_indices"]), + "position_filter": "all", + }, + "comparability": { + "class": klass, + "usable_as_floor": usable_as_floor, + "same_lane": same_lane, + "key": None, + "key_inputs": None, + "bias": findings.get("bias"), + }, + "tokenwise": tokenwise_meta, + "self_compare": None, + "submission": { + "emitted": False, "path": None, "receipt_sha256": None, + "submission_schema": None, + "refusal": None if comparison_kind == "measurement" else + "comparison_kind is %s, not measurement; bin/fidelity/receipt.py::" + "_scan_for_unsubmittable is the second, independent refusal axis." + % comparison_kind, + }, + "disclosures": findings.get("disclosures") or [], + } + + if comparison_kind in ("reproduction_confirmation", "run_to_run_floor"): + receipt["self_compare"] = { + "capture_content_digest_equal": + reference.content_digest == candidate.content_digest, + "weights_identity_equal": + reference.weights_identity() == candidate.weights_identity(), + "head_digest_equal": (reference.head.get("tensor_content_sha256") + == candidate.head.get("tensor_content_sha256")), + "asserted_exact_zero": comparison_kind == "reproduction_confirmation", + "force_compute_agreed": options.get("force_compute_agreed"), + "expected_tokenwise_bytes": tokenwise_meta.get("bytes"), + "expected_tokenwise_sha256": tokenwise_meta.get("sha256"), + } + if not receipt["disclosures"]: + receipt["disclosures"] = [{ + "code": "no_known_deviations", "severity": "info", + "affects_comparability": False, + "detail": "every gate passed with no override.", + }] + if comparison_kind == "measurement": + registry_lib = _registry_lib() + key_inputs = { + "panel_id": panel.get("panel_id") or "panel--unknown", + "reference_id": (reference.manifest.get("dataset") or {}).get("id") or "reference--unknown", + "metric_name": "mean_tokenwise_kld", + "direction": "reference_to_candidate", + "accumulation_dtype": "float64", + "stack_relation": findings.get("stack_relation", "same_stack"), + "head_policy": head_policy, + } + receipt["comparability"]["key"] = registry_lib.comparability_key(key_inputs) + # The registry hashes its OWN reference record id (reference--...), not + # the dataset id this receipt knows, so the two keys never match and a + # reader cross-checking sees a silent mismatch. CMP-001 recomputes the + # key at ingest; this one is a preview and says so. + key_inputs["note"] = ("provisional; the registry recomputes with its reference " + "record id (registry CMP-001)") + receipt["comparability"]["key_inputs"] = key_inputs + return F.seal_receipt(receipt) + + +def _registry_lib(): + registry_tools = os.path.join(_REPO, "registry", "tools") + if registry_tools not in sys.path: + sys.path.insert(0, registry_tools) + import registry_lib # noqa: WPS433 + + return registry_lib + + +def compare(reference_root: str, candidate_root: str, out_dir: str, + options: Optional[Dict[str, Any]] = None) -> Dict[str, Any]: + """The whole of step 3: gate ladder, then the answer, then the receipt.""" + import numpy as np + + options = dict(options or {}) + + # Tensor verification is ON unless the caller says otherwise, in the library + # as well as the CLI. Recomputing checksums.txt and the seal does NOT catch a + # byte flipped inside a tensor whose checksums were refreshed afterwards -- + # and refreshing them is what re-running finalize after an edit does. The + # receipt records which of the two ran. + options["verify_tensors"] = bool(options.get("verify_tensors", True)) + reference = load_dataset(reference_root, + verify=not options.get("skip_seal"), + verify_tensors=options["verify_tensors"], + allow_partial=bool(options.get("allow_partial"))) + candidate = load_dataset(candidate_root, + verify=not options.get("skip_seal"), + verify_tensors=options["verify_tensors"], + allow_partial=bool(options.get("allow_partial"))) + gates, findings = run_gates(reference, candidate, options) + gates["seal"] = _gate(True, "both manifests self-seal and checksums.txt verified" + + ("; every tensor_content_sha256 recomputed" + if options.get("verify_tensors") else "")) + + kind = classify(reference, candidate, options, findings) + if options.get("self_compare") and kind != "reproduction_confirmation": + raise Refusal("self-compare", "not_a_self_compare", + "--self-compare was asked for but the two captures differ " + "(%s vs %s); this is a %s" + % (reference.content_digest[:12], candidate.content_digest[:12], kind)) + + if kind == "reproduction_confirmation": + result = short_circuit_result(reference, candidate, findings) + if options.get("force_compute"): + computed = compute(reference, candidate, findings, options) + same = bool(np.array_equal(computed["tokenwise"], result["tokenwise"])) + options["force_compute_agreed"] = same + if not same: + raise Refusal("compute", "self_compare_disagreement", + "--force-compute produced a result that is not bitwise identical " + "to the hash proof; the estimator or the reader is broken") + result["estimator_backend"] = computed["estimator_backend"] + result["device"] = computed["device"] + result["vocab_chunk"] = computed["vocab_chunk"] + result["position_block"] = computed["position_block"] + for field in ("replay_backend", "replay_env", "replay_peak_device_bytes"): + result[field] = computed.get(field) + else: + result = compute(reference, candidate, findings, options) + + # P1-09: outputs are staged in a private temporary directory and renamed + # into out_dir only after the receipt passes its own schema/seal validation. + # The old order wrote the array and the receipt first and validated later + # (in the CLI), so a refused comparison still left a plausible receipt on + # disk for any library caller or shell script to pick up. + import shutil + import tempfile + + parent = os.path.dirname(os.path.abspath(out_dir)) or "." + os.makedirs(parent, exist_ok=True) + tmp_dir = tempfile.mkdtemp(prefix=".compare-staging-", dir=parent) + try: + tokenwise_meta = save_tokenwise(os.path.join(tmp_dir, "tokenwise-kld.npy"), + result["tokenwise"]) + receipt = build_receipt(reference, candidate, gates, findings, result, + tokenwise_meta, options, kind) + report = dsvalidate.validate_receipt(receipt, out_dir) + if report.errors: + raise Refusal( + "publish", "receipt_invalid", + "the computed receipt fails its own schema/seal validation and is NOT " + "written: %s" + % "; ".join("%(rule)s %(code)s: %(message)s" % e for e in report.errors[:5])) + F.write_json(os.path.join(tmp_dir, "comparison-receipt.json"), receipt) + os.makedirs(out_dir, exist_ok=True) + # The array lands first, the receipt last: at no instant does a receipt + # exist whose tokenwise file is missing. + os.replace(os.path.join(tmp_dir, "tokenwise-kld.npy"), + os.path.join(out_dir, "tokenwise-kld.npy")) + os.replace(os.path.join(tmp_dir, "comparison-receipt.json"), + os.path.join(out_dir, "comparison-receipt.json")) + finally: + shutil.rmtree(tmp_dir, ignore_errors=True) + return receipt + + +# --------------------------------------------------------------------------- +# Registry submission (SC-3) +# --------------------------------------------------------------------------- + + +class NotAMeasurement(RuntimeError): + """SC-3: only `comparison_kind == "measurement"` may reach registry_add.""" + + +class MissingProvenance(RuntimeError): + """SC-4: a submission names a registered artifact, panel and reference. + + None of the three can be derived from a fidelity dataset: `artifact` is the + quant's HF repository at a 40-hex revision with its codec and scope, + `panel_ref`/`reference_ref` are registry ids that must already exist. The + comparator refuses to write a file with those blocks empty rather than + emitting something that fails `registry_validate.py --submission` with + twenty schema errors an hour later. + """ + + +# `submission.schema.json#/properties/determinism` sets additionalProperties:false. +# The comparison receipt's determinism block is deliberately RICHER -- it carries +# min/max/stddev of the run means, which the receipt schema wants and the +# submission schema forbids -- so the crossing is a projection, listed here rather +# than done by deletion so a new receipt field cannot silently leak through. +_SUBMISSION_DETERMINISM_FIELDS = ( + "run_count", "cold_start_per_run", "run_means", "identical_across_runs", + "evidence_kind", "evidence_hashes", "distinct_evidence_hash_count", + "per_run_report_sha256", "note", +) +_SUBMISSION_ESTIMATOR_FIELDS = ( + "accumulation_dtype", "head_policy", "logits_dtype", "padded_columns_masked", + "softmax_note", "stack_relation", "two_pass", "vocab_chunk", + "vocab_masking_policy", "zero_handling", +) +_SUBMISSION_SCOPE_FIELDS = ( + "calibration_overlap_scan", "contexts", "covers_full_panel", "position_filter", + "positions_per_context", "scope_name", "scope_selection_file", + "scope_selection_sha256", "scored_positions", "subset_detail", +) + + +def _project(block: Optional[Dict[str, Any]], fields: Sequence[str]) -> Dict[str, Any]: + block = block or {} + return {key: block[key] for key in fields if key in block} + + +#: The receipt names dtypes the way numpy/torch do (`float32`, the replay +#: dtype); the registry's `common.schema.json#/$defs/numeric_format` enum spells +#: them `fp32`. Mapped at the crossing, never inside the sealed receipt. +_REGISTRY_NUMERIC_FORMAT = {"float32": "fp32", "float64": "fp64", "f32": "fp32", + "f16": "fp16", "float16": "fp16", "bfloat16": "bf16"} + + +def _submission_estimator(estimator: Dict[str, Any]) -> Dict[str, Any]: + block = _project(estimator, _SUBMISSION_ESTIMATOR_FIELDS) + dtype = block.get("logits_dtype") + if isinstance(dtype, str): + block["logits_dtype"] = _REGISTRY_NUMERIC_FORMAT.get(dtype.lower(), dtype) + return block + + +def _evidence_source(side: Dict[str, Any], role: str) -> Dict[str, Any]: + """A `common.schema.json#/$defs/source` pointing at one fidelity dataset. + + `kind` must come from the registry's enum and `uri` is required; there is no + `fidelity_dataset` kind and no `role` property, so the role travels in the + note. The digest is the dataset SEAL, which is what makes the pointer + checkable (DS-001). + """ + repository, revision = side.get("repository"), side.get("revision") + note = ("%s fidelity dataset %s (malaiwah.fidelity-dataset.v1, form %s, lane %s)" + % (role, side.get("dataset_id") or "unnamed", side.get("form"), side.get("lane"))) + if repository: + uri = "https://huggingface.co/datasets/%s/blob/%s/fidelity-dataset.json" % ( + repository, revision or "main") + return {"kind": "hf_file", "uri": uri, "sha256": side["dataset_sha256"], "note": note} + # Not published: name it by its own id, never by a path on the measuring box + # -- that is the defect (`packed_root: /home/jl_fs/...`) this format exists + # to stop shipping. + return {"kind": "filesystem_path", + "uri": "%s/fidelity-dataset.json" % (side.get("dataset_id") or "fidelity-dataset"), + "sha256": side["dataset_sha256"], + "note": note + " -- not published; the digest is the only pointer"} + + +def emit_submission(receipt: Dict[str, Any], out_path: str, *, + measurer: Dict[str, Any], artifact: Dict[str, Any], + panel: Dict[str, Any], reference: Dict[str, Any], + environment: Optional[Dict[str, Any]] = None) -> Dict[str, Any]: + """Turn a measurement receipt into a registry submission. + + Two independent refusal axes, on purpose: + + 1. HERE: `comparison_kind != "measurement"` is refused outright. A + reproduction confirmation and a run-to-run floor are real results and + real receipts; neither is a measurement row. + 2. `bin/fidelity/receipt.py::assert_submittable`, which scans every block + for preview/teacher markers at any depth. + + `build_submission` self-seals and computes `scope_digest` and the + comparability key with `registry/tools/registry_lib.py` -- the registry's + own code, imported, never reimplemented. + """ + from pathlib import Path + + if receipt.get("comparison_kind") != "measurement": + raise NotAMeasurement( + "REFUSED: comparison_kind is %r. Only a measurement may become a registry row " + "(SC-3). A reproduction_confirmation proves the estimator is exact on identical " + "input; a run_to_run_floor is a lane property. Neither is a quantization result." + % receipt.get("comparison_kind")) + + # SC-5. A blocking disclosure means the comparator itself said the number is + # not publishable as a measurement. The registry's DISC-003 says the same, + # but ONLY at row-ingest time -- `registry_validate.py --submission` runs + # `check_submission`, which never calls `check_disclosures`. So the tool that + # minted the number is the one that has to refuse it. + blocking = [d for d in receipt.get("disclosures") or [] + if d.get("severity") == "blocking"] + if blocking: + raise NotAMeasurement( + "REFUSED: the comparison carries %d blocking disclosure(s) -- %s. A blocking " + "disclosure is the comparator saying this number is not publishable as a " + "measurement (DISC-003 forces status pending/retracted downstream). The receipt " + "stands as a result; it does not become a registry row." + % (len(blocking), ", ".join(sorted(d.get("code", "?") for d in blocking)))) + + missing = [] + for label, block, required in (("artifact", artifact, + ("repository", "revision", "container", "codec", + "scope", "producer")), + ("panel", panel, ("panel_ref", "panel_token_sha256")), + ("reference", reference, + ("reference_ref", "teacher_receipt_sha256"))): + for key in required: + if not (block or {}).get(key): + missing.append("%s.%s" % (label, key)) + if missing: + raise MissingProvenance( + "REFUSED to write a submission: %d required field(s) have no value -- %s.\n" + " These name registry records and cannot be derived from a fidelity dataset: " + "the artifact is an HF repository at a 40-hex revision with its codec and " + "quantization scope, and panel_ref/reference_ref must already exist in the " + "registry (a measurement may not introduce a panel).\n" + " Fix: pass --submission-provenance FILE. `bin/fidelity-dataset compare " + "--print-provenance-template` writes a skeleton with every required key." + % (len(missing), ", ".join(missing))) + + sys.path.insert(0, os.path.join(_REPO, "bin")) + from fidelity import receipt as receipt_mod # noqa: WPS433 + + submission = receipt_mod.build_submission( + suite_root=Path(_REPO), + lane=receipt["candidate"]["lane"], + measurer=measurer, + artifact=artifact, + panel=panel, + reference=reference, + metric={ + "name": "mean_tokenwise_kld", + "value": receipt["metric"]["value"], + "units": receipt["metric"]["units"], + "direction": receipt["metric"]["direction"], + }, + estimator=_submission_estimator(receipt["estimator"]), + determinism=_project(receipt["determinism"], _SUBMISSION_DETERMINISM_FIELDS), + measurement_scope=_project(receipt["measurement_scope"], _SUBMISSION_SCOPE_FIELDS), + produced_by=receipt_mod.produced_by_block( + Path(_REPO), "bin/fidelity_dataset.py", + {"comparison_kind": receipt["comparison_kind"]}), + environment=environment, + evidence=[ + _evidence_source(receipt["reference"], "reference"), + _evidence_source(receipt["candidate"], "candidate"), + ], + auxiliary_metrics={"top1_agreement": receipt.get("top1_agreement"), + "median_kld": receipt["kl"].get("median"), + "p95_kld": receipt["kl"].get("p95"), + "p99_kld": receipt["kl"].get("p99"), + "p999_kld": receipt["kl"].get("p99_9"), + "max_kld": receipt["kl"].get("max"), + "context_macro_mean_kld": receipt.get("kl_macro_stratum_mean")}, + # The bias block and usable_as_floor are the comparator's own verdict on + # how the number may be READ. Dropping them here is how a row ends up + # carrying `bias: null` for a comparison its own receipt declared biased. + comparability={"bias": (receipt.get("comparability") or {}).get("bias"), + "usable_as_floor": (receipt.get("comparability") or {}) + .get("usable_as_floor")}, + extra_disclosures=[d for d in receipt.get("disclosures") or [] + if d.get("code") != "no_known_deviations"], + ) + F.write_json(out_path, submission) + return submission diff --git a/raw/retained/build_microfloat.py b/raw/retained/build_microfloat.py new file mode 100644 index 0000000000000000000000000000000000000000..f25095239f23d17c3b9806a79634c00fe845e157 --- /dev/null +++ b/raw/retained/build_microfloat.py @@ -0,0 +1,270 @@ +#!/usr/bin/env python3 +"""Build tiny FORMAT fixtures, optionally capture via integrated QFS layer-outer. + +No optimizer-quality claim: deterministic CPU minmax/conservative-scale RTN. +MXFP4 uses ceil(log2(group_max/6)); this is NOT CT's MX observer or Kimi QAT. +NVFP4 uses a tensor maximum global, rounded E4M3 group scales, then E2M1 +nearest-even RTN. FP8 uses ceil(log2(block_max/448)) UE8M0 + E4M3 RTN. +No calibration, activation quantization, kernel parity, training or model code. +""" +from __future__ import annotations +import argparse +from collections import defaultdict +import hashlib +import json +from pathlib import Path +import re +import shutil +import subprocess +import sys + +PINS = { + "malaiwah/glm-moe-dsa-tiny-random-bf16": "a1a973330e4e912678adbd8ea41e8b86b1c9dccb", + "malaiwah/qwen3-5-tiny-random-bf16": "a430e41d5814ba5e7bfa5ee29d86935aac56d95d", +} +FORMATS = ("ct-mxfp4", "ct-nvfp4", "modelopt-nvfp4", "fp8-ue8m0", "modelopt-mixed") +MIXED_FORMATS = ("modelopt-nvfp4", "modelopt-fp8-tensor", "modelopt-fp8-block") + + +def fp4_codes(x): + """Literal round-to-nearest-even thresholds, independently of the decoder.""" + import torch + a = x.abs() + code = torch.zeros_like(a, dtype=torch.uint8) + for value, boundary, inclusive in [(1, .25, False), (2, .75, True), + (3, 1.25, False), (4, 1.75, True), (5, 2.5, False), + (6, 3.5, True), (7, 5., False)]: + code = torch.where(a >= boundary if inclusive else a > boundary, value, code) + return code | (torch.signbit(x).to(torch.uint8) << 3) + + +def oracle_fp4(packed): + """Independent bit-field E2M1, not the surface LUT/unpack helper.""" + import torch + code = torch.empty((*packed.shape[:-1], packed.shape[-1] * 2), dtype=torch.int32) + code[..., 0::2] = packed.to(torch.int32) & 15 + code[..., 1::2] = packed.to(torch.int32) >> 4 + exponent, mantissa = (code >> 1) & 3, code & 1 + magnitude = torch.where(exponent == 0, mantissa.float() * .5, + torch.ldexp(1 + mantissa.float() * .5, exponent - 1)) + return torch.copysign(magnitude, torch.where((code & 8) != 0, -1., 1.)) + + +def encode(weight, fmt): + import torch + x = weight.float().cpu() + if not torch.isfinite(x).all(): + raise ValueError("nonfinite source weight") + if fmt == "modelopt-fp8-block": + parts, oracle = encode(x, "fp8-ue8m0") + scale = torch.exp2(parts["scale"].float() - 127).to(torch.bfloat16) + return {"weight": parts["weight"], "weight_scale_inv": scale}, oracle + if fmt == "modelopt-fp8-tensor": + scale = (x.abs().max() / 448.).clamp(min=2**-126).to(torch.bfloat16).reshape(1) + q = (x / scale.float()).clamp(-448,448).to(torch.float8_e4m3fn) + return {"weight": q, "weight_scale": scale}, q.float() * scale.float() + if fmt == "fp8-ue8m0": + n, k = x.shape[-2:] + scales = torch.empty((*x.shape[:-2], (n + 127)//128, (k + 127)//128), dtype=torch.uint8) + q = torch.empty_like(x, dtype=torch.float8_e4m3fn) + oracle = torch.empty_like(x) + for i in range(scales.shape[-2]): + for j in range(scales.shape[-1]): + block = x[..., i*128:(i+1)*128, j*128:(j+1)*128] + amax = block.abs().amax(dim=(-2,-1)) + exponent = torch.where(amax == 0, 0., torch.ceil(torch.log2(amax / 448.))).clamp(-127, 127) + scale = torch.exp2(exponent) + scales[..., i, j] = (exponent + 127).to(torch.uint8) + qb = (block / scale[..., None, None]).clamp(-448,448).to(torch.float8_e4m3fn) + q[..., i*128:(i+1)*128, j*128:(j+1)*128] = qb + oracle[..., i*128:(i+1)*128, j*128:(j+1)*128] = qb.float() * scale[..., None, None] + return {"weight": q, "scale": scales}, oracle + group = 32 if fmt == "ct-mxfp4" else 16 + blocks = x.reshape(*x.shape[:-1], -1, group) + amax = blocks.abs().amax(dim=-1) + extra = {} + if fmt == "ct-mxfp4": + exponent = torch.where(amax == 0, 0., torch.ceil(torch.log2(amax / 6.))).clamp(-127, 127) + stored_scale = (exponent + 127).to(torch.uint8) + effective = torch.exp2(exponent) + else: + global_multiplier = torch.clamp(x.abs().max() / (6. * 448.), min=torch.finfo(torch.float32).tiny) + if not bool(x.abs().max()): + global_multiplier = torch.tensor(1., dtype=torch.float32) + if fmt == "ct-nvfp4": + global_value = global_multiplier.reciprocal().reshape(1) + unrounded = amax / 6. * global_value + role = "weight_global_scale" + else: + global_value = global_multiplier.reshape(1) + unrounded = amax / 6. / global_value + role = "weight_scale_2" + unrounded = torch.where(amax == 0, 0., unrounded.clamp(min=2**-9, max=448.)) + stored_scale = unrounded.to(torch.float8_e4m3fn) + effective = stored_scale.float() / global_value if fmt == "ct-nvfp4" else stored_scale.float() * global_value + extra[role] = global_value + normalized = blocks / torch.where(effective == 0, 1., effective).unsqueeze(-1) + codes = fp4_codes(normalized).reshape(x.shape) + packed = codes[..., 0::2] | (codes[..., 1::2] << 4) + oracle = (oracle_fp4(packed).reshape(blocks.shape) * effective.unsqueeze(-1)).reshape(x.shape) + return {"weight" if fmt == "modelopt-nvfp4" else "weight_packed": packed, + "weight_scale": stored_scale, **extra}, oracle + + +def quant_config(fmt, targets): + if fmt == "modelopt-mixed": + declarations = ({"quant_algo":"NVFP4","group_size":16}, + {"quant_algo":"FP8"}, {"quant_algo":"FP8_PB_WO","group_size":128}) + return {"quant_method":"modelopt", "quant_algo":"MIXED_PRECISION", + "quantized_layers":{target:dict(declarations[i % 3]) for i,target in enumerate(targets)}} + if fmt == "fp8-ue8m0": + return {"quant_method": "fp8", "fmt": "e4m3", "scale_fmt": "ue8m0", + "activation_scheme": "dynamic", "weight_block_size": [128, 128]} + if fmt == "modelopt-nvfp4": + return {"quant_method": "modelopt", "quant_algo": "NVFP4", "group_size": 16, + "num_bits": 4, "with_input_scale": False} + mx = fmt == "ct-mxfp4" + packing = "mxfp4-pack-quantized" if mx else "nvfp4-pack-quantized" + return {"quant_method": "compressed-tensors", "format": packing, + "quantization_status": "compressed", "ignore": [], + "config_groups": {"group_0": {"format": packing, "targets": targets, + "input_activations": None, "output_activations": None, + "weights": {"num_bits": 4, "type": "float", "group_size": 32 if mx else 16, + "strategy": "group" if mx else "tensor_group", "symmetric": True, + "dynamic": False, "scale_dtype": "torch.uint8" if mx else "torch.float8_e4m3fn"}}}} + + +def metadata(tensors): + import torch + codes = {torch.uint8: "U8", torch.int8: "I8", torch.int32: "I32", torch.int64: "I64", + torch.float32: "F32", torch.float16: "F16", torch.bfloat16: "BF16", torch.float8_e4m3fn: "F8_E4M3"} + return {k: {"shape": list(v.shape), "dtype": codes[v.dtype]} for k,v in tensors.items()} + + +def digest(path): + return hashlib.sha256(Path(path).read_bytes()).hexdigest() + + +def capture(args): + command = [sys.executable,str(args.qfs_root/"engines/tools/hf_capture.py"), + "--model",str(args.out),"--model-revision",args.candidate_revision,"--weights-repository",args.candidate_repo, + "--panel",str(args.panel),"--out",str(args.out.parent/(args.out.name+"-capture")), + "--role","quant","--lane","streaming","--device",args.device,"--dtype","bfloat16", + "--schedule",args.schedule,"--dataset-id","fidelity--tiny.microfloat."+args.format, + "--dataset-name","Tiny "+args.format+" FORMAT fixture", "--scope-file",str(args.out/"scope.json"), + "--codec",args.format] + if args.format != "modelopt-mixed": + command += ["--declared-bits","8" if args.format == "fp8-ue8m0" else "4"] + subprocess.run(command,check=True) + + +def main(): + p = argparse.ArgumentParser(description=__doc__) + p.add_argument("--qfs-root", type=Path, default=Path("/tmp/qfs-explorer-development")) + p.add_argument("--source-repo", choices=sorted(PINS), default=next(iter(PINS))) + p.add_argument("--format", choices=FORMATS, required=True) + p.add_argument("--out", type=Path, required=True) + p.add_argument("--schedule", choices=["layer-outer"], default="layer-outer") + p.add_argument("--capture", action="store_true") + p.add_argument("--panel", type=Path) + p.add_argument("--candidate-repo") + p.add_argument("--candidate-revision") + p.add_argument("--device", default="cpu") + args = p.parse_args() + if args.capture and (not args.panel or not args.candidate_repo or not re.fullmatch(r"[0-9a-f]{40}", args.candidate_revision or "")): + p.error("capture requires --panel, --candidate-repo and exact --candidate-revision (publish/pin separately)") + if args.out.exists(): + if args.capture: + provenance = json.loads((args.out / "provenance.json").read_text()) + if provenance["source"] != {"repository":args.source_repo,"revision":PINS[args.source_repo]} or provenance["format"] != args.format: + p.error("existing fixture provenance does not match requested source/format") + for name, sha in provenance["output_sha256"].items(): + if digest(args.out / name) != sha: + p.error("existing fixture changed after build: " + name) + capture(args) + return + p.error("--out must not exist; never overwrite a fixture") + sys.path.insert(0, str(args.qfs_root / "engines/tools")) + from microscale_surface import plan_modules, decode_module + from fp8_scope import assignments_from_census, classify, decoder_layers + from huggingface_hub import snapshot_download + from safetensors.torch import load_file, save_file + import torch + pin = PINS[args.source_repo] + source = Path(snapshot_download(args.source_repo, revision=pin, + allow_patterns=["*.json", "*.safetensors", "tokenizer*", "vocab*", "merges.txt", "LICENSE*", "*.model"], + ignore_patterns=["*.py", "*.md"])) + files = sorted(source.glob("*.safetensors")) + if not files or sum(f.stat().st_size for f in files) > 128 * 1024**2: + raise ValueError("only tiny fixture roots below 128MiB are permitted") + config = json.loads((source / "config.json").read_text()) + if config.get("quantization_config") or (config.get("text_config") or {}).get("quantization_config"): + raise ValueError("source must be native, not quantized") + original = {} + for shard in files: + for key,value in load_file(str(shard)).items(): + if key in original: raise ValueError("duplicate source key " + key) + original[key] = value + transformed, oracle, targets = {}, {}, [] + encoded_formats = {} + for key,value in original.items(): + eligible = (key.endswith(".weight") and value.ndim in (2,3) and value.is_floating_point() + and ".layers." in key and (args.format == "fp8-ue8m0" or value.shape[-1] % (32 if args.format == "ct-mxfp4" else 16) == 0) + and not any(s in key for s in ("embed", "norm", ".mlp.gate.weight", ".router."))) + if not eligible: + transformed[key] = value + continue + module = key.rsplit(".",1)[0] + selected_format = MIXED_FORMATS[len(targets) % 3] if args.format == "modelopt-mixed" else args.format + parts, expected = encode(value, selected_format) + encoded_formats[key] = selected_format + targets.append(module) + oracle[key] = expected + transformed.update({module + "." + role: tensor.contiguous() for role,tensor in parts.items()}) + if not oracle: raise ValueError("no eligible source matrices") + if args.format == "modelopt-mixed" and len(targets) < 3: + raise ValueError("mixed fixture requires at least three matrices for all constituents") + config["quantization_config"] = quant_config(args.format, targets) + plan = plan_modules(config, metadata(transformed)) + errors = {} + for key,spec in plan["modules"].items(): + decoded = decode_module({r:transformed[k] for r,k in spec["components"].items()},spec,dtype=torch.float32,device="cpu") + if not torch.equal(decoded.view(torch.int32), oracle[key].view(torch.int32)): + raise ValueError("independent encoder reconstruction disagrees: " + key) + errors[key] = float((decoded - original[key].float()).abs().max()) + if not any(v > 0 for v in errors.values()): + raise ValueError("fixture unexpectedly has no quantization error") + args.out.mkdir(parents=True) + for source_file in source.iterdir(): + if source_file.is_file() and source_file.name not in ("config.json", "model.safetensors.index.json") and source_file.suffix != ".safetensors" and source_file.suffix != ".py": + shutil.copy2(source_file, args.out / source_file.name) + (args.out / "config.json").write_text(json.dumps(config,indent=2)+"\n") + save_file(transformed, str(args.out / "model.safetensors"), metadata={"format":"pt"}) + index = {"metadata":{"total_size":sum(v.numel()*v.element_size() for v in transformed.values())}, + "weight_map":{k:"model.safetensors" for k in transformed}} + (args.out / "model.safetensors.index.json").write_text(json.dumps(index,indent=2)+"\n") + census = defaultdict(list) + for key,value in original.items(): + changed = key in oracle + fmt = encoded_formats[key] if changed else {torch.float32:"fp32",torch.bfloat16:"bf16",torch.float16:"fp16"}.get(value.dtype,str(value.dtype)) + census[classify(key,decoder_layers(config))].append((key,"quantized" if changed else "native",fmt,8 if changed and "fp8" in fmt else 4 if changed else value.element_size()*8)) + scope = {"policy":"mixed", "head_policy":"native", "kv_cache_dtype":"bf16", "mtp_included":bool(census.get("mtp")), + "activation_quantization":None, + "assignments":assignments_from_census(census,"FORMAT fixture CPU RTN; reconstructed weights only; activation-not-captured, no optimizer/native-kernel quality claim")} + (args.out / "scope.json").write_text(json.dumps(scope,indent=2)+"\n") + provenance = {"source":{"repository":args.source_repo,"revision":pin}, "format":args.format, + "algorithm":__doc__, "claim":"FORMAT fixture, not Kimi QAT/ModelOpt calibration/CT observer quality", + "reconstruction_scope":plan["activation_quantization"], "encoded_tensors":errors, + "encoded_formats":encoded_formats, + "source_sha256":{f.name:digest(f) for f in [source/"config.json",*files]}, + "output_sha256":{f.name:digest(f) for f in args.out.iterdir() if f.is_file()}, + "tool_sha256":digest(__file__), "reader_sha256":digest(args.qfs_root/"engines/tools/microscale_surface.py"), + "reference":plan["reference"], "verification":"independent CPU FP32 encoder reconstruction per encoded weight; no GPU parity"} + (args.out / "provenance.json").write_text(json.dumps(provenance,indent=2)+"\n") + print(json.dumps({"model":str(args.out),"format":args.format,"encoded_modules":len(oracle),"max_weight_error":max(errors.values())})) + if args.capture: + capture(args) + + +if __name__ == "__main__": + main() diff --git a/raw/retained/engines--tools--affine_surface.py b/raw/retained/engines--tools--affine_surface.py new file mode 100644 index 0000000000000000000000000000000000000000..3617af7fb1ec8183d4e11ea02a34957e5a952475 --- /dev/null +++ b/raw/retained/engines--tools--affine_surface.py @@ -0,0 +1,341 @@ +#!/usr/bin/env python3 +"""Weight reconstruction, not quantizer optimization or serving-kernel emulation. + +GPTQ v1/v2 INT4, AWQ GEMM INT4, compressed-tensors pack-quantized INT4/INT8, +and MLX affine INT4/INT8. Canonical names are never rewritten: only the final +storage suffix changes to .weight. Callers retain every key outside consumed. +Config-level activation declarations are disclosed but are not simulated. +GEMV, Marlin, EXL, planar packing, mixed GPTQ dynamic overrides and CT activation +ordering are refused. Tensor geometry cannot identify these alternative layouts. +""" +from __future__ import annotations + +import math +import re +from collections.abc import Mapping + +REFERENCES = { + "gptq": "https://github.com/ModelCloud/GPTQModel/blob/46626c213c4a4c31ca1760124dfe400bc7a03ad9/gptqmodel/utils/model_dequant.py", + "awq": "https://github.com/casper-hansen/AutoAWQ/blob/88e4c76b20755db275574e6a03c83c84ba3bece5/awq/utils/packing_utils.py", + "compressed-tensors": "https://github.com/vllm-project/compressed-tensors/blob/099fa98fea7f3533a8e304a081795a1136ef67c0/src/compressed_tensors/compressors/pack_quantized/base.py", + "mlx": "mlx_surface.dequant_affine (MLX affine q * scale + bias)", +} +_FLOATS = {"F16", "BF16", "F32"} +_QUANT_SUFFIXES = {"qweight", "qzeros", "scales", "biases", "g_idx", "weight_packed", "weight_shape", "weight_scale", "weight_zero_point", "weight_g_idx", "input_scale", "input_zero_point", "input_global_scale", "output_scale", "output_zero_point", "q_perm", "q_invperm", "q_scale", "q_scale_max"} + + +def _fail(message): + return ValueError(f"affine_surface: {message}") + + +def _integer(value, label, *, allow_minus_one=False): + if type(value) is not int or (value <= 0 and not (allow_minus_one and value == -1)): + raise _fail(f"{label} must be a positive integer" + (" or -1" if allow_minus_one else "")) + return value + + +def _quant_config(config): + candidates = [] + def visit(node, path): + if not isinstance(node, Mapping): + return + for field in ("quantization_config", "quantization"): + value = node.get(field) + if value is not None: + if not isinstance(value, Mapping): + raise _fail(f"{path}{field} must be an object") + candidates.append((path + field, dict(value))) + for field in ("text_config", "language_config", "llm_config"): + visit(node.get(field), path + field + ".") + visit(config, "") + if not candidates: + return None + first = candidates[0][1] + if any(value != first for _, value in candidates[1:]): + raise _fail("ambiguous conflicting quantization declarations: " + ", ".join(p for p, _ in candidates)) + return first + + +def _meta(metadata, key, *, shape=None, dtypes=None, ranks=None): + if key not in metadata: + raise _fail(f"missing component {key}") + item = metadata[key] + if not isinstance(item, Mapping): + raise _fail(f"metadata for {key} must be an object") + actual = item.get("shape") + if not isinstance(actual, (list, tuple)) or any(type(x) is not int or x <= 0 for x in actual): + raise _fail(f"invalid shape for {key}: {actual}") + actual = list(actual) + if shape is not None and actual != list(shape): + raise _fail(f"{key} shape {actual} != expected {list(shape)}") + if ranks is not None and len(actual) not in ranks: + raise _fail(f"{key}: rank {len(actual)} unsupported") + if dtypes is not None and item.get("dtype") not in dtypes: + raise _fail(f"{key}: dtype {item.get('dtype')} not in {sorted(dtypes)}") + return actual + + +def _matches(target, prefix): + if not isinstance(target, str): + raise _fail("compressed-tensors targets must be strings") + if target == "Linear": + # Only packed modules are considered; no model class is inferred for floats. + return True + if target.startswith("re:"): + try: + return re.match(target[3:], prefix) is not None + except re.error as exc: + raise _fail(f"invalid target regex {target}: {exc}") from exc + return prefix == target + + +def _ct_scheme(quant, prefix): + groups = quant.get("config_groups") + if not isinstance(groups, Mapping) or not groups: + raise _fail("compressed-tensors config_groups missing") + matches = [] + for name, group in groups.items(): + if not isinstance(group, Mapping) or not isinstance(group.get("targets"), list): + raise _fail(f"invalid config group {name}") + if any(_matches(target, prefix) for target in group["targets"]): + matches.append(group) + if not matches: + raise _fail(f"no compressed-tensors scheme targets {prefix}") + if any(group != matches[0] for group in matches[1:]): + raise _fail(f"ambiguous compressed-tensors schemes for {prefix}") + ignored = quant.get("ignore", []) + if not isinstance(ignored, list): + raise _fail("compressed-tensors ignore must be a list") + if any(_matches(target, prefix) for target in ignored): + raise _fail(f"packed module {prefix} is declared ignored") + return matches[0] + + +def plan_modules(config_dict, tensor_metadata): + """Plan from safetensors metadata; CT weight_shape needs its small value list. + + No tensor payloads or model code are loaded here. Recognized but unsupported + declarations fail closed. CT format routing must precede this reader when + multiple readers support the compressed-tensors method. + """ + quant = _quant_config(config_dict) + if quant is None: + return None + method = str(quant.get("quant_method", "")).lower() + if not method and "bits" in quant and "group_size" in quant: + method = "mlx" + if method not in REFERENCES: + return None + if method == "compressed-tensors" and quant.get("format") != "pack-quantized": + raise _fail(f"unsupported compressed-tensors format {quant.get('format')}") + if method in {"gptq", "awq"}: + if quant.get("bits") != 4: + raise _fail(f"{method} supports only 4 bits") + if quant.get("dynamic"): + raise _fail("GPTQ dynamic overrides are unsupported") + if str(quant.get("pack_dtype", "int32")).removeprefix("torch.") != "int32": + raise _fail("only int32 packed GPTQ/AWQ is supported") + if method == "gptq": + if "checkpoint_format" in quant and "format" in quant and str(quant["checkpoint_format"]).lower() != str(quant["format"]).lower(): + raise _fail("conflicting GPTQ format and checkpoint_format") + fmt = str(quant.get("checkpoint_format", quant.get("format", "gptq"))).lower() + if fmt not in {"gptq", "gptq_v2"}: + raise _fail(f"unsupported GPTQ checkpoint_format {fmt}") + else: + fmt = str(quant.get("version", "gemm")).lower() + if fmt != "gemm" or quant.get("zero_point", True) is not True: + raise _fail("only asymmetric AWQ GEMM is supported, not GEMV/Marlin") + modules, consumed, activations = {}, set(), [] + suffix = ".qweight" if method in {"gptq", "awq"} else ".weight_packed" if method == "compressed-tensors" else ".scales" + for key in sorted(tensor_metadata): + if not key.endswith(suffix): + continue + prefix = key[:-len(suffix)] + components = {} + def component(role, tail, **kwargs): + stored = prefix + "." + tail + result = _meta(tensor_metadata, stored, **kwargs) + components[role] = stored + return result + spec = {"components": components, "format": method, "bits": 4} + if method in {"gptq", "awq"}: + packed = component("weight", "qweight", ranks={2}, dtypes={"I32"}) + n, k = (packed[1], packed[0] * 8) if method == "gptq" else (packed[1] * 8, packed[0]) + gs = _integer(quant.get("group_size"), "group_size", allow_minus_one=True) + gs = k if gs == -1 else gs + groups = math.ceil(k / gs) + component("scales", "scales", shape=[groups, n], dtypes=_FLOATS) + component("zeros", "qzeros", shape=[groups, math.ceil(n / 8)], dtypes={"I32"}) + if method == "gptq" and prefix + ".g_idx" in tensor_metadata: + component("g_idx", "g_idx", shape=[k], dtypes={"I32", "I64"}) + elif method == "gptq" and quant.get("desc_act", False): + raise _fail(f"desc_act requires original-column g_idx: {prefix}") + spec.update(shape=[n, k], group_size=gs, zero_offset=1 if method == "gptq" and fmt == "gptq" else 0, format=f"{method}-{fmt}-int4") + elif method == "mlx": + per_tensor = quant.get("per_tensor", {}) + if not isinstance(per_tensor, Mapping): + raise _fail("MLX per_tensor overrides must be an object") + overrides = per_tensor.get(prefix, per_tensor.get(prefix + ".weight", quant.get(prefix, {}))) + if prefix in quant and prefix in per_tensor and quant[prefix] != per_tensor[prefix]: + raise _fail(f"conflicting MLX per-module overrides for {prefix}") + if not isinstance(overrides, Mapping): + raise _fail(f"packed MLX module has disabled/invalid override: {prefix}") + bits = _integer(overrides.get("bits", quant.get("bits")), "bits") + if bits not in {4, 8} or overrides.get("mode", quant.get("mode", "affine")) != "affine": + raise _fail("only MLX affine 4/8-bit is supported") + gs = _integer(overrides.get("group_size", quant.get("group_size")), "group_size") + scales_shape = component("scales", "scales", ranks={2, 3}, dtypes=_FLOATS) + component("biases", "biases", shape=scales_shape, dtypes=_FLOATS) + shape = [*scales_shape[:-1], scales_shape[-1] * gs] + if shape[-1] * bits % 32: + raise _fail("MLX input dimension is not whole packed words") + component("weight", "weight", shape=[*shape[:-1], shape[-1] * bits // 32], dtypes={"U32", "I32"}) + spec.update(shape=shape, bits=bits, group_size=gs, format=f"mlx-affine-int{bits}") + else: + scheme = _ct_scheme(quant, prefix) + weights = scheme.get("weights") + if not isinstance(weights, Mapping) or weights.get("type") != "int" or weights.get("num_bits") not in {4, 8}: + raise _fail(f"{prefix}: only CT signed INT4/INT8 is supported") + bits = weights["num_bits"] + lanes = 32 // bits + if weights.get("actorder") not in (None, False) or weights.get("dynamic", False): + raise _fail("CT activation ordering/dynamic weights unsupported") + symmetric = weights.get("symmetric", True) + if type(symmetric) is not bool: + raise _fail("CT symmetric must be boolean") + packed = component("weight", "weight_packed", ranks={2, 3}, dtypes={"I32"}) + component("weight_shape", "weight_shape", shape=[len(packed)], dtypes={"I32", "I64"}) + shape = tensor_metadata[components["weight_shape"]].get("value") + if not isinstance(shape, (list, tuple)) or len(shape) != len(packed) or any(type(x) is not int or x <= 0 for x in shape): + raise _fail(f"{prefix}: weight_shape requires actual positive integer values") + shape = list(shape) + if packed != [*shape[:-1], math.ceil(shape[-1] / lanes)]: + raise _fail(f"{prefix}: packed shape inconsistent with weight_shape") + strategy = weights.get("strategy", "tensor") + if strategy == "group": + gs = _integer(weights.get("group_size"), "group_size") + scale_shape = [*shape[:-1], math.ceil(shape[-1] / gs)] + elif strategy == "channel": + gs, scale_shape = shape[-1], [*shape[:-1], 1] + elif strategy == "tensor": + gs, scale_shape = shape[-1], [1] + else: + raise _fail(f"unsupported CT strategy {strategy}") + component("scales", "weight_scale", shape=scale_shape, dtypes=_FLOATS) + zp_key = prefix + ".weight_zero_point" + if not symmetric: + zp_shape = [*shape[:-2], math.ceil(shape[-2] / lanes), scale_shape[-1]] if strategy != "tensor" else [1] + component("zeros", "weight_zero_point", shape=zp_shape, dtypes={"I32"} if strategy != "tensor" else {"I8"}) + elif zp_key in tensor_metadata: + component("zeros", "weight_zero_point", shape=scale_shape, dtypes={"I8"}) + for which in ("input_activations", "output_activations"): + if scheme.get(which) is not None: + activations.append({"module": prefix, "kind": which, "declaration": scheme[which], "status": "activation-not-captured"}) + spec.update(shape=shape, bits=bits, group_size=gs, strategy=strategy, symmetric=symmetric, format=f"ct-pack-quantized-int{bits}") + canonical = prefix + ".weight" + if canonical in tensor_metadata and components.get("weight") != canonical: + raise _fail(f"both packed and canonical weight stored: {canonical}") + spec["component_metadata"] = {role: {"shape": list(tensor_metadata[stored]["shape"]), "dtype": tensor_metadata[stored]["dtype"]} for role, stored in components.items()} + modules[canonical] = spec + consumed.update(components.values()) + if not modules: + raise _fail(f"recognized {method} declaration has no packed modules") + orphans = [key for key in tensor_metadata if key.rsplit(".", 1)[-1] in _QUANT_SUFFIXES and key not in consumed] + if orphans: + raise _fail("orphan/unsupported quantization state: " + ", ".join(orphans[:12])) + return {"format": "affine-weight-reconstruction-v1", "method": method, "modules": modules, "consumed": sorted(consumed), "activation_quantization": activations or None, "reference": REFERENCES[method]} + + +def _unpack_last(value, count, *, bits=4, awq=False): + import torch + lanes = 32 // bits + shifts = torch.arange(lanes, device=value.device, dtype=torch.int32) * bits + unpacked = (value.to(torch.int32).unsqueeze(-1) >> shifts) & ((1 << bits) - 1) + if awq: + order = torch.tensor([0, 4, 1, 5, 2, 6, 3, 7], device=value.device) + unpacked = unpacked.index_select(-1, order) + return unpacked.flatten(-2)[..., :count] + + +def decode_module(payload, spec, *, dtype, device): + """Decode actual storage in FP32, then cast exactly once to requested dtype. + + GPTQ g_idx maps original K columns to groups; it is NOT an instruction to + permute the stored weights. Reapplying argsort(g_idx) would corrupt desc_act. + Work chunks bound temporary gathered group scales for noncontiguous g_idx. + """ + import torch + if set(payload) != set(spec["components"]): + raise _fail("payload roles differ from planned components") + dtype_map = {"I32": torch.int32, "I64": torch.int64, "I8": torch.int8, "U32": torch.uint32, "F16": torch.float16, "BF16": torch.bfloat16, "F32": torch.float32} + for role, tensor in payload.items(): + meta = spec["component_metadata"][role] + if list(tensor.shape) != meta["shape"] or tensor.dtype != dtype_map[meta["dtype"]]: + raise _fail(f"payload {role} differs from planned shape/dtype") + data = {role: tensor.to(device=device) for role, tensor in payload.items()} + scale = data["scales"].float() + if not torch.isfinite(scale).all() or (scale < 0).any(): + raise _fail("scales must be finite and nonnegative") + shape, gs, fmt = spec["shape"], spec["group_size"], spec["format"] + n, k = shape[-2:] + output = torch.empty(shape, dtype=dtype, device=device) + if fmt.startswith("mlx-"): + from mlx_surface import dequant_affine + biases = data["biases"].float() + if not torch.isfinite(biases).all(): + raise _fail("MLX biases must be finite") + weight_rows = data["weight"].reshape(-1, data["weight"].shape[-1]) + scale_rows = scale.reshape(-1, scale.shape[-1]) + bias_rows = biases.reshape(-1, biases.shape[-1]) + output_rows = output.reshape(-1, k) + for start in range(0, weight_rows.shape[0], 256): + end = min(weight_rows.shape[0], start + 256) + decoded = dequant_affine(weight_rows[start:end], scale_rows[start:end], bias_rows[start:end], bits=spec["bits"], group_size=gs) + output_rows[start:end] = decoded.to(dtype=dtype) + return output + if fmt.startswith(("gptq-", "awq-")): + awq = fmt.startswith("awq-") + zeros = ((_unpack_last(data["zeros"], n, awq=awq) + spec["zero_offset"]) & 15).float() + groups = scale.shape[0] + g_idx = data.get("g_idx") + if g_idx is not None and ((g_idx < 0).any() or (g_idx >= groups).any()): + raise _fail("g_idx outside scale group bounds") + for start in range(0, k, 256): + end = min(k, start + 256) + if awq: + codes = _unpack_last(data["weight"][start:end], n, awq=True) + else: + # K chunks start on whole words; GPTQ packs down K, not N. + codes = _unpack_last(data["weight"][start // 8:math.ceil(end / 8)].T, end - start).T + idx = g_idx[start:end].long() if g_idx is not None else torch.arange(start, end, device=device) // gs + decoded = (codes.float() - zeros.index_select(0, idx)) * scale.index_select(0, idx) + output[..., start:end] = decoded.T.to(dtype=dtype) + return output + if fmt not in {"ct-pack-quantized-int4", "ct-pack-quantized-int8"}: + raise _fail(f"unsupported decode format {fmt}") + if data["weight_shape"].tolist() != shape: + raise _fail("weight_shape payload differs from planning value") + bits = spec["bits"] + lanes, offset = 32 // bits, 1 << (bits - 1) + zeros = data.get("zeros") + if spec["symmetric"]: + if zeros is not None and torch.count_nonzero(zeros): + raise _fail("nonzero zero_point for symmetric CT scheme") + zeros = None + elif spec["strategy"] != "tensor": + zeros = (_unpack_last(zeros.transpose(-2, -1), n, bits=bits).transpose(-2, -1) - offset).float() + else: + if ((zeros.int() < -offset) | (zeros.int() >= offset)).any(): + raise _fail(f"CT tensor zero_point outside signed INT{bits}") + zeros = zeros.float() + # Groupwise broadcast: no K-wide repeat of scales/zero points, supports tails. + for start in range(0, k, gs): + end = min(k, start + gs) + # group_size need not align with a packed word boundary. + word_start = start // lanes + codes = _unpack_last(data["weight"][..., word_start:math.ceil(end / lanes)], end - word_start * lanes, bits=bits)[..., start - word_start * lanes:] - offset + group = start // gs + s = scale if spec["strategy"] == "tensor" else scale[..., group:group + 1] + z = 0 if zeros is None else zeros if spec["strategy"] == "tensor" else zeros[..., group:group + 1] + output[..., start:end] = ((codes.float() - z) * s).to(dtype=dtype) + return output diff --git a/raw/retained/engines--tools--gguf_qwen35.py b/raw/retained/engines--tools--gguf_qwen35.py new file mode 100644 index 0000000000000000000000000000000000000000..edf3f9144f9240b661083b23fb01ac4492d72302 --- /dev/null +++ b/raw/retained/engines--tools--gguf_qwen35.py @@ -0,0 +1,273 @@ +"""Dense qwen35 canonical GGUF -> native Qwen3_5ForCausalLM text view. + +ABI audited at llama.cpp 9a7570587ce908b0073a0458877205b80627f393, +conversion/qwen.py Qwen3NextModel / _LinearAttentionVReorderBase. GGUF has +no V-layout version field: a file-hash-bound qwen35-layout.json attestation +is required. Shape/name matches alone cannot distinguish historical layouts. +This is not qwen35moe, qwen4_exp, vision, MTP, or llama.cpp serving execution. +""" +from __future__ import annotations + +from dataclasses import dataclass +import hashlib +import json +from pathlib import Path +from typing import Any, Mapping + +import gguf_surface as gg + +CONVERTER_REVISION = "9a7570587ce908b0073a0458877205b80627f393" +LAYOUT = "qwen35-split-qkv-z-grouped-to-tiled-v1" + + +def _dict(config): + return dict(config) if isinstance(config, Mapping) else config.to_dict() + + +def text_config(config): + original = _dict(config) + if original.get("model_type") not in ("qwen3_5", "qwen3_5_text"): + raise ValueError("qwen35: only dense Qwen3.5 text/wrapper config is supported") + text = dict(original.get("text_config", original)) + if text.get("model_type") != "qwen3_5_text": + raise ValueError("qwen35: expected dense qwen3_5_text, not MoE or Qwen4") + for key in ("hidden_size", "num_hidden_layers", "vocab_size", "layer_types"): + if key in original and "text_config" in original and original[key] != text.get(key): + raise ValueError(f"qwen35: conflicting top/text {key}") + if text.get("attention_bias", False) or text.get("num_experts", 0): + raise ValueError("qwen35: attention bias / expert layout not supported") + if text.get("mtp_num_hidden_layers", 0) or original.get("mtp_num_hidden_layers", 0): + raise ValueError("qwen35: MTP config is outside this text-only surface") + return text + + +def model_view(config): + from transformers import Qwen3_5ForCausalLM, Qwen3_5TextConfig + original = _dict(config) + text = text_config(original) + text["architectures"] = ["Qwen3_5ForCausalLM"] + derived = Qwen3_5TextConfig.from_dict(text) + evidence = { + "schema": "qfs.qwen35-native-text-view.v1", "scope": "text-only", + "original_model_type": original.get("model_type"), + "original_architectures": original.get("architectures"), + "native_class": "Qwen3_5ForCausalLM", "derived_config": json.loads(derived.to_json_string(use_diff=False)), + "original_config_sha256": gg._sha256_bytes(gg._canonical_json(original)), + "vision": "not present in language GGUF; not borrowed or synthesized", + "mtp": "not supported", "identity_policy": "original config and packed files retained", + } + return Qwen3_5ForCausalLM, derived, evidence + + +@dataclass(frozen=True) +class TensorSpec: + stored: str + shape: tuple[int, ...] + stored_shape: tuple[int, ...] + layer: int + transform: str = "identity" + + +def canonical_plan(config): + c = text_config(config) + h, f, n, vocab = (int(c[k]) for k in ("hidden_size", "intermediate_size", "num_hidden_layers", "vocab_size")) + kh, vh, kd, vd, kernel = (int(c[k]) for k in ("linear_num_key_heads", "linear_num_value_heads", "linear_key_head_dim", "linear_value_head_dim", "linear_conv_kernel_dim")) + ah, ak, ad = int(c["num_attention_heads"]), int(c["num_key_value_heads"]), int(c["head_dim"]) + if min(h, f, n, vocab, kh, vh, kd, vd, kernel, ah, ak, ad) < 1 or vh % kh or ah % ak: + raise ValueError("qwen35: invalid attention geometry") + if kernel == 1: + raise ValueError("qwen35: singleton-kernel converter squeeze vintage is unsupported") + types = c.get("layer_types") + if not isinstance(types, (list, tuple)) or len(types) != n or set(types) - {"linear_attention", "full_attention"}: + raise ValueError("qwen35: explicit complete layer_types required") + out = {} + def add(name, stored, shape, layer=-1, transform="identity", stored_shape=None): + out[name] = TensorSpec(stored, tuple(shape), tuple(stored_shape or shape), layer, transform) + add("model.embed_tokens.weight", "token_embd.weight", (vocab, h)) + add("model.norm.weight", "output_norm.weight", (h,), transform="norm_offset") + add("lm_head.weight", "output.weight", (vocab, h)) + for i, kind in enumerate(types): + p, s = f"model.layers.{i}.", f"blk.{i}." + for hf, stored in (("input_layernorm", "attn_norm"), ("post_attention_layernorm", "post_attention_norm")): + add(p + hf + ".weight", s + stored + ".weight", (h,), i, "norm_offset") + for hf, stored, shape in (("gate_proj", "ffn_gate", (f, h)), ("up_proj", "ffn_up", (f, h)), ("down_proj", "ffn_down", (h, f))): + add(p + "mlp." + hf + ".weight", s + stored + ".weight", shape, i) + if kind == "full_attention": + # Upstream leaves q_proj unchanged: [head, query+gate, head_dim]. + # It is NOT all query rows followed by all gate rows. + for hf, stored, shape, transform in ( + ("q_proj", "attn_q", (2 * ah * ad, h), "identity"), + ("k_proj", "attn_k", (ak * ad, h), "identity"), + ("v_proj", "attn_v", (ak * ad, h), "identity"), + ("o_proj", "attn_output", (h, ah * ad), "identity"), + ("q_norm", "attn_q_norm", (ad,), "norm_offset"), + ("k_norm", "attn_k_norm", (ad,), "norm_offset"), + ): + add(p + "self_attn." + hf + ".weight", s + stored + ".weight", shape, i, transform) + else: + for hf, stored, shape, transform in ( + ("in_proj_qkv.weight", "attn_qkv.weight", (2 * kh * kd + vh * vd, h), "qkv"), + ("in_proj_z.weight", "attn_gate.weight", (vh * vd, h), "v_rows"), + ("in_proj_a.weight", "ssm_alpha.weight", (vh, h), "head_rows"), + ("in_proj_b.weight", "ssm_beta.weight", (vh, h), "head_rows"), + ("A_log", "ssm_a", (vh,), "negative_exp"), + ("dt_bias", "ssm_dt.bias", (vh,), "head_rows"), + ("norm.weight", "ssm_norm.weight", (vd,), "identity"), + ("out_proj.weight", "ssm_out.weight", (h, vh * vd), "v_columns"), + ): + add(p + "linear_attn." + hf, s + stored, shape, i, transform) + channels = 2 * kh * kd + vh * vd + add(p + "linear_attn.conv1d.weight", s + "ssm_conv1d.weight", (channels, 1, kernel), i, "conv", (channels, kernel)) + return out + + +@dataclass(frozen=True) +class Qwen35Surface: + container: Any + config: dict + plan: dict[str, TensorSpec] + layout: dict + file_records: tuple + file_hash_verification: str + architecture: str = "qwen35" + + +def load_gguf_surface(files, config, require_file_hashes=True, **kwargs): + container = gg.GgufContainer([gg.GgufFile(str(p)) for p in files]) + if container.architecture != "qwen35": + raise ValueError("qwen35: only canonical dense qwen35 supported, not qwen35moe/qwen4_exp") + if container.remote: + raise ValueError("qwen35: local hash-bound converter-layout attestation required") + c = text_config(config) + plan = canonical_plan(config) + kv = container.kv + expected = { + "block_count": c["num_hidden_layers"], "embedding_length": c["hidden_size"], + "feed_forward_length": c["intermediate_size"], "attention.head_count": c["num_attention_heads"], + "attention.head_count_kv": c["num_key_value_heads"], "attention.key_length": c["head_dim"], + "attention.value_length": c["head_dim"], "ssm.conv_kernel": c["linear_conv_kernel_dim"], + "ssm.state_size": c["linear_key_head_dim"], "ssm.group_count": c["linear_num_key_heads"], + "ssm.time_step_rank": c["linear_num_value_heads"], + "ssm.inner_size": c["linear_value_head_dim"] * c["linear_num_value_heads"], + } + rope = c.get("rope_parameters") or c.get("rope_scaling") or {} + expected["rope.dimension_count"] = int(c["head_dim"] * rope.get("partial_rotary_factor", c.get("partial_rotary_factor", 0.25))) + expected["rope.dimension_sections"] = list(rope.get("mrope_section", [11, 11, 10])) + [0] + expected["attention.layer_norm_rms_epsilon"] = c["rms_norm_eps"] + if "rope_theta" in rope: + expected["rope.freq_base"] = rope["rope_theta"] + for key, value in expected.items(): + actual = kv.get("qwen35." + key) + if isinstance(value, float): + import math + same = isinstance(actual, (int, float)) and math.isclose(actual, value, rel_tol=1e-6) + else: + same = actual == value + if not same: + raise ValueError(f"qwen35: header {key}={actual!r}, config requires {value!r}") + if kv.get("qwen35.nextn_predict_layers", 0): + raise ValueError("qwen35: MTP tensors are outside the declared text view") + recurrent = kv.get("qwen35.attention.recurrent_layers") + want = [t == "linear_attention" for t in c["layer_types"]] + if recurrent is None: + interval = kv.get("qwen35.full_attention_interval") + if not isinstance(interval, int) or interval < 1: + raise ValueError("qwen35: missing recurrent schedule") + recurrent = [(i + 1) % interval != 0 for i in range(c["num_hidden_layers"])] + if recurrent != want: + raise ValueError("qwen35: recurrent/full attention schedule mismatch") + if c.get("tie_word_embeddings") and "output.weight" not in container.tensors: + head = plan["lm_head.weight"] + plan["lm_head.weight"] = TensorSpec("token_embd.weight", head.shape, head.stored_shape, -1) + required = {spec.stored for spec in plan.values()} + if required != set(container.tensors): + raise ValueError(f"qwen35: incomplete canonical text census; missing={sorted(required - set(container.tensors))}; unknown={sorted(set(container.tensors) - required)}") + for name, spec in plan.items(): + row = container.tensors[spec.stored] + if row["type"] not in gg.SUPPORTED_TYPES: + raise ValueError(f"qwen35: unsupported type {row['type']} for {spec.stored}") + if gg.hf_shape_of(row) != spec.stored_shape: + raise ValueError(f"qwen35: unsupported layout for {spec.stored}: {gg.hf_shape_of(row)} != {spec.stored_shape}") + if c.get("tie_word_embeddings") and "output.weight" in container.tensors: + embedding, head = (container.tensors[k] for k in ("token_embd.weight", "output.weight")) + if embedding["type"] != head["type"] or embedding["bytes"] != head["bytes"]: + raise ValueError("qwen35: tied head has a distinct encoding; equivalence is unproven") + for offset in range(0, head["bytes"], 8 << 20): + size = min(8 << 20, head["bytes"] - offset) + if container.read_tensor_range("token_embd.weight", offset, size) != container.read_tensor_range("output.weight", offset, size): + raise ValueError("qwen35: tied config has unequal own embedding/head tensors") + gg.audit_container(container) + root = Path(container.files[0].location).resolve().parent + layout_path = root / "qwen35-layout.json" + layout = json.loads(layout_path.read_text()) + if layout.get("schema") != "qfs.qwen35-converter-layout.v1" or layout.get("layout") != LAYOUT or layout.get("converter_revision") != CONVERTER_REVISION or layout.get("source_projection_layout") != "split_qkv_z": + raise ValueError("qwen35: unproven converter vintage/fused QKVZ layout; canonical split ABI attestation required") + records = [] + bound = layout.get("files", {}) + for f in container.files: + sha = gg._sha256_file(Path(f.location)) + if bound.get(f.name) != sha: + raise ValueError(f"qwen35: converter-layout attestation not bound to current {f.name}") + records.append({"name": f.name, "bytes": f.size, "sha256": sha}) + return Qwen35Surface(container, c, plan, layout, tuple(records), "full") + + +def slots(surface): + return {name: spec.layer for name, spec in surface.plan.items()} + + +def _untile(tensor, axis, kh, ratio, dim): + shape = list(tensor.shape) + expanded = shape[:axis] + [ratio, kh, dim] + shape[axis + 1:] + return tensor.reshape(expanded).transpose(axis, axis + 1).reshape(shape).contiguous() + + +def materialize_layer(surface, layer, *, torch_dtype=None, device=None, stats=None, only=None): + import torch + c = surface.config + kh, vh = c["linear_num_key_heads"], c["linear_num_value_heads"] + ratio, vd, qk = vh // kh, c["linear_value_head_dim"], 2 * kh * c["linear_key_head_dim"] + names = {name for name, spec in surface.plan.items() if spec.layer == layer} + if only is not None: + if set(only) - names: + raise ValueError("qwen35: requested names outside canonical layer") + names = set(only) + out = {} + for name in sorted(names): + spec = surface.plan[name] + x = gg.load_decoded_tensor(surface.container, spec.stored, device=device) + t = spec.transform + if t in ("qkv", "conv"): + x = torch.cat((x[:qk], _untile(x[qk:], 0, kh, ratio, vd)), dim=0) + if t == "conv": + x = x.unsqueeze(1) + elif t == "v_rows": + x = _untile(x, 0, kh, ratio, vd) + elif t == "v_columns": + x = _untile(x, 1, kh, ratio, vd) + elif t in ("head_rows", "negative_exp"): + x = _untile(x, 0, kh, ratio, 1) + if t == "negative_exp": + if not bool(torch.isfinite(x).all()) or not bool((x < 0).all()): + raise ValueError(f"qwen35: {spec.stored} must be finite strictly negative for log(-A)") + x = torch.log(-x) + elif t == "norm_offset": + x = x - 1.0 + if tuple(x.shape) != spec.shape or not bool(torch.isfinite(x).all()): + raise ValueError(f"qwen35: invalid reconstructed {name}") + out[name] = x.to(dtype=torch_dtype or torch.float32).contiguous() + if stats is not None: + stats["qwen35_materialized_tensors"] = stats.get("qwen35_materialized_tensors", 0) + len(out) + return out + + +def decode_contract(surface): + contract = gg.decode_contract(surface.container, surface.layout.get("build", "qwen35-text")) + contract["quantization_config"].update({ + "decode": "GGUF blocks to fp32, inverse norm offsets/negative exponent/V-head tile order, then requested capture dtype; native text forward, not GGUF serving kernels", + "model_view": "Qwen3_5ForCausalLM text-only; vision/MTP absent", + "layout": surface.layout, + "canonical_tensor_count": len(surface.plan), + "classification": "weights_reconstructed", + }) + return contract diff --git a/raw/retained/engines--tools--gguf_surface.py b/raw/retained/engines--tools--gguf_surface.py new file mode 100644 index 0000000000000000000000000000000000000000..2af997c33b29d7930ccb4ebaf0e0c9938eca2e51 --- /dev/null +++ b/raw/retained/engines--tools--gguf_surface.py @@ -0,0 +1,2877 @@ +#!/usr/bin/env python3 +"""GGUF (llama.cpp) checkpoint surface adapter for the streaming K6 scorer. + +Scores community GGUF quantizations of GLM-5.3-Flash (unsloth/GLM-5.3-Flash-GGUF, +ddh0/GLM-5.3-Flash-GGUF, ...) on OUR sealed 25-window panel through the SAME +single-device streaming capture (``stream_score.py --source gguf``) used for +K6/K8/native-BF16, so the number lands on the same yardstick. + +CRITICAL SCOPE DIFFERENCE from the EXL3/TR3 and Dione families: a GGUF +quantizes (nearly) EVERYTHING -- token_embd, output (lm_head), all attention / +KDA / DSA projections, shared experts, dense MLPs AND the routed experts. Only +norms, conv1d kernels, router gates and a few scalar tensors are stored F32. +This adapter therefore supplies ALL tensors from the GGUF itself: + + * routed experts (layers 3..44) are sliced per expert out of the fused + ``blk.L.ffn_{gate,up,down}_exps.weight`` tensors and streamed-decoded to + BF16 through the shared install algebra (fp32 dequant, ONE bf16 rounding); + * every non-routed tensor is decoded once into a MATERIALIZED safetensors + view under the official HF names, and the sealed ``from_pretrained`` + constructor runs over that view unmodified; + * the official BF16 tree is consulted ONLY for config/tokenizer files and the + vision tower (``model.visual.*``), which the main GGUF does not carry (it + ships as a separate mmproj file). The receipt discloses this. + +Format facts (measured from the live repos, 2026-08-29, header-level; see +gguf-evidence/): + + * unsloth UD-Q4_K_XL @ 2975ab41: llama.cpp v3 split (6 files, each a complete + GGUF with its own tensor table; shard 1 carries all KV metadata and zero + tensors), arch ``glm5next``, 1412 tensors: Q8_0 645 / F32 638 / Q4_K 84 / + Q5_K 42 / Q6_K 3. ddh0 @ be335b19: single file, arch spelled + ``glm5-next``, IQ3_S/IQ4_XS experts (v1-REFUSED by type, see below). + * ggml dims are stored fastest-first; the row-major (= official HF) shape is + ``reversed(dims)``. Fused expert tensors are [in, out, 288] -> expert e is + a contiguous [out, in] block-aligned slice. That slot-e-is-expert-e + assumption is PROVEN, not assumed: ``audit_expert_placement`` scores the + decoded slot against the official BF16 expert and gets rel-L2 0.0714 (the + Q4_K error) vs 1.42 for every row-shifted control, which settles the slot + ordering, the reversed-dims orientation and the projection mapping at once. + * MLA split: HF ``self_attn.kv_b_proj.weight`` [32768, 512] does NOT exist in + the GGUF; llama.cpp stores ``attn_k_b.weight`` (dims [256,512,64] -- + PER-HEAD TRANSPOSED) and ``attn_v_b.weight`` (dims [512,256,64]). The + reconstruction (per head h: concat(transpose(k_b[h]), v_b[h]) along the + row axis, heads stacked) was PROVEN against the official BF16 tensor: + rel-L2 0.0054 (the Q8_0 error) for this arrangement vs >= 1.40 for every + other candidate (k/v swapped, non-interleaved). The full 64-head audit is + recorded in gguf-evidence/mla-full-audit.json and the offline selftest + re-runs ``audit_mla_placement`` itself on a real head window. + * Tensors the official tree stores F32 (hc_*_base/scale, A_log, dt_bias, + e_score_correction_bias) are stored F32 in the GGUF too and pass through + BYTE-EXACTLY; every other decoded tensor gets a single fp32 -> bf16 + rounding, so a GGUF that stores norms F32 (llama.cpp's convention) is + DOWNCAST to the official bf16 rather than widening the model. The policy + is not trusted: ``verify_official_dtypes`` reads the official safetensors + headers wherever those shards are present and refuses any disagreement. + +Dequantization is plain PyTorch (uint8-level unpack, fp32 accumulation, no +float64, no int64 beyond gather indices -- MPS-safe) and is BITWISE equal to +gguf-py 0.19.0's reference ``dequantize`` for every supported type, proven on +real ranged-fetched tensors including full expert slices with sub-block scales +(Q4_K/Q5_K) -- the offline selftest re-proves it from committed fixtures. + +SUPPORTED ggml types: F32, F16, BF16, Q8_0, Q4_K, Q5_K, Q6_K (v1, the Flash +lane) plus Q3_K, IQ4_XS, IQ3_XXS, IQ3_S (2026-09-05, for the GLM-5.3 flagship +UD-Q3_K_XL / UD-IQ4_XS builds; each proven bitwise against gguf-py 0.19.0 on +real ranged-fetched blocks, gguf-evidence/dequant_*_ggufpy_ref.npy). Measured +against every build in the Flash repo (gguf-evidence/unsloth-build-census.json, +each build's own 1,412-tensor table), that set scores BF16, Q8_0, UD-IQ4_XS, +UD-Q3_K_XL, UD-Q4_K_XL, UD-Q5_K_XL and UD-Q6_K_XL and refuses the five IQ1/IQ2 +builds. Note the refusals are NOT predictable from the directory names: +unsloth's "Dynamic" recipe mixes IQ2_XS/IQ3_XXS/IQ4_XS into UD-Q2_K_XL and +IQ3_XXS/IQ4_XS into UD-Q3_K_XL. + +Any unsupported type is REFUSED BY NAME AND TYPE at census time, before any +decode: adding a type means adding a kernel WITH the same bitwise-vs-gguf-py +proof, not silently skipping tensors. + +TWO ARCHITECTURES, ONE DATA TABLE (``GgufArch``): ``glm5next`` (GLM-5.3-Flash, +above) and ``glm-dsa`` (the GLM-5.3 flagship, unsloth/GLM-5.3-GGUF @ 346b3591, +``GlmMoeDsaForCausalLM``): 78 decoder layers + MTP blk.78, dense layers 0-2, +256 routed experts of [2048, 6144], MLA with 64 heads x (nope 192 + v 256) over +kv_lora_rank 512 (kv_b_proj [28672, 512]), and a DSA indexer whose weights the +official tree carries on 22 "full" layers only -- the GGUF ships indexer +tensors on EVERY layer, the extra 285 being value-identical copies of the +preceding full layer's (stored BF16 where the parent is F32, so the proof +compares decoded values, never bytes). Every mapping and layout choice for +glm-dsa was proven EXACTLY (uint16 bit patterns) against zai-org/GLM-5.3-BF16 @ +304b8051 by HTTP range requests -- the composed kv_b_proj over all 64 heads, +q_a/q_b/kv_a/o projections, dense and shared FFNs, routed expert slots 0/128/ +255, the indexer, embed/head/norm windows and the MTP block -- +gguf-evidence/glmdsa-layout-audit.json; the tokenizer array order equals the +official vocab (glmdsa-tokenizer-order-audit.json). ``materialize_layer`` is +the per-layer reader the layer-outer streamer (``gguf-dequant-to-bf16``) +calls: one decoder layer's tensors under their official names, decoded on the +capture device, kv_b composed, experts sliced, ONE bf16 rounding. + +DISCLOSED DEVIATION - unsealed-source scoring: community GGUFs ship no encoder +receipts, no reconstruction closures and no sealed reader ABI. The adapter +records whole-file sha256 for every GGUF it consumes plus the immutable repo +revision, and every receipt carries ``seal_disclosure`` saying exactly that +(the Dione precedent, engines/tools/dione_surface.py). +""" + +from __future__ import annotations + +import argparse +import hashlib +import json +import os +import re +import struct +import sys +import threading +import time +from dataclasses import dataclass, field, replace +from pathlib import Path +from typing import Any, Dict, List, Mapping, Optional, Sequence, Tuple + +GGUF_FORMAT = "glm53-gguf-llamacpp-v1" +GGUF_SURFACE_SCHEMA = "malaiwah.glm53-gguf-surface.v1" +GGUF_IDENTITY_SCHEMA = "malaiwah.glm53-gguf-student-identity.v1" +GGUF_READER_IDENTITY_SCHEMA = "malaiwah.glm53-gguf-offline-reader-identity.v1" +GGUF_FILES_VERIFIED_SCHEMA = "malaiwah.glm53-gguf-files-verified.v1" +GGUF_VIEW_RECEIPT_SCHEMA = "malaiwah.glm53-gguf-nonrouted-view-receipt.v1" +SEAL_DISCLOSURE = ( + "unsealed-source scoring: community GGUF releases ship no upstream encoder " + "receipts, reconstruction closures or sealed reader ABI; the surface was " + "decoded WITHOUT seal verification (whole-file sha256 of every consumed " + "GGUF and the immutable repo revision are recorded instead)" +) +SCOPE_DISCLOSURE = ( + "the GGUF artifact quantizes non-routed tensors too (token_embd, lm_head, " + "attention/KDA/DSA projections, shared experts, dense MLPs); this lane " + "decodes ALL of them from the artifact -- the non-routed forward therefore " + "measures the artifact, not the official BF16 tree. The vision tower is " + "NOT in the main GGUF (separate mmproj file) and is sourced from the " + "official BF16 tree; it is never executed by the text-only sealed panel" +) + +PROJECTIONS = ("gate_proj", "up_proj", "down_proj") +EXPS_SUFFIX = {"gate_proj": "ffn_gate_exps.weight", "up_proj": "ffn_up_exps.weight", + "down_proj": "ffn_down_exps.weight"} +_REVISION = re.compile(r"[0-9a-f]{40}") + + +@dataclass(frozen=True) +class GgufArch: + """Everything this adapter knows about one llama.cpp architecture, as DATA. + + The two production templates are ``glm5next`` (GLM-5.3-Flash) and + ``glm-dsa`` (GlmMoeDsaForCausalLM). Their maps and dtype policies are + audited against official BF16 tensors (gguf-evidence/glmdsa-layout-audit.json + for the flagship). ``arch_from_container`` derives GLM-DSA dimensions from + each artifact's headers, including smaller zero-MTP checkpoints; templates + are not geometry defaults for those artifacts. Other architecture names + are refused rather than interpreted using GLM tensor semantics. + """ + + key: str # general.architecture + accepted_names: Tuple[str, ...] # spellings seen across convert vintages + family: str # human label + layer_prefix: str # official HF stack path of the decoder layers + top_level: Mapping[str, str] # gguf name -> official name, top level + block_count: int # decoder layers INCLUDING the MTP block + dense_layers: Tuple[int, ...] # leading dense (non-MoE) layers + num_experts: int + projection_shape: Mapping[str, Tuple[int, int]] # per routed expert, [out, in] + mla_heads: int + mla_kv_lora_rank: int + mla_k_nope: int # per-head rows of attn_k_b^T in kv_b_proj + mla_v_dim: int # per-head rows of attn_v_b in kv_b_proj + geometry_gate: Mapping[str, int] # . KV values that must match + official_f32_suffixes: Tuple[str, ...] # official-tree float32 tensors (passthrough) + indexer_shared_copies: bool # glm-dsa: GGUF ships indexer copies on shared layers + nextn_predict_layers: int = 1 + + @property + def decoder_layers(self) -> int: + return self.block_count - self.nextn_predict_layers + + @property + def mtp_layers(self) -> Tuple[int, ...]: + return tuple(range(self.decoder_layers, self.block_count)) + + @property + def mtp_layer(self) -> int: + """First MTP index; equals block_count (an absent-layer sentinel) without MTP.""" + return self.decoder_layers + + @property + def routed_layers(self) -> Tuple[int, ...]: + """Main routed layers: after the dense prefix, before the MTP block.""" + return tuple(range(len(self.dense_layers), self.mtp_layer)) + + @property + def kv_b_rows(self) -> int: + return self.mla_heads * (self.mla_k_nope + self.mla_v_dim) + + def layer_name(self, layer: int, suffix: str) -> str: + return f"{self.layer_prefix}.{layer}.{suffix}" + + def expert_name(self, layer: int, expert: int, projection: str) -> str: + return self.layer_name(layer, f"mlp.experts.{expert}.{projection}.weight") + + def kv_b_name(self, layer: int) -> str: + return self.layer_name(layer, "self_attn.kv_b_proj.weight") + + def official_dtype_for(self, hf_name: str) -> str: + for suffix in self.official_f32_suffixes: + if hf_name.endswith(suffix): + return "float32" + return "bfloat16" + + +GLM5NEXT = GgufArch( + key="glm5next", + accepted_names=("glm5next", "glm5-next"), + family="GLM-5.3-Flash", + layer_prefix="model.language_model.layers", + top_level={ + "token_embd.weight": "model.language_model.embed_tokens.weight", + "output.weight": "lm_head.weight", + "output_norm.weight": "model.language_model.norm.weight", + }, + block_count=46, + dense_layers=(0, 1, 2), + num_experts=288, + projection_shape={"gate_proj": (2048, 4096), "up_proj": (2048, 4096), + "down_proj": (4096, 2048)}, + mla_heads=64, mla_kv_lora_rank=512, mla_k_nope=256, mla_v_dim=256, + geometry_gate={ + "block_count": 46, "expert_count": 288, "expert_used_count": 8, + "leading_dense_block_count": 3, "embedding_length": 4096, + "expert_feed_forward_length": 2048, "vocab_size": 154880, + "nextn_predict_layers": 1, + }, + # measured: 291 of 38,770 official tensors, exactly these suffix families + official_f32_suffixes=( + "hc_attn_base", "hc_attn_scale", "hc_ffn_base", "hc_ffn_scale", + "mlp.gate.e_score_correction_bias", "self_attn.A_log", "self_attn.dt_bias", + ), + indexer_shared_copies=False, +) + +# GLM-5.3 flagship (zai-org/GLM-5.3-BF16 @ 304b8051, GlmMoeDsaForCausalLM). +# Geometry from the unsloth/GLM-5.3-GGUF headers (glm-dsa.* KVs) and the +# official config: 78 decoder layers + MTP blk.78, dense 0-2, 256 experts, +# MLA nope 192 / v 256 / 64 heads (attn_k_b dims [192,512,64], attn_v_b +# [512,256,64] -> kv_b_proj [64*(192+256)=28672, 512]). Official float32 +# tensors: only e_score_correction_bias (the audit read every other class as +# bf16, including the router gate, the norms and indexer.weights_proj that the +# GGUF widens to F32 -- all proven exactly representable and bit-equal). +GLM_DSA = GgufArch( + key="glm-dsa", + accepted_names=("glm-dsa",), + family="GLM-5.3", + layer_prefix="model.layers", + top_level={ + "token_embd.weight": "model.embed_tokens.weight", + "output.weight": "lm_head.weight", + "output_norm.weight": "model.norm.weight", + }, + block_count=79, + dense_layers=(0, 1, 2), + num_experts=256, + projection_shape={"gate_proj": (2048, 6144), "up_proj": (2048, 6144), + "down_proj": (6144, 2048)}, + mla_heads=64, mla_kv_lora_rank=512, mla_k_nope=192, mla_v_dim=256, + geometry_gate={ + "block_count": 79, "expert_count": 256, "expert_used_count": 8, + "leading_dense_block_count": 3, "embedding_length": 6144, + "expert_feed_forward_length": 2048, "vocab_size": 154880, + "nextn_predict_layers": 1, "attention.q_lora_rank": 2048, + "attention.kv_lora_rank": 512, "attention.key_length_mla": 256, + "attention.value_length_mla": 256, "attention.head_count": 64, + "attention.indexer.head_count": 32, "attention.indexer.key_length": 128, + }, + official_f32_suffixes=("mlp.gate.e_score_correction_bias",), + indexer_shared_copies=True, +) + +ARCHITECTURES: Dict[str, GgufArch] = {name: arch for arch in (GLM5NEXT, GLM_DSA) + for name in arch.accepted_names} + + +def arch_for(architecture: str) -> GgufArch: + """The table entry for a ``general.architecture`` value; refuses by name.""" + arch = ARCHITECTURES.get(architecture) + if arch is None: + raise _fail( + f"general.architecture is {architecture!r}, not one of " + f"{tuple(ARCHITECTURES)} - not a GLM-5.3 GGUF this adapter knows" + ) + return arch + + +def arch_from_container(container: "GgufContainer", config: Any = None) -> GgufArch: + """Read GLM-DSA geometry from headers, cross-checking an optional HF config. + + Architecture name maps and official dtype policy remain production-derived. + GLM5NEXT retains its audited fixed geometry; GLM-DSA supports zero or one + MTP block and a contiguous leading-dense schedule. Missing/contradictory + geometry is refused, never replaced with flagship dimensions. + """ + template = arch_for(container.architecture) + if config is not None and not isinstance(config, Mapping): + config = config.to_dict() + if config is not None and isinstance(config.get("text_config"), Mapping): + text = config["text_config"] + conflicts = [k for k in text if k in config and config[k] != text[k] + and k not in ("model_type", "architectures", "dtype")] + if conflicts: + raise _fail(f"top-level/text_config geometry conflicts: {conflicts}") + config = text + + def integer(key: str, minimum: int = 1) -> int: + values = [f.kv[f"{container.architecture}.{key}"] for f in container.files + if f"{container.architecture}.{key}" in f.kv] + if not values or any(type(v) is not int or v < minimum for v in values): + raise _fail(f"geometry {key}: missing or invalid integer {values}") + if len(set(values)) != 1: + raise _fail(f"geometry {key}: split headers disagree: {values}") + return values[0] + + if template.key != "glm-dsa": + for key, want in template.geometry_gate.items(): + got = integer(key, 0 if key == "nextn_predict_layers" else 1) + if got != want: + raise _fail(f"geometry gate: {key} is {got}, expected {want}") + return template + gate = {key: integer(key, 0 if key in ("nextn_predict_layers", + "leading_dense_block_count") else 1) + for key in template.geometry_gate} + gate["rope.dimension_count"] = integer("rope.dimension_count") + mtp = gate["nextn_predict_layers"] + if mtp not in (0, 1): + raise _fail("only zero or one MTP block is supported") + decoder_layers = gate["block_count"] - mtp + dense = gate["leading_dense_block_count"] + nope = gate["attention.key_length_mla"] - gate["rope.dimension_count"] + if decoder_layers < 1 or not 0 <= dense < decoder_layers or nope < 1: + raise _fail("invalid decoder/dense/MLA non-RoPE geometry") + if gate["expert_used_count"] > gate["expert_count"]: + raise _fail("expert_used_count exceeds expert_count") + if config is not None: + if config.get("model_type") != "glm_moe_dsa": + raise _fail("glm-dsa container requires a glm_moe_dsa HF config") + checks = { + "num_hidden_layers": decoder_layers, "num_nextn_predict_layers": mtp, + "first_k_dense_replace": dense, "hidden_size": gate["embedding_length"], + "moe_intermediate_size": gate["expert_feed_forward_length"], + "n_routed_experts": gate["expert_count"], + "num_experts_per_tok": gate["expert_used_count"], + "vocab_size": gate["vocab_size"], "q_lora_rank": gate["attention.q_lora_rank"], + "kv_lora_rank": gate["attention.kv_lora_rank"], + "num_attention_heads": gate["attention.head_count"], + "qk_nope_head_dim": nope, "qk_rope_head_dim": gate["rope.dimension_count"], + "v_head_dim": gate["attention.value_length_mla"], + "index_n_heads": gate["attention.indexer.head_count"], + "index_head_dim": gate["attention.indexer.key_length"], + } + for key, want in checks.items(): + # Absent MTP is an established HF default; other geometry is required. + got = config.get(key, 0 if key == "num_nextn_predict_layers" else None) + if type(got) is not int or got != want: + raise _fail(f"config.{key} is {got!r}, container requires {want}") + expected_mlp = ["dense"] * dense + ["sparse"] * (decoder_layers - dense) + if config.get("mlp_layer_types", expected_mlp) != expected_mlp: + raise _fail("config.mlp_layer_types is not the header's leading-dense schedule") + hidden, intermediate = gate["embedding_length"], gate["expert_feed_forward_length"] + return replace(template, block_count=gate["block_count"], + dense_layers=tuple(range(dense)), num_experts=gate["expert_count"], + projection_shape={"gate_proj": (intermediate, hidden), + "up_proj": (intermediate, hidden), + "down_proj": (hidden, intermediate)}, + mla_heads=gate["attention.head_count"], + mla_kv_lora_rank=gate["attention.kv_lora_rank"], mla_k_nope=nope, + mla_v_dim=gate["attention.value_length_mla"], geometry_gate=gate, + nextn_predict_layers=mtp) + + +# glm5next spellings, kept as module constants: the Flash streaming lane +# (stream_score.py, gguf_decode_bench.py, the offline selftest) addresses them. +MAIN_ROUTED_LAYERS = GLM5NEXT.routed_layers +MTP_LAYER = GLM5NEXT.mtp_layer +NUM_EXPERTS = GLM5NEXT.num_experts +PROJECTION_SHAPE = GLM5NEXT.projection_shape +ACCEPTED_ARCHITECTURES = GLM5NEXT.accepted_names + +QK_K = 256 +# (elements per block, bytes per block) from ggml's own type traits. +GGML_TYPE_IDS = {0: "F32", 1: "F16", 2: "Q4_0", 3: "Q4_1", 6: "Q5_0", 7: "Q5_1", + 8: "Q8_0", 9: "Q8_1", 10: "Q2_K", 11: "Q3_K", 12: "Q4_K", 13: "Q5_K", + 14: "Q6_K", 15: "Q8_K", 16: "IQ2_XXS", 17: "IQ2_XS", 18: "IQ3_XXS", + 19: "IQ1_S", 20: "IQ4_NL", 21: "IQ3_S", 22: "IQ2_S", 23: "IQ4_XS", + 24: "I8", 25: "I16", 26: "I32", 27: "I64", 28: "F64", 29: "IQ1_M", + 30: "BF16", 34: "TQ1_0", 35: "TQ2_0", 36: "MXFP4"} +BLOCK_TRAITS = {"F32": (1, 4), "F16": (1, 2), "BF16": (1, 2), "Q8_0": (32, 34), + "Q6_K": (256, 210), "Q5_K": (256, 176), "Q4_K": (256, 144), + "Q3_K": (256, 110), "Q2_K": (256, 84), "Q5_0": (32, 22), + "Q4_0": (32, 18), "Q4_1": (32, 20), "Q5_1": (32, 24), + "IQ4_XS": (256, 136), "IQ4_NL": (32, 18), "IQ3_XXS": (256, 98), + "IQ3_S": (256, 110), "IQ2_XXS": (256, 66), "IQ2_XS": (256, 74), + "IQ2_S": (256, 82), "IQ1_S": (256, 50), "IQ1_M": (256, 56), + "MXFP4": (32, 17)} +# Decode support: the types the unsloth Q8_0/UD-Q*_K_XL builds use (Flash and +# the GLM-5.3 flagship UD-Q4_K_XL), plus the four IQ/K types the flagship +# UD-Q3_K_XL and UD-IQ4_XS builds mix in. Their kernels have committed +# gguf-py 0.19.0 ranged-block goldens. Q4_0 additionally uses the standard +# block32 signed-scale/nibble layout, not the block256 Q4_K kernel. +SUPPORTED_TYPES = ("F32", "F16", "BF16", "Q8_0", "Q4_0", "Q4_K", "Q5_K", "Q6_K", + "Q3_K", "IQ4_XS", "IQ3_XXS", "IQ3_S") + +# Tensors the OFFICIAL BF16 tree stores as float32 (measured: 291 of 38,770, +# exactly these suffix families). The GGUF stores them F32 too; the +# materialized view writes them F32 so the constructed model is dtype-identical +# to a native build. Everything else is written bfloat16. +OFFICIAL_F32_SUFFIXES = GLM5NEXT.official_f32_suffixes + +# PROVEN MLA reconstruction arrangement (see module docstring + selftest): +# per head h: rows [h*R .. h*R+nope-1] = transpose(attn_k_b[h]), +# rows [h*R+nope .. h*R+R-1] = attn_v_b[h], R = nope + v_dim. +# glm5next: nope = v = 256 (R 512, rel-L2 audit); glm-dsa: nope 192, v 256 +# (R 448, EXACT equality against the official bf16 in the layout audit). +MLA_KV_B_ARRANGEMENT = "per_head_rows_kT_then_v" +MLA_HEADS = GLM5NEXT.mla_heads +MLA_KV_LORA_RANK = GLM5NEXT.mla_kv_lora_rank +MLA_HEAD_DIM = GLM5NEXT.mla_k_nope + + +def _fail(message: str) -> ValueError: + return ValueError(f"gguf_surface: {message}") + + +def _canonical_json(value: Any) -> bytes: + """Byte-identical to quant_pipeline.core.artifacts.canonical_json.""" + return ( + json.dumps(value, sort_keys=True, separators=(",", ":"), ensure_ascii=False, allow_nan=False) + + "\n" + ).encode() + + +def _sha256_bytes(data: bytes) -> str: + return hashlib.sha256(data).hexdigest() + + +def _sha256_file(path: Path, chunk_size: int = 8 << 20) -> str: + digest = hashlib.sha256() + with path.open("rb") as handle: + while True: + chunk = handle.read(chunk_size) + if not chunk: + break + digest.update(chunk) + return digest.hexdigest() + + +def _read_json(path: Path, label: str) -> Dict[str, Any]: + if not path.is_file(): + raise _fail(f"{label} missing: {path}") + return json.loads(path.read_text(encoding="utf-8")) + + +# --------------------------------------------------------------------------- +# dequantization kernels -- plain torch, uint8-level, fp32, MPS-safe. +# Transliterated from gguf-py 0.19.0 gguf/quants.py with the SAME op order +# ((d*sc)*q - dmin*m for Q4_K/Q5_K), which is what makes them bitwise-equal to +# the reference dequantize(). Proven on real ranged-fetched tensors (module +# docstring); the offline selftest re-proves from committed fixtures. +# --------------------------------------------------------------------------- + +def _f16cast(b): + import torch + + return b.contiguous().view(torch.float16).to(torch.float32) + + +def dequant_q8_0(blocks): + """uint8 [nb, 34] -> fp32 [nb, 32]. layout: f16 d | int8 qs[32].""" + import torch + + d = _f16cast(blocks[:, :2]) + x = blocks[:, 2:].contiguous().view(torch.int8).to(torch.float32) + return x * d + + +def dequant_q4_0(blocks): + """uint8 [nb,18] -> fp32 [nb,32]; f16 d, low-half then high-half nibbles.""" + import torch + + d = _f16cast(blocks[:, :2]) + packed = blocks[:, 2:] + q = torch.cat((packed & 15, packed >> 4), dim=1).to(torch.float32) - 8 + return d * q + + +def _get_scale_min(scales): + """The 12-byte 6-bit packed scales/mins of Q4_K/Q5_K -> uint8 [nb, 8] x 2.""" + import torch + + s = scales.reshape(-1, 3, 4) + d, m, m_d = s[:, 0, :], s[:, 1, :], s[:, 2, :] + sc = torch.cat([d & 0x3F, (m_d & 0x0F) | ((d >> 2) & 0x30)], dim=-1) + mn = torch.cat([m & 0x3F, (m_d >> 4) | ((m >> 2) & 0x30)], dim=-1) + return sc, mn + + +def dequant_q4_k(blocks): + """uint8 [nb, 144] -> fp32 [nb, 256]. f16 d | f16 dmin | 12B scales | 128B q.""" + import torch + + nb = blocks.shape[0] + d = _f16cast(blocks[:, 0:2]) + dmin = _f16cast(blocks[:, 2:4]) + sc, mn = _get_scale_min(blocks[:, 4:16]) + dd = (d * sc.to(torch.float32)).reshape(nb, -1, 1) + dm = (dmin * mn.to(torch.float32)).reshape(nb, -1, 1) + qs = blocks[:, 16:].reshape(nb, 4, 1, 32) + qs = torch.stack([qs >> 0, qs >> 4], dim=2).reshape(nb, 4, 2, 32) + qs = (qs & 0x0F).reshape(nb, -1, 32).to(torch.float32) + return (dd * qs - dm).reshape(nb, QK_K) + + +def dequant_q5_k(blocks): + """uint8 [nb, 176] -> fp32 [nb, 256]. adds 32B of high bits over Q4_K.""" + import torch + + nb = blocks.shape[0] + d = _f16cast(blocks[:, 0:2]) + dmin = _f16cast(blocks[:, 2:4]) + sc, mn = _get_scale_min(blocks[:, 4:16]) + dd = (d * sc.to(torch.float32)).reshape(nb, -1, 1) + dm = (dmin * mn.to(torch.float32)).reshape(nb, -1, 1) + qh = blocks[:, 16:48].reshape(nb, 1, 1, 32) + qs = blocks[:, 48:].reshape(nb, 4, 1, 32) + ql = torch.stack([qs >> 0, qs >> 4], dim=2).reshape(nb, 4, 2, 32) + ql = (ql & 0x0F).reshape(nb, -1, 32) + qh = torch.stack([qh >> i for i in range(8)], dim=2).reshape(nb, 1, 8, 32) + qh = (qh & 0x01).reshape(nb, -1, 32) + q = (ql | (qh << 4)).to(torch.float32) + return (dd * q - dm).reshape(nb, QK_K) + + +def dequant_q6_k(blocks): + """uint8 [nb, 210] -> fp32 [nb, 256]. 128B ql | 64B qh | 16 int8 sc | f16 d.""" + import torch + + nb = blocks.shape[0] + ql = blocks[:, 0:128].reshape(nb, 2, 1, 64) + qh = blocks[:, 128:192].reshape(nb, 2, 1, 32) + scales = blocks[:, 192:208].contiguous().view(torch.int8).to(torch.float32) + d = _f16cast(blocks[:, 208:210]) + dd = (d * scales).reshape(nb, QK_K // 16, 1) + ql = torch.stack([ql >> 0, ql >> 4], dim=2).reshape(nb, 2, 2, 64) + ql = (ql & 0x0F).reshape(nb, -1, 32) + qh = torch.stack([qh >> 0, qh >> 2, qh >> 4, qh >> 6], dim=2).reshape(nb, 2, 4, 32) + qh = (qh & 0x03).reshape(nb, -1, 32) + q = (ql | (qh << 4)).view(torch.int8).to(torch.float32) - 32.0 + q = q.reshape(nb, QK_K // 16, -1) + return (dd * q).reshape(nb, QK_K) + + +def dequant_q3_k(blocks): + """uint8 [nb, 110] -> fp32 [nb, 256]. 32B hmask | 64B qs | 12B scales | f16 d. + + The 16 six-bit scales are packed low nibbles first (8 bytes) then the two + high bits of each (4 bytes); q = ql - 4*(1 - hmask_bit), per gguf-py. + """ + import torch + + nb = blocks.shape[0] + hmask = blocks[:, 0:32] + qs = blocks[:, 32:96] + scales = blocks[:, 96:108] + d = _f16cast(blocks[:, 108:110]) + lscales = torch.stack([scales[:, 0:8] >> 0, scales[:, 0:8] >> 4], dim=1).reshape(nb, 16) + hscales = torch.stack([scales[:, 8:12] >> s for s in (0, 2, 4, 6)], dim=1).reshape(nb, 16) + sc = ((lscales & 0x0F) | ((hscales & 0x03) << 4)).view(torch.int8).to(torch.float32) - 32.0 + dl = (d * sc).reshape(nb, 16, 1) + ql = torch.stack([qs.reshape(nb, 2, 32) >> s for s in (0, 2, 4, 6)], dim=2) + ql = (ql.reshape(nb, 16, 16) & 0x03) + qh = torch.stack([hmask.reshape(nb, 1, 32) >> s for s in range(8)], dim=2) + qh = ((qh.reshape(nb, 16, 16) & 0x01) ^ 0x01) + q = (ql.view(torch.int8) - (qh << 2).view(torch.int8)).to(torch.float32) + return (dl * q).reshape(nb, QK_K) + + +IQ4_NL_KVALUES = (-127, -104, -83, -65, -49, -35, -22, -10, 1, 13, 25, 38, 53, 69, 89, 113) + + +def dequant_iq4_xs(blocks): + """uint8 [nb, 136] -> fp32 [nb, 256]. f16 d | u16 scales_h | 4B scales_l | 128B qs. + + Eight 6-bit sub-block scales (4 low bits per nibble of scales_l, 2 high + bits per pair in scales_h), 4-bit codes through the IQ4_NL codebook. + """ + import torch + + nb = blocks.shape[0] + d = _f16cast(blocks[:, 0:2]) + scales_h = blocks[:, 2:4].contiguous().view(torch.int16).to(torch.int32) & 0xFFFF + scales_l = torch.stack([blocks[:, 4:8] >> 0, blocks[:, 4:8] >> 4], dim=2).reshape(nb, 8) & 0x0F + scales_h = torch.stack([(scales_h.reshape(nb) >> (2 * i)) & 0x03 for i in range(8)], dim=1) + sc = (scales_l.to(torch.int32) | (scales_h << 4)).to(torch.int8).to(torch.float32) - 32.0 + dl = (d * sc).reshape(nb, 8, 1) + qs = blocks[:, 8:].reshape(nb, 8, 1, 16) + qs = torch.stack([qs >> 0, qs >> 4], dim=2).reshape(nb, 8, 32) & 0x0F + kvalues = torch.tensor(IQ4_NL_KVALUES, dtype=torch.float32, device=blocks.device) + vals = kvalues[qs.to(torch.long)] + return (dl * vals).reshape(nb, QK_K) + + +# ksigns / grid tables copied from gguf-py 0.19.0 (gguf/quants.py, MIT), which +# copies them from ggml; each grid row is 4 codebook values, two per hex byte. +_IQ_KSIGNS = ( + b"\x00\x81\x82\x03\x84\x05\x06\x87\x88\x09\x0a\x8b\x0c\x8d\x8e\x0f" + b"\x90\x11\x12\x93\x14\x95\x96\x17\x18\x99\x9a\x1b\x9c\x1d\x1e\x9f" + b"\xa0\x21\x22\xa3\x24\xa5\xa6\x27\x28\xa9\xaa\x2b\xac\x2d\x2e\xaf" + b"\x30\xb1\xb2\x33\xb4\x35\x36\xb7\xb8\x39\x3a\xbb\x3c\xbd\xbe\x3f" + b"\xc0\x41\x42\xc3\x44\xc5\xc6\x47\x48\xc9\xca\x4b\xcc\x4d\x4e\xcf" + b"\x50\xd1\xd2\x53\xd4\x55\x56\xd7\xd8\x59\x5a\xdb\x5c\xdd\xde\x5f" + b"\x60\xe1\xe2\x63\xe4\x65\x66\xe7\xe8\x69\x6a\xeb\x6c\xed\xee\x6f" + b"\xf0\x71\x72\xf3\x74\xf5\xf6\x77\x78\xf9\xfa\x7b\xfc\x7d\x7e\xff" +) +_IQ3_XXS_GRID_MAP = (0x04, 0x0c, 0x14, 0x1c, 0x24, 0x2c, 0x34, 0x3e) +_IQ3_XXS_GRID_HEX = ( + b"0000020004001100130017002000220031004200730075000101030110011201" + b"2101250130013201410154017001000202020402110220022202310233023702" + b"5102570275020103070310031203250370031304370444045704730475040105" + b"0705320552053506640610071407160743076107011003101010121021102310" + b"3010321034104710501000110211111120112211011203121012121221123012" + b"7212001302132013311346136613011405145014201524154615711505162217" + b"4017002002201120132020202220262031204220012103210521102112212121" + b"3021632167217021002202221122172220222222372240225522012310231423" + b"7023742335245324032527254125742501270327162745270130103012302130" + b"2330503065307230003102312031313144314631013203321032253252327232" + b"1133333330344734723400350635223555351436363663363337603704401740" + b"3540374053405740744120423742404260426642074345430444514464442545" + b"4345704505471047124730471250415070500051065126515551145232527252" + b"0253535310542354275472540255315550562457425724604460466064602161" + b"6161176264623063366344640565526533660367216703700570077010703270" + b"5270267140711272457252720073157333736073217441740075027524753076" +) +_IQ3_S_GRID_MAP = (0x01, 0x03, 0x05, 0x07, 0x09, 0x0b, 0x0d, 0x0f) +_IQ3_S_GRID_HEX = ( + b"0000010002000500070010001100120014001600200021002500330040004200" + b"4500470051005300600062007100740077000001010102010401100111011501" + b"2001230127013101350144016101650172010002010205020702100213021602" + b"2102250230023402420245024702510253027002730203031103150320032203" + b"3103330336034403500352036703710375030004130417042104240432044004" + b"4304510470040205040520052205260533054105450547056605730506061106" + b"1306310652067106000702070407200722072607330750075407001001100210" + b"0410101011101310151017102010221031103410361054105610611072100011" + b"0111031106111011141121113011331141115011521170117611001212121512" + b"1712201224123212401243125512601272120113041307131013131321132713" + b"3013341341136213701303140514121414143114331442144614501454140115" + b"1015131521153015321551152016241627164416461601170317101712172117" + b"3517411762177017002001200320052007201020122014201620212023202720" + b"3020322041204320452050205220672070207320752000210221102113211721" + b"2221252131213421422151210122042207222122232230223722412253225722" + b"7122742200230223052311232223242331233323422350236623012407242024" + b"2324322435244124722475240425112522253725402553257025002602260726" + b"2126552661260527112726273027432750270230113013301530173022303130" + b"3330353042304430473051306330713001310331053114312131233140316031" + b"7231763100321232203232323432503201331033143321332333273330334133" + b"4333473355337333033411341634223431345234603464340135103512352535" + b"3235443556357335163641360137033720372237353700400440124020402440" + b"2740324041405040704002410741114113412241304135414341514155410142" + b"0342104215422142334240425742624270420443114313432043224331433543" + b"0044024424443744404471440545074521456245134634466046104715473047" + b"4347514702501050145022504050445047505250665074500151035105511251" + b"2151325172510052115223523052365253520253075310532753445351536553" + b"7353015404542054325446541255265551555355425602570457225711601360" + b"1560316033606060006120612761646112623462426255626262706200631463" + b"2163406325644364626400650365346560650566406611671367007004700770" + b"2070227036704070547062700271117124714371457101720472107216722172" + b"3072517202733273357353730174057413742074507422754275027631760077" +) +_IQ_GRID_CACHE: Dict[Tuple[str, str], Any] = {} + + +def _iq_grid(kind: str, device) -> Any: + """The IQ3 codebook as an fp32 [entries, 4] tensor on `device` (cached). + + Decoded from the hex table exactly as gguf-py's ``init_grid`` does: each + hex byte carries two 3-bit indices (low nibble, then high nibble), mapped through + ``grid_map``. 256 entries for IQ3_XXS, 512 for IQ3_S. + """ + import torch + + import numpy as np + + key = (kind, str(device)) + grid = _IQ_GRID_CACHE.get(key) + if grid is None: + hex_bytes, grid_map = {"IQ3_XXS": (_IQ3_XXS_GRID_HEX, _IQ3_XXS_GRID_MAP), + "IQ3_S": (_IQ3_S_GRID_HEX, _IQ3_S_GRID_MAP)}[kind] + packed = np.frombuffer(bytes.fromhex(hex_bytes.decode("ascii")), dtype=np.uint8) + codes = np.stack([packed & 0x07, (packed >> 4) & 0x07], axis=-1).reshape(-1) + values = np.asarray(grid_map, dtype=np.float32)[codes].reshape(-1, 4) + grid = torch.from_numpy(values.copy()).to(device) + _IQ_GRID_CACHE[key] = grid + return grid + + +def _iq_signs_from_ksigns(sign_index): + """7-bit ksigns indices [..., 4] -> +-1.0 fp32 [..., 4, 8] (bit i of the + looked-up byte is the sign of element i).""" + import torch + + ksigns = torch.tensor(list(_IQ_KSIGNS), dtype=torch.uint8, device=sign_index.device) + byte = ksigns[sign_index.to(torch.long)] + bits = torch.stack([(byte >> i) & 0x01 for i in range(8)], dim=-1) + return torch.where(bits == 0, torch.tensor(1.0, device=sign_index.device), + torch.tensor(-1.0, device=sign_index.device)) + + +def dequant_iq3_xxs(blocks): + """uint8 [nb, 98] -> fp32 [nb, 256]. f16 d | 64B qs (grid indices) | 8 x u32 scales. + + Per 32-element group one u32: bits 0..27 = four 7-bit ksigns indices, bits + 28..31 = the 4-bit sub-scale; db = d * (0.5 + s) * 0.5; value = db * grid * sign. + """ + import torch + + nb = blocks.shape[0] + d = _f16cast(blocks[:, 0:2]) + qs = blocks[:, 2:66] + scales = blocks[:, 66:98].contiguous().view(torch.int32).reshape(nb, 8) + # u32 semantics on an int32 view: shift as unsigned via masking + sub = ((scales >> 28) & 0x0F).to(torch.float32) + db = ((d * (0.5 + sub)) * 0.5).reshape(nb, 8, 1, 1) + sign_index = torch.stack([(scales >> s) & 0x7F for s in (0, 7, 14, 21)], dim=-1) + signs = _iq_signs_from_ksigns(sign_index).reshape(nb, 8, 4, 8) + grid = _iq_grid("IQ3_XXS", blocks.device)[qs.reshape(nb, 8, 8).to(torch.long)] + grid = grid.reshape(nb, 8, 4, 8) + return ((db * grid) * signs).reshape(nb, QK_K) + + +def dequant_iq3_s(blocks): + """uint8 [nb, 110] -> fp32 [nb, 256]. f16 d | 64B qs | 8B qh | 32B signs | 4B scales. + + 9-bit grid indices (qs byte + one qh bit), raw sign bits, 4-bit sub-scales + with db = d * (1 + 2*s). + """ + import torch + + nb = blocks.shape[0] + d = _f16cast(blocks[:, 0:2]) + qs = blocks[:, 2:66] + qh = blocks[:, 66:74] + sign_bytes = blocks[:, 74:106] + scales = blocks[:, 106:110] + sc = torch.stack([scales >> 0, scales >> 4], dim=2).reshape(nb, 8) & 0x0F + db = (d * (1 + 2 * sc.to(torch.int32)).to(torch.float32)).reshape(nb, 8, 1, 1) + bits = torch.stack([(sign_bytes >> i) & 0x01 for i in range(8)], dim=-1) + signs = torch.where(bits == 0, torch.tensor(1.0, device=blocks.device), + torch.tensor(-1.0, device=blocks.device)).reshape(nb, 8, 4, 8) + high = torch.stack([(qh.reshape(nb, 8, 1) >> i) & 0x01 for i in range(8)], dim=-1) + index = qs.reshape(nb, 8, 8).to(torch.long) | (high.reshape(nb, 8, 8).to(torch.long) << 8) + grid = _iq_grid("IQ3_S", blocks.device)[index].reshape(nb, 8, 4, 8) + return ((db * grid) * signs).reshape(nb, QK_K) + + +def dequant_bytes(ggml_type: str, raw: bytes, n_elements: int, device=None): + """Decode a block-aligned byte string of `ggml_type` to a flat fp32 tensor. + + ``device`` moves the raw UINT8 BUFFER before any kernel runs, so the whole + decode happens there and the result is already resident. The kernels above + are not rewritten for it -- they are the same lines, in the same order, on a + tensor that happens to live somewhere else. + + Why that keeps the bitwise property. Every operation in these kernels is + either an integer op on uint8/int8 (shift, mask, or, reinterpret) or an IEEE + 754 binary32 multiply or subtract on an elementwise-shaped operand. Both + classes are exactly specified and device-independent: there is no reduction, + no matmul (so no TF32 path), and in eager mode no fusion that could turn the + ``dd * q - dm`` pair into an FMA with a different rounding. Proven, not + assumed: `engines/tools/selftest_gguf_offline.py` rung 1b re-decodes the same + committed REAL ranged-fetched bytes on whatever accelerator the host has and + demands ``torch.equal`` against the CPU output that rung 1 already proved + bitwise-equal to gguf-py 0.19.0. On this laptop that is MPS; on the rented + box it is CUDA, and it runs there BEFORE the capture, which is the only + place the check is worth anything. + + Speed is the point. Measured on the box (docs/GGUF-MEASUREMENT.md), the CPU + path costs ~39 ms per expert matrix while the GPU sits at 2-4% -- and the + fp32 result it then has to hand over is 33.5 MB per matrix, 7.1x the 4.7 MB + of quantized bytes this path sends instead. + """ + import torch + + if ggml_type not in SUPPORTED_TYPES: + raise _fail( + f"ggml type {ggml_type} has no v1 decode kernel (supported: " + f"{', '.join(SUPPORTED_TYPES)}); adding one requires the same " + "bitwise-vs-gguf-py proof the shipped kernels carry" + ) + per_block, block_bytes = BLOCK_TRAITS[ggml_type] + if n_elements % per_block: + raise _fail(f"{ggml_type}: {n_elements} elements is not block-aligned ({per_block})") + expected = n_elements // per_block * block_bytes + if len(raw) != expected: + raise _fail(f"{ggml_type}: got {len(raw)} bytes, expected {expected}") + buf = torch.frombuffer(bytearray(raw), dtype=torch.uint8) + if device is not None and str(device) != "cpu": + # The reinterpreting `.view(torch.float16)` inside `_f16cast` needs a + # contiguous source; `.to()` of a contiguous uint8 tensor stays one. + buf = buf.to(device) + if ggml_type == "F32": + return buf.view(torch.float32).clone() + if ggml_type == "F16": + return buf.view(torch.float16).to(torch.float32) + if ggml_type == "BF16": + return buf.view(torch.bfloat16).to(torch.float32) + blocks = buf.reshape(-1, block_bytes) + if ggml_type == "Q8_0": + return dequant_q8_0(blocks).reshape(-1) + if ggml_type == "Q4_0": + return dequant_q4_0(blocks).reshape(-1) + if ggml_type == "Q4_K": + return dequant_q4_k(blocks).reshape(-1) + if ggml_type == "Q5_K": + return dequant_q5_k(blocks).reshape(-1) + if ggml_type == "Q6_K": + return dequant_q6_k(blocks).reshape(-1) + if ggml_type == "Q3_K": + return dequant_q3_k(blocks).reshape(-1) + if ggml_type == "IQ4_XS": + return dequant_iq4_xs(blocks).reshape(-1) + if ggml_type == "IQ3_XXS": + return dequant_iq3_xxs(blocks).reshape(-1) + if ggml_type == "IQ3_S": + return dequant_iq3_s(blocks).reshape(-1) + raise _fail(f"unreachable: {ggml_type}") + + +# --------------------------------------------------------------------------- +# GGUF container parsing (v2/v3, llama.cpp split convention) +# --------------------------------------------------------------------------- + +class _NeedMoreData(Exception): + pass + + +class _Reader: + def __init__(self, buf: bytes): + self.b, self.o = buf, 0 + + def _take(self, n: int) -> bytes: + if self.o + n > len(self.b): + raise _NeedMoreData() + v = self.b[self.o:self.o + n] + self.o += n + return v + + def u32(self) -> int: + return struct.unpack(" int: + return struct.unpack(" str: + return self._take(self.u64()).decode("utf8", "replace") + + def value(self, t: int): + if t == 8: + return self.string() + if t == 9: + et = self.u32() + n = self.u64() + return [self.value(et) for _ in range(n)] + fmt = {0: " Tuple[Dict[str, Any], Dict[str, Any], List[Dict[str, Any]]]: + """Parse one GGUF file's header from its leading bytes. + + Raises _NeedMoreData when `buf` is too short -- callers read progressively. + Returns (info, kv, tensor_rows); tensor offsets are relative to the file's + data_start (= align(header_end, general.alignment)). + """ + if buf[:4] != b"GGUF": + raise _fail("not a GGUF file (magic differs)") + r = _Reader(buf) + r.o = 4 + version = r.u32() + if version not in (2, 3): + raise _fail(f"unsupported GGUF version {version}") + n_tensors = r.u64() + n_kv = r.u64() + kv: Dict[str, Any] = {} + for _ in range(n_kv): + key = r.string() + vtype = r.u32() + kv[key] = r.value(vtype) + tensors: List[Dict[str, Any]] = [] + for _ in range(n_tensors): + name = r.string() + nd = r.u32() + dims = [r.u64() for _ in range(nd)] + type_id = r.u32() + offset = r.u64() + ggml_type = GGML_TYPE_IDS.get(type_id, f"UNKNOWN_{type_id}") + n = 1 + for d in dims: + n *= d + traits = BLOCK_TRAITS.get(ggml_type) + nbytes = (n // traits[0] * traits[1]) if traits and n % traits[0] == 0 else None + tensors.append({"name": name, "dims": dims, "type": ggml_type, + "elements": n, "offset": offset, "bytes": nbytes}) + alignment = int(kv.get("general.alignment", 32)) + data_start = (r.o + alignment - 1) // alignment * alignment + info = {"version": version, "kv_count": n_kv, "tensor_count": n_tensors, + "header_end": r.o, "alignment": alignment, "data_start": data_start} + return info, kv, tensors + + +class GgufFile: + """One GGUF file, local path or https URL (URLs are metadata/audit-only).""" + + _HEADER_STEPS = (1 << 19, 1 << 21, 1 << 23, 1 << 25, 1 << 26) + + def __init__(self, location: str): + self.location = str(location) + self.remote = self.location.startswith("http://") or self.location.startswith("https://") + self.name = self.location.rsplit("/", 1)[-1] + self._lock = threading.Lock() + self._local_fd: Optional[int] = None + self.size = self._probe_size() + buf = b"" + for step in self._HEADER_STEPS: + buf = self._read_absolute(0, min(step, self.size)) + try: + self.info, self.kv, tensor_rows = parse_gguf_header(buf) + break + except _NeedMoreData: + if step >= self.size or step == self._HEADER_STEPS[-1]: + raise _fail(f"{self.name}: header larger than {step} bytes or truncated") + self.tensors: Dict[str, Dict[str, Any]] = {} + for row in tensor_rows: + if row["name"] in self.tensors: + raise _fail(f"{self.name}: duplicate tensor {row['name']}") + row["file"] = self.name + self.tensors[row["name"]] = row + + # -- IO --------------------------------------------------------------- + def _probe_size(self) -> int: + if not self.remote: + path = Path(self.location) + if not path.is_file(): + raise _fail(f"GGUF file absent: {path}") + return path.stat().st_size + import urllib.request + + req = urllib.request.Request(self.location, headers={"Range": "bytes=0-0"}) + with urllib.request.urlopen(req, timeout=300) as resp: + content_range = resp.headers.get("Content-Range", "") + match = re.match(r"bytes \d+-\d+/(\d+)", content_range) + if match is None: + raise _fail(f"{self.location}: no Content-Range on a ranged request") + return int(match.group(1)) + + def _read_absolute(self, start: int, length: int) -> bytes: + if length <= 0: + return b"" + if self.remote: + import urllib.request + + req = urllib.request.Request( + self.location, headers={"Range": "bytes=%d-%d" % (start, start + length - 1)} + ) + data = urllib.request.urlopen(req, timeout=600).read() + else: + with self._lock: + if self._local_fd is None: + self._local_fd = os.open(self.location, os.O_RDONLY) + data = os.pread(self._local_fd, length, start) + if len(data) != length: + raise _fail(f"{self.name}: short read at {start} ({len(data)} of {length})") + return data + + def read_tensor_range(self, tensor_name: str, rel_offset: int, length: int) -> bytes: + row = self.tensors.get(tensor_name) + if row is None: + raise _fail(f"{self.name} has no tensor {tensor_name}") + if row["bytes"] is not None and rel_offset + length > row["bytes"]: + raise _fail(f"{tensor_name}: range {rel_offset}+{length} exceeds {row['bytes']}") + return self._read_absolute(self.info["data_start"] + row["offset"] + rel_offset, length) + + # -- split KVs -------------------------------------------------------- + @property + def split_no(self) -> Optional[int]: + value = self.kv.get("split.no") + return None if value is None else int(value) + + @property + def split_count(self) -> Optional[int]: + value = self.kv.get("split.count") + return None if value is None else int(value) + + +class GgufContainer: + """A complete artifact: one single-file GGUF or every part of a v3 split.""" + + def __init__(self, files: List[GgufFile]): + if not files: + raise _fail("no GGUF files given") + arch = {f.kv.get("general.architecture") for f in files if "general.architecture" in f.kv} + arch.discard(None) + if len(arch) != 1: + raise _fail(f"files disagree on general.architecture: {sorted(arch)}") + self.architecture = arch.pop() + counts = {f.split_count for f in files} + if counts == {None}: + if len(files) != 1: + raise _fail(f"{len(files)} files given but none carries split.count") + self.files = files + else: + if None in counts or len(counts) != 1: + raise _fail("split.count differs (or is absent) across the given files") + want = counts.pop() + if len(files) != want: + got = sorted(f.name for f in files) + raise _fail( + f"split artifact needs all {want} parts, got {len(files)}: {got} " + "(pass every .gguf of the split)" + ) + by_no = {f.split_no: f for f in files} + if sorted(by_no) != list(range(want)): + raise _fail(f"split.no values {sorted(by_no)} do not cover 0..{want - 1}") + self.files = [by_no[i] for i in range(want)] + declared = {int(f.kv["split.tensors.count"]) for f in self.files + if "split.tensors.count" in f.kv} + # the union tensor table (names must be disjoint across parts) + self.tensors: Dict[str, Dict[str, Any]] = {} + for f in self.files: + overlap = set(f.tensors) & set(self.tensors) + if overlap: + raise _fail(f"tensor(s) present in two split parts: {sorted(overlap)[:3]}") + self.tensors.update(f.tensors) + if declared and declared != {len(self.tensors)}: + raise _fail( + f"split.tensors.count declares {sorted(declared)} but the union table has " + f"{len(self.tensors)} tensors" + ) + # KV lives on the part that carries the full metadata (split.no 0 / + # single file); every part contributes what it has, first part wins. + self.kv: Dict[str, Any] = {} + for f in reversed(self.files): + self.kv.update(f.kv) + self._by_file = {f.name: f for f in self.files} + self.remote = any(f.remote for f in self.files) + + def geometry_value(self, key: str): + return self.kv.get(f"{self.architecture}.{key}") + + def read_tensor_range(self, tensor_name: str, rel_offset: int, length: int) -> bytes: + row = self.tensors.get(tensor_name) + if row is None: + raise _fail(f"artifact has no tensor {tensor_name}") + return self._by_file[row["file"]].read_tensor_range(tensor_name, rel_offset, length) + + def read_tensor(self, tensor_name: str) -> bytes: + row = self.tensors.get(tensor_name) + if row is None: + raise _fail(f"artifact has no tensor {tensor_name}") + if row["bytes"] is None: + raise _fail(f"{tensor_name}: byte size underivable for type {row['type']}") + return self.read_tensor_range(tensor_name, 0, row["bytes"]) + + +# --------------------------------------------------------------------------- +# header-level identity + contract (STDLIB ONLY: the controller imports these) +# --------------------------------------------------------------------------- + +GGUF_DECODE_METHOD = "gguf-dequant-to-bf16" +#: What the layer-outer `gguf-dequant-to-bf16` lane binds into +#: `weights_decode.quantization_config`: everything a GGUF declares about its +#: own quantization, read from the header bytes. The controller (range +#: requests) and the pod (local files) MUST compute the identical block from +#: the same headers -- `qualify-root` compares them field for field. +GGUF_CONTRACT_KV = ("general.architecture", "general.file_type", + "general.quantization_version", "general.quantized_by", + "quantize.imatrix.file", "quantize.imatrix.dataset", + "quantize.imatrix.entries_count", "quantize.imatrix.chunks_count") + + +def tensor_table_sha256(container: GgufContainer) -> str: + """sha256 over the canonical JSON of every tensor's (name, dims, type, offset, + file): the GGUF analogue of a safetensors index digest. Header CONTENT, never + container bytes, so it is the same on the controller and on the pod.""" + rows = [{"name": n, "dims": [int(d) for d in r["dims"]], "type": r["type"], + "offset": int(r["offset"]), "file": r["file"]} + for n, r in sorted(container.tensors.items())] + return _sha256_bytes(_canonical_json(rows)) + + +def decode_contract(container: GgufContainer, build: str) -> Dict[str, Any]: + """The `weights_decode` block of the gguf lane, from headers alone. + + ``build`` is the repo-relative directory of the variant (e.g. ``UD-Q4_K_XL``, + the ``--path`` of the plan), so two builds of one repo revision never share + a contract. + """ + type_census: Dict[str, int] = {} + for row in container.tensors.values(): + type_census[row["type"]] = type_census.get(row["type"], 0) + 1 + kv = {key: container.kv[key] for key in GGUF_CONTRACT_KV if key in container.kv} + return { + "method": GGUF_DECODE_METHOD, + "quantization_config": { + "container": "gguf", + "build": build, + "files": sorted(f.name for f in container.files), + "general": kv, + "type_census": dict(sorted(type_census.items())), + "tensor_count": len(container.tensors), + "tensor_table_sha256": tensor_table_sha256(container), + "decode": "every tensor block-dequantized to fp32 by the gguf-py-proven " + "kernels on the capture device, then ONE rounding to bfloat16 " + "(official-float32 tensors kept fp32); attn_k_b/attn_v_b composed " + "into kv_b_proj; fused experts sliced per expert", + }, + } + + +def audit_container(container: GgufContainer) -> Dict[str, Any]: + """Every tensor's bytes lie inside its file, and no two overlap. + + The GGUF analogue of `layer_outer.audit_checkpoint_tree`: a truncated part + would otherwise read as a short read (refused at read time) or, worse, a + row whose offset points past the data would decode garbage. Local files + only (sizes are stat'ed); remote containers are audited by range failures. + """ + by_file: Dict[str, List[Tuple[int, int, str]]] = {} + for name, row in container.tensors.items(): + if row["bytes"] is None: + raise _fail(f"{name}: byte size underivable for type {row['type']}") + by_file.setdefault(row["file"], []).append((int(row["offset"]), int(row["bytes"]), name)) + total = 0 + for f in container.files: + extents = sorted(by_file.get(f.name, [])) + end = f.info["data_start"] + for offset, nbytes, name in extents: + start = f.info["data_start"] + offset + if start < end: + raise _fail(f"{f.name}: {name} overlaps the previous tensor's bytes") + end = start + nbytes + total += nbytes + # a metadata-only part (llama.cpp's split 1) ends at its header, which + # may sit BEFORE the aligned data_start; only tensor bytes are bounded + if extents and end > f.size: + raise _fail( + f"{f.name}: tensor extents run to byte {end} but the file has {f.size} " + "(truncated part?)" + ) + return {"files": len(container.files), "tensors": len(container.tensors), + "tensor_bytes": total, "file_bytes": sum(f.size for f in container.files), + "extents_ok": True} + + +def tokenizer_matches(kv: Mapping[str, Any], tokenizer_json: bytes) -> Dict[str, Any]: + """Does the GGUF's embedded vocabulary equal an HF tokenizer.json's, by ID? + + A GGUF ships no tokenizer files: the token strings live in + ``tokenizer.ggml.tokens`` (index = id) and the BPE merges in + ``tokenizer.ggml.merges``. The lane runs the reference root's tokenizer + files (the panel is already tokenized), so it must be SHOWN that the + artifact's own vocabulary is the same one: every id the HF vocab (model + + added tokens) defines must carry the same string, the merges must be the + same list in the same order, and ids beyond the HF vocab may only be + llama.cpp's ``[PAD]`` fillers up to the declared vocab_size. Refuses + on any other difference, naming the first. + """ + doc = json.loads(tokenizer_json.decode("utf-8")) + vocab = dict((doc.get("model") or {}).get("vocab") or {}) + by_id: Dict[int, str] = {int(i): s for s, i in vocab.items()} + for added in doc.get("added_tokens") or []: + by_id.setdefault(int(added["id"]), added["content"]) + tokens = list(kv.get("tokenizer.ggml.tokens") or []) + if not tokens: + raise _fail("the GGUF carries no tokenizer.ggml.tokens array") + mismatched = [i for i in range(len(tokens)) if i in by_id and by_id[i] != tokens[i]] + if mismatched: + i = mismatched[0] + raise _fail( + f"REFUSED: GGUF token id {i} is {tokens[i]!r} but the HF tokenizer says " + f"{by_id[i]!r} ({len(mismatched)} ids differ)" + ) + missing = [i for i in by_id if i >= len(tokens)] + if missing: + raise _fail(f"REFUSED: HF tokenizer defines id {min(missing)} beyond the GGUF's " + f"{len(tokens)} tokens") + pads = [i for i in range(len(tokens)) if i not in by_id] + bad_pads = [i for i in pads if tokens[i] != "[PAD%d]" % i] + if bad_pads: + raise _fail(f"REFUSED: GGUF token id {bad_pads[0]} = {tokens[bad_pads[0]]!r} is " + "absent from the HF tokenizer and is not a [PAD] filler") + hf_merges = [(m if isinstance(m, str) else " ".join(m)) + for m in (doc.get("model") or {}).get("merges") or []] + gg_merges = list(kv.get("tokenizer.ggml.merges") or []) + if hf_merges != gg_merges: + raise _fail(f"REFUSED: BPE merges differ (HF {len(hf_merges)}, GGUF {len(gg_merges)})") + return {"tokens": len(tokens), "hf_ids": len(by_id), "pad_fillers": len(pads), + "merges": len(gg_merges), "pre": kv.get("tokenizer.ggml.pre"), + "model": kv.get("tokenizer.ggml.model"), "equal": True} + + +# --------------------------------------------------------------------------- +# llama.cpp -> HF name map +# --------------------------------------------------------------------------- +# Suffix rules verified by BIJECTION against the official BF16 index (glm5next: +# 38,770 tensors, revision a6c167b6...; glm-dsa: 59,585 tensors, revision +# 304b8051...) in the offline selftest: every GGUF tensor is consumed exactly +# once, every official non-routed non-vision tensor is produced exactly once, +# and reversed(ggml dims) equals the official shape for every 1:1 tensor. The +# per-layer suffix map is shared by both architectures (glm-dsa simply never +# ships the KDA/mHC/kpool names); the top level and the layer prefix come from +# the arch table. +_TOP_LEVEL = GLM5NEXT.top_level +_LAYER_DIRECT = { + "attn_norm.weight": "input_layernorm.weight", + "ffn_norm.weight": "post_attention_layernorm.weight", + "attn_output.weight": "self_attn.o_proj.weight", + "attn_q.weight": "self_attn.q_proj.weight", + "attn_k.weight": "self_attn.k_proj.weight", + "attn_v.weight": "self_attn.v_proj.weight", + "ssm_beta.weight": "self_attn.b_proj.weight", + "ssm_f_a.weight": "self_attn.f_a_proj.weight", + "ssm_f_b.weight": "self_attn.f_b_proj.weight", + "ssm_g_a.weight": "self_attn.g_a_proj.weight", + "ssm_g_b.weight": "self_attn.g_b_proj.weight", + "ssm_conv1d_q.weight": "self_attn.q_conv1d.weight", + "ssm_conv1d_k.weight": "self_attn.k_conv1d.weight", + "ssm_conv1d_v.weight": "self_attn.v_conv1d.weight", + "ssm_a": "self_attn.A_log", + "ssm_dt.bias": "self_attn.dt_bias", + "ssm_norm.weight": "self_attn.o_norm.weight", + "attn_q_a.weight": "self_attn.q_a_proj.weight", + "attn_q_b.weight": "self_attn.q_b_proj.weight", + "attn_kv_a_mqa.weight": "self_attn.kv_a_proj_with_mqa.weight", + "attn_kv_a_norm.weight": "self_attn.kv_a_layernorm.weight", + "attn_q_a_norm.weight": "self_attn.q_a_layernorm.weight", + "indexer.attn_k.weight": "self_attn.indexer.wk.weight", + "indexer.attn_q_b.weight": "self_attn.indexer.wq_b.weight", + "indexer.proj.weight": "self_attn.indexer.weights_proj.weight", + "indexer.k_norm.weight": "self_attn.indexer.k_norm.weight", + "indexer.k_norm.bias": "self_attn.indexer.k_norm.bias", + "indexer_compressor_ape.weight": "self_attn.indexer.index_kpool_compress_ape", + "indexer_compressor_gate.weight": "self_attn.indexer.index_kpool_compress_gate", + # ddh0's convert vintage spells the same two tensors differently (same + # dims); one artifact carries one spelling, never both -- build_census + # refuses a duplicate HF target. + "indexer.kpool_ape.weight": "self_attn.indexer.index_kpool_compress_ape", + "indexer.kpool_gate.weight": "self_attn.indexer.index_kpool_compress_gate", + "hc_attn_base.weight": "hc_attn_base", + "hc_attn_fn.weight": "hc_attn_fn", + "hc_attn_scale.weight": "hc_attn_scale", + "hc_ffn_base.weight": "hc_ffn_base", + "hc_ffn_fn.weight": "hc_ffn_fn", + "hc_ffn_scale.weight": "hc_ffn_scale", + "ffn_gate.weight": "mlp.gate_proj.weight", + "ffn_up.weight": "mlp.up_proj.weight", + "ffn_down.weight": "mlp.down_proj.weight", + "ffn_gate_inp.weight": "mlp.gate.weight", + "exp_probs_b.bias": "mlp.gate.e_score_correction_bias", + "ffn_gate_shexp.weight": "mlp.shared_experts.gate_proj.weight", + "ffn_up_shexp.weight": "mlp.shared_experts.up_proj.weight", + "ffn_down_shexp.weight": "mlp.shared_experts.down_proj.weight", + "nextn.eh_proj.weight": "eh_proj.weight", + "nextn.enorm.weight": "enorm.weight", + "nextn.hnorm.weight": "hnorm.weight", + "nextn.shared_head_norm.weight": "shared_head.norm.weight", +} +_ROUTED = {"ffn_gate_exps.weight": "gate_proj", "ffn_up_exps.weight": "up_proj", + "ffn_down_exps.weight": "down_proj"} +_MLA = {"attn_k_b.weight": "k_b", "attn_v_b.weight": "v_b"} +_BLK = re.compile(r"^blk\.(\d+)\.(.+)$") + + +def classify_tensor(gguf_name: str, arch: GgufArch = GLM5NEXT) -> Tuple[str, ...]: + """One GGUF tensor name -> its role. + + Returns one of + ("top", hf_name) -- 1:1, top level + ("direct", layer, hf_name) -- 1:1, per layer + ("routed", layer, projection) -- fused expert tensor + ("mla", layer, "k_b"|"v_b") -- half of kv_b_proj + ("unmapped",) -- census REFUSES these by name + """ + if gguf_name in arch.top_level: + return ("top", arch.top_level[gguf_name]) + match = _BLK.match(gguf_name) + if match is None: + return ("unmapped",) + layer, suffix = int(match.group(1)), match.group(2) + if not 0 <= layer < arch.block_count: + raise _fail(f"{gguf_name}: layer outside declared block_count {arch.block_count}") + if suffix in _LAYER_DIRECT: + return ("direct", layer, arch.layer_name(layer, _LAYER_DIRECT[suffix])) + if suffix in _ROUTED: + return ("routed", layer, _ROUTED[suffix]) + if suffix in _MLA: + return ("mla", layer, _MLA[suffix]) + return ("unmapped",) + + +def routed_tensor_name(layer: int, projection: str) -> str: + return f"blk.{layer}.{EXPS_SUFFIX[projection]}" + + +def official_expert_name(layer: int, expert: int, projection: str, + arch: GgufArch = GLM5NEXT) -> str: + return arch.expert_name(layer, expert, projection) + + +def kv_b_hf_name(layer: int, arch: GgufArch = GLM5NEXT) -> str: + return arch.kv_b_name(layer) + + +def hf_shape_of(row: Mapping[str, Any]) -> Tuple[int, ...]: + """ggml dims are fastest-first; the official row-major shape is the reverse.""" + return tuple(int(d) for d in reversed(row["dims"])) + + +def expert_slice_range(row: Mapping[str, Any], expert: int, + arch: GgufArch = GLM5NEXT) -> Tuple[int, int]: + """(relative byte offset, byte length) of one expert inside a fused tensor.""" + dims = [int(d) for d in row["dims"]] + experts = arch.num_experts + if len(dims) != 3 or dims[2] != experts: + raise _fail(f"{row['name']}: dims {dims} are not a fused {experts}-expert tensor") + per_expert_elems = dims[0] * dims[1] + traits = BLOCK_TRAITS.get(row["type"]) + if traits is None: + raise _fail(f"{row['name']}: no block traits for type {row['type']}") + per_block, block_bytes = traits + if per_expert_elems % per_block: + raise _fail(f"{row['name']}: expert slice is not block-aligned") + if expert < 0 or expert >= experts: + raise _fail(f"expert {expert} out of range") + per_expert_bytes = per_expert_elems // per_block * block_bytes + return expert * per_expert_bytes, per_expert_bytes + + +# --------------------------------------------------------------------------- +# census + surface +# --------------------------------------------------------------------------- + +@dataclass +class GgufCensus: + direct_map: Dict[str, str] # gguf name -> HF name (1:1) + routed: Dict[Tuple[int, str], str] # (layer, projection) -> gguf name + mla: Dict[Tuple[int, str], str] # (layer, half) -> gguf name + mla_layers: Tuple[int, ...] + unmapped: List[str] = field(default_factory=list) + unsupported: List[Tuple[str, str]] = field(default_factory=list) + arch: GgufArch = GLM5NEXT + # glm-dsa: GGUF indexer tensors on layers whose official indexer is + # "shared" (no HF module) -> (gguf name, the full layer they copy). They + # are NOT in direct_map: a name the model does not build is never loaded. + shared_indexer_copies: Dict[str, int] = field(default_factory=dict) + + def nonrouted_hf_names(self) -> List[str]: + return sorted(list(self.direct_map.values()) + + [kv_b_hf_name(layer, self.arch) for layer in self.mla_layers]) + + +def indexer_full_layers_from_config(config: Any, arch: GgufArch) -> Optional[Tuple[int, ...]]: + """Layers whose DSA indexer has its OWN weights, from the official config. + + ``indexer_types`` lists ``full``/``shared`` per decoder layer; the MTP block + (past ``num_hidden_layers``) carries its own indexer in the official tree + (index_share_for_mtp_iteration is a runtime flag, the weights ship). None + when the config carries no ``indexer_types`` (glm5next has none). + """ + if isinstance(config, Mapping): + types = config.get("indexer_types") + else: + types = getattr(config, "indexer_types", None) + if types is None: + return None + types = list(types) + if len(types) != arch.mtp_layer: + raise _fail( + f"config.indexer_types has {len(types)} entries but {arch.key} has " + f"{arch.mtp_layer} decoder layers before the MTP block" + ) + if any(t not in ("full", "shared") for t in types): + raise _fail(f"config.indexer_types carries an unknown entry: {sorted(set(types))}") + if types[0] != "full": + raise _fail("config.indexer_types: layer 0 must be 'full' (a shared layer needs a parent)") + return tuple(i for i, t in enumerate(types) if t == "full") + arch.mtp_layers + + +def build_census(container: GgufContainer, arch: Optional[GgufArch] = None, + indexer_full_layers: Optional[Sequence[int]] = None) -> GgufCensus: + """Classify EVERY tensor; refuse unknown names and undecodable types. + + ``indexer_full_layers`` is REQUIRED for an architecture whose GGUF ships + indexer copies on shared layers (glm-dsa): it is the official config's + ``indexer_types == "full"`` set (see ``indexer_full_layers_from_config``). + Indexer tensors on any other layer are recorded as ``shared_indexer_copies`` + and must be proven value-identical to their parent by + ``verify_shared_indexer_copies`` before a run. + """ + if arch is None: + arch = arch_from_container(container) + if arch.indexer_shared_copies and indexer_full_layers is None: + raise _fail( + f"{arch.key}: the census needs the official config's indexer_types " + "(which layers own an indexer); the GGUF carries indexer tensors on " + "every layer and cannot say which are copies" + ) + full_set = set(indexer_full_layers or ()) + direct_map: Dict[str, str] = {} + routed: Dict[Tuple[int, str], str] = {} + mla: Dict[Tuple[int, str], str] = {} + shared_copies: Dict[str, int] = {} + unmapped: List[str] = [] + unsupported: List[Tuple[str, str]] = [] + for name, row in container.tensors.items(): + role = classify_tensor(name, arch) + if role[0] == "unmapped": + unmapped.append(name) + continue + if row["type"] not in SUPPORTED_TYPES: + unsupported.append((name, row["type"])) + if role[0] == "top": + direct_map[name] = role[1] + elif role[0] == "direct": + layer = role[1] + if (arch.indexer_shared_copies and ".indexer." in name + and layer not in full_set): + parents = [f for f in full_set if f < layer] + if not parents: + raise _fail(f"{name}: shared-indexer layer {layer} has no preceding full layer") + shared_copies[name] = max(parents) + else: + direct_map[name] = role[2] + elif role[0] == "routed": + routed[(role[1], role[2])] = name + elif role[0] == "mla": + mla[(role[1], role[2])] = name + if unmapped: + raise _fail( + f"{len(unmapped)} tensors have no {arch.key}->HF mapping (first: " + f"{sorted(unmapped)[:5]}). A tensor this adapter cannot NAME is a " + "tensor it will not silently skip." + ) + target_counts: Dict[str, int] = {} + for hf in direct_map.values(): + target_counts[hf] = target_counts.get(hf, 0) + 1 + duplicate_targets = [hf for hf, count in target_counts.items() if count > 1] + if duplicate_targets: + raise _fail( + f"two GGUF tensors map to the same official tensor: {sorted(duplicate_targets)[:3]} " + "(alias spellings must not coexist in one artifact)" + ) + if unsupported: + listed = ", ".join(f"{n} [{t}]" for n, t in sorted(unsupported)[:6]) + types = sorted({t for _, t in unsupported}) + raise _fail( + f"REFUSED: {len(unsupported)} tensors use ggml types without a v1 decode " + f"kernel ({', '.join(types)}), e.g. {listed}. Supported: " + f"{', '.join(SUPPORTED_TYPES)}. IQ-family GGUFs (ddh0, unsloth UD-IQ*) " + "are a named exclusion until their kernels land with the same " + "bitwise-vs-gguf-py proof." + ) + # closure: routed tensors for every routed layer AND the MTP block, all + # three projections + expected_routed_layers = arch.routed_layers + arch.mtp_layers + missing_routed = [ + routed_tensor_name(layer, projection) + for layer in expected_routed_layers + for projection in PROJECTIONS + if (layer, projection) not in routed + ] + if missing_routed: + raise _fail(f"fused expert tensors absent: {missing_routed[:5]}") + stray_routed = sorted(set(routed) - {(l, p) for l in expected_routed_layers + for p in PROJECTIONS}) + if stray_routed: + raise _fail( + f"fused expert tensors outside layers {expected_routed_layers[0]}.." + f"{expected_routed_layers[-1]}: {stray_routed[:5]}" + ) + for (layer, projection), name in routed.items(): + row = container.tensors[name] + out_features, in_features = arch.projection_shape[projection] + if [int(d) for d in row["dims"]] != [in_features, out_features, arch.num_experts]: + raise _fail( + f"{name}: dims {row['dims']} != expected [in={in_features}, " + f"out={out_features}, experts={arch.num_experts}]" + ) + # MLA pairs must be complete per layer + mla_layers = sorted({layer for layer, _ in mla}) + for layer in mla_layers: + for half in ("k_b", "v_b"): + if (layer, half) not in mla: + raise _fail(f"layer {layer}: attn_{half} present without its pair") + for (layer, half), name in mla.items(): + row = container.tensors[name] + want = ([arch.mla_k_nope, arch.mla_kv_lora_rank, arch.mla_heads] if half == "k_b" + else [arch.mla_kv_lora_rank, arch.mla_v_dim, arch.mla_heads]) + if [int(d) for d in row["dims"]] != want: + raise _fail(f"{name}: dims {row['dims']} != expected {want}") + if arch.indexer_shared_copies: + # every full layer must own a complete indexer; every copy layer must + # copy exactly the suffixes its parent has + indexer_suffixes = sorted(s for s in _LAYER_DIRECT if s.startswith("indexer.")) + present = {name for name in container.tensors if ".indexer." in name} + for layer in range(arch.block_count): + want = {f"blk.{layer}.{s}" for s in indexer_suffixes + if f"blk.{layer}.{s}" in present} + if layer in full_set and not want: + raise _fail(f"layer {layer} is a full indexer layer but ships no indexer tensors") + if layer not in full_set and want: + parent = shared_copies[next(iter(want))] + parent_have = {n.split(".", 2)[2] for n in present if n.startswith(f"blk.{parent}.")} + mine = {n.split(".", 2)[2] for n in want} + if mine != parent_have: + raise _fail( + f"layer {layer}: indexer copy set {sorted(mine)} differs from its " + f"parent layer {parent} {sorted(parent_have)}" + ) + return GgufCensus(direct_map=direct_map, routed=routed, mla=mla, + mla_layers=tuple(mla_layers), arch=arch, + shared_indexer_copies=shared_copies) + + +def verify_shared_indexer_copies(container: GgufContainer, census: GgufCensus, + device=None) -> Dict[str, Any]: + """PROVE every shared-layer indexer tensor equals its parent's, by VALUE. + + The audit (gguf-evidence/glmdsa-layout-audit.json) found the copies stored + in a different ggml type than their parent in the BF16 build (BF16 vs F32), + so bytes cannot be compared: both sides are decoded to fp32 and must be + ``torch.equal``. Refuses on the first difference, naming the tensor. + """ + import torch + + compared = 0 + by_parent: Dict[int, int] = {} + for name, parent in sorted(census.shared_indexer_copies.items()): + suffix = name.split(".", 2)[2] + parent_name = f"blk.{parent}.{suffix}" + mine = load_decoded_tensor(container, name, device=device) + theirs = load_decoded_tensor(container, parent_name, device=device) + if mine.shape != theirs.shape or not torch.equal(mine, theirs): + raise _fail( + f"REFUSED: {name} is not a value-identical copy of {parent_name} - the " + "converter's shared-indexer layout differs from the proven one" + ) + compared += 1 + by_parent[parent] = by_parent.get(parent, 0) + 1 + # STRING keys: this dict is sealed into the runtime receipt, and an int-keyed + # dict sorts numerically in memory but lexically after the JSON round trip + # ("10" < "2"), so receipt_sha256 would never recompute (SEAL-1(g); the + # UD-Q4_K_XL attempt of 2026-09-05 lost a full 78-layer capture to it). + return {"copies_compared": compared, + "copies_by_parent_layer": {str(k): v for k, v in sorted(by_parent.items())}, + "all_value_identical": True} + + +def verify_nonrouted_bijection(census: GgufCensus, official_names) -> Dict[str, Any]: + """The mapped HF set must EXACTLY biject the official non-routed non-vision set.""" + arch = census.arch + official = set(official_names) + routed_official = { + official_expert_name(layer, expert, projection, arch) + for layer in arch.routed_layers + arch.mtp_layers + for expert in range(arch.num_experts) + for projection in PROJECTIONS + } + vision = {name for name in official if name.startswith("model.visual.")} + expected = official - routed_official - vision + produced = set(census.nonrouted_hf_names()) + if produced != expected: + extra = sorted(produced - expected)[:5] + missing = sorted(expected - produced)[:5] + raise _fail( + f"non-routed name map does not biject the official set " + f"(maps-to-nothing-official: {extra}, official-but-unmapped: {missing})" + ) + if len(routed_official - official): + raise _fail("official index lacks routed expert names -- wrong index") + return { + "official_tensors": len(official), + "official_routed_tensors": len(routed_official), + "official_vision_tensors": len(vision), + "nonrouted_mapped_tensors": len(produced), + "mla_reconstructed_tensors": len(census.mla_layers), + "shared_indexer_copies_not_loaded": len(census.shared_indexer_copies), + "bijection_ok": True, + } + + +GEOMETRY_GATE = GLM5NEXT.geometry_gate + + +@dataclass(frozen=True) +class GgufSurface: + container: GgufContainer + census: GgufCensus + repo: Optional[str] + revision: str + architecture: str + file_records: Tuple[Dict[str, Any], ...] + file_hash_verification: str # "full" | "skipped" + type_census: Dict[str, int] + scope_policy: Dict[str, Any] + quant_metadata: Dict[str, Any] + + @property + def arch(self) -> GgufArch: + return self.census.arch + + def checkpoint_identity_sha256(self) -> str: + body = { + "schema": GGUF_IDENTITY_SCHEMA, + "gguf_repo": self.repo, + "gguf_revision": self.revision, + "format": GGUF_FORMAT, + "architecture": self.architecture, + "files": list(self.file_records), + "file_hash_verification": self.file_hash_verification, + "type_census": dict(self.type_census), + "scope_policy": self.scope_policy, + "quant_metadata": self.quant_metadata, + "mla_kv_b_arrangement": MLA_KV_B_ARRANGEMENT, + "nonrouted_policy": "decoded_from_the_same_gguf_artifact", + "seal_disclosure": SEAL_DISCLOSURE, + } + if self.census.shared_indexer_copies: + # glm-dsa only: the identity says how many artifact tensors are + # proven duplicates that the model never loads (glm5next hashes + # stay byte-identical to the published Flash rows) + body["shared_indexer_copies_not_loaded"] = len(self.census.shared_indexer_copies) + return _sha256_bytes(_canonical_json(body)) + + +def _scope_policy(container: GgufContainer, census: GgufCensus) -> Dict[str, Any]: + """MEASURED scope: what this artifact quantized, read from its own table.""" + def type_of(name: str) -> Optional[str]: + row = container.tensors.get(name) + return None if row is None else row["type"] + + quantized = sorted({row["type"] for row in container.tensors.values() + if row["type"] not in ("F32", "F16", "BF16")}) + routed_types = sorted({container.tensors[name]["type"] for name in census.routed.values()}) + attention_names = [name for name in list(census.direct_map) + list(census.mla.values()) + if ".attn_" in name or ".ssm_" in name or ".indexer" in name] + attention_quantized = any( + container.tensors[name]["type"] not in ("F32", "F16", "BF16") + for name in attention_names + ) + return { + "policy": "artifact_quantizes_nonrouted_tensors_too", + "embeddings_type": type_of("token_embd.weight"), + "lm_head_type": type_of("output.weight"), + "attention_kda_dsa_quantized": bool(attention_quantized), + "routed_expert_types": routed_types, + "quantized_types_present": quantized, + "vision_in_artifact": False, + "vision_source": "official_bf16_tree_not_part_of_the_artifact_never_executed", + "activations": "not_quantized_by_gguf_weights_only_format", + "disclosure": SCOPE_DISCLOSURE, + } + + +GGUF_SCOPE_SCHEMA = "malaiwah.glm53-gguf-scope.v1" + +#: ggml type -> (registry numeric_format, nominal bits/weight). "Nominal" is +#: the type's name; the MEASURED rate per class is computed from the block +#: traits below and reported in the note, because a K-quant block carries +#: scales and mins that the name does not mention. +_REGISTRY_FORMAT = { + "F32": ("fp32", 32.0), "F16": ("fp16", 16.0), "BF16": ("bf16", 16.0), + "Q8_0": ("gguf-k-quant", 8.0), "Q6_K": ("gguf-k-quant", 6.0), + "Q5_K": ("gguf-k-quant", 5.0), "Q4_K": ("gguf-k-quant", 4.0), + "Q3_K": ("gguf-k-quant", 3.0), "Q2_K": ("gguf-k-quant", 2.0), + "Q5_1": ("gguf-k-quant", 5.0), "Q5_0": ("gguf-k-quant", 5.0), + "Q4_1": ("gguf-k-quant", 4.0), "Q4_0": ("gguf-k-quant", 4.0), + "IQ4_XS": ("gguf-i-quant", 4.0), "IQ4_NL": ("gguf-i-quant", 4.0), + "IQ3_S": ("gguf-i-quant", 3.0), "IQ3_XXS": ("gguf-i-quant", 3.0), + "IQ2_S": ("gguf-i-quant", 2.0), "IQ2_XS": ("gguf-i-quant", 2.0), + "IQ2_XXS": ("gguf-i-quant", 2.0), "IQ1_M": ("gguf-i-quant", 1.0), + "IQ1_S": ("gguf-i-quant", 1.0), "MXFP4": ("mxfp4", 4.0), +} +_NATIVE_TYPES = ("F32", "F16", "BF16") + + +def scope_class_of(hf_name: str, layer: Optional[int], + arch: GgufArch = GLM5NEXT) -> Tuple[str, str]: + """(registry tensor_class, why) for one official name. + + The registry vocabulary is coarse and model-agnostic on purpose, and this + architecture has three families that do not map onto it by keyword: + GLM5Next's KDA gates (``f_a/f_b/g_a/g_b/b_proj``, the conv1d kernels, + ``A_log``/``dt_bias``), the DSA sparse-attention indexer, and the mHC + hyper-connection coefficients (``hc_*``). None of them is a q/k/v or an o + projection, so calling them ``attn.qkv`` would overstate what the qkv row + covers; they go to ``attn.other`` / ``other`` WITH a note, which the schema + requires for ``other`` and which is the honest answer anyway. + """ + if layer == arch.mtp_layer: + return "mtp", "layer %d is the MTP layer; present in the artifact, never executed" % arch.mtp_layer + if hf_name.endswith("lm_head.weight"): + return "lm_head", "the output projection" + if "embed_tokens" in hf_name: + return "embed_tokens", "the token embedding table" + if ".mlp.experts." in hf_name or ".mlp.experts" in hf_name: + return "moe.experts", "routed experts" + if ".mlp.shared_experts." in hf_name: + return "moe.shared_expert", "the always-on shared expert" + if ".mlp.gate." in hf_name: + return "moe.router", "the router logits and their score-correction bias" + if hf_name.endswith(".mlp.gate_proj.weight"): + return "mlp.gate", "dense (non-MoE) layers only" + if hf_name.endswith(".mlp.up_proj.weight"): + return "mlp.up", "dense (non-MoE) layers only" + if hf_name.endswith(".mlp.down_proj.weight"): + return "mlp.down", "dense (non-MoE) layers only" + if ".self_attn." in hf_name: + tail = hf_name.split(".self_attn.", 1)[1] + if tail.startswith("o_proj"): + return "attn.o", "the attention output projection" + if tail.split(".")[0] in ( + "q_proj", "k_proj", "v_proj", "q_a_proj", "q_b_proj", + "kv_a_proj_with_mqa", "kv_b_proj"): + return "attn.qkv", "q/k/v and the MLA down/up projections" + return "attn.other", ("KDA gates, conv1d kernels, the DSA indexer and " + "the attention norms") + if ".hc_attn" in hf_name: + return "attn.other", "mHC hyper-connection coefficients on the attention branch" + if ".hc_ffn" in hf_name: + return "other", "mHC hyper-connection coefficients on the FFN branch" + if "norm" in hf_name: + return "norm", "layer and final norms" + if ".visual." in hf_name: + return "other", "the vision tower" + return "other", "unclassified by the registry's coarse vocabulary" + + +def measured_scope(surface: "GgufSurface") -> Dict[str, Any]: + """The per-tensor-class recipe, MEASURED from the container's own table. + + Nothing here is read off a build NAME and nothing is defaulted. Every + class reports the ggml types its tensors actually use, so a mixed class + (unsloth's "Dynamic" recipe puts Q4_K gate/up beside Q6_K down on three + layers) says `mixed` instead of picking one and calling the other a + rounding error. + + The MEASURED bits/weight per class is computed from ggml's own block traits + -- elements and bytes -- and lands in the note, because it is the number the + type name does not tell you: Q4_K is 4.5 bits/weight once its scales and + mins are counted, not 4. + """ + container, census = surface.container, surface.census + arch = census.arch + per_class: Dict[str, Dict[str, Any]] = {} + + def account(hf_name: str, layer: Optional[int], row: Mapping[str, Any], + count: int = 1) -> None: + cls, why = scope_class_of(hf_name, layer, arch) + entry = per_class.setdefault(cls, {"types": {}, "why": why, + "elements": 0, "bytes": 0}) + ggml_type = row["type"] + entry["types"][ggml_type] = entry["types"].get(ggml_type, 0) + count + elements = int(row["elements"]) + traits = BLOCK_TRAITS.get(ggml_type) + entry["elements"] += elements + if traits is not None: + per_block, block_bytes = traits + entry["bytes"] += elements // per_block * block_bytes + + for gguf_name, hf_name in census.direct_map.items(): + match = _BLK.match(gguf_name) + account(hf_name, int(match.group(1)) if match else None, + container.tensors[gguf_name]) + for (layer, _half), gguf_name in census.mla.items(): + account(kv_b_hf_name(layer, arch), layer, container.tensors[gguf_name]) + for (layer, projection), gguf_name in census.routed.items(): + account(official_expert_name(layer, 0, projection, arch), layer, + container.tensors[gguf_name]) + + assignments = [] + for cls in sorted(per_class): + entry = per_class[cls] + types = entry["types"] + native = all(t in _NATIVE_TYPES for t in types) + formats = {_REGISTRY_FORMAT.get(t, ("unknown", None))[0] for t in types} + fmt = formats.pop() if len(formats) == 1 else "mixed" + nominal = {_REGISTRY_FORMAT.get(t, ("unknown", None))[1] for t in types} + effective = (8.0 * entry["bytes"] / entry["elements"]) if entry["elements"] else None + note = "%s. ggml types: %s. MEASURED %.4f bits/weight over %d weights." % ( + entry["why"], + ", ".join("%s x%d" % (t, types[t]) for t in sorted(types)), + effective if effective is not None else float("nan"), entry["elements"]) + if native: + note += (" Stored natively by the artifact; the streaming lane's " + "materialized view casts F32 tensors the official release " + "stores as bf16 down to bf16, so the constructed model is " + "dtype-identical to a native build rather than wider.") + assignments.append({ + "tensor_class": cls, + "treatment": "native" if native else "quantized", + "format": fmt, + "bits_per_weight": (nominal.pop() if len(nominal) == 1 else None), + "layer_range": "all", + "note": note, + }) + # The vision tower belongs to `other` too, and it is ABSENT. One class + # cannot be both quantized and not_present, and the registry vocabulary has + # one `other` slot, so the absence is stated in the note rather than as a + # second entry with the same tensor_class -- which would double-count the + # class in scope_digest and read as a contradiction. + if surface.arch.layer_prefix == GLM5NEXT.layer_prefix: + vision = ("The vision tower (model.visual.*) is ALSO `other` and is NOT in " + "this container -- llama.cpp ships it as a separate mmproj file. " + "The streaming lane copies it from the official BF16 tree so the " + "model can be constructed at all; the text-only sealed panel never " + "executes it, so no vision weight is inside the measured function.") + other = next((a for a in assignments if a["tensor_class"] == "other"), None) + if other is None: + assignments.append({ + "tensor_class": "other", "treatment": "not_present", + "format": "unknown", "bits_per_weight": None, "layer_range": "all", + "note": vision, + }) + else: + other["note"] += " " + vision + quantized = {(a["format"], a["bits_per_weight"]) for a in assignments + if a["treatment"] == "quantized"} + policy = "none" if not quantized else ("uniform" if len(quantized) == 1 else "mixed") + head = next((a for a in assignments if a["tensor_class"] == "lm_head"), None) + return { + "policy": policy, + "head_policy": ("quantized" if head and head["treatment"] == "quantized" + else "native" if head else "unknown"), + # A GGUF is a WEIGHTS container. The KV cache dtype is a llama.cpp + # runtime flag that the file does not carry, and this measurement does + # not run llama.cpp at all -- it runs the sealed transformers forward. + # "unknown" would suggest the artifact declares something we failed to + # read; it declares nothing, which is a different fact. + "kv_cache_dtype": "not_applicable", + "mtp_included": any(a["tensor_class"] == "mtp" for a in assignments), + "activation_quantization": None, + "assignments": assignments, + } + + +def measured_bits_per_weight(surface: "GgufSurface") -> Optional[float]: + """The artifact's own bits/weight, over every tensor it stores.""" + elements = 0 + payload = 0 + for row in surface.container.tensors.values(): + traits = BLOCK_TRAITS.get(row["type"]) + if traits is None: + return None + per_block, block_bytes = traits + n = int(row["elements"]) + elements += n + payload += n // per_block * block_bytes + return (8.0 * payload / elements) if elements else None + + +def scope_report(surface: "GgufSurface") -> Dict[str, Any]: + """What `gguf_surface.py scope` writes: the scope plus its provenance.""" + scope = measured_scope(surface) + return { + "schema": GGUF_SCOPE_SCHEMA, + "scope": scope, + "measured_bits_per_weight": measured_bits_per_weight(surface), + "source": { + "repo": surface.repo, + "revision": surface.revision, + "architecture": surface.architecture, + "files": [row["name"] for row in surface.file_records], + "file_hash_verification": surface.file_hash_verification, + "checkpoint_identity_sha256": surface.checkpoint_identity_sha256(), + "quant_metadata": surface.quant_metadata, + "read_from": ("the container's OWN tensor table -- every type, " + "element count and block size -- never from the build " + "name, which for an unsloth 'UD' build claims one type " + "and holds four"), + }, + "seal_disclosure": SEAL_DISCLOSURE, + "scope_disclosure": SCOPE_DISCLOSURE, + } + + +def load_gguf_surface( + locations: List[str], + *, + repo: Optional[str] = None, + revision: Optional[str] = None, + require_file_hashes: bool = True, + indexer_full_layers: Optional[Sequence[int]] = None, + config: Any = None, +) -> GgufSurface: + """Open every file of one artifact, gate its geometry and census it. + + ``indexer_full_layers`` is the official config's ``indexer_types == "full"`` + set (``indexer_full_layers_from_config``); required for glm-dsa, ignored + for glm5next. + """ + files = [GgufFile(location) for location in locations] + container = GgufContainer(files) + arch = arch_from_container(container, config) + if config is not None: + resolved_config = config if isinstance(config, Mapping) else config.to_dict() + resolved_config = resolved_config.get("text_config", resolved_config) + derived_full = indexer_full_layers_from_config(resolved_config, arch) + if indexer_full_layers is not None and derived_full is not None \ + and tuple(indexer_full_layers) != derived_full: + raise _fail("explicit indexer_full_layers disagrees with config.indexer_types") + if derived_full is not None: + indexer_full_layers = derived_full + census = build_census(container, arch, indexer_full_layers=indexer_full_layers) + if revision is not None and _REVISION.fullmatch(revision) is None: + raise _fail("--gguf-revision must be the immutable 40-hex repo commit") + + file_records: List[Dict[str, Any]] = [] + verification = "skipped" + if container.remote: + if require_file_hashes: + raise _fail( + "remote (https) GGUF locations support metadata dry-runs and audits " + "only; a measurement needs local files plus `gguf_surface.py " + "verify-files` (or an explicit --skip-gguf-hashes disclosure)" + ) + for f in container.files: + file_records.append({"name": f.name, "bytes": f.size, "sha256": None}) + else: + marker: Optional[Dict[str, Any]] = None + marker_path = Path(container.files[0].location).resolve().parent / "gguf-files-verified.json" + if marker_path.is_file(): + marker = _read_json(marker_path, "gguf-files-verified.json") + if marker.get("schema") != GGUF_FILES_VERIFIED_SCHEMA or marker.get("all_hashed") is not True: + raise _fail(f"stale/foreign {marker_path} - re-run verify-files") + by_name = {row["name"]: row for row in marker.get("files", [])} + for f in container.files: + row = by_name.get(f.name) + if row is None or int(row["bytes"]) != f.size: + raise _fail( + f"{marker_path} does not cover {f.name} at its current size - " + "re-run verify-files" + ) + file_records.append({"name": f.name, "bytes": f.size, "sha256": row["sha256"]}) + verification = "full" + elif require_file_hashes: + raise _fail( + "whole-file sha256 marker absent: run `python gguf_surface.py " + f"verify-files --file ...` first (writes {marker_path.name}), or pass " + "--skip-gguf-hashes for a disclosed unverified read" + ) + else: + for f in container.files: + file_records.append({"name": f.name, "bytes": f.size, "sha256": None}) + + type_census: Dict[str, int] = {} + for row in container.tensors.values(): + type_census[row["type"]] = type_census.get(row["type"], 0) + 1 + quant_keys = ("general.file_type", "general.quantization_version", "general.quantized_by", + "quantize.imatrix.file", "quantize.imatrix.dataset", + "quantize.imatrix.entries_count", "quantize.imatrix.chunks_count") + quant_metadata = {key: container.kv[key] for key in quant_keys if key in container.kv} + return GgufSurface( + container=container, + census=census, + repo=repo, + revision=revision or "unpinned-local-snapshot", + architecture=container.architecture, + file_records=tuple(file_records), + file_hash_verification=verification, + type_census=type_census, + scope_policy=_scope_policy(container, census), + quant_metadata=quant_metadata, + ) + + +def verify_file_hashes(locations: List[str]) -> Dict[str, Any]: + """Hash every local GGUF; write gguf-files-verified.json next to the first.""" + paths = [Path(location).resolve() for location in locations] + for path in paths: + if not path.is_file(): + raise _fail(f"GGUF file absent: {path}") + started = time.monotonic() + rows = [{"name": path.name, "bytes": path.stat().st_size, "sha256": _sha256_file(path)} + for path in paths] + record = { + "schema": GGUF_FILES_VERIFIED_SCHEMA, + "files": rows, + "all_hashed": True, + "elapsed_seconds": time.monotonic() - started, + } + marker = paths[0].parent / "gguf-files-verified.json" + marker.write_text(json.dumps(record, indent=2, sort_keys=True) + "\n", encoding="utf-8") + record["marker"] = str(marker) + return record + + +# --------------------------------------------------------------------------- +# decode: routed experts, MLA reconstruction, whole tensors +# --------------------------------------------------------------------------- + +def load_decoded_tensor(container: GgufContainer, gguf_name: str, device=None): + """Whole tensor -> fp32 in the OFFICIAL (row-major reversed-dims) shape.""" + row = container.tensors[gguf_name] + flat = dequant_bytes(row["type"], container.read_tensor(gguf_name), int(row["elements"]), + device=device) + return flat.reshape(hf_shape_of(row)) + + +def load_decoded_expert(container: GgufContainer, census: GgufCensus, *, + layer: int, expert: int, projection: str, device=None): + """One routed expert -> (fp32 [out, in] tensor, census row). + + ``device`` is handed straight to ``dequant_bytes``: the quantized slice is + what crosses the bus, and the decode lands the tensor where the slab + already is. Bitwise-identical to ``device=None`` by construction (same + kernels, same order) and by test. + """ + arch = census.arch + name = census.routed.get((layer, projection)) + if name is None: + raise _fail(f"no fused tensor for layer {layer} {projection}") + row = container.tensors[name] + rel, nbytes = expert_slice_range(row, expert, arch) + out_features, in_features = arch.projection_shape[projection] + flat = dequant_bytes(row["type"], container.read_tensor_range(name, rel, nbytes), + out_features * in_features, device=device) + tensor = flat.reshape(out_features, in_features) + return tensor, { + "tensor": official_expert_name(layer, expert, projection, arch), + "gguf_tensor": name, + "shard": row["file"], + "bytes": nbytes, + "ggml_type": row["type"], + "dtype": "float32-decoded", + } + + +def compose_kv_b(k, v, arch: GgufArch): + """Decoded attn_k_b [heads, rank, nope] + attn_v_b [heads, v, rank] -> + official kv_b_proj [heads*(nope+v), rank]. + + PROVEN arrangement (MLA_KV_B_ARRANGEMENT): per head the official rows are + [transpose(k_b[h]); v_b[h]] -- llama.cpp stores k_b per-head TRANSPOSED + for its MQA absorb trick. glm5next: rel-L2 0.0054 (Q8_0 error) vs every + other candidate >= 1.40; glm-dsa: EXACT equality on the BF16 build + (gguf-evidence/glmdsa-layout-audit.json), and the offline selftest re-runs + this composition on committed real windows. + """ + import torch + + heads, rank = arch.mla_heads, arch.mla_kv_lora_rank + k = k.reshape(heads, rank, arch.mla_k_nope) + v = v.reshape(heads, arch.mla_v_dim, rank) + k_t = k.transpose(1, 2).contiguous() + return torch.cat([k_t, v], dim=1).reshape(arch.kv_b_rows, rank).contiguous() + + +def reconstruct_kv_b(container: GgufContainer, census: GgufCensus, layer: int, + device=None): + """attn_k_b + attn_v_b -> official kv_b_proj, fp32 (see ``compose_kv_b``).""" + arch = census.arch + k_name = census.mla[(layer, "k_b")] + v_name = census.mla[(layer, "v_b")] + k_row, v_row = container.tensors[k_name], container.tensors[v_name] + k_flat = dequant_bytes(k_row["type"], container.read_tensor(k_name), int(k_row["elements"]), + device=device) + v_flat = dequant_bytes(v_row["type"], container.read_tensor(v_name), int(v_row["elements"]), + device=device) + return compose_kv_b(k_flat, v_flat, arch) + + +def audit_expert_placement(candidate, official_bf16, *, label: str, + shifts: Tuple[int, ...] = (1, 8, 64, 512)) -> Dict[str, Any]: + """Is the expert we decoded the expert the official checkpoint calls that? + + The fused GGUF tensor is [in, out, 288] and slot `e` is assumed to be HF + expert `e`. That assumption is exactly as unproven-by-inspection as the + kv_b_proj layout was, and exactly as silently wrong if it is off: a + permuted expert order decodes cleanly, closes every census, and measures + the wrong model. So it is checked numerically, the same way. + + `candidate` is the decoded slice (fp32, [rows, in]); `official_bf16` is the + official expert tensor, of which the leading `rows` rows are compared. The + aligned comparison must land at the QUANTIZATION error while every + row-shifted control lands at O(1) -- which simultaneously proves the slot + ordering, the row-major (reversed-dims) orientation and the projection + mapping, since a transposed read or a wrong projection fails it too. + """ + import torch + + cand = candidate.to(torch.float64) + official = official_bf16.to(torch.float64) + rows = int(cand.shape[0]) + if official.shape[0] < rows or official.shape[1] != cand.shape[1]: + raise _fail( + f"expert placement audit: candidate {tuple(cand.shape)} does not fit the official " + f"tensor {tuple(official.shape)}" + ) + + def _score(other): + cos = float(torch.nn.functional.cosine_similarity( + cand.flatten(), other.flatten(), dim=0)) + return {"cosine": cos, "rel_l2": float((cand - other).norm() / other.norm())} + + aligned = _score(official[:rows]) + controls: Dict[str, Dict[str, float]] = {} + for shift in shifts: + if shift + rows <= official.shape[0]: + controls[f"official_rows_shifted_by_{shift}"] = _score( + official[shift:shift + rows]) + if not controls: + raise _fail("expert placement audit needs at least one row-shifted control") + best_control = min(row["rel_l2"] for row in controls.values()) + ok = (aligned["rel_l2"] < 0.5 and best_control > 0.5 + and best_control > 4.0 * aligned["rel_l2"]) + audit = {"label": label, "rows_compared": rows, "aligned": aligned, + "controls": controls, "best_control_rel_l2": best_control, + "passed": bool(ok)} + if not ok: + raise _fail( + f"expert placement audit FAILED for {label}: aligned rel-L2 " + f"{aligned['rel_l2']:.4f} vs best control {best_control:.4f} - the fused " + "tensor's expert slot ordering or orientation is not what this adapter assumes" + ) + return audit + + +def audit_mla_placement(container: GgufContainer, census: GgufCensus, *, + layer: int, official_bf16) -> Dict[str, Any]: + """Re-prove the kv_b arrangement against the official BF16 tensor. + + `official_bf16` is the official kv_b_proj tensor (any float dtype). All + four candidate arrangements are scored; the shipped one must dominate. + Cosines are accumulated in float64 on CPU (audits never run on MPS). + + The head count is READ from the k_b row's own dims rather than assumed, so + the same function audits a full 64-head tensor and a cheap leading-head + WINDOW of one (which is what the offline selftest replays from committed + real bytes, and what a bandwidth-limited pre-flight would fetch). + """ + import torch + + k_name = census.mla[(layer, "k_b")] + v_name = census.mla[(layer, "v_b")] + k_row, v_row = container.tensors[k_name], container.tensors[v_name] + heads = int(k_row["dims"][2]) + if int(v_row["dims"][2]) != heads: + raise _fail(f"layer {layer}: attn_k_b covers {heads} heads, attn_v_b " + f"{int(v_row['dims'][2])} - not the same window") + if official_bf16.numel() != heads * 2 * MLA_HEAD_DIM * MLA_KV_LORA_RANK: + raise _fail( + f"official kv_b_proj has {official_bf16.numel()} elements but the {heads}-head " + f"window needs {heads * 2 * MLA_HEAD_DIM * MLA_KV_LORA_RANK} " + "(pass the matching leading rows)" + ) + official = official_bf16.to(torch.float64).reshape(heads * 2 * MLA_HEAD_DIM, + MLA_KV_LORA_RANK) + k = dequant_bytes(k_row["type"], container.read_tensor(k_name), + int(k_row["elements"])).reshape(heads, MLA_KV_LORA_RANK, MLA_HEAD_DIM) + v = dequant_bytes(v_row["type"], container.read_tensor(v_name), + int(v_row["elements"])).reshape(heads, MLA_HEAD_DIM, MLA_KV_LORA_RANK) + k_t = k.transpose(1, 2).contiguous() + candidates = { + "per_head_rows_kT_then_v": torch.cat([k_t, v], dim=1).reshape(-1, MLA_KV_LORA_RANK), + "per_head_rows_v_then_kT": torch.cat([v, k_t], dim=1).reshape(-1, MLA_KV_LORA_RANK), + "all_k_rows_then_all_v_rows": torch.cat( + [k_t.reshape(-1, MLA_KV_LORA_RANK), v.reshape(-1, MLA_KV_LORA_RANK)], dim=0), + "all_v_rows_then_all_k_rows": torch.cat( + [v.reshape(-1, MLA_KV_LORA_RANK), k_t.reshape(-1, MLA_KV_LORA_RANK)], dim=0), + } + scores: Dict[str, Dict[str, float]] = {} + for name, cand in candidates.items(): + c64 = cand.to(torch.float64) + cos = float(torch.nn.functional.cosine_similarity( + c64.flatten(), official.flatten(), dim=0)) + rel = float((c64 - official).norm() / official.norm()) + scores[name] = {"cosine": cos, "rel_l2": rel} + winner = max(scores, key=lambda name: scores[name]["cosine"]) + # The discriminator is rel-L2, not a cosine MARGIN. Two arrangements that + # share a leading block (per-head-k-then-v and all-k-then-all-v agree on + # head 0's k rows) have a cosine gap that shrinks as 1/(2*heads): measured + # 0.013 over the full 64 heads but 0.546 over a 2-head window, so an + # absolute cosine margin passes or fails depending on how much of the + # tensor was fetched. rel-L2 does not move: the right arrangement scores + # the QUANTIZATION error (~0.005 for Q8_0) and every wrong one scores O(1), + # at either window size. The gate therefore reads "the shipped arrangement + # reproduces the official weights and no other arrangement comes near". + runner_up_rel_l2 = min(scores[name]["rel_l2"] for name in scores + if name != MLA_KV_B_ARRANGEMENT) + shipped_rel_l2 = scores[MLA_KV_B_ARRANGEMENT]["rel_l2"] + ok = (winner == MLA_KV_B_ARRANGEMENT + and scores[MLA_KV_B_ARRANGEMENT]["cosine"] > 0.98 + and shipped_rel_l2 < 0.10 + and runner_up_rel_l2 > 0.50 + and runner_up_rel_l2 > 10.0 * shipped_rel_l2) + audit = {"layer": layer, "heads_audited": heads, "candidates": scores, + "shipped": MLA_KV_B_ARRANGEMENT, "winner": winner, + "shipped_rel_l2": shipped_rel_l2, "best_other_rel_l2": runner_up_rel_l2, + "passed": bool(ok)} + if not ok: + raise _fail( + f"MLA kv_b placement audit FAILED at layer {layer}: {scores} - the " + "converter's k_b/v_b layout differs from the proven arrangement" + ) + return audit + + +# --------------------------------------------------------------------------- +# expert source for stream_score's ExpertStreamer +# --------------------------------------------------------------------------- + +class GgufExpertSource: + """Routed experts decoded per (layer, expert, projection) from the GGUF. + + Mirrors NativeCheckpointSource's contract: ``load`` returns a tensor ready + for the shared install algebra (device move, fuse_gate_up, ONE bf16 + rounding, torch.equal close) plus a census row. os.pread-based reads are + thread-safe without per-thread handles. + + ``decode_device`` decides WHERE the block dequant runs. ``None`` is the + reference: the pool thread decodes on CPU and the consumer moves 33.5 MB of + fp32 per matrix to the accelerator. Anything else sends the 4.7 MB + quantized slice instead and decodes there, which is the difference between + 23.7 min/window and something a contributor can afford (see the module + docstring on `dequant_bytes` and docs/GGUF-MEASUREMENT.md). The two produce + bitwise-identical tensors; that is the acceptance test, not a hope. + + The consumer's ``payload_cpu.to(self.device)`` is a no-op when the decode + already landed on that device, so the fill loop needs no branch. + """ + + def __init__(self, surface: GgufSurface, decode_device=None): + self.surface = surface + self.decode_device = decode_device + self._lock = threading.Lock() + self.bytes_read = 0 + self.files_read: set = set() + + def routed_tensor_census(self, layers: Tuple[int, ...]) -> Dict[str, Any]: + arch = self.surface.arch + rows = [] + for layer in layers: + for projection in PROJECTIONS: + name = self.surface.census.routed.get((layer, projection)) + if name is None: + raise _fail(f"fused tensor absent for layer {layer} {projection}") + row = self.surface.container.tensors[name] + rows.append(row) + # per-expert byte cost is a function of the LAYER's ggml type, and the + # unsloth XL builds deliberately mix types across layers (Q4_K gate/up + # with three Q6_K down layers, ...). Reporting one layer's number as + # if it were the artifact's would understate the fetch ledger, so this + # reports the distinct sizes per projection and the exact total. + per_expert: Dict[str, Dict[str, Any]] = {} + streamed_bytes = 0 + for projection in PROJECTIONS: + sizes: Dict[str, int] = {} + for layer in layers: + row = self.surface.container.tensors[self.surface.census.routed[ + (layer, projection)]] + size = expert_slice_range(row, 0, arch)[1] + sizes[row["type"]] = size + streamed_bytes += size * arch.num_experts + per_expert[projection] = {"bytes_by_ggml_type": dict(sorted(sizes.items()))} + return { + "routed_tensor_count": len(layers) * arch.num_experts * len(PROJECTIONS), + "fused_gguf_tensors": len(rows), + "layers": [layers[0], layers[-1]] if layers else [], + "experts_per_layer": arch.num_experts, + "per_expert_bytes": per_expert, + "streamed_routed_bytes_total": streamed_bytes, + "types": sorted({row["type"] for row in rows}), + **({"mtp_layer_%d_fused_tensors_present_not_streamed" % arch.mtp_layer: all( + (arch.mtp_layer, p) in self.surface.census.routed for p in PROJECTIONS + )} if arch.mtp_layers else {}), + } + + def load(self, *, layer: int, expert: int, projection: str): + tensor, row = load_decoded_expert( + self.surface.container, self.surface.census, + layer=layer, expert=expert, projection=projection, + device=self.decode_device, + ) + with self._lock: + self.bytes_read += int(row["bytes"]) + self.files_read.add(row["shard"]) + return tensor, row + + +# --------------------------------------------------------------------------- +# per-layer subset reader for the layer-outer streamer (gguf-dequant-to-bf16) +# --------------------------------------------------------------------------- + +RESIDENT_LAYER = -1 # the key `layer_subsets` uses for embed/norm/head + + +def layer_partition(census: GgufCensus) -> Dict[int, List[str]]: + """layer index -> the GGUF tensor names the streamer loads for that layer. + + RESIDENT_LAYER carries the top-level tensors (token_embd, output_norm, + output). Shared-indexer copies are absent by construction (they are not in + ``direct_map``). Every other tensor of the container appears exactly once. + """ + out: Dict[int, List[str]] = {} + for gguf_name in census.direct_map: + match = _BLK.match(gguf_name) + out.setdefault(int(match.group(1)) if match else RESIDENT_LAYER, []).append(gguf_name) + for (layer, _half), gguf_name in census.mla.items(): + out.setdefault(layer, []).append(gguf_name) + for (layer, _projection), gguf_name in census.routed.items(): + out.setdefault(layer, []).append(gguf_name) + return {layer: sorted(names) for layer, names in out.items()} + + +def materialize_layer(surface: GgufSurface, layer: int, *, torch_dtype=None, + device=None, stats: Optional[Dict[str, Any]] = None, + only: Optional[Sequence[str]] = None) -> Dict[str, Any]: + """Every tensor of one decoder layer (or RESIDENT_LAYER) under its OFFICIAL name. + + ``only`` restricts the decode to the named official tensors (the streamer's + resident load asks one layer for just its router-correction BUFFER); a name + in ``only`` that the layer does not carry is a refusal. + + Decoded ON ``device`` (the quantized bytes cross the bus, not the fp32 + result): each GGUF tensor is dequantized once to fp32 by the proven kernels, + the MLA halves are composed into ``kv_b_proj`` (``compose_kv_b``), fused + expert tensors are sliced into the ``mlp.experts.{e}.{proj}.weight`` names + the HF converter expects, and the result is cast ONCE to ``torch_dtype`` + (bfloat16 by default) -- except the tensors the official tree stores as + float32 (``arch.official_f32_suffixes``), which stay fp32. Nothing here is + a guess: the name map, the kv_b arrangement, the expert slot order and the + F32-widened tensors were each proven bitwise against the official BF16 + release (gguf-evidence/glmdsa-layout-audit.json; module docstring). + + ``stats`` (optional) accumulates decoded tensor counts, bytes read and the + ggml type histogram so the runtime receipt can report them. + """ + import torch + + torch_dtype = torch_dtype or torch.bfloat16 + arch, container, census = surface.arch, surface.container, surface.census + partition = layer_partition(census) + if layer not in partition: + raise _fail(f"layer {layer} is not a layer of this artifact " + f"(known: {sorted(partition)})") + out: Dict[str, Any] = {} + counters = stats if stats is not None else {} + counters.setdefault("tensors_decoded", 0) + counters.setdefault("official_tensors_produced", 0) + counters.setdefault("gguf_bytes_read", 0) + counters.setdefault("ggml_types", {}) + + def note(row: Mapping[str, Any]) -> None: + counters["tensors_decoded"] += 1 + counters["gguf_bytes_read"] += int(row["bytes"]) + counters["ggml_types"][row["type"]] = counters["ggml_types"].get(row["type"], 0) + 1 + + def finish(hf_name: str, tensor) -> None: + if hf_name in out: + raise _fail(f"{hf_name} produced twice for layer {layer}") + want = torch.float32 if arch.official_dtype_for(hf_name) == "float32" else torch_dtype + out[hf_name] = tensor.to(want).contiguous() + counters["official_tensors_produced"] += 1 + + wanted = set(only) if only is not None else None + mla_seen: Dict[int, Dict[str, Any]] = {} + for gguf_name in partition[layer]: + role = classify_tensor(gguf_name, arch) + row = container.tensors[gguf_name] + if role[0] in ("top", "direct"): + hf_name = role[1] if role[0] == "top" else role[2] + if wanted is not None and hf_name not in wanted: + continue + finish(hf_name, load_decoded_tensor(container, gguf_name, device=device)) + note(row) + elif role[0] == "mla": + if wanted is not None and kv_b_hf_name(role[1], arch) not in wanted: + continue + mla_seen.setdefault(role[1], {})[role[2]] = gguf_name + note(row) + elif role[0] == "routed": + projection = role[2] + experts = [e for e in range(arch.num_experts) + if wanted is None + or official_expert_name(layer, e, projection, arch) in wanted] + if not experts: + continue + for expert in experts: + tensor, _row = load_decoded_expert(container, census, layer=layer, + expert=expert, projection=projection, + device=device) + finish(official_expert_name(layer, expert, projection, arch), tensor) + note(row) + else: # pragma: no cover - the census refused these already + raise _fail(f"{gguf_name}: unmapped tensor reached materialize_layer") + for mla_layer, halves in mla_seen.items(): + if set(halves) != {"k_b", "v_b"}: + raise _fail(f"layer {mla_layer}: MLA halves incomplete ({sorted(halves)})") + finish(kv_b_hf_name(mla_layer, arch), + reconstruct_kv_b(container, census, mla_layer, device=device)) + if wanted is not None and set(out) != wanted: + missing = sorted(wanted - set(out))[:5] + raise _fail(f"layer {layer} does not carry the requested tensors {missing}") + return out + + +def materialize_plan(surface: GgufSurface) -> Dict[str, Any]: + """What ``materialize_layer`` will do, as a receipt-ready summary (no reads).""" + arch, census = surface.arch, surface.census + partition = layer_partition(census) + return { + "architecture": arch.key, + "family": arch.family, + "layer_prefix": arch.layer_prefix, + "decoder_layers": arch.decoder_layers, + "mtp_layer": arch.mtp_layer if arch.mtp_layers else None, + "layers_with_tensors": sorted(l for l in partition if l != RESIDENT_LAYER), + "resident_tensors": [census.direct_map[n] for n in partition.get(RESIDENT_LAYER, [])], + "routed_layers": list(arch.routed_layers), + "experts_per_layer": arch.num_experts, + "mla_layers": list(census.mla_layers), + "kv_b_arrangement": MLA_KV_B_ARRANGEMENT, + "kv_b_shape": [arch.kv_b_rows, arch.mla_kv_lora_rank], + "shared_indexer_copies_not_loaded": len(census.shared_indexer_copies), + "official_f32_suffixes": list(arch.official_f32_suffixes), + "type_census": dict(surface.type_census), + } + +# --------------------------------------------------------------------------- +# materialized non-routed view (decoded safetensors under official HF names) +# --------------------------------------------------------------------------- + +def _official_dtype_for(hf_name: str, arch: GgufArch = GLM5NEXT) -> str: + return arch.official_dtype_for(hf_name) + + +def safetensors_header(path: Path) -> Dict[str, Any]: + """The JSON header of a safetensors file (name -> {dtype, shape, offsets}).""" + with Path(path).open("rb") as handle: + length = struct.unpack(" Dict[str, Any]: + """Check OFFICIAL_F32_SUFFIXES against the official tree's ACTUAL dtypes. + + The view has to be dtype-identical to a native build, and the suffix list is + a claim about the released checkpoint that could go stale. Wherever the + official shard is present this reads the real dtype out of its safetensors + header and refuses on any disagreement; shards that are absent (the GGUF + lane only strictly needs the vision-carrying ones) are COUNTED, not assumed + away, and the count lands in the view receipt. + """ + bf16_root = Path(bf16_root) + by_shard: Dict[str, List[str]] = {} + for name in names: + shard = weight_map.get(name) + if shard is None: + raise _fail(f"official index has no entry for {name}") + by_shard.setdefault(shard, []).append(name) + verified = 0 + unreadable_shards = [] + disagreements = [] + for shard, shard_names in sorted(by_shard.items()): + path = bf16_root / shard + if not path.is_file(): + unreadable_shards.append(shard) + continue + header = safetensors_header(path) + for name in shard_names: + info = header.get(name) + if info is None: + raise _fail(f"{shard} does not carry {name} despite the index saying so") + actual = _ST_DTYPE_TO_TORCH.get(info["dtype"], info["dtype"]) + if actual != _official_dtype_for(name, arch): + disagreements.append((name, actual, _official_dtype_for(name, arch))) + verified += 1 + if disagreements: + listed = ", ".join(f"{n}: official {a}, policy {p}" for n, a, p in disagreements[:5]) + raise _fail( + f"the official dtype policy is WRONG for {len(disagreements)} tensors ({listed}). " + "OFFICIAL_F32_SUFFIXES no longer describes the released checkpoint; the view would " + "not be dtype-identical to a native build" + ) + return {"tensors_checked_against_official_headers": verified, + "tensors_unchecked": len(names) - verified, + "shards_absent": len(unreadable_shards), + "policy_disagreements": 0} + + +def materialize_nonrouted_view( + surface: GgufSurface, + bf16_root: Path, + work_dir: Path, + *, + shard_bytes: int = 4 << 30, + progress: bool = True, +) -> Tuple[Path, Dict[str, Any]]: + """Decode every non-routed tensor into a from_pretrained-able directory. + + The view carries the official HF names/dtypes/shapes: decoded GGUF tensors + (bf16, or byte-exact F32 for the official-F32 set), the reconstructed + kv_b_proj per DSA layer, and the vision tower copied VERBATIM from the + official BF16 tree (the only part the artifact does not carry). config / + tokenizer / preprocessor files come from the BF16 tree. Routed experts are + ABSENT by construction -- stream_score's loader assertions + (missing==0, stray==0) apply unchanged. + + Reused across runs via a fingerprint stamp: the view is rebuilt only when + the artifact identity or this adapter changes. + """ + import torch + from safetensors import safe_open + from safetensors.torch import save_file + + bf16_root = Path(bf16_root).resolve() + bf16_index = _read_json(bf16_root / "model.safetensors.index.json", "official BF16 index") + official_map: Mapping[str, str] = bf16_index["weight_map"] + bijection = verify_nonrouted_bijection(surface.census, official_map.keys()) + vision_names = sorted(name for name in official_map if name.startswith("model.visual.")) + dtype_audit = verify_official_dtypes(bf16_root, official_map, + surface.census.nonrouted_hf_names(), surface.arch) + + view = Path(work_dir).resolve() / "gguf-nonrouted-view" + stamp_path = view / "gguf-view-receipt.json" + fingerprint = { + "schema": GGUF_VIEW_RECEIPT_SCHEMA, + "checkpoint_identity_sha256": surface.checkpoint_identity_sha256(), + "adapter_sha256": _sha256_file(Path(__file__).resolve()), + "vision_tensor_count": len(vision_names), + } + if stamp_path.is_file(): + stamp = _read_json(stamp_path, "gguf view stamp") + if all(stamp.get(key) == value for key, value in fingerprint.items()): + record = dict(stamp) + record["reused"] = True + return view, record + view.mkdir(parents=True, exist_ok=True) + + started = time.monotonic() + container, census = surface.container, surface.census + jobs: List[Tuple[str, str]] = [] # (hf_name, kind:gguf_name|mla:layer|vision) + for gguf_name, hf_name in census.direct_map.items(): + jobs.append((hf_name, "gguf:" + gguf_name)) + for layer in census.mla_layers: + jobs.append((kv_b_hf_name(layer, surface.arch), "mla:%d" % layer)) + for name in vision_names: + jobs.append((name, "vision")) + jobs.sort(key=lambda item: item[0]) + + bf16_handles: Dict[str, Any] = {} + + def official_tensor(name: str): + shard = official_map[name] + handle = bf16_handles.get(shard) + if handle is None: + shard_path = bf16_root / shard + if not shard_path.is_file(): + raise _fail( + f"BF16 shard {shard} absent ({name}); the GGUF view needs only " + "the vision-carrying shards of the official tree" + ) + handle = safe_open(str(shard_path), framework="pt", device="cpu") + bf16_handles[shard] = handle + return handle.get_tensor(name) + + shard_index = 0 + current: Dict[str, Any] = {} + current_bytes = 0 + total_tensor_bytes = 0 + weight_map: Dict[str, str] = {} + shard_files: List[str] = [] + tensor_manifest: List[Dict[str, Any]] = [] + counts = {"decoded_bf16": 0, "f32_passthrough": 0, "mla_reconstructed": 0, + "vision_copied": 0} + + def flush() -> None: + nonlocal shard_index, current, current_bytes + if not current: + return + name = "gguf-view-%05d.safetensors" % shard_index + save_file(current, str(view / name), metadata={"format": "pt"}) + shard_files.append(name) + for tensor_name in current: + weight_map[tensor_name] = name + shard_index += 1 + current = {} + current_bytes = 0 + + for hf_name, kind in jobs: + if kind == "vision": + tensor = official_tensor(hf_name) + counts["vision_copied"] += 1 + source = "official_bf16_vision" + elif kind.startswith("mla:"): + layer = int(kind.split(":", 1)[1]) + tensor = reconstruct_kv_b(container, census, layer).to(torch.bfloat16) + counts["mla_reconstructed"] += 1 + source = "mla_reconstruction" + else: + gguf_name = kind.split(":", 1)[1] + row = container.tensors[gguf_name] + decoded = load_decoded_tensor(container, gguf_name) + if _official_dtype_for(hf_name, surface.arch) == "float32": + if row["type"] != "F32": + raise _fail( + f"{hf_name} is float32 in the official tree but {row['type']} " + "in the GGUF - dtype policy would not round-trip" + ) + tensor = decoded # byte-exact F32 passthrough + counts["f32_passthrough"] += 1 + else: + tensor = decoded.to(torch.bfloat16) + counts["decoded_bf16"] += 1 + source = "gguf:" + row["type"] + tensor = tensor.contiguous() + nbytes = tensor.numel() * tensor.element_size() + if current_bytes + nbytes > shard_bytes and current: + flush() + current[hf_name] = tensor + current_bytes += nbytes + total_tensor_bytes += nbytes + tensor_manifest.append({"tensor": hf_name, "source": source, + "dtype": str(tensor.dtype).replace("torch.", ""), + "shape": list(tensor.shape)}) + if progress and len(tensor_manifest) % 400 == 0: + print(json.dumps({"gguf_view_progress": len(tensor_manifest), + "of": len(jobs)}), flush=True) + flush() + for handle in bf16_handles.values(): + close = getattr(handle, "__exit__", None) + if close is not None: + try: + close(None, None, None) + except Exception: # noqa: BLE001 - handle cleanup is best-effort + pass + + (view / "model.safetensors.index.json").write_text( + json.dumps({"metadata": {"total_size": total_tensor_bytes}, + "weight_map": weight_map}), + encoding="utf-8", + ) + for entry in bf16_root.iterdir(): + if entry.name == "model.safetensors.index.json" or entry.is_dir(): + continue + if entry.suffix in (".json", ".jinja", ".txt", ".model"): + target = view / entry.name + if not target.exists(): + target.write_bytes(entry.read_bytes()) + + record = dict(fingerprint) + record.update({ + "view_path": str(view), + "tensor_count": len(weight_map), + "tensor_bytes": total_tensor_bytes, + "shard_count": len(shard_files), + "counts": counts, + "bijection": bijection, + "official_dtype_audit": dtype_audit, + "tensor_manifest_sha256": _sha256_bytes(_canonical_json(tensor_manifest)), + "elapsed_seconds": time.monotonic() - started, + "reused": False, + }) + stamp_path.write_text(json.dumps(record, indent=2, sort_keys=True) + "\n", encoding="utf-8") + return view, record + + +def verify_view_nonrouted_values( + surface: GgufSurface, view: Path, *, sample: int = 8 +) -> Dict[str, Any]: + """Spot-check the materialized view against a fresh decode (regression net).""" + import torch + from safetensors import safe_open + + index = _read_json(Path(view) / "model.safetensors.index.json", "view index") + weight_map = index["weight_map"] + names = sorted(surface.census.direct_map.items()) + import numpy as np + + rng = np.random.default_rng(0x66F) + picks = [names[int(i)] for i in rng.choice(len(names), size=min(sample, len(names)), + replace=False)] + handles: Dict[str, Any] = {} + compared = 0 + for gguf_name, hf_name in picks: + shard = weight_map[hf_name] + handle = handles.get(shard) + if handle is None: + handle = safe_open(str(Path(view) / shard), framework="pt", device="cpu") + handles[shard] = handle + stored = handle.get_tensor(hf_name) + fresh = load_decoded_tensor(surface.container, gguf_name) + if _official_dtype_for(hf_name, surface.arch) == "float32": + expected = fresh + else: + expected = fresh.to(torch.bfloat16) + if not torch.equal(stored, expected): + raise _fail(f"materialized view differs from a fresh decode: {hf_name}") + compared += 1 + return {"spot_checked_tensors": compared, "all_equal": True} + + +def gguf_reader_identity(runner_path, *, surface: GgufSurface) -> Dict[str, Any]: + """Identity binding this adapter + the runner (mirrors dione_reader_identity).""" + body = { + "schema": GGUF_READER_IDENTITY_SCHEMA, + "mode": "offline_gguf_block_dequant_to_bf16_all_tensors_for_logit_measurement", + "serving_kernel": False, + "bits": None, + "codebook": "ggml-block-quants", + "supported_types": list(SUPPORTED_TYPES), + "type_census": dict(surface.type_census), + "mla_kv_b_arrangement": MLA_KV_B_ARRANGEMENT, + "adapter_sha256": _sha256_file(Path(__file__).resolve()), + "runner_sha256": _sha256_file(Path(runner_path).resolve()), + "seal_disclosure": SEAL_DISCLOSURE, + } + body["runtime_reader_sha256"] = _sha256_bytes(_canonical_json(body)) + return body + + +def surface_summary(surface: GgufSurface) -> Dict[str, Any]: + return { + "schema": GGUF_SURFACE_SCHEMA, + "gguf_repo": surface.repo, + "gguf_revision": surface.revision, + "architecture": surface.architecture, + "format": GGUF_FORMAT, + "files": list(surface.file_records), + "file_hash_verification": surface.file_hash_verification, + "tensor_count": len(surface.container.tensors), + "type_census": dict(surface.type_census), + "quant_metadata": surface.quant_metadata, + "scope_policy": surface.scope_policy, + "streamed_routed_modules": (len(surface.arch.routed_layers) * surface.arch.num_experts + * len(PROJECTIONS)), + **({"mtp_layer_%d_experts" % surface.arch.mtp_layer: + "present_in_artifact_identity_never_streamed_or_executed"} + if surface.arch.mtp_layers else {}), + "shared_indexer_copies_not_loaded": len(surface.census.shared_indexer_copies), + "mla_reconstructed_layers": list(surface.census.mla_layers), + "mla_kv_b_arrangement": MLA_KV_B_ARRANGEMENT, + "nonrouted_tensors_from_artifact": len(surface.census.nonrouted_hf_names()), + "checkpoint_identity_sha256": surface.checkpoint_identity_sha256(), + "seal_disclosure": SEAL_DISCLOSURE, + } + + +# --------------------------------------------------------------------------- +# standalone CLI +# --------------------------------------------------------------------------- + +def main() -> int: + parser = argparse.ArgumentParser(description=__doc__) + sub = parser.add_subparsers(dest="command", required=True) + + p = sub.add_parser("dry-run", help="validate an artifact from headers alone " + "(local paths or https URLs, no weight reads)") + p.add_argument("--file", action="append", required=True, dest="files", + help="every .gguf of the artifact (repeat; local path or https URL)") + p.add_argument("--repo") + p.add_argument("--revision") + p.add_argument("--bf16-index", type=Path, + help="official BF16 model.safetensors.index.json for the " + "non-routed bijection census (optional but recommended)") + + p = sub.add_parser("verify-files", help="sha256 every local file; write the marker") + p.add_argument("--file", action="append", required=True, dest="files") + + p = sub.add_parser("scope", help="emit the per-tensor-class recipe MEASURED " + "from the container's own tensor table") + p.add_argument("--file", action="append", required=True, dest="files") + p.add_argument("--repo") + p.add_argument("--revision") + p.add_argument("--out", type=Path, help="write here instead of stdout") + + p = sub.add_parser("audit-mla", help="re-prove the kv_b_proj reconstruction " + "arrangement against the official BF16 tensor") + p.add_argument("--file", action="append", required=True, dest="files") + p.add_argument("--layer", type=int, default=3) + p.add_argument("--bf16", type=Path, required=True, + help="official BF16 root (index + the shard carrying kv_b_proj)") + p.add_argument("--repo") + p.add_argument("--revision") + + p = sub.add_parser("audit-expert", help="prove the fused tensor's expert SLOT ordering " + "and orientation against the official BF16 expert") + p.add_argument("--file", action="append", required=True, dest="files") + p.add_argument("--layer", type=int, default=3) + p.add_argument("--expert", type=int, default=0) + p.add_argument("--projection", default="gate_proj", choices=PROJECTIONS) + p.add_argument("--bf16", type=Path, required=True, + help="official BF16 root (index + the shard carrying that expert)") + p.add_argument("--repo") + p.add_argument("--revision") + + args = parser.parse_args() + if args.command == "verify-files": + record = verify_file_hashes(args.files) + print(json.dumps(record, sort_keys=True)) + return 0 + + surface = load_gguf_surface( + args.files, repo=getattr(args, "repo", None), + revision=getattr(args, "revision", None), + require_file_hashes=False, + ) + summary = surface_summary(surface) + if args.command == "scope": + report = scope_report(surface) + text = json.dumps(report, indent=2, sort_keys=True) + "\n" + if getattr(args, "out", None): + args.out.write_text(text, encoding="utf-8") + else: + sys.stdout.write(text) + return 0 + if args.command == "dry-run": + if args.bf16_index and args.bf16_index.is_file(): + official = json.loads(args.bf16_index.read_text(encoding="utf-8"))["weight_map"] + summary["nonrouted_bijection"] = verify_nonrouted_bijection( + surface.census, official.keys()) + print(json.dumps(summary, indent=2, sort_keys=True)) + return 0 + if args.command in ("audit-mla", "audit-expert"): + from safetensors import safe_open + + bf16_root = args.bf16.resolve() + index = _read_json(bf16_root / "model.safetensors.index.json", "official BF16 index") + + def _official(name: str): + shard = index["weight_map"].get(name) + if shard is None: + raise _fail(f"official index lacks {name}") + with safe_open(str(bf16_root / shard), framework="pt", device="cpu") as handle: + return handle.get_tensor(name) + + if args.command == "audit-mla": + summary["mla_placement_audit"] = audit_mla_placement( + surface.container, surface.census, layer=args.layer, + official_bf16=_official(kv_b_hf_name(args.layer))) + else: + name = official_expert_name(args.layer, args.expert, args.projection) + decoded, _ = load_decoded_expert( + surface.container, surface.census, + layer=args.layer, expert=args.expert, projection=args.projection) + summary["expert_placement_audit"] = audit_expert_placement( + decoded, _official(name), label=name) + print(json.dumps(summary, indent=2, sort_keys=True)) + return 0 + raise _fail(f"unknown command {args.command}") + + +if __name__ == "__main__": + try: + raise SystemExit(main()) + except ValueError as error: + print(f"ERROR: {error}", file=sys.stderr) + raise SystemExit(2) diff --git a/raw/retained/engines--tools--hf_capture.py b/raw/retained/engines--tools--hf_capture.py new file mode 100644 index 0000000000000000000000000000000000000000..affa917db198b23d5d70b455c741480919b3b481 --- /dev/null +++ b/raw/retained/engines--tools--hf_capture.py @@ -0,0 +1,3043 @@ +#!/usr/bin/env python3 +"""Portable hidden-form capture: an HF checkpoint + a token panel -> a SEALED fidelity dataset. + +Why this file exists +-------------------- +`bin/fidelity-dataset capture` documented a three-step architecture whose step 1 +could not be run by anybody outside our own campaign: + + * it delegates to ``engines/tools/hidden_replay.py``, which was never committed to + the public repository, so a fresh clone cannot capture at all; + * that wrapper hard-codes ``HIDDEN_WIDTH = 4096`` and + ``EXPECTED_VOCAB = 154880``, i.e. GLM-5.3-Flash's exact geometry, so it + refuses every other checkpoint including the public 0.1B architectural + fixture; + * it drives ``stream_score.py``, our sealed streaming engine, which needs the + campaign's sealed-corpus machinery; and + * having run, it wrote a *capture tree*, never the dataset the ``--out`` flag + promised. + +This module is the missing counterpart: one forward pass per panel window +through a plain ``transformers`` model, the lm_head input tapped with a forward +pre-hook, and the result assembled into a dataset that +``docs/FIDELITY-DATASET-SPEC.md`` accepts. It has no GLM-5.3-Flash constants +and no dependency on ``stream_score.py``; it works for any causal LM whose +``get_output_embeddings()`` is a bias-free ``nn.Linear``-shaped head. + +THE CUT (state it, never assume it) +----------------------------------- +The captured tensor is the model's final hidden state as handed to ``lm_head`` +-- i.e. after the text model's final norm and immediately before the head +matmul -- taken as the head module's INPUT via ``register_forward_pre_hook``. +Replay applies the head ONLY. This is the same cut as +``engines/tools/hidden_replay.py`` and as Festr's kimi-k3 hidden-replay convention, +which is what makes the two artifact families comparable. + +Storage consequence: a hidden-form record costs ``hidden_size * 2`` bytes per +scored position, a logit-form record ``vocab_size * 4``. The manifest records +both so the ratio is arithmetic, not a claim. + +Determinism +----------- +This tool captures ONE cold run. Cross-run determinism is not asserted here -- +it is established by capturing twice in two separate processes and running +``fidelity-dataset compare --self-compare``, which is the spec's SC-1 +reproduction confirmation. The ``determinism`` block therefore declares +``run_count: 1`` and names the self-compare as the outstanding evidence, rather +than claiming an identity this process never observed. +""" + +from __future__ import annotations + +import argparse +import hashlib +import json +import os +import stat +import struct +import sys +import time +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple + +REPO = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +sys.path.insert(0, os.path.join(REPO, "bin")) + +from fidelity import dsformat as F # noqa: E402 +from fidelity import dsmanifest, dsvalidate # noqa: E402 +from fidelity import panel as panel_contract # noqa: E402 +from fidelity import codepin # noqa: E402 + +sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) + +import layer_outer # noqa: E402 +import race_fetch # noqa: E402 +# "The capital of France is" -> " Paris", asked of every capture, as one extra +# window through the schedule that is already running. It is the only guard here +# that sees a shard which loaded as ZEROS: the names, the shapes and the tensor +# count are all correct in that case, and only the model's own output is wrong. +import generation_probe # noqa: E402 +# The capture loop is the other multi-hour silence in a stage log: a root +# capture is 25 windows of full-vocabulary forward and, under the layer-outer +# schedule, N layers x 25 windows inside a single `run_panel` call. Same meter, +# same file-vs-TTY rule -- see engines/tools/progress.py. +import progress as progress_meter # noqa: E402 + +TOOL_VERSION = "hf_capture/1" + +# Recorded in `runtime.capture_tool.mechanism`, which is NOT an input to +# `stack_fingerprint_sha256` -- deliberately. The fingerprint is what +# `dscompare` reads to decide `stack_relation`, and a cross-stack verdict +# stamps `usable_as_floor: false` and attaches a 1e-2-class bias block. The +# layer-outer schedule is proven bit-identical to the window-outer one on two +# architectures (see docs/LAYER-OUTER.md), so charging a capture a +# comparability penalty for it would be asserting a difference the digests say +# is not there. It is still written down, in the sealed receipt, where a +# reader can see which loop produced their tensors. +SCHEDULE_MECHANISM = { + layer_outer.SCHEDULE_WINDOW_OUTER: + "transformers forward pass; forward pre-hook on model.get_output_embeddings()", + layer_outer.SCHEDULE_LAYER_OUTER: + "transformers forward pass, layer-outer/window-inner schedule: for each decoder " + "layer the model's own forward is run once per window with the layers below " + "replaying their memoised output and the layers above suspending, so each " + "layer's weights are materialised once for the whole panel. Windows are pushed " + "through sequentially, never batched. Forward pre-hook on " + "model.get_output_embeddings(), fired by the model's own epilogue after the " + "last layer", +} + +CUT_POINT = "after_final_rmsnorm_before_lm_head" +CUT_STATEMENT = ( + "the final hidden state handed to lm_head -- after the text model's final " + "norm and immediately before the head matmul -- captured as the head " + "module's input via torch.nn.Module.register_forward_pre_hook; replay " + "applies the head ONLY (no final norm at replay time: the capture already " + "sits after it). Same cut as engines/tools/hidden_replay.py and as Festr's " + "kimi-k3 hidden-replay qualification." +) + +# The checkpoint identity algorithm. The spec REQUIRES +# weights.checkpoint_identity_sha256 but ships no portable way to compute one +# for a generic HF checkpoint, so this file defines one and names it in the +# dataset instead of emitting an unexplained hex string. +CHECKPOINT_IDENTITY_ALGORITHM = ( + "sha256 over the canonical JSON {\"algorithm\": , \"files\": " + "[{\"name\", \"size\", \"sha256\"}, ...]} of every *.safetensors shard plus " + "config.json in the checkpoint directory, sorted by name; for a llama.cpp GGUF " + "tree the shards are every *.gguf of the one build directory (name = " + "/) and config.json is the official release's copy beside it" +) + + +def fail(message: str, code: int = 1) -> "SystemExit": + print("hf_capture: ERROR: %s" % message, file=sys.stderr, flush=True) + return SystemExit(code) + + +def log(**fields: Any) -> None: + print(json.dumps(fields, sort_keys=True), flush=True) + + +# --------------------------------------------------------------------------- +# checkpoint identity +# --------------------------------------------------------------------------- + + +def checkpoint_identity(model_dir: str, + workers: Optional[int] = None) -> Tuple[str, List[Dict[str, Any]]]: + """sha256 over the sorted per-file (name, size, sha256) census. + + The per-file digests are independent, so they are computed in parallel + (hashlib releases the GIL); the census is assembled in sorted name order + exactly as before, so the identity value is unchanged. Sequential, this + was 22 minutes of a 33-minute GLM-5.3 cold run on an NVMe host. + """ + from concurrent.futures import ThreadPoolExecutor + + names = sorted(name for name in os.listdir(model_dir) + if name.endswith(".safetensors") or name == "config.json") + # a GGUF tree keeps its one build under /*.gguf (see + # layer_outer.gguf_files_in); those are the shards of this checkpoint + for sub in sorted(os.listdir(model_dir)): + path = os.path.join(model_dir, sub) + if os.path.isdir(path): + names.extend(sorted(os.path.join(sub, n) for n in os.listdir(path) + if n.endswith(".gguf"))) + names = sorted(set(names) | {n for n in os.listdir(model_dir) if n.endswith(".gguf")}) + if workers is None: + workers = max(1, min(16, (os.cpu_count() or 2) - 1)) + with ThreadPoolExecutor(max_workers=workers) as pool: + digests = list(pool.map( + lambda name: F.sha256_file(os.path.join(model_dir, name)), names)) + files = [] + for name, digest in zip(names, digests): + full = os.path.join(model_dir, name) + files.append({"name": name, "size": os.path.getsize(full), "sha256": digest}) + doc = {"algorithm": CHECKPOINT_IDENTITY_ALGORITHM, "files": files} + payload = json.dumps(doc, sort_keys=True, separators=(",", ":")).encode("utf-8") + return hashlib.sha256(payload).hexdigest(), files + + +# --------------------------------------------------------------------------- +# panel +# --------------------------------------------------------------------------- + + +class Panel(object): + """A sealed token panel: window metadata plus the token/mask .npy arrays. + + The upstream panel (brandonmusic/GLM-5.3-Flash-BF16-Teacher-Logits, + calibration/panel-v1) digests its arrays by FILE sha256, while the dataset + spec digests token ids by compact-JSON sha256. Both are recorded: the + per-record ``attention_mask_sha256`` we emit is the file digest of the mask + bytes we write, which are byte-identical to the upstream .npy, so the + upstream anchor survives into the dataset and can be re-checked. + """ + + def __init__(self, root: str, panel_id: str, source: str, receipt_sha256: Optional[str], + windows: Sequence[Dict[str, Any]], synthetic: bool = False, + tokenizer: Optional[Dict[str, Any]] = None): + self.root = root + self.panel_id = panel_id + self.source = source + self.receipt_sha256 = receipt_sha256 + # Before a resolved binding is applied both names hold the raw shipped + # file digest for backward-compatible unbound captures. Binding keeps + # the byte identity here while replacing ``receipt_sha256`` with the + # receipt's verified semantic/self-sealed identity. + self.receipt_file_sha256 = receipt_sha256 + self.windows = list(windows) + self.synthetic = synthetic + self.tokenizer = tokenizer or {} + + +def load_panel(panel_dir: str, role: str, limit: Optional[int], + tokenizer_id: Optional[str], vocab_size: int) -> Panel: + """Read a quant-pipeline.glm53-token-panel.v1 tree from disk.""" + import numpy as np + + panel_json = os.path.join(panel_dir, "panel.json") + if not os.path.isfile(panel_json): + raise fail("no panel.json under %s" % panel_dir) + doc = json.loads(open(panel_json, "r", encoding="utf-8").read()) + schema = doc.get("schema") + if schema != "quant-pipeline.glm53-token-panel.v1": + raise fail("unexpected panel schema %r" % schema) + rows = [w for w in doc.get("windows", []) if role in (None, "", w.get("role"))] + rows.sort(key=lambda w: w["window_id"]) + if limit is not None: + rows = rows[:limit] + if not rows: + raise fail("no windows with role=%r in %s" % (role, panel_json)) + + arrays = os.path.join(panel_dir, "arrays") + windows = [] + for row in rows: + token_path = os.path.join(arrays, "%s.tokens.npy" % row["window_id"]) + if not os.path.isfile(token_path): + raise fail("panel window %s: missing %s" % (row["window_id"], token_path)) + got = F.sha256_file(token_path) + if got != row["token_ids_sha256"]: + raise fail("panel window %s: token file digest %s != sealed %s" + % (row["window_id"], got[:12], row["token_ids_sha256"][:12])) + ids = np.load(token_path, allow_pickle=False) + mask_path = _find_mask(arrays, row, ids.shape[0]) + got_mask = F.sha256_file(mask_path) + if got_mask != row["attention_mask_sha256"]: + raise fail("panel window %s: mask digest %s != sealed %s" + % (row["window_id"], got_mask[:12], row["attention_mask_sha256"][:12])) + mask = np.load(mask_path, allow_pickle=False) + if mask.shape[0] != ids.shape[0]: + raise fail("panel window %s: mask len %d != tokens len %d" + % (row["window_id"], mask.shape[0], ids.shape[0])) + if int(ids.max()) >= vocab_size: + raise fail("panel window %s: token id %d >= vocab_size %d -- this panel was " + "built for a different tokenizer" + % (row["window_id"], int(ids.max()), vocab_size)) + windows.append({ + "window_id": row["window_id"], + "role": row.get("role"), + "domain": row.get("domain"), + "document_id": row.get("document_id"), + "prediction_positions": int(row["prediction_positions"]), + "token_ids": [int(v) for v in ids], + "token_file_sha256": got, + "mask_bytes": open(mask_path, "rb").read(), + "mask_sha256": got_mask, + "mask": mask, + }) + + receipt = os.path.join(panel_dir, "panel.receipt.json") + return Panel( + root=panel_dir, panel_id="panel--%s" % os.path.basename(panel_dir.rstrip("/")), + source=panel_json, receipt_sha256=F.sha256_file(receipt) if os.path.isfile(receipt) else None, + windows=windows, + tokenizer={"id": tokenizer_id, "repository": tokenizer_id, "revision": None, + "vocab_size": vocab_size, "add_special_tokens": False, + "chat_template_applied": False}) + +def _is_canonical_sha256(value: Any) -> bool: + return (isinstance(value, str) and len(value) == 64 + and all(char in "0123456789abcdef" for char in value)) + + +def bind_resolved_panel_tokenizer(panel: Panel, args: argparse.Namespace) -> None: + """Apply the exact tokenizer and receipt identities from a verified binding. + + ``load_panel`` can only infer a repository-like tokenizer id from the + legacy panel tree. Once ``run_capture`` has verified the exact resolved + panel contract against local panel and tokenizer bytes, that inferred + identity is strictly weaker and must not leak into the dataset manifest. + + A receipt has two deliberately distinct hashes: its declared semantic + identity (including the legacy field-absent and modern self-blank sealing + conventions) and the hash of its shipped bytes. The latter must still + match what ``load_panel`` read before the former replaces the manifest + identity. + """ + evidence = getattr(args, "panel_binding_evidence", None) + if evidence is None: + return + if not isinstance(evidence, dict): + raise fail("panel binding REFUSED: verified binding evidence is not an object") + binding = evidence.get("binding") + if not isinstance(binding, dict): + raise fail("panel binding REFUSED: verified binding is not an object") + tokenizer = binding.get("tokenizer") + if not isinstance(tokenizer, dict): + raise fail("panel binding REFUSED: verified binding has no tokenizer identity") + receipt = binding.get("receipt") + if not isinstance(receipt, dict): + raise fail("panel binding REFUSED: verified binding has no receipt identity") + receipt_seal_mode = receipt.get("receipt_seal_mode") + if receipt_seal_mode not in ("self-blank", "legacy-field-absent"): + raise fail("panel binding REFUSED: unsupported receipt_seal_mode %r" + % receipt_seal_mode) + + declared_receipt_sha256 = receipt.get("declared_receipt_sha256") + if not _is_canonical_sha256(declared_receipt_sha256): + raise fail("panel binding REFUSED: declared_receipt_sha256 is not canonical " + "lowercase SHA-256") + receipt_file_sha256 = receipt.get("receipt_file_sha256") + if not _is_canonical_sha256(receipt_file_sha256): + raise fail("panel binding REFUSED: receipt_file_sha256 is not canonical " + "lowercase SHA-256") + observed_receipt_file_sha256 = panel.receipt_file_sha256 + if not _is_canonical_sha256(observed_receipt_file_sha256): + raise fail("panel binding REFUSED: load_panel did not hash panel.receipt.json") + if receipt_file_sha256 != observed_receipt_file_sha256: + raise fail("panel binding REFUSED: receipt_file_sha256 mismatch: binding %s, " + "observed %s" % (receipt_file_sha256, + observed_receipt_file_sha256)) + + # JSON round-trip is a detached, plain-data copy and preserves the exact + # schema-compatible identity resolved by fidelity.panel. Mutate only after + # every receipt check so a refusal cannot leave a half-bound panel. + resolved_tokenizer = json.loads(json.dumps( + tokenizer, sort_keys=True, separators=(",", ":"), + ensure_ascii=False, allow_nan=False)) + panel.tokenizer = resolved_tokenizer + panel.receipt_sha256 = declared_receipt_sha256 + + +def _find_mask(arrays: str, row: Dict[str, Any], length: int) -> str: + """The upstream panel shares one causal mask across windows of equal length.""" + named = os.path.join(arrays, "%s.mask.npy" % row["window_id"]) + if os.path.isfile(named): + return named + shared = os.path.join(arrays, "causal-mask-%d.npy" % length) + if os.path.isfile(shared): + return shared + for name in sorted(os.listdir(arrays)): + if name.startswith("causal-mask-") and name.endswith(".npy"): + if F.sha256_file(os.path.join(arrays, name)) == row["attention_mask_sha256"]: + return os.path.join(arrays, name) + raise fail("panel window %s: no attention mask array found in %s" + % (row["window_id"], arrays)) + + +# --------------------------------------------------------------------------- +# model +# --------------------------------------------------------------------------- + + +REPORT_OBSERVED = "_load_report_observed" +REPORT_AUGMENTED = "_load_report_has_conversion_errors" + + +class _FullLoadingReport: + """Make `from_pretrained`'s load report tell the whole truth. + + `output_loading_info=True` does not hand back `transformers`' + `LoadStateDictInfo`; it hands back `LoadStateDictInfo.to_dict()`, and that + method says, in its own source: + + # Does not include the `conversion_errors` to be coherent with legacy + # reporting in the tests + + `conversion_errors` is where a failure of the MoE `WeightConverter` lands -- + the converter that, for `zai-org/GLM-5.3-BF16`, is responsible for 57,600 of + 59,585 checkpoint tensors (96.7%). A guard that reads only the dict is + blind to the failure of 96.7% of the checkpoint by construction. + + So for the duration of the load we wrap `to_dict` to also emit + `conversion_errors` (and `skipped_pp_keys`), plus a flag saying the wrap + took effect. If this build of `transformers` has no such class or method, + the flag stays false and `load_report` refuses to call the load verified + rather than reporting a clean bill of health it never checked. + """ + + def __init__(self) -> None: + self.target = None + self.original = None + + def __enter__(self) -> "_FullLoadingReport": + try: + from transformers.utils.loading_report import LoadStateDictInfo + except Exception: # pragma: no cover - older/newer transformers + return self + original = getattr(LoadStateDictInfo, "to_dict", None) + if original is None: # pragma: no cover + return self + + def to_dict(self_inner): + doc = dict(original(self_inner)) + doc["conversion_errors"] = dict(getattr(self_inner, "conversion_errors", {}) or {}) + doc["skipped_pp_keys"] = set(getattr(self_inner, "skipped_pp_keys", set()) or set()) + doc[REPORT_AUGMENTED] = True + return doc + + self.target, self.original = LoadStateDictInfo, original + LoadStateDictInfo.to_dict = to_dict + return self + + def __exit__(self, *exc) -> bool: + if self.target is not None: + self.target.to_dict = self.original + return False + + +def _from_pretrained(cls, model_dir: str, torch_dtype, **extra): + """`from_pretrained` plus the load report, across the dtype-kwarg rename. + + The report is what tells us whether the checkpoint actually populated the + model. It is requested here rather than reconstructed later because only + `from_pretrained` knows the checkpoint-name -> parameter-name mapping (a + MoE checkpoint may ship 256 per-expert matrices that the model holds as one + fused tensor, so comparing key sets by hand is wrong). + + Every return marks whether a report was actually OBSERVED. It used to + return a bare ``{}`` on the no-report path, which downstream read as "no + missing keys" -- i.e. an unexamined load and a clean load were the same + value. They are not the same fact and must not be the same value. + """ + with _FullLoadingReport(): + for kwargs in ({"dtype": torch_dtype}, {"torch_dtype": torch_dtype}): + try: + out = cls.from_pretrained(model_dir, output_loading_info=True, + **kwargs, **extra) + except TypeError as exc: + if "dtype" not in str(exc): + # A TypeError from INSIDE the load is not a signature + # mismatch. Retrying under a different kwarg name would + # hide it, and the final fallback would then return a + # model with no report at all. + raise + continue + if isinstance(out, tuple): + info = dict(out[1] or {}) + info[REPORT_OBSERVED] = out[1] is not None + return out[0], info + return out, {REPORT_OBSERVED: False} + # Very old / unusual classes: take the model without a report and say so. + return (cls.from_pretrained(model_dir, torch_dtype=torch_dtype, **extra), + {REPORT_OBSERVED: False}) + + +# `transformers` 5.16.1 `quantizers/quantizer_finegrained_fp8.py:195`: +# +# layer_overrides = FP8Experts._impl_tp_layer_overrides.get(impl) +# ... +# updated_plan = {k: layer_overrides.get(v, v) for k, v in base_plan.items()} +# +# `_impl_tp_layer_overrides` has exactly one key, `deepgemm_megamoe`, and +# `config._experts_implementation` is still None when `get_hf_quantizer` runs, +# so `layer_overrides` is None and the comprehension raises -- but only for a +# config whose parallel plan is NON-EMPTY. Every FP8 `deepseek_v4` repo is in +# that set (`DeepseekV4Config.base_model_ep_plan` has 7 entries), which is why +# `deepseek-ai/DeepSeek-V4-Flash-0731` -- 4.6M downloads -- does not load at +# all on this build, on ANY device. +_FP8_TP_PLAN_BUG = "'NoneType' object has no attribute 'get'" + + +def _is_fp8_tp_plan_bug(exc: BaseException) -> bool: + import traceback as _tb + + if not isinstance(exc, AttributeError) or _FP8_TP_PLAN_BUG not in str(exc): + return False + return any("quantizer_finegrained_fp8.py" in frame.filename + and frame.name == "update_tp_plan" + for frame in _tb.extract_tb(exc.__traceback__)) + + +def neutralize_parallel_plan(config) -> List[str]: + """Empty the tensor/expert parallel plans on a config and its sub-configs. + + Those plans are a MAP FROM MODULE PATH TO SHARDING KIND. They are consulted + only when the model is being split across ranks (`tp_plan=`, a device mesh, + `accelerate`'s parallel loader); a single-process load -- which is every + load this tool performs -- never reads them. Emptying them is therefore + inert for the forward pass, and it is the SMALLEST edit that walks around + the FP8 quantizer defect above. + + The alternative that also "works" is a trap and is deliberately not offered: + `from_pretrained(..., experts_implementation="deepgemm_megamoe")` makes the + load succeed, because that is the one key `_impl_tp_layer_overrides` has -- + and then the first forward pass dies in + `integrations/moe.py:get_interface` with + + KeyError: `deepgemm_megamoe` is not a valid experts implementation + registered in the `ExpertsInterface` + + i.e. it buys a model that loads and cannot run. Measured, not assumed: + `docs/NEW-ARCHITECTURES-FEASIBILITY.md`. + + Returns the dotted names of the plans it actually emptied, for the receipt. + """ + emptied: List[str] = [] + + def strip(node, prefix: str) -> None: + for attr in ("base_model_tp_plan", "base_model_ep_plan"): + if getattr(node, attr, None): + setattr(node, attr, {}) + emptied.append(prefix + attr) + for name in ("text_config", "vision_config", "audio_config"): + child = getattr(node, name, None) + if child is not None and hasattr(child, "__dict__"): + strip(child, prefix + name + ".") + + strip(config, "") + return emptied + + +def _model_config(model_dir, trust_remote_code=False, code_revision=None, + code_repository=None): + """Resolve native or explicitly pinned classes before any model code runs.""" + import transformers + + codepin.validate_options(trust_remote_code, code_revision, code_repository) + raw = codepin.raw_config(model_dir) + bundle = None + custom_cls = None + if trust_remote_code: + bundle = codepin.prepare(raw, code_revision, code_repository) + config_reference = bundle.references.get("AutoConfig") + if config_reference: + config_cls = bundle.load_class(config_reference) + config = config_cls.from_dict(raw) + else: + config = transformers.AutoConfig.from_pretrained( + model_dir, trust_remote_code=False) + reference = (bundle.references.get("AutoModelForImageTextToText") + or bundle.references.get("AutoModelForCausalLM")) + custom_cls = bundle.load_class(reference) + bundle.verify_imports() + else: + # Explicit False disables both auto_map execution and interactive trust + # prompts, while allowing native model_type dispatch for legacy names. + config = transformers.AutoConfig.from_pretrained( + model_dir, trust_remote_code=False) + return config, custom_cls, bundle + + +def load_model(model_dir: str, device: str, dtype_name: str, + device_map: Any = None, max_memory: Optional[Dict[Any, str]] = None, + offload_folder: Optional[str] = None, + drop_parallel_plan: bool = False, trust_remote_code: bool = False, + code_revision: Optional[str] = None, + code_repository: Optional[str] = None): + """Instantiate the checkpoint, optionally without ever materialising it whole. + + `device_map` exists for the reason `docs/GLM53-ROOT-FEASIBILITY.md` R2 + gives: with `device_map=None` `transformers` materialises the entire model + in CPU RAM and this function then calls `.to(device)`. At + `zai-org/GLM-5.3-BF16`'s 1,486.8 GB that exceeds the largest rentable RAM + and the whole VRAM of an 8x H200 node, so the default path cannot load the + root model on any machine we can rent. When a `device_map` is passed the + model is dispatched by `accelerate` instead, and `.to(device)` is SKIPPED -- + calling it on a dispatched model raises. + """ + import torch + import transformers + + torch_dtype = {"bfloat16": torch.bfloat16, "float16": torch.float16, + "float32": torch.float32}[dtype_name] + config, custom_cls, bundle = _model_config( + model_dir, trust_remote_code, code_revision, code_repository) + architectures = list(getattr(config, "architectures", None) or []) + extra: Dict[str, Any] = {"config": config, "trust_remote_code": False} + if drop_parallel_plan: + emptied = neutralize_parallel_plan(config) + # Pass the edited config explicitly; otherwise `from_pretrained` reads + # config.json again and the edit never reaches the quantizer. + extra["config"] = config + log(stage="parallel_plan_dropped", plans=emptied) + if device_map is not None: + extra["device_map"] = device_map + if max_memory: + extra["max_memory"] = max_memory + if offload_folder: + extra["offload_folder"] = offload_folder + if device_map is not None: + try: + import accelerate # noqa: F401 + except Exception: + raise fail( + "--device-map needs `accelerate`, which is not installed. Without it " + "transformers materialises the WHOLE model in CPU RAM and this tool then " + "calls .to(--device); for zai-org/GLM-5.3-BF16 that is 1,486.8 GB and it " + "cannot succeed anywhere. Install accelerate, or drop --device-map and " + "accept the whole-model-resident path.") + model = None + info: Dict[str, Any] = {} + errors = [] + candidates = ([custom_cls] if custom_cls is not None else + [getattr(transformers, name, None) for name in architectures]) + for cls in candidates: + if cls is None: + continue + name = cls.__name__ + try: + model, info = _from_pretrained(cls, model_dir, torch_dtype, **extra) + break + except Exception as exc: # pragma: no cover - depends on the checkpoint + if _is_fp8_tp_plan_bug(exc) and not drop_parallel_plan: + raise fail( + "REFUSED: this transformers build cannot even BEGIN to load this FP8 " + "checkpoint. `FineGrainedFP8HfQuantizer.update_tp_plan` rewrites the " + "config's tensor/expert parallel plan through " + "`FP8Experts._impl_tp_layer_overrides.get(config._experts_implementation)`, " + "which is None for every implementation except `deepgemm_megamoe` and " + "is ALWAYS None at this point in the load, so the rewrite raises " + "AttributeError on any FP8 config whose parallel plan is non-empty " + "(deepseek_v4 ships 7 entries). This is an upstream defect, not a " + "property of the artifact. The safe walk-around is " + "--drop-parallel-plan, which empties those plans -- they are read " + "only when the model is split across ranks, which this tool never " + "does. Do NOT instead pass experts_implementation=deepgemm_megamoe: " + "that loads and then dies on the first forward pass. (%s: %s: %s)" + % (name, type(exc).__name__, exc)) + errors.append("%s: %s: %s" % (name, type(exc).__name__, exc)) + if model is None and custom_cls is None: + for auto_name in ("AutoModelForCausalLM", "AutoModelForImageTextToText"): + cls = getattr(transformers, auto_name, None) + if cls is None: + continue + try: + model, info = _from_pretrained(cls, model_dir, torch_dtype, **extra) + break + except Exception as exc: + if _is_fp8_tp_plan_bug(exc) and not drop_parallel_plan: + raise fail( + "REFUSED: transformers' FP8 quantizer crashed rewriting this config's " + "parallel plan before any weight was read (upstream defect; see " + "--drop-parallel-plan). %s: %s: %s" + % (auto_name, type(exc).__name__, exc)) + errors.append("%s: %s: %s" % (auto_name, type(exc).__name__, exc)) + if model is None: + raise fail("could not instantiate the model (%s)" % "; ".join(errors)) + if bundle is not None: + bundle.verify_imports() + model._qfs_verified_code = bundle + model.eval() + if device_map is None: + model.to(device) + return model, config, info + + +def _base_capture(value: Optional[str]) -> Optional[Dict[str, Any]]: + """`--base-capture` -> the schema's object, not the raw string. + + `dataset.base_capture` is `{dataset_sha256, capture_content_digest, + repository, revision, note}` or null. The flag used to be written straight + through, so ANY capture that named its intended root was refused by the + validator the capture itself runs -- after the forward pass had been paid + for. A bare `repo` or `repo@revision` is the common case and is accepted; + a JSON object is passed through so the digests can be pinned. + """ + if value in (None, ""): + return None + text = value.strip() + if text.startswith("{"): + doc = json.loads(text) + if not isinstance(doc, dict): + raise fail("--base-capture JSON must be an object, got %s" % type(doc).__name__) + doc.setdefault("dataset_sha256", None) + return doc + if text.startswith("hf://"): + text = text[len("hf://"):] + repository, _, revision = text.partition("@") + return {"dataset_sha256": None, "capture_content_digest": None, + "repository": repository or None, "revision": revision or None, + "note": "named by --base-capture; digests not pinned because the " + "comparison partner was not read at capture time"} + + +def _key_list(value: Any) -> List[str]: + if not value: + return [] + try: + return sorted(str(k) for k in value) + except TypeError: # pragma: no cover - a report shape we do not know + return [str(value)] + +def load_unexpected_tensor_allowlist( + path: str, artifact_sha256: Optional[str] = None, + canonical_names_sha256: Optional[str] = None) -> Dict[str, Any]: + """Load one exact, byte-bound set of intentionally unused checkpoint keys.""" + try: + raw = open(path, "rb").read() + except OSError as exc: + raise fail("cannot read --unexpected-tensors-allowlist %s: %s" % (path, exc)) + try: + names = json.loads(raw.decode("utf-8")) + except (UnicodeDecodeError, ValueError) as exc: + raise fail("unexpected-tensor allowlist is not UTF-8 JSON: %s" % exc) + if not isinstance(names, list) or not names: + raise fail("unexpected-tensor allowlist must be a non-empty JSON array") + if any(not isinstance(name, str) or not name for name in names): + raise fail("every unexpected-tensor allowlist entry must be a non-empty string") + if len(names) != len(set(names)): + duplicates = sorted(name for name in set(names) if names.count(name) > 1) + raise fail("unexpected-tensor allowlist contains duplicate name(s): %s" + % ", ".join(duplicates[:6])) + expected = sorted(names) + canonical = json.dumps(expected, sort_keys=True, separators=(",", ":")).encode("utf-8") + raw_digest = hashlib.sha256(raw).hexdigest() + names_digest = hashlib.sha256(canonical).hexdigest() + for label, supplied, actual in ( + ("--unexpected-tensors-allowlist-sha256", artifact_sha256, raw_digest), + ("--unexpected-tensors-name-sha256", canonical_names_sha256, names_digest)): + if supplied is not None and supplied != actual: + raise fail("%s mismatch: supplied %s, observed %s" % (label, supplied, actual)) + return { + "schema": "malaiwah.unexpected-tensor-allowlist-binding.v1", + "artifact_file": os.path.basename(path), + "artifact_bytes": len(raw), + "artifact_sha256": raw_digest, + "canonical_sorted_names_sha256": names_digest, + "expected_count": len(expected), + "expected_keys": expected, + } + + +def load_weights_license( + path: str, expected_sha256: str, expected_bytes: int) -> Tuple[bytes, Dict[str, Any]]: + """Read one small regular license file through an exact byte identity.""" + if (not isinstance(expected_sha256, str) + or len(expected_sha256) != 64 + or any(char not in "0123456789abcdef" for char in expected_sha256)): + raise fail("--weights-license-sha256 must be lowercase 64-hex") + if (isinstance(expected_bytes, bool) + or not isinstance(expected_bytes, int) + or not 0 < expected_bytes <= 1024 * 1024): + raise fail("--weights-license-bytes must be in 1..1048576") + fd = None + try: + fd = os.open(path, os.O_RDONLY | getattr(os, "O_NOFOLLOW", 0)) + info = os.fstat(fd) + if not stat.S_ISREG(info.st_mode): + raise fail("--weights-license-file is not a regular file") + if info.st_size != expected_bytes: + raise fail( + "--weights-license-file byte count mismatch: expected %d, observed %d" + % (expected_bytes, info.st_size)) + with os.fdopen(fd, "rb") as handle: + fd = None + raw = handle.read(expected_bytes + 1) + except SystemExit: + raise + except OSError as exc: + raise fail("cannot read --weights-license-file %s: %s" % (path, exc)) + finally: + if fd is not None: + os.close(fd) + if len(raw) != expected_bytes: + raise fail("--weights-license-file changed while it was read") + observed = hashlib.sha256(raw).hexdigest() + if observed != expected_sha256: + raise fail( + "--weights-license-file SHA-256 mismatch: expected %s, observed %s" + % (expected_sha256, observed)) + try: + raw.decode("utf-8") + except UnicodeDecodeError as exc: + raise fail("--weights-license-file is not UTF-8 text: %s" % exc) + return raw, { + "source_file": os.path.basename(path), + "dataset_path": "LICENSE", + "bytes": len(raw), + "sha256": observed, + } + + +def _unexpected_tensor_evidence( + report: Dict[str, Any], allowlist: Optional[Dict[str, Any]], + require_exact: bool) -> Optional[Dict[str, Any]]: + observed = sorted(report.get("unexpected_keys") or []) + if not observed and allowlist is None: + return None + if allowlist is None: + raise fail( + "REFUSED: %d checkpoint tensor(s) were not used by this architecture. " + "Broad acceptance is obsolete: pass a pinned --unexpected-tensors-allowlist " + "and both of its SHA-256 identities only after proving this exact set is an " + "intentionally unused public block. First keys: %s" + % (len(observed), ", ".join(observed[:6]))) + expected = list(allowlist["expected_keys"]) + observed_set = set() + duplicate_set = set() + for name in observed: + if name in observed_set: + duplicate_set.add(name) + observed_set.add(name) + duplicates = sorted(duplicate_set) + missing = sorted(set(expected) - observed_set) + extra = sorted(observed_set - set(expected)) + exact_match = observed == expected + evidence = dict(allowlist) + evidence.update({ + "observed_count": len(observed), + "observed_keys": observed, + "duplicate_observed_keys": duplicates, + "missing_keys": missing, + "extra_keys": extra, + "exact_match": exact_match, + }) + if duplicates or extra or (require_exact and not exact_match): + raise fail( + "REFUSED: unexpected checkpoint tensor list differs from the exact bound " + "allowlist; duplicates=%d [%s], missing=%d [%s], extra=%d [%s]. " + "Expected digest %s." + % (len(duplicates), ", ".join(duplicates[:6]), + len(missing), ", ".join(missing[:6]), len(extra), ", ".join(extra[:6]), + allowlist["canonical_sorted_names_sha256"])) + return evidence + + + + +def missing_weight_keys(info: Dict[str, Any]) -> List[str]: + """Parameters `transformers` had to INVENT because the checkpoint lacked them. + + `missing_keys` is not the whole set. `mismatched_keys` names parameters + that were present in the checkpoint at the wrong shape, and the loading + report `transformers` prints for them says, verbatim, + + Reinit due to size mismatch - ckpt: ... vs model: ... + + -- a randomly initialised tensor under a different heading. `transformers` + itself unions the two in `LoadStateDictInfo.missing_and_mismatched()`; this + function reads only `missing_keys` no longer. + """ + keys = set(_key_list(info.get("missing_keys"))) + for entry in (info.get("mismatched_keys") or []): + # (key, checkpoint_shape, model_shape) + keys.add(str(entry[0]) if isinstance(entry, (tuple, list)) and entry else str(entry)) + return sorted(keys) + + +def load_report(info: Dict[str, Any]) -> Dict[str, Any]: + """Everything the load told us, including what `to_dict()` drops. + + `observed` is false when no report was produced at all. That is NOT the + same as a clean report and this tool must never treat it as one: an + unexamined load is exactly the state in which a randomly-initialised model + gets measured and published. + """ + mismatched = [] + for entry in (info.get("mismatched_keys") or []): + if isinstance(entry, (tuple, list)) and len(entry) >= 3: + mismatched.append({"key": str(entry[0]), + "checkpoint_shape": list(entry[1]) if entry[1] else None, + "model_shape": list(entry[2]) if entry[2] else None}) + else: + mismatched.append({"key": str(entry), "checkpoint_shape": None, + "model_shape": None}) + conversion = info.get("conversion_errors") + return { + "observed": bool(info.get(REPORT_OBSERVED)), + "conversion_errors_visible": bool(info.get(REPORT_AUGMENTED)), + "missing_keys": _key_list(info.get("missing_keys")), + "unexpected_keys": _key_list(info.get("unexpected_keys")), + "mismatched_keys": mismatched, + "error_msgs": [str(m) for m in (info.get("error_msgs") or [])], + "conversion_errors": {str(k): str(v) for k, v in (conversion or {}).items()}, + } + + +def refuse_on_load_report( + report: Dict[str, Any], allow_missing: bool, + unexpected_allowlist: Optional[Dict[str, Any]] = None, + require_exact_unexpected: bool = True) -> List[str]: + """CAPTURE-03. Refuse every unproven deviation from published weights. + + Unexpected checkpoint tensors proceed only when their complete set equals + a byte-bound and semantic-digest-bound exact allowlist. The non-exact mode + is solely a streamed per-layer early check; the aggregate report is always + checked exactly after all layers load. + """ + if not report["observed"]: + raise fail( + "REFUSED: this load produced NO loading report, so nothing here has checked " + "whether transformers randomly initialised parameters the checkpoint did not " + "provide. An unexamined load is not a clean load. Use a transformers build " + "whose from_pretrained honours output_loading_info=True.") + if not report["conversion_errors_visible"]: + raise fail( + "REFUSED: this transformers build did not expose `conversion_errors`, the " + "field that records a failure of the on-the-fly WeightConverter. For a fused-" + "expert MoE checkpoint that converter owns almost the entire checkpoint, so a " + "guard that cannot read the field cannot claim the weights are the artifact's.") + if report["conversion_errors"]: + keys = sorted(report["conversion_errors"]) + raise fail( + "REFUSED: %d weight CONVERSION error(s) during loading -- a WeightConverter " + "raised, so the parameters it was assembling were skipped and hold whatever " + "initialisation was left behind: %s%s. This is not overridable: an exception " + "mid-conversion means the parameter's contents are unknown, and there is no " + "disclosure that makes an unknown weight measurable. First error: %s" + % (len(keys), ", ".join(keys[:6]), + " (+%d more)" % (len(keys) - 6) if len(keys) > 6 else "", + report["conversion_errors"][keys[0]].strip().splitlines()[-1][:400])) + if report["error_msgs"]: + raise fail( + "REFUSED: %d error(s) were raised while copying the state dict into the model: " + "%s. Not overridable." % (len(report["error_msgs"]), + " | ".join(report["error_msgs"])[:600])) + reinitialised = sorted({m["key"] for m in report["mismatched_keys"]} + | set(report["missing_keys"])) + if reinitialised and not allow_missing: + mismatched = len(report["mismatched_keys"]) + raise fail( + "REFUSED: %d parameter(s) were NOT usable from the checkpoint and were randomly " + "initialised by transformers, so this model's forward pass is not the " + "artifact's: %s%s.%s Either this build of transformers cannot read the " + "checkpoint's storage format, or the checkpoint is incomplete. Pass " + "--allow-missing-weights only if you can defend a number measured on a " + "partially random model; it forces a BLOCKING disclosure." + % (len(reinitialised), ", ".join(reinitialised[:6]), + " (+%d more)" % (len(reinitialised) - 6) if len(reinitialised) > 6 else "", + (" %d of them were present at the WRONG SHAPE ('Reinit due to size " + "mismatch')." % mismatched) if mismatched else "")) + evidence = _unexpected_tensor_evidence( + report, unexpected_allowlist, require_exact_unexpected) + if evidence is not None: + report["unexpected_tensor_allowlist"] = evidence + return reinitialised + + +def head_module(model): + """Find a real registered output projection, never synthesize a head.""" + head = None + chosen = None + # Multimodal wrappers sometimes omit the outer getter but expose the + # language model's actual head. Only inspect named language-model paths; + # searching arbitrary Linear children could select an attention projection. + for path in ("", "language_model", "model.language_model"): + owner = model + for part in path.split(".") if path else (): + owner = getattr(owner, part, None) + if owner is None: + continue + getter = getattr(owner, "get_output_embeddings", None) + try: + candidate = getter() if callable(getter) else None + except (AttributeError, NotImplementedError): + candidate = None + if candidate is None and path: + candidate = getattr(owner, "lm_head", None) + if candidate is not None and hasattr(candidate, "weight"): + head = candidate + chosen = (path + "." if path else "") + ( + "get_output_embeddings()" if callable(getter) and candidate is not getattr(owner, "lm_head", None) + else "lm_head") + break + if head is None: + raise fail("no weight-bearing output head exposed by the model or its named " + "nested language_model; cannot capture hidden-replay") + names = [name for name, module in model.named_modules() if module is head] + if not names or getattr(head.weight, "ndim", None) != 2: + raise fail("output head must be a registered module with a rank-2 weight") + model._qfs_head_path = names[0] + model._qfs_head_resolution = chosen + if getattr(head, "bias", None) is not None: + raise fail("the head carries a bias; the hidden-replay contract assumes none " + "(HEAD gate). Capture in logit form instead.") + return head + + +# --------------------------------------------------------------------------- +# capture +# --------------------------------------------------------------------------- + + +def st_header(name: str, dtype: str, shape: Sequence[int], nbytes: int, + metadata: Optional[Dict[str, str]] = None) -> bytes: + """The safetensors prefix (` bytes: + return st_header(name, dtype, shape, len(raw), metadata) + raw + + +def _bf16_view(tensor): + """The tensor's bytes as a host uint16 view, without a `.tobytes()` copy.""" + import torch + + flat = tensor.detach().contiguous().cpu() + if flat.dtype != torch.bfloat16: + raise fail("refusing to store a %s tensor as BF16: that would be a lossy cast the " + "manifest claims is lossless" % flat.dtype) + return flat.view(torch.uint16).numpy() + + +def _bf16_raw(tensor) -> bytes: + return _bf16_view(tensor).tobytes() + + +def write_st_tensor(path: str, name: str, dtype: str, shape: Sequence[int], raw, + metadata: Optional[Dict[str, str]] = None) -> Dict[str, str]: + """Write one single-tensor safetensors file in two `write()` calls and hash as it goes. + + `raw` is any buffer exposing the tensor's little-endian bytes (a numpy + view of the bf16 tensor's storage). The bytes on disk are exactly + `st_bytes(...)`; what changes is that a 1.9 GB head no longer makes the + `tobytes()` copy, the `header + raw` concatenation copy, and a re-read to + hash. Returns the three frozen digests (`dsformat` section 5.1) of the + file just written: `file_sha256` over everything, `payload_sha256` over + the data region, `tensor_content_sha256` over the named tensor -- the + last two coincide for a single-tensor file whose data_offsets start at 0. + """ + view = memoryview(raw).cast("B") + header = st_header(name, dtype, shape, len(view), metadata) + whole = hashlib.sha256() + payload = hashlib.sha256() + whole.update(header) + with open(path, "wb") as handle: + handle.write(header) + step = 1 << 26 + for start in range(0, len(view), step): + chunk = view[start:start + step] + handle.write(chunk) + whole.update(chunk) + payload.update(chunk) + content = payload.hexdigest() + return {"file_sha256": whole.hexdigest(), "payload_sha256": content, + "tensor_content_sha256": content} + + +class _ForwardTimer(object): + """Forward time as the DEVICE saw it. + + `time.monotonic()` around `model(...)` on CUDA measures kernel launch, not + execution: the queued forwards drain inside the next layer's copy and get + billed to `layer_load` (review-efficiency section 2, caveat 1). On CUDA a + pair of events brackets each forward and `flush` -- called once per layer + boundary, where the load synchronises anyway -- adds the elapsed device + time to the window's slot. Anywhere else the wall clock is used and the + receipt says which (`resources.forward_timing`). + """ + + def __init__(self, device: str): + import torch + + self.cuda = str(device).startswith("cuda") and torch.cuda.is_available() + self.mode = "cuda-events" if self.cuda else "wall-clock" + self.pending: List[Tuple[int, Any, Any]] = [] + + def time(self, fn: Callable[[], None], index: int, seconds: List[float]) -> None: + # `try/finally`: under the layer-outer schedule every forward but the + # last layer's ends by unwinding (`layer_outer._Suspend`), and a clock + # that stopped only on a normal return would bill those forwards to + # nothing -- which is what the pre-2026-09-05 `time.monotonic()` did. + if not self.cuda: + started = time.monotonic() + try: + fn() + finally: + seconds[index] += time.monotonic() - started + return + import torch + + start = torch.cuda.Event(enable_timing=True) + end = torch.cuda.Event(enable_timing=True) + start.record() + try: + fn() + finally: + end.record() + self.pending.append((index, start, end)) + + def flush(self, seconds: List[float]) -> None: + if not self.pending: + return + import torch + + torch.cuda.synchronize() + for index, start, end in self.pending: + seconds[index] += start.elapsed_time(end) / 1000.0 + del self.pending[:] + + +def _source_files(args: argparse.Namespace) -> Dict[str, str]: + """Every file that decided the arithmetic, hashed. + + `layer_outer.py` is listed only when it ran: a window-outer capture is not + made by that file and must not claim to be. + """ + files = {"engines/tools/hf_capture.py": F.sha256_file(os.path.abspath(__file__))} + if args.schedule == layer_outer.SCHEDULE_LAYER_OUTER: + files["engines/tools/layer_outer.py"] = F.sha256_file( + os.path.abspath(layer_outer.__file__)) + streamer = getattr(args, "_weights_decode_streamer", None) + packed = getattr(streamer, "packed_plan", None) + if packed is not None: + import quant_stream + for name in quant_stream.source_files(packed): + files["engines/tools/" + name] = F.sha256_file( + os.path.join(os.path.dirname(__file__), name)) + gguf = getattr(streamer, "gguf_plan", None) + if gguf is not None: + names = ["gguf_surface.py"] + if "_bridge" in gguf: + names.append("gguf_qwen35.py") + for name in names: + files["engines/tools/" + name] = F.sha256_file( + os.path.join(os.path.dirname(__file__), name)) + files["bin/fidelity/panel.py"] = F.sha256_file( + os.path.abspath(panel_contract.__file__)) + files["bin/fidelity/codepin.py"] = F.sha256_file( + os.path.abspath(codepin.__file__)) + return files + + +def _run_layer_outer(args, model, streamer, panel, tap, forward_window, layer_seconds, + window_count=None): + """Drive `layer_outer.run_panel` and hand back one tapped hidden state per window. + + The saving is in weight LOADING, not compute. `on_layer_start` / + `on_layer_end` are where it is banked: with `--layer-residency stream` each + layer's weights are materialised once here for the whole panel and freed + before the next, so a run reads the checkpoint tree once instead of once + per window. + """ + if streamer is not None: + layers = streamer.layers + else: + try: + _, layers = layer_outer.find_decoder_layers(model) + except layer_outer.LayerOuterError as exc: + raise fail(str(exc)) + # The sanity probe rides along as ONE EXTRA WINDOW, so it costs one more + # forward per layer and no additional weight loading at all -- the layers are + # already being loaded for the panel. It is never a separate pass over the + # checkpoint, which for a 1.5 TB model would be the whole capture again. + if window_count is None: + window_count = len(panel.windows) + log(stage="schedule", schedule=args.schedule, residency=args.layer_residency, + layers=len(layers), windows=len(panel.windows), + forward_windows=window_count) + + # The window-outer loop discovers a ragged panel on the window that differs, + # having paid only for the windows before it. This schedule runs every + # window's forward before the record loop is reached, so the same refusal + # would arrive after the whole panel had been paid for. Check it first. + lengths = {len(window["token_ids"]) for window in panel.windows} + if len(lengths) > 1: + raise fail("a ragged panel is not supported: context lengths %s" + % sorted(lengths)) + + watcher = args.resident_watcher + timer: _ForwardTimer = args._forward_timer + resources = args._resources + + def on_layer_start(index: int) -> None: + if streamer is not None: + started = time.monotonic() + try: + streamer.load_layer(index) + except layer_outer.LayerOuterError as exc: + raise fail(str(exc)) + # Sampled with the layer loaded -- i.e. at the moment the schedule + # holds the most it ever holds. + resident = watcher.sample() + seconds = time.monotonic() - started + resources["layer_load_seconds"].append(seconds) + log(stage="layer_load", index=index, seconds=round(seconds, 3), + checkpoint_tensors=streamer.layer_counts.get(index), + resident_weight_bytes=resident) + + def on_layer_end(index: int) -> None: + # The forwards of this layer are queued on the device; settle them + # into the per-window clock here, once per layer, before the free. + timer.flush(layer_seconds) + if streamer is not None: + streamer.free_layer(index) + watcher.sample() + + # The layer-outer schedule runs len(layers) x len(windows) forwards inside + # ONE `run_panel` call, and only the per-layer boundary logged anything -- + # so the longest layer looked like a hang. The meter counts the real inner + # unit. `layer_seconds` is already being accumulated here; the meter reads + # nothing else and adds one integer increment per forward. + inner_meter = progress_meter.Progress( + len(layers) * window_count, label="layer-outer forwards", + interval=getattr(args, "progress_seconds", progress_meter.DEFAULT_INTERVAL_SECONDS), + ) + + def timed_forward(window_index: int) -> None: + try: + timer.time(lambda: forward_window(window_index), window_index, layer_seconds) + finally: + inner_meter.update(1) + + def collect(window_index: int): + window_id = (panel.windows[window_index]["window_id"] + if window_index < len(panel.windows) else "sanity-probe") + if len(tap) != 1: + raise fail("window %s: the head hook fired %d times, expected exactly 1 -- an " + "extra forward would misalign the capture" + % (window_id, len(tap))) + return tap[0] + + try: + hidden = layer_outer.run_panel(model, layers, timed_forward, window_count, + log, on_layer_start=on_layer_start, + on_layer_end=on_layer_end, collect=collect) + except layer_outer.LayerOuterError as exc: + raise fail(str(exc)) + finally: + inner_meter.close() + del tap[:] + if streamer is not None: + streamer.close() + for index, value in enumerate(hidden): + if value is None: # pragma: no cover - run_panel guarantees this + raise fail("window %d produced no hidden state under the layer-outer schedule" + % index) + return hidden + + +def _prepare_probe(args: argparse.Namespace, model_dir: str) -> Dict[str, Any]: + """Tokenize the sanity prompt, or say why the probe cannot run. + + A refusal here rather than a silent skip whenever the caller asked for + ENFORCEMENT: a fail-closed check that could not run has not passed. + """ + prompt = getattr(args, "sanity_prompt", generation_probe.DEFAULT_PROMPT) + expect = getattr(args, "sanity_expect", None) + if expect is not None and not expect.strip(): + expect = None + if not getattr(args, "sanity_check", True): + return {"stub": generation_probe.skipped( + "--no-sanity-check was passed; the probe did not run", + prompt=prompt, expect=expect, enforced=False)} + tokenizer, reason = generation_probe.load_tokenizer(model_dir) + if tokenizer is None: + if expect is not None: + raise fail( + "REFUSED: --sanity-expect %r asks for a FAIL-CLOSED generation check and " + "the tokenizer could not be loaded from %s (%s). A check that could not " + "run has not passed. Ship the tokenizer with the checkpoint, or pass " + "--sanity-expect '' to record the probe without enforcing it." + % (expect, model_dir, reason)) + return {"stub": generation_probe.skipped( + "tokenizer unavailable: %s" % reason, + prompt=prompt, expect=expect, enforced=False)} + try: + token_ids = generation_probe.encode_prompt(tokenizer, prompt) + except generation_probe.ProbeRefusal as exc: + raise fail(str(exc)) + log(stage="sanity_probe_planned", prompt=prompt, expect=expect, + prompt_tokens=len(token_ids)) + return {"token_ids": token_ids, "tokenizer": tokenizer, + "prompt": prompt, "expect": expect} + + +def _resolve_probe(args: argparse.Namespace, plan: Dict[str, Any], + logits: List[Any]) -> Dict[str, Any]: + if not plan: + return None + if "stub" in plan: + log(stage="sanity_probe", **{k: v for k, v in plan["stub"].items() + if k != "schema"}) + return plan["stub"] + if not logits: + if plan["expect"] is not None: + raise fail( + "REFUSED: the generation sanity probe was enforced but the model " + "returned no logits for its window. The head is where this capture " + "taps its hidden states, so a forward that produced none is a " + "malfunction of the capture itself, not of the probe.") + return generation_probe.skipped( + "the model returned no logits for the probe window", + prompt=plan["prompt"], expect=plan["expect"], enforced=False) + try: + verdict = generation_probe.evaluate(logits[0], plan["tokenizer"], + prompt=plan["prompt"], + expect=plan["expect"]) + except generation_probe.ProbeRefusal as exc: + raise fail(str(exc)) + log(stage="sanity_probe", status=verdict["status"], top1=verdict["top1_text"], + probability=round(verdict["top1_probability"], 6), + entropy_nats=round(verdict["entropy_nats"], 4), + uniform_entropy_nats=round(verdict["uniform_entropy_nats"], 4), + enforced=verdict["enforced"]) + return verdict + + +def _race_trailing_files(args: argparse.Namespace, model_dir: str, plan) -> List[str]: + """Every published file that is NOT a shard the plan already covers. + + Best effort by design: if the repo listing cannot be obtained the capture + still runs -- the shards are what the arithmetic needs -- and the log says + the sidecars were not enumerated rather than pretending they were absent. + """ + shards = set(plan.needed_at) + try: + if getattr(args, "race_simulate_source", None): + names = sorted(os.listdir(args.race_simulate_source)) + else: + from huggingface_hub import list_repo_files + + names = list_repo_files( + args.race_repo, revision=args.race_revision or args.model_revision, + token=os.environ.get("HF_TOKEN") or None) + except Exception as exc: # pragma: no cover - network/listing dependent + log(stage="race_sidecars_unlisted", reason="%s: %s" % (type(exc).__name__, exc)) + return [] + # A file `race_bootstrap` already pinned at this revision is not re-fetched: + # it is on disk, at the same revision, and in the simulate harness a + # re-fetch would also charge it the injected delay -- which would make the + # A/B compare two different file sets. + return [name for name in sorted(names) + if name not in shards and not name.startswith(".") + and not os.path.exists(os.path.join(model_dir, name))] + + +def _start_race_fetch(args: argparse.Namespace, model_dir: str): + """Start the overlapped fetch, or return None when --race-repo was not given. + + Refuses rather than degrading: race mode only means anything under the + layer-outer/stream schedule (that is the only loop that reads layer N after + layer N-1 has already been used), and it needs the checkpoint index, which is + the file that says which shard holds which layer. + """ + if not getattr(args, "race_repo", None): + return None + if args.schedule != layer_outer.SCHEDULE_LAYER_OUTER \ + or args.layer_residency != layer_outer.RESIDENCY_STREAM: + raise fail( + "--race-repo needs --schedule layer-outer --layer-residency stream. Every " + "other schedule materialises the whole model before the first window, so " + "there is no point at which a not-yet-arrived layer could be waited for; " + "overlapping the fetch with it would just be downloading during a load.") + if not os.path.isdir(model_dir): + raise fail("--race-repo needs --model to be a LOCAL directory holding the " + "bootstrap files (config.json, the tokenizer, " + "model.safetensors.index.json); the shards land into it. Got %r" + % model_dir) + try: + weight_map = race_fetch.read_index(model_dir) + plan = race_fetch.plan_shards(weight_map, args.race_layer_key_regex) + except race_fetch.RaceFetchError as exc: + raise fail(str(exc)) + revision = args.race_revision or args.model_revision + if getattr(args, "race_simulate_source", None): + download = race_fetch.simulated_downloader( + args.race_simulate_source, model_dir, args.race_simulate_seconds) + log(stage="race_simulated_downloader", source=args.race_simulate_source, + seconds_per_file=args.race_simulate_seconds, + warning="TEST HARNESS: this capture is not a measurement and is " + "stamped with a blocking disclosure") + else: + download = race_fetch.hf_downloader(args.race_repo, revision, model_dir, + token=os.environ.get("HF_TOKEN") or None) + # The whole repo, not just the shards: `fetch_target` pulls everything, and + # a race-mode tree that quietly lacked the release's own SHA256SUMS would + # skip a verification the ordinary path performs. They are queued AFTER every + # layer, so nothing ever waits on them. + trailing = _race_trailing_files(args, model_dir, plan) + fetcher = race_fetch.RaceFetcher(plan, download, workers=args.race_workers, + log=log, timeout=args.race_timeout_seconds, + trailing_files=trailing) + # A file already on disk (the bootstrap fetch put config/index/tokenizer + # there) is still enqueued: hf_hub_download is a no-op on an unchanged file + # and returns immediately, and enqueueing it keeps the gate's record the + # single source of truth about what has landed. + log(stage="race_plan", repo=args.race_repo, revision=revision, + shards=len(plan.needed_at), resident_shards=len(plan.resident_shards), + layers=plan.layer_count, unmatched_keys=plan.unmatched_keys, + layer_key_regex=plan.layer_key_regex) + fetcher.start() + return fetcher + + +def run_capture(args: argparse.Namespace) -> int: + import numpy as np + import torch + + started = time.monotonic() + trust_code = bool(getattr(args, "trust_remote_code", False)) + code_revision = getattr(args, "code_revision", None) + code_repository = getattr(args, "code_repository", None) + codepin.validate_options(trust_code, code_revision, code_repository) + # The one knob that flips every fp32 cuBLAS GEMM to TF32 from the environment + # with no torch-side trace. layer_outer refuses it for the trellis decode + # only; the router GEMMs of EVERY capture are fp32 and deserve the same + # refusal. Observed again at seal time and recorded in runtime_environment. + if str(os.environ.get("NVIDIA_TF32_OVERRIDE", "")).strip() == "1": + raise fail("NVIDIA_TF32_OVERRIDE=1 forces TF32 in cuBLAS regardless of the torch " + "flags; the capture's fp32 GEMMs would not be fp32. Unset it.") + model_dir = args.model + if not os.path.isdir(model_dir): + from huggingface_hub import snapshot_download + + model_dir = snapshot_download(args.model, revision=args.model_revision, + local_dir=args.model_cache) + log(stage="snapshot", repo=args.model, dir=model_dir) + if trust_code and code_repository is None: + raw = codepin.raw_config(model_dir) + mapping = raw.get("auto_map") or {} + if not isinstance(mapping, dict): + raise codepin.CodePinError("REFUSED: auto_map must be an object") + qualified = any(isinstance(entry, str) and "--" in entry + for value in mapping.values() + for entry in (value if isinstance(value, (list, tuple)) else [value])) + # Qualified auto_map references identify their own code repository; + # multiple foreign repositories require the user's explicit bundle. + origin = args.weights_repository or args.model + if not qualified and codepin.REPOSITORY.fullmatch(origin) and not os.path.isdir(origin): + code_repository = origin + + # RACE MODE. Start the background fetch before anything else touches the + # tree: from here on the checkpoint is arriving, not present. + if args.panel_binding: + try: + binding_raw = open(args.panel_binding, "rb").read() + expected_binding = json.loads(binding_raw.decode("utf-8")) + except (OSError, UnicodeDecodeError, ValueError) as exc: + raise fail("cannot read strict --panel-binding JSON: %s" % exc) + binding_file_sha = hashlib.sha256(binding_raw).hexdigest() + if binding_file_sha != args.panel_binding_sha256: + raise fail("--panel-binding-sha256 mismatch: supplied %s, observed %s" + % (args.panel_binding_sha256, binding_file_sha)) + try: + resolved_panel = panel_contract.resolve_panel( + args.panel, role=args.panel_role, + tokenizer_root=args.panel_tokenizer_root or model_dir) + except panel_contract.PanelError as exc: + raise fail("panel binding REFUSED: %s" % exc) + resolved_binding = resolved_panel.to_dict() + if not resolved_binding["tokenizer"]["files_verified"]: + raise fail("panel binding REFUSED: tokenizer files were not verified") + if resolved_binding != expected_binding: + raise fail("panel binding REFUSED: local panel/tokenizer bytes do not equal " + "the complete --panel-binding contract") + args.panel_binding_evidence = { + "binding_file": os.path.basename(args.panel_binding), + "binding_file_sha256": binding_file_sha, + "binding": resolved_binding, + # Loader-key equivalences panel.py admitted on tokenizer_config.json + # (never inside the binding, which names the ROOT's digests): + # each becomes a `tokenizer_config_loader_keys_ignored` disclosure. + "tokenizer_equivalences": resolved_panel.tokenizer_equivalences(), + } + else: + args.panel_binding_evidence = None + fetcher = _start_race_fetch(args, model_dir) + + # The checkpoint identity is a sha256 over EVERY shard, so in race mode it + # cannot be computed here -- most of the tree is still on the wire, and a + # digest over what happens to have landed would be an identity for a + # checkpoint that does not exist. It is computed at assembly time instead, + # once the fetch has joined, over the complete tree. Same preimage, same + # value; only the moment moves. + identity = identity_files = None + # S2-2: what the run cost, for the receipt (`capture_runtime.resources`). + # Filled in as the stages happen; assembled by `_resources_block`. + args._resources = {"identity_seconds": None, "resident_load_seconds": None, + "layer_load_seconds": [], "hidden_d2h_bytes": 0, + "seal_started": None} + args._forward_timer = _ForwardTimer(args.device) + if fetcher is None: + identity_started = time.monotonic() + identity, identity_files = checkpoint_identity(model_dir) + args._resources["identity_seconds"] = time.monotonic() - identity_started + log(stage="checkpoint_identity", sha256=identity, files=len(identity_files), + seconds=round(args._resources["identity_seconds"], 3)) + + layer_outer.reset_peak_memory(args.device) + max_memory = json.loads(args.max_memory) if args.max_memory else None + streamer = None + resident_started = time.monotonic() + if args.schedule == layer_outer.SCHEDULE_LAYER_OUTER \ + and args.layer_residency == layer_outer.RESIDENCY_STREAM: + # The whole point: never materialise the model, materialise one layer at + # a time. `load_model`'s path is not reachable from here -- it would + # allocate the 1,486.8 GB this schedule exists to avoid. + import transformers + + config, cls, bundle = _model_config( + model_dir, trust_code, code_revision, code_repository) + architectures = list(getattr(config, "architectures", None) or []) + if cls is None: + for name in architectures: + cls = getattr(transformers, name, None) + if cls is not None: + break + if cls is None: + # No AutoModelForCausalLM fallback here, unlike `load_model`: the + # meta-device build calls `cls(config)` directly and an auto class + # cannot be instantiated that way. A refusal naming the config's own + # architectures is more useful than a TypeError from inside torch. + raise fail( + "the layer-outer streaming loader needs a concrete architecture class; " + "config.architectures is %r and transformers exposes none of them. " + "AutoModelForCausalLM cannot be built on the meta device without one; " + "use --schedule window-outer, which can fall back to it." + % (architectures,)) + + def layer_guard(index: int, info: Dict[str, Any]) -> None: + # CAPTURE-03, per streamed layer. The window-outer path gets one + # load and one guard; this path gets one load per layer, so the + # guard runs per layer -- otherwise the streamed weights (97.5% of + # GLM-5.3 by bytes) would be the only unexamined part of the model. + report = load_report(info) + reinit = refuse_on_load_report( + report, args.allow_missing_weights, + args.unexpected_tensor_allowlist_binding, + require_exact_unexpected=False) + if reinit: + log(stage="layer_missing_weights", index=index, count=len(reinit), + keys=reinit[:8]) + + try: + streamer = layer_outer.build_streamed_model( + model_dir, cls, config, args.dtype, args.device, log, + layer_guard=layer_guard, gate=fetcher) + except layer_outer.LayerOuterError as exc: + raise fail(str(exc)) + except race_fetch.RaceFetchError as exc: + raise fail(str(exc)) + except (AttributeError, TypeError, NotImplementedError) as exc: + if bundle is None: + raise + raise fail("REFUSED: pinned class %s does not support the installed " + "transformers meta-device streaming loader: %s: %s" + % (cls.__name__, type(exc).__name__, exc)) + model = streamer.model + if bundle is not None: + bundle.verify_imports() + model._qfs_verified_code = bundle + loading_info = layer_outer.streamed_loading_info(streamer) + # The decode counts grow as layers stream; the receipt reads them + # after the capture, from this streamer. + args._weights_decode_streamer = streamer + else: + model, config, loading_info = load_model( + model_dir, args.device, args.dtype, device_map=args.device_map, + max_memory=max_memory, offload_folder=args.offload_folder, + drop_parallel_plan=args.drop_parallel_plan, + trust_remote_code=trust_code, code_revision=code_revision, + code_repository=code_repository) + args._verified_code = getattr(model, "_qfs_verified_code", None) + args._resolved_classes = {"model": type(model).__module__ + "." + type(model).__qualname__, + "config": type(config).__module__ + "." + type(config).__qualname__} + args._resources["resident_load_seconds"] = time.monotonic() - resident_started + + # CAPTURE-03. A checkpoint whose tensors this `transformers` build cannot + # name does not fail to load: `from_pretrained` RANDOMLY INITIALISES the + # parameters it could not find, logs a table, and returns a model that + # runs. Captured, that produces a confident number for weights nobody ever + # measured -- the single most dangerous outcome this tool can have. + # Observed on malaiwah/GLM-5.2-SIQ-Fruit, whose routed experts ship as + # exl3-trellis atoms (`.trellis`/`.suh`/`.svh`/`.mcg`): stock transformers + # reported `model.layers.{3..12}.mlp.experts.{gate_up,down}_proj` MISSING + # and handed back a model with random experts, mean ~0, std 0.0199. + # + # `refuse_on_load_report` widens that to the three neighbouring ways the + # same harm arrives -- mismatched shapes, state-dict errors, and converter + # errors -- and to the case where no report was produced at all. + report = load_report(loading_info) + log(stage="load_report", observed=report["observed"], + conversion_errors_visible=report["conversion_errors_visible"], + missing=len(report["missing_keys"]), mismatched=len(report["mismatched_keys"]), + unexpected=len(report["unexpected_keys"]), + conversion_errors=len(report["conversion_errors"]), + error_msgs=len(report["error_msgs"]), + unexpected_sample=report["unexpected_keys"][:6]) + # Under streaming this report predates every layer load, so an allowlist + # that (correctly) names per-layer unused tensors would read as "missing" + # here. Extras are refused now; exactness is decided after the layers have + # streamed (see the final pass below the capture). + missing = refuse_on_load_report( + report, args.allow_missing_weights, + args.unexpected_tensor_allowlist_binding, + require_exact_unexpected=streamer is None) + if missing: + log(stage="missing_weights", count=len(missing), keys=missing[:12]) + + # The high-water mark of MATERIALISED weight bytes. RSS cannot answer this + # on the CPU path (safetensors mmaps the shards, so the page cache lands in + # ru_maxrss whether or not the schedule ever held those bytes as its own), + # and it is the figure a "does GLM-5.3 fit" projection actually needs. + args.resident_watcher = layer_outer.ResidentWeightPeak(model) + args.resident_watcher.sample() + + head = head_module(model) + args._head_module_path = model._qfs_head_path + args._head_resolution = model._qfs_head_resolution + vocab_size = int(head.weight.shape[0]) + hidden_size = int(head.weight.shape[1]) + if int(getattr(config, "vocab_size", vocab_size)) != vocab_size: + log(stage="warning", message="config.vocab_size %s != head rows %d; the head wins" + % (getattr(config, "vocab_size", None), vocab_size)) + log(stage="model", vocab_size=vocab_size, hidden_size=hidden_size, + dtype=str(head.weight.dtype), device=args.device, + architectures=list(getattr(config, "architectures", None) or [])) + + # The panel's tokenizer identity is part of panel IDENTITY (PANEL-D6) and the + # schema requires a string. Default it to the checkpoint whose tokenizer + # actually produced these ids rather than emitting null and failing `verify` + # only after the whole capture has been paid for. + tokenizer_id = args.tokenizer_id or args.weights_repository or args.model + panel = load_panel(args.panel, args.panel_role, args.windows, tokenizer_id, vocab_size) + bind_resolved_panel_tokenizer(panel, args) + log(stage="panel", windows=len(panel.windows), panel_json=panel.source, + receipt_sha256=panel.receipt_sha256) + + tap: List[Any] = [] + + def pre_hook(module, inputs): + hidden = inputs[0] + if not torch.is_tensor(hidden): + raise fail("the head pre-hook received a non-tensor input") + if hidden.dtype != torch.bfloat16: + raise fail("head input dtype %s != bfloat16 -- the 'bf16 capture is lossless' " + "claim would be false; refusing" % hidden.dtype) + if hidden.ndim != 3 or hidden.shape[0] != 1 or int(hidden.shape[-1]) != hidden_size: + raise fail("head input shape %s is not [1, seq, %d]" + % (tuple(hidden.shape), hidden_size)) + tap.append(hidden.detach().squeeze(0).to("cpu", copy=True)) + args._resources["hidden_d2h_bytes"] += int(hidden.numel()) * hidden.element_size() + + handle = head.register_forward_pre_hook(pre_hook) + + writer = dsmanifest.DatasetWriter(args.out) + if args.weights_license_payload is not None: + writer.add_file("LICENSE", args.weights_license_payload) + log(stage="weights_license", **args.weights_license_binding) + panel_records: List[Dict[str, Any]] = [] + capture_records: List[Dict[str, Any]] = [] + context_length = None + + # THE ONE FORWARD CALL, shared by both schedules. It is written once so + # that the layer-outer path cannot drift from the window-outer path in the + # inputs it builds: same dtypes, same devices, same kwargs, same + # `use_cache=False`. What differs between the schedules is only WHEN this + # is called and which layers are resident when it is. + # -- the generation sanity probe's window ------------------------------- + # Prepared BEFORE the panel loop because under the layer-outer schedule it + # must be pushed through the same `run_panel` call: a probe run afterwards + # would need every layer a second time, i.e. a second read of the whole + # checkpoint. + probe_plan = _prepare_probe(args, model_dir) + probe_index = len(panel.windows) if probe_plan.get("token_ids") else None + probe_logits: List[Any] = [] + + def forward_window(index: int) -> None: + if probe_index is not None and index == probe_index: + token_ids = probe_plan["token_ids"] + mask = [1] * len(token_ids) + else: + window = panel.windows[index] + token_ids = window["token_ids"] + mask = window["mask"] + del tap[:] + input_ids = torch.tensor([token_ids], dtype=torch.long, device=args.device) + attention_mask = torch.from_numpy( + np.asarray(mask, dtype=np.int64).reshape(1, -1)).to(args.device) + with torch.inference_mode(): + out = model(input_ids=input_ids, attention_mask=attention_mask, + use_cache=False) + if probe_index is not None and index == probe_index: + logits = getattr(out, "logits", None) + if logits is None and isinstance(out, (tuple, list)) and out: + logits = out[0] + if logits is not None: + del probe_logits[:] + probe_logits.append(logits[0, -1].detach().to("cpu", copy=True)) + args._resources["hidden_d2h_bytes"] += ( + int(probe_logits[-1].numel()) * probe_logits[-1].element_size()) + + precomputed: Optional[List[Any]] = None + forward_count = len(panel.windows) + (1 if probe_index is not None else 0) + layer_seconds: List[float] = [0.0] * forward_count + args._layer_seconds = layer_seconds + if args.schedule == layer_outer.SCHEDULE_LAYER_OUTER: + precomputed = _run_layer_outer(args, model, streamer, panel, tap, forward_window, + layer_seconds, window_count=forward_count) + elif probe_index is not None: + # Window-outer: the model is fully resident, so the probe is one extra + # forward and costs nothing but its own compute. + args._forward_timer.time(lambda: forward_window(probe_index), probe_index, + layer_seconds) + args._forward_timer.flush(layer_seconds) + probe = _resolve_probe(args, probe_plan, probe_logits) + + # CAPTURE-03, the exact check the docstring of refuse_on_load_report + # promises "after all layers load". Under layer-outer streaming the layers + # load DURING the capture, and each layer's own unexpected keys are absorbed + # into the streamer's aggregate only then -- the `report` built above is a + # copy taken before any layer streamed. Sealing that copy under-disclosed: + # the published Fruit root reported 791 unused tensors (the MTP block) when + # the loader had also skipped 50 indexer tensors on layers whose + # `indexer_types` entry is `shared` (found 2026-09-03, first exact-allowlist + # run). The per-layer guard refuses EXTRA keys as each layer lands, so this + # final pass can only add allowlisted names to the disclosure, never admit + # new ones -- and it refuses an allowlist name that was never observed. + if streamer is not None: + report = load_report(layer_outer.streamed_loading_info(streamer)) + refuse_on_load_report( + report, args.allow_missing_weights, + args.unexpected_tensor_allowlist_binding) + log(stage="load_report_final", unexpected=len(report["unexpected_keys"]), + unexpected_sample=report["unexpected_keys"][:6]) + + # The outer meter: how far through the panel, and when this capture ends. + # `every=1` because a window is minutes long -- every completed one earns a + # line even when the 30 s throttle has not elapsed. + window_meter = progress_meter.Progress( + len(panel.windows), label="windows", every=1, + interval=getattr(args, "progress_seconds", progress_meter.DEFAULT_INTERVAL_SECONDS), + ) + try: + for index, window in enumerate(panel.windows): + ids = window["token_ids"] + mask = window["mask"] + if context_length is None: + context_length = len(ids) + elif context_length != len(ids): + raise fail("window %s has context length %d, expected %d; a ragged panel is " + "not supported" % (window["window_id"], len(ids), context_length)) + token_rel = writer.add_token_file(index, ids) + mask_rel, mask_sha = writer.add_mask_file(index, window["mask_bytes"]) + if mask_sha != window["mask_sha256"]: + raise fail("window %s: the mask bytes we wrote hash to %s, not the sealed %s" + % (window["window_id"], mask_sha[:12], window["mask_sha256"][:12])) + + if precomputed is not None: + # layer-outer: this window's forward already happened, spread + # across the layer loop. Everything below -- the row + # selection, the BF16 payload, the records -- is the same code + # on the same tensor. + hidden_full = precomputed[index] + elapsed = layer_seconds[index] + else: + args._forward_timer.time(lambda: forward_window(index), index, layer_seconds) + args._forward_timer.flush(layer_seconds) + elapsed = layer_seconds[index] + if len(tap) != 1: + raise fail("window %s: the head hook fired %d times, expected exactly 1 " + "-- an extra forward would misalign the capture" + % (window["window_id"], len(tap))) + hidden_full = tap[0] + if hidden_full.shape[0] != len(ids): + raise fail("window %s: hidden seq %d != tokens %d" + % (window["window_id"], hidden_full.shape[0], len(ids))) + causal = (np.asarray(mask[:-1], dtype=np.bool_) + & np.asarray(mask[1:], dtype=np.bool_)) + selected = hidden_full[:-1][torch.from_numpy(causal)].contiguous() + if int(selected.shape[0]) != window["prediction_positions"]: + raise fail("window %s: %d scored rows != the panel's declared %d" + % (window["window_id"], int(selected.shape[0]), + window["prediction_positions"])) + + payload = st_bytes(F.TENSOR_KEY_HIDDEN, "BF16", + [int(selected.shape[0]), hidden_size], _bf16_raw(selected), + metadata={"capture_role": "hidden_states_pre_lm_head", + "cut_point": CUT_POINT, + "window_id": window["window_id"], + "cold_run": args.cold_run, + "dtype": "bfloat16"}) + rel = writer.add_capture_tensor(index, payload, "hidden") + full = os.path.join(args.out, rel) + + panel_records.append(dsmanifest.panel_record( + index=index, token_file=token_rel, token_ids=ids, + prediction_positions=window["prediction_positions"], + window_id=window["window_id"], attention_mask_file=mask_rel, + attention_mask_sha256=mask_sha, role=window["role"], + domain=window["domain"], document_id=window["document_id"])) + capture_records.append(dsmanifest.tensor_record( + index=index, filename=os.path.basename(rel), abs_path=full, + key=F.TENSOR_KEY_HIDDEN, dtype="BF16", + shape=[int(selected.shape[0]), hidden_size], + scored_rows=int(selected.shape[0]), + token_ids_json_sha256=F.token_ids_json_sha256(ids), + token_ids_sha256_legacy=F.token_ids_json_sha256_legacy(ids), + attention_mask_sha256=mask_sha, window_id=window["window_id"], + role=window["role"], domain=window["domain"], + document_id=window["document_id"], + elapsed_seconds=round(elapsed, 3))) + log(stage="window", index=index, window_id=window["window_id"], + rows=int(selected.shape[0]), bytes=os.path.getsize(full), + seconds=round(elapsed, 3)) + window_meter.update(1) + del tap[:] + finally: + window_meter.close(suffix="capture complete") + handle.remove() + + # -- head --------------------------------------------------------------- + # S3-3: header and raw bytes in two write() calls, hashed as they stream -- + # no `tobytes()` copy, no `header + raw` copy, no re-read to hash. The + # bytes on disk are `st_bytes(...)`'s (selftest_hf_capture asserts it). + args._resources["seal_started"] = time.monotonic() + head_weight = head.weight + head_rel, head_full = writer.reserve_head_payload() + head_digests = write_st_tensor(head_full, "lm_head.weight", "BF16", + list(head_weight.shape), _bf16_view(head_weight)) + head_content = head_digests["tensor_content_sha256"] + log(stage="head", file=head_rel, tensor_content_sha256=head_content, + bytes=os.path.getsize(head_full)) + + # -- measured, not predicted ------------------------------------------- + # docs/GLM53-ROOT-FEASIBILITY.md §2 projects a peak from the census. A + # projection is not a measurement, so every run now reports what it + # actually used and the projection can be rebuilt on top of numbers. + args.resident_watcher.sample() + memory = layer_outer.peak_memory(args.device) + memory.update({"peak_resident_weight_bytes": args.resident_watcher.peak, + "peak_resident_weight_gb": round(args.resident_watcher.peak / 1e9, 3), + "peak_resident_weight_detail": args.resident_watcher.detail, + "resident_weight_note": + "the maximum, over the run, of the materialised parameter+buffer " + "bytes. On the CPU path peak_rss_bytes ALSO counts the safetensors " + "mmap page cache, which is evictable and is not held by the " + "schedule; this figure is not confounded by it. On CUDA, " + "peak_cuda_allocated_bytes is the authoritative number because it " + "includes activations and workspace and has no page cache.", + "schedule": args.schedule, "device": args.device, + "layer_residency": (args.layer_residency + if args.schedule == layer_outer.SCHEDULE_LAYER_OUTER + else None), + "windows": len(panel.windows), "context_length": context_length, + "hidden_size": hidden_size, "vocab_size": vocab_size, + "model": args.weights_repository or args.model, + "decoder_layers": (len(streamer.layers) if streamer is not None + else None)}) + log(stage="peak_memory", **memory) + if args.memory_report: + directory = os.path.dirname(os.path.abspath(args.memory_report)) + if directory: + os.makedirs(directory, exist_ok=True) + with open(args.memory_report, "w", encoding="utf-8") as handle: + json.dump(memory, handle, indent=2, sort_keys=True) + handle.write("\n") + + # RACE MODE: the tail of the fetch. Every layer has been read by now, so + # what is left is whatever the plan did not need -- and the checkpoint + # IDENTITY is a digest over the complete tree, so it cannot be taken until + # this returns. The wait is measured and reported rather than hidden: it is + # the part of the fetch the overlap did NOT hide. + race_report = None + if fetcher is not None: + join_started = time.monotonic() + fetcher.join() + tail = time.monotonic() - join_started + race_report = fetcher.report() + race_report["tail_join_seconds"] = round(tail, 3) + log(stage="race_fetch_joined", tail_seconds=round(tail, 3), + blocked_seconds=race_report["blocked_seconds"], + files=race_report["files"]) + identity, identity_files = checkpoint_identity(model_dir) + log(stage="checkpoint_identity", sha256=identity, files=len(identity_files)) + if getattr(args, "race_report", None): + directory = os.path.dirname(os.path.abspath(args.race_report)) + if directory: + os.makedirs(directory, exist_ok=True) + with open(args.race_report, "w", encoding="utf-8") as handle: + json.dump({"plan": fetcher.plan.to_dict(), "fetch": race_report}, + handle, indent=2, sort_keys=True) + handle.write("\n") + + return _assemble(args, writer, panel, panel_records, capture_records, + context_length=context_length, vocab_size=vocab_size, + hidden_size=hidden_size, head_rel=head_rel, head_full=head_full, + head_content=head_content, head_shape=list(head_weight.shape), + head_digests=head_digests, memory=memory, + model_dir=model_dir, identity=identity, identity_files=identity_files, + config=config, started=started, missing_weights=missing, + load_report=report, probe=probe, race_report=race_report) + + +# --------------------------------------------------------------------------- +# assembly +# --------------------------------------------------------------------------- + + +def _container_identity() -> Optional[Dict[str, Any]]: + """Which image produced these tensors -- or None, which is what it was. + + `dsmanifest.capture_runtime` has carried a `container` block since the + format landed and nothing has ever filled it, so every capture this repo + has sealed says `image_digest: null` whether it ran in a pinned container + or on a hand-bootstrapped box. A containerised capture can answer, and the + convention for how is already in this tree: `fidelity/stackprint.py` reads + `STACKPRINT_IMAGE_PIN`, falling back to a pin FILE, precisely because + `docker load` strips the registry digest and the file is then the only + trustworthy source. + + Two properties this must keep, and a test asserts both: + + * With no pin present it returns None, so `capture_runtime` uses the same + all-null default it always did and a non-container capture's bytes are + UNCHANGED. A published dataset must not shift because a field learned + how to be filled. + * It is not an input to `stack_fingerprint_sha256`. That digest is what + `dscompare` reads to decide `stack_relation`, and a cross-stack verdict + stamps `usable_as_floor: false`. The container is where the stack ran, + not what the stack IS -- so recording it must not make a containerised + capture incomparable with the identical computation run outside one. + That is also the acceptance test for the image: same capture_content_digest. + """ + pin = (os.environ.get("STACKPRINT_IMAGE_PIN") or "").strip() + source = "env:STACKPRINT_IMAGE_PIN" + if not pin: + for path in (os.environ.get("FIDELITY_IMAGE_PIN_FILE"), + "/opt/fidelity/image-pin.txt", "/glm53/out/image-pin.txt"): + if not path: + continue + try: + with open(path, "r", encoding="utf-8") as fh: + pin = fh.read().strip().split()[0] + except Exception: # noqa: BLE001 + continue + if pin: + source = "image-pin-file:%s" % path + break + if not pin: + return None + return {"image_digest": pin, + "image_reference": os.environ.get("FIDELITY_IMAGE_REFERENCE") or None, + "image_repository_digest": None, + "source": source} + + +#: The in-digest policy string every published GLM-5.3 capture carries. Kept +#: byte-identical whenever the OBSERVED policy is torch's default, because the +#: string is inside `stack_fingerprint_sha256` and a changed digest would file +#: every future candidate as cross_stack against the published root. +DEFAULT_NUMERIC_POLICY = "default torch matmul precision; no TF32 override applied" + + +def observe_numeric_policy() -> Dict[str, Any]: + """What the fp32 GEMMs actually ran under, read from torch and the environment. + + Recorded on EVERY capture (until now only the trellis pin recorded it, in + weights_decode.numeric_policy). `deviates_from_default` is true when + anything would make an fp32 matmul not fp32: NVIDIA_TF32_OVERRIDE=1, + allow_tf32 on the cuda matmul backend, or a float32_matmul_precision below + 'highest'. cudnn's allow_tf32 is recorded but is not a deviation: it + governs convolutions, which this forward has none of, and torch's own + default for it is True. + """ + import torch + + override = os.environ.get("NVIDIA_TF32_OVERRIDE") + matmul_tf32 = bool(getattr(torch.backends.cuda.matmul, "allow_tf32", False)) + cudnn_tf32 = bool(getattr(torch.backends.cudnn, "allow_tf32", False)) + precision = getattr(torch, "get_float32_matmul_precision", lambda: None)() + deviates = (str(override or "").strip() == "1" or matmul_tf32 + or (precision is not None and precision != "highest")) + return { + "NVIDIA_TF32_OVERRIDE": override, + "allow_tf32_matmul": matmul_tf32, + "allow_tf32_cudnn": cudnn_tf32, + "float32_matmul_precision": precision, + "deviates_from_default": deviates, + "observed_at": "seal time, after the forward", + } + + +def _stack_fingerprint(device: str) -> Dict[str, Any]: + import torch + + observed = observe_numeric_policy() + policy = DEFAULT_NUMERIC_POLICY + if observed["deviates_from_default"]: + # A different stack: the digest MUST move. + policy = ("TF32 DEVIATION: NVIDIA_TF32_OVERRIDE=%r allow_tf32_matmul=%r " + "float32_matmul_precision=%r" + % (observed["NVIDIA_TF32_OVERRIDE"], observed["allow_tf32_matmul"], + observed["float32_matmul_precision"])) + fingerprint = { + "schema": "malaiwah.stack-fingerprint.v1", + "engine": "transformers-eager", + "torch_version": torch.__version__, + "device": device, + "device_name": None, + "cuda_runtime_version": None, + "numeric_policy": policy, + "attention_backend": os.environ.get("ATTN_IMPLEMENTATION", "model default"), + } + try: + import transformers + + fingerprint["transformers_version"] = transformers.__version__ + except Exception: + pass + if device.startswith("cuda") and torch.cuda.is_available(): + fingerprint["device_name"] = torch.cuda.get_device_name(0) + fingerprint["cuda_runtime_version"] = torch.version.cuda + return fingerprint + + +def _scope(args: argparse.Namespace) -> Dict[str, Any]: + if args.scope_file: + doc = json.loads(open(args.scope_file, "r", encoding="utf-8").read()) + return dsmanifest.scope_block(doc["assignments"], doc["head_policy"], + doc.get("kv_cache_dtype", "bf16"), doc["policy"]) + return dsmanifest.native_scope() + + + +def preview_banner(manifest) -> str: + """The preview warning, at the TOP of the card, in the reader's first screen. + + Prepended in `render_card` rather than in `default_card_body` on purpose: a + capture run with `--readme` supplies its own body, and the one thing that + must never be lost by supplying your own body is the statement that this + dataset is preliminary. + """ + block = manifest.get("preview") or {} + if not block: + return "" + return "\n".join([ + "> ## ⚠ PRELIMINARY — NOT THE FINAL ROOT", + "> ", + "> " + block["statement"].replace("\n", "\n> "), + "> ", + "> | | |", + "> |---|---|", + "> | cold runs backing this dataset | **%s** |" % block.get("run_count"), + "> | cross-run determinism demonstrated | **no** |", + "> | will ever be updated in place | **no** |", + "> | superseded by | **`%s`** |" % block.get("superseded_by"), + "> | usable as a registry reference | **no** (`not_submittable`) |", + "", + "", + ]) + + +def render_card(args, manifest, body: str) -> str: + """A dataset card whose frontmatter carries the required x_fidelity block.""" + sys.path.insert(0, os.path.join(REPO, "bin")) + from fidelity import cardmeta + + body = preview_banner(manifest) + body + + front = { + "license": args.dataset_license, + "tags": ["fidelity", "kl-divergence", "fidelity-provenance", + "fidelity-dataset", "fidelity-%s" % args.role], + "x_fidelity": cardmeta.build_dataset_x_fidelity( + None, repository=args.repository, manifest=manifest), + } + front, _ = cardmeta.split_card(cardmeta.render_card(front, body)) + return cardmeta.render_card(front, body) + + +def _probe_card_line(manifest) -> str: + """One sentence a reader can check without opening the manifest.""" + probe = manifest.get("generation_sanity_probe") or {} + status = probe.get("status") + if status in ("pass", "recorded"): + return ("`%s` -> `%s` (p=%.4f, entropy %.3f of a possible %.3f nats). %s " + "One extra window through the same schedule; its hidden state was " + "discarded and is not part of this dataset." + % (probe.get("prompt"), probe.get("top1_text"), + probe.get("top1_probability", float("nan")), + probe.get("entropy_nats", float("nan")), + probe.get("uniform_entropy_nats", float("nan")), + ("Enforced against %r." % probe.get("expect") + if probe.get("enforced") else "Recorded, not enforced."))) + return ("**The generation sanity probe did not run** (%s). Tensor counts, " + "shapes and the load report can all be clean while a shard loaded as " + "zeros; this dataset carries no evidence that the model generates " + "sensibly." % probe.get("reason", "no reason recorded")) + + +def default_card_body(args, manifest, scope) -> str: + capture = manifest["capture"] + panel = manifest["panel"] + rows = capture["scored_rows_total"] + hidden_bytes = capture["total_size_bytes"] + logit_bytes = rows * capture["vocab_size"] * 4 + license_section = [] + if args.weights_license_binding is not None: + license_section = [ + "## License", + "", + "This dataset redistributes the captured model's native output-head " + "weights. The source license and required notice are reproduced " + "byte-for-byte in [`LICENSE`](LICENSE).", + "", + ] + lines = [ + "# %s" % args.dataset_name, + "", + "A **%s** fidelity dataset in **hidden form**, produced by " + "`engines/tools/hf_capture.py` from `%s`." % ( + args.role, args.weights_repository or args.model), + "", + "## The cut", + "", + CUT_STATEMENT, + "", + "## What is here", + "", + "| | |", + "|---|---|", + "| records | %d |" % capture["records_count"], + "| scored positions | %d |" % rows, + "| context length | %d |" % panel["context_length"], + "| hidden width | %d |" % capture["hidden_width"], + "| vocab size | %d |" % capture["vocab_size"], + "| capture bytes (hidden form) | %d |" % hidden_bytes, + "| the same capture in logit form would be | %d bytes (%.0fx) |" + % (logit_bytes, logit_bytes / float(hidden_bytes) if hidden_bytes else 0), + "| scope policy | %s |" % scope["policy"], + "| lane | %s |" % args.lane, + "", + "## Does the model still generate sensibly", + "", + _probe_card_line(manifest), + "", + ] + license_section + [ + "## How to check it", + "", + "```", + "bin/fidelity-dataset verify ", + "```", + "", + "Full specification: ", + "", + ] + return "\n".join(lines) + + +PREVIEW_SCHEMA = "malaiwah.fidelity-dataset-preview.v1" + +PREVIEW_STATEMENT = ( + "THIS IS A PRELIMINARY CAPTURE. It is backed by ONE cold run. Cross-run " + "determinism is NOT demonstrated: a second cold capture agreeing digest-for-" + "digest, plus the exactly-0.0 self-compare, is what would establish it, and " + "neither has happened here. It is sealed and immutable and will NEVER be " + "updated in place -- the complete-evidence capture is a SEPARATE dataset with " + "a separate id, named below. Numbers measured against this dataset are true " + "statements about THIS dataset; they do not become statements about the final " + "one, and the comparability key makes that mechanical rather than a matter of " + "care: reference_id is one of its seven fields." +) + + +def _apply_preview_identity(args, manifest) -> None: + """Seal this capture as a PREVIEW: a different identity, not an earlier version. + + The property that must hold is that a measurement made against the preview + can never be silently read as a measurement against the final. Two + mechanisms, both structural: + + * IDENTITY -- the preview's `dataset.id` differs from the final's, and + `bin/fidelity/dscompare.py` uses exactly that field as the `reference_id` + input to `registry_lib.comparability_key`. Different reference_id means a + different comparability group, which the renderer draws as a different + table and the validator refuses to merge. This is the same mechanism + `docs/DESIGNATED-REFERENCE.md` relies on, for the same reason. + * PUBLISHABILITY -- `not_submittable: true` is a marker + `bin/fidelity/receipt.py::_scan_for_unsubmittable` refuses at any depth, + and the blocking disclosure below is what `emit_submission`'s SC-5 check + refuses on. Neither is new machinery. + + Updating a published root in place is the failure this exists to prevent: + the identity would stay the same while the CONTENT changed, so rows measured + against the old bytes and rows measured against the new bytes would land in + ONE comparability group and be quietly incomparable. + """ + final_id = args.preview_of.strip() + if not final_id: + raise fail("--preview-of needs the final dataset's id, not an empty string") + if final_id == args.dataset_id: + raise fail( + "REFUSED: --preview-of %r is the same id as --dataset-id. A preview and a " + "final are two DATASETS, not two versions of one. Sharing the id is exactly " + "the corruption this flag exists to prevent: `reference_id` is a " + "comparability-key field, so rows measured against the one-run bytes and " + "rows measured against the full-evidence bytes would land in the same group " + "and be silently incomparable. Give the preview its own id (convention: the " + "final id with a `.preview` suffix)." % final_id) + manifest["not_submittable"] = True + manifest["preview"] = { + "schema": PREVIEW_SCHEMA, + "preliminary": True, + "superseded_by": final_id, + "run_count": manifest["determinism"]["run_count"], + "determinism_demonstrated": False, + "updated_in_place": False, + "immutable": True, + "statement": PREVIEW_STATEMENT, + } + manifest["disclosures"].append({ + "code": "preview_capture", "severity": "blocking", + "affects_comparability": True, + "detail": "%s Final dataset id: %s." % (PREVIEW_STATEMENT, final_id), + }) + log(stage="preview_identity", dataset_id=args.dataset_id, superseded_by=final_id, + not_submittable=True) + + +def _resources_block(args, fingerprint: Dict[str, Any], memory: Dict[str, Any], + identity_files: Optional[List[Dict[str, Any]]], + started: float) -> Dict[str, Any]: + """S2-2: what the capture cost, on the receipt -- provenance, never identity. + + Every value is one `run_capture` already measured or logged: the peaks + from `layer_outer.peak_memory`/`ResidentWeightPeak`, the stage seconds + from the clocks around identity, the resident load, each layer load, the + decoders and the forwards, the bytes from the shard headers and the head + tap. `seconds.forward_sum` is DEVICE time when `forward_timing` is + `cuda-events` (events bracket each forward and are read at the layer + boundary) and wall time otherwise. `seconds.seal` runs from the head + serialisation to the moment this block was assembled -- the manifest + seal that follows cannot be inside the document it seals -- and + `seconds.elapsed` ends at the same moment. The block sits beside + `lane_identity_inputs`, not in it, and `capture_content_digest` does not + read it (`bin/selftest_fidelity_dataset.py` asserts both). + """ + tracked = args._resources + streamer = getattr(args, "_weights_decode_streamer", None) + timing = dict(getattr(streamer, "timing", None) or {}) + layer_loads = list(tracked["layer_load_seconds"]) + forward_sum = float(sum(getattr(args, "_layer_seconds", None) or [])) + on_cuda = str(args.device).startswith("cuda") and memory.get("peak_cuda_allocated_bytes") is not None + checkpoint_bytes = (sum(int(f["size"]) for f in identity_files) + if identity_files else None) + if streamer is not None: + checkpoint_read = int(timing.get("checkpoint_bytes_read", 0)) or None + else: + # `from_pretrained` reads every tensor of every shard. + checkpoint_read = checkpoint_bytes + now = time.monotonic() + return { + "device_name": fingerprint.get("device_name"), + "peak_cuda_allocated_bytes": memory.get("peak_cuda_allocated_bytes"), + "peak_cuda_reserved_bytes": memory.get("peak_cuda_reserved_bytes"), + "peak_resident_weight_bytes": memory.get("peak_resident_weight_bytes"), + "peak_rss_bytes": memory.get("peak_rss_bytes"), + "rss_units_source": memory.get("rss_units_source"), + "checkpoint_bytes": checkpoint_bytes, + "checkpoint_files": len(identity_files) if identity_files else None, + "seconds": { + "identity": _round3(tracked.get("identity_seconds")), + "resident_load": _round3(tracked.get("resident_load_seconds")), + "layer_load_sum": _round3(sum(layer_loads)) if layer_loads else None, + "layer_load_max": _round3(max(layer_loads)) if layer_loads else None, + "layer_loads": len(layer_loads) or None, + "decode_sum": (_round3(timing.get("decode_seconds")) + if timing.get("decode_seconds") else None), + "fill_sum": (_round3(timing.get("fill_seconds")) + if timing.get("fill_seconds") else None), + "forward_sum": _round3(forward_sum), + "seal": (_round3(now - tracked["seal_started"]) + if tracked.get("seal_started") is not None else None), + "elapsed": _round3(now - started), + }, + "bytes": { + "checkpoint_read": checkpoint_read, + # Stored-form bytes moved over the bus: fp8/trellis payloads move + # as stored and are decoded on the device, bf16 slices as bf16. + "weights_h2d": checkpoint_read if on_cuda else None, + "hidden_d2h": int(tracked.get("hidden_d2h_bytes", 0)), + }, + "forward_timing": args._forward_timer.mode, + "note": ("provenance, not identity: peaks and stage seconds this run measured; " + "forward_sum is device time under cuda-events, wall time otherwise; " + "seal covers head serialisation up to this block's assembly"), + } + + +def _round3(value: Optional[float]) -> Optional[float]: + return None if value is None else round(float(value), 3) + + +def _assemble(args, writer, panel, panel_records, capture_records, *, context_length, + vocab_size, hidden_size, head_rel, head_full, head_content, head_shape, + head_digests, memory, model_dir, identity, identity_files, config, started, + missing_weights=(), load_report=None, probe=None, + race_report=None) -> int: + scope = _scope(args) + quantized = scope["policy"] != "native" + + panel_doc = dsmanifest.panel_binding( + panel_id=args.panel_id or panel.panel_id, + name=args.panel_name or ("token panel %s" % (args.panel_id or panel.panel_id)), + records=panel_records, context_length=context_length, + tokenizer=panel.tokenizer, + repository=args.panel_repository, revision=args.panel_revision, + panel_receipt_sha256=panel.receipt_sha256, + scoring_window={"score_from": 0, "windowed": False, + "min_left_context_tokens": 1, "dropped_positions_total": 0, + "policy": "every causal prediction position of every window is " + "scored; nothing is dropped"}) + + coverage = dsmanifest.coverage_block( + capture_records, len(panel_records), + subset_detail=(args.subset_detail or + ("the first %d role=%s windows of the upstream panel, taken in " + "window_id order to keep the run cheap" + % (len(panel_records), args.panel_role)) + if args.windows else None)) + + capture_doc = dsmanifest.capture_manifest( + run_name=args.run_name, form="hidden", semantic_point=CUT_POINT, + tensor_key=F.TENSOR_KEY_HIDDEN, dtype="BF16", dtype_lossless=True, + vocab_size=vocab_size, context_length=context_length, records=capture_records, + hidden_width=hidden_size, coverage=coverage) + + # A head the trellis decoder produced from an exl3 payload (jpsequeira's + # 8-bit lm_head) is the candidate's OWN dequantized head: sealed as such + # (spec head-source table: artifact_dequantized) and replayed under + # HEAD-1d, own heads. Every other head is shipped as loaded. + head_decoded = (layer_outer.head_decode_identity(args._weights_decode_streamer) + if getattr(args, "_weights_decode_streamer", None) is not None else None) + head_doc = dsmanifest.head_identity( + present=True, tensor_key=(getattr(args, "_head_module_path", None) or "lm_head") + ".weight", + shape=head_shape, dtype="BF16", + file_sha256=head_digests["file_sha256"], tensor_content_sha256=head_content, + quantized=bool(head_decoded), source=(head_decoded or {}).get("source", "native"), + applied_in_capture=False, file=head_rel, + bits=int(head_decoded["bits"]) if head_decoded else 16, + final_norm={"file": None, "tensor_key": None, "shape": None, "dtype": None, + "file_sha256": None, "tensor_content_sha256": None, + "applied_in_capture": True, "applied_at_replay": False}, + note=(("the head is the artifact's exl3 K%d payload decoded to bf16 by %s (%s) " + "before the forward -- the candidate's own head, quantization error " + "included -- shipped so a third party can replay logits = hidden @ head^T" + % (head_decoded["bits"], head_decoded["reference"], head_decoded["method"])) + if head_decoded else + "the head is shipped verbatim from the checkpoint so a third party can " + "replay logits = hidden @ head^T without the weights")) + + fingerprint = _stack_fingerprint(args.device) + verified_code = getattr(args, "_verified_code", None) + code_evidence = verified_code.evidence() if verified_code is not None else None + if code_evidence is not None: + fingerprint["verified_code"] = { + "repository": code_evidence["repository"], + "revision": code_evidence["revision"], + "closure_sha256": code_evidence["closure_sha256"], + "resolved_classes": getattr(args, "_resolved_classes", {})} + canonical = json.dumps(fingerprint, sort_keys=True, separators=(",", ":")) + runtime_doc = dsmanifest.capture_runtime( + lane=args.lane, + stack_fingerprint=fingerprint, + stack_fingerprint_sha256=hashlib.sha256(canonical.encode("utf-8")).hexdigest(), + lane_identity_sha256=hashlib.sha256( + ("%s|%s|%s" % (args.lane, fingerprint.get("torch_version"), + fingerprint.get("device_name"))).encode("utf-8")).hexdigest(), + container=_container_identity(), + weights={"repository": args.weights_repository or args.model, + "revision": args.model_revision, + "model_revision": args.model_revision, + "checkpoint_identity_sha256": identity, + "checkpoint_identity_algorithm": CHECKPOINT_IDENTITY_ALGORITHM, + "checkpoint_files": identity_files}, + runtime_environment={"python": sys.version.split()[0], + "cold_run": args.cold_run, + # Observed, not asserted; outside the fingerprint + # digest so a default-policy capture keeps matching + # the published root's stack_fingerprint_sha256. + "numeric_policy_observed": observe_numeric_policy()}, + source_files=_source_files(args), + capture_tool={"file": "engines/tools/hf_capture.py", + "sha256": F.sha256_file(os.path.abspath(__file__)), + "version": TOOL_VERSION, "wraps": [], + "schedule": args.schedule, + "verified_code": code_evidence, + "resolved_classes": getattr(args, "_resolved_classes", {}), + "model_view": getattr(getattr(args, "_weights_decode_streamer", None), + "model_view", None), + "head_module_path": getattr(args, "_head_module_path", None), + "head_resolution": getattr(args, "_head_resolution", None), + # Full expected and observed sets, plus both identities + # of the allowlist artifact, are inside this sealed + # runtime receipt. A count or a boolean is not evidence. + "unexpected_tensor_allowlist": + (load_report or {}).get("unexpected_tensor_allowlist"), + "weights_license": args.weights_license_binding, + "resolved_panel_binding": + getattr(args, "panel_binding_evidence", None), + "parallel_plan_dropped": bool(getattr(args, "drop_parallel_plan", False)), + "layer_residency": (args.layer_residency + if args.schedule == layer_outer.SCHEDULE_LAYER_OUTER + else None), + # What the loader did to the checkpoint's bytes before + # the forward: None for a native checkpoint; for a + # block-scaled FP8 one, the decode method, its reference + # arithmetic and the counts. The number is "dequantize- + # and-run, weights-only" and the receipt says so. + "weights_decode": ( + layer_outer.weights_decode_evidence(args._weights_decode_streamer) + if getattr(args, "_weights_decode_streamer", None) is not None + else None), + # How the routed experts reached the device: the direct + # fill (a byte copy per slice) or the converter's + # stack-and-cat; None under window-outer. Loading + # mechanism, not identity -- the bytes are proven equal. + "expert_fill": ( + layer_outer.expert_fill_evidence(args._weights_decode_streamer) + if getattr(args, "_weights_decode_streamer", None) is not None + else None), + "mechanism": SCHEDULE_MECHANISM[args.schedule]}, + resources=_resources_block(args, fingerprint, memory, identity_files, started)) + + evidence = capture_doc["capture_content_digest"] + determinism = { + "run_count": 1, + "cold_start_per_run": True, + "evidence_kind": "hidden_state_tensor_sha256", + "evidence_hashes": [evidence], + "distinct_evidence_hash_count": 1, + # One run cannot observe cross-run identity. Say so instead of + # asserting it: the SC-1 self-compare is what establishes it. + "identical_across_runs": None, + "repeats": [], + "repeat_noise": None, + "note": "a single cold capture; cross-run determinism is NOT asserted here. " + "Capture a second cold run and run `fidelity-dataset compare " + "--self-compare` -- an exactly 0.0 result is the SC-1 reproduction " + "confirmation.", + } + + disclosures = [dict(d) for d in (json.loads(args.disclosures) if args.disclosures else [])] + if not disclosures: + disclosures = [{"code": "no_known_deviations", "severity": "info", + "affects_comparability": False, + "detail": "captured by engines/tools/hf_capture.py"}] + model_view = getattr(getattr(args, "_weights_decode_streamer", None), "model_view", None) + if model_view is not None: + disclosures = [d for d in disclosures if d.get("code") != "no_known_deviations"] + disclosures.append({ + "code": "text_only_model_view", "severity": "caveat", + "affects_comparability": False, + "detail": "Language GGUF captured through the native Qwen3_5ForCausalLM text-only " + "view, using the artifact's complete own text tensors and head. Vision " + "and MTP are absent, not synthesized or borrowed. Original config and " + "weight bytes remain the checkpoint identity; derived in-memory config " + "and decoder layout are sealed in the runtime receipt. No multimodal claim."}) + # --allow-missing-weights was used: the number in this dataset is partly a + # measurement of randomly initialised parameters. Say so, loudly, forever. + if missing_weights: + disclosures.append({ + "code": "randomly_initialised_weights", "severity": "blocking", + "affects_comparability": True, + "detail": "%d parameter(s) were absent from the checkpoint and were randomly " + "initialised by transformers before this capture ran, so this is NOT " + "a measurement of the published artifact. First keys: %s." + % (len(missing_weights), ", ".join(list(missing_weights)[:6]))}) + + # An exact match against a pinned allowlist is factual provenance, not an + # override. Missing, extra, renamed, duplicated, or differently bound keys + # were already refused before any capture arithmetic ran. + unexpected = list((load_report or {}).get("unexpected_keys") or []) + unexpected_evidence = (load_report or {}).get("unexpected_tensor_allowlist") + if unexpected: + disclosures.append({ + "code": "checkpoint_tensors_intentionally_unused", "severity": "caveat", + "affects_comparability": False, + "detail": "%d checkpoint tensor(s) were present but intentionally unused by " + "this architecture. Their complete set exactly matched pinned " + "allowlist %s (canonical sorted-name SHA-256 %s)." + % (len(unexpected), unexpected_evidence["artifact_sha256"], + unexpected_evidence["canonical_sorted_names_sha256"])}) + + # A tokenizer_config.json that differs from the root's by a loader-only + # key (fidelity.panel.TOKENIZER_CONFIG_LOADER_KEYS): admitted by the + # exact rule in panel.py, and said here with both digests and the keys. + for equivalence in ((getattr(args, "panel_binding_evidence", None) or {}) + .get("tokenizer_equivalences") or []): + if "keys_dropped_from_root" in equivalence: + disclosures.append({ + "code": "tokenizer_config_loader_keys_ignored", "severity": "info", + "affects_comparability": False, + "detail": "%s differs from the reference root's bound file (root sha256 %s, " + "%d bytes; candidate sha256 %s, %d bytes) only by loader-only keys " + "(dropped from root: %s; from candidate: %s; allowlist %s); canonical " + "JSON is otherwise identical. Reason: %s." + % (equivalence["name"], equivalence["root_sha256"], + equivalence["root_bytes"], equivalence["candidate_sha256"], + equivalence["candidate_bytes"], + equivalence["keys_dropped_from_root"] or "none", + equivalence["keys_dropped_from_candidate"] or "none", + equivalence["loader_keys_allowlist"], equivalence["reason"])}) + else: + disclosures.append({ + "code": "tokenizer_file_provenance_admitted", "severity": "info", + "affects_comparability": False, + "detail": "%s differs from the reference root's bound file (root sha256 %s, " + "%d bytes; candidate sha256 %s, %d bytes) and is admitted as " + "per-model provenance. Reason: %s." + % (equivalence["name"], equivalence["root_sha256"], + equivalence["root_bytes"], equivalence["candidate_sha256"], + equivalence["candidate_bytes"], equivalence["reason"])}) + + # The weight-source transformations a trellis artifact needed, said on the + # dataset itself so the registry session reads them from the seal and not + # from a log: tensor-parallel rank shards composed into whole weights + # (davidsyoung), serving-kernel zero padding truncated (drowzeys), and a + # quantization_config whose quant_method mislabels the artifact. + decode_evidence = ( + layer_outer.weights_decode_evidence(args._weights_decode_streamer) + if getattr(args, "_weights_decode_streamer", None) is not None else None) + if isinstance(decode_evidence, dict): + composition = decode_evidence.get("tp_rank_composition") + if composition: + disclosures.append({ + "code": "tp_rank_payloads_composed", "severity": "caveat", + "affects_comparability": False, + "detail": "%d routed-expert module(s) were stored as %d tensor-parallel " + "rank shards each (the artifact's own hybrid_tr3_tail " + "declaration) and composed into whole weights by concatenating " + "the decoded shards in ascending rank order along the one axis " + "the shapes admit (%s). The composition is verified against the " + "artifact's declared source at %s." + % (composition.get("modules_composed", 0), composition.get("tp"), + ", ".join("%s: axis %d" % kv for kv in sorted( + (composition.get("axes") or {}).items())), + composition.get("evidence"))}) + truncated = decode_evidence.get("zero_padded_rows_truncated") + if truncated: + disclosures.append({ + "code": "zero_padded_rows_truncated", "severity": "caveat", + "affects_comparability": False, + "detail": "%d tensor(s) were stored with %d trailing all-zero row(s) in " + "total beyond the shape the architecture declares (serving-kernel " + "alignment padding); every excess row was verified exactly zero " + "and dropped. First: %s." + % (truncated.get("count", 0), truncated.get("rows", 0), + ", ".join("%s %s->%s" % (t["name"], t["stored"], t["used"]) + for t in (truncated.get("tensors") or [])[:3]))}) + observed = decode_evidence.get("observed") or {} + mislabel = observed.get("quant_method_declared") + if observed.get("declared_by") == "hybrid_tr3_tail" and mislabel not in (None, "exl3"): + disclosures.append({ + "code": "quantization_config_mislabels_artifact", "severity": "caveat", + "affects_comparability": False, + "detail": "config.json's quantization_config declares quant_method=%r, " + "which describes nothing in this checkpoint; the artifact is " + "declared by its hybrid_tr3_tail block (exl3-trellis) and the " + "payload bytes agree. The surface was read from the bytes." + % mislabel}) + if decode_evidence.get("method") == layer_outer.NVFP4_DECODE_METHOD: + qc = decode_evidence.get("quantization_config") or {} + disclosures.append({ + "code": "activation_scales_not_applied", "severity": "caveat", + "affects_comparability": False, + "detail": "the artifact ships a static per-tensor `input_scale` beside each " + "of its %d routed-expert modules (a W4A4 serving kernel would " + "quantize activations with it); this is a weights-only " + "decode-and-run measurement, %d such tensors were read and NOT " + "applied (activation_scheme %s), so activation quantization is not " + "captured by the measured KLD -- the same caveat family as the " + "official FP8 release's dynamic activation scheme." + % (int(decode_evidence.get("modules_decoded", 0)), + int(decode_evidence.get("input_scale_tensors_not_applied", 0)), + qc.get("activation_scheme"))}) + + # DET-D4: `verify` warns when run_count < 5 and asks for this disclosure, but + # nothing in the tooling emitted it, so every capture this engine writes + # would carry a warning nobody could clear. A single cold run is a real + # choice; declare it. + if determinism["run_count"] < 5 and not any( + d.get("code") == "reduced_run_count" for d in disclosures): + disclosures.append({ + "code": "reduced_run_count", "severity": "caveat", + "affects_comparability": False, + "detail": "this dataset is ONE cold capture (run_count 1, the DET-D4 floor is 5). " + "Cross-run determinism is not asserted by the dataset; it is " + "established by a second cold capture plus `fidelity-dataset compare " + "--self-compare`, whose exactly-0.0 result is the SC-1 reproduction " + "confirmation."}) + + # The generation sanity probe's verdict. Recorded on EVERY capture, including + # when it was skipped and when it was disabled, because a check nobody ran is + # not a check that passed and a reader must be able to tell the difference. + if probe is None: + probe = generation_probe.skipped( + "the capture engine did not run the probe", + prompt=getattr(args, "sanity_prompt", None), + expect=getattr(args, "sanity_expect", None), enforced=False) + if probe.get("status") == "skipped": + disclosures.append({ + "code": "generation_sanity_probe_skipped", "severity": "caveat", + "affects_comparability": False, + "detail": "the generation sanity probe did not run (%s). Tensor counts, shapes " + "and the load report can all be clean while a shard loaded as zeros " + "or as randomly initialised weights; this capture carries no " + "evidence that the model generates sensibly." + % probe.get("reason", "no reason recorded")}) + + manifest = dsmanifest.top_manifest( + dataset={"id": args.dataset_id, "name": args.dataset_name, "role": args.role, + "structural_status": "sealed", "qualification": None, + "author": {"name": args.author, "role": "capture-author", "handle": None, + "url": None, "is_registry_maintainer": False}, + "license": args.dataset_license, + # The intended HF dataset repository (schema: "HF dataset + # repo id when published"; null when the capture stays local). + # qualify-root binds it to the job's capture.dataset_repository; + # a refactor dropped it and the first real qualify_root stage + # refused on dataset_repository=None (2026-09-03). + "repository": args.repository, "revision": None, + "base_capture": _base_capture(args.base_capture)}, + weights={"repository": args.weights_repository or args.model, + "revision": args.model_revision, "model_revision": args.model_revision, + "quantized": quantized, "checkpoint_identity_sha256": identity, + "config_sha256": F.sha256_file(os.path.join(model_dir, "config.json")) + if os.path.isfile(os.path.join(model_dir, "config.json")) else None, + "index_sha256": None, "artifact_ref": args.artifact_ref, + # `model_ref` is a REGISTRY model id (`model--...`), not an HF + # repository. A capture that has not been registered has none, + # and inventing one out of the repo name fails the schema. + "model_ref": args.model_ref, + "codec": args.codec, "declared_bits": args.declared_bits, + "declared_head_bits": 16}, + scope=scope, + panel={"panel_id": panel_doc["panel_id"], "panel_file": "panel/panel.json", + "panel_file_sha256": "0" * 64, + "suite_token_hash_sha256": panel_doc["suite_token_hash_sha256"], + "panel_token_sha256_legacy": panel_doc["panel_token_sha256_legacy"], + "panel_receipt_sha256": panel.receipt_sha256, + "repository": args.panel_repository, "revision": args.panel_revision, + "contexts": len(panel_records), "context_length": context_length, + "scored_positions_total": sum(int(r["prediction_positions"]) + for r in panel_records), + "scoring_window": panel_doc["scoring_window"], + "tokenizer": panel_doc["tokenizer"], "remap_file": None, + "contamination": panel_doc["contamination"]}, + capture={"manifest_file": "capture/manifest.json", "manifest_file_sha256": "0" * 64, + "capture_content_digest": evidence, "form": "hidden", + "semantic_point": CUT_POINT, "tensor_key": F.TENSOR_KEY_HIDDEN, + "dtype": "BF16", "dtype_lossless": True, "hidden_width": hidden_size, + "vocab_size": vocab_size, "head_separable": True, + "head_not_separable_reason": None, + "records_count": len(capture_records), + "scored_rows_total": capture_doc["total_scored_rows"], + "total_size_bytes": capture_doc["total_size_bytes"], + "lossy_codec": None}, + head={"present": True, "file": head_rel, "head_json": "head/head.json", + "tensor_key": "lm_head.weight", "compat_tensor_key": "weight", + "shape": head_shape, "dtype": "BF16", "bias": None, + "file_sha256": head_doc["file_sha256"], "raw_tensor_sha256": head_content, + "tensor_content_sha256": head_content, "quantized": head_doc["quantized"], + "bits": head_doc["bits"], "source": head_doc["source"], "applied_in_capture": False, + "final_norm": head_doc["final_norm"], "equality_receipt": None}, + runtime={"file": "runtime/capture-runtime.json", "file_sha256": "0" * 64, + "lane": args.lane, "lane_inferred": False, + "lane_identity_sha256": runtime_doc["lane_identity_sha256"], + "stack_fingerprint_sha256": runtime_doc["stack_fingerprint_sha256"], + "backend_identity_sha256": None, "runtime_reader_sha256": None, + "source": "native"}, + determinism=determinism, + coverage=coverage, + disclosures=disclosures) + + # Additive top-level blocks (the dataset schema is additionalProperties: true + # and section 1.3 requires v1 readers to ignore unknown keys). They are set + # BEFORE `writer.finish`, so the self-blanked `dataset_sha256` covers them -- + # a preview marker outside the seal would be a label anyone could strip. + manifest["generation_sanity_probe"] = probe + if race_report is not None: + simulated = bool(getattr(args, "race_simulate_source", None)) + manifest["race_mode"] = { + "schema": "malaiwah.race-mode-capture.v1", + "enabled": True, + "downloader": "simulated" if simulated else "huggingface_hub", + "repository": getattr(args, "race_repo", None), + "revision": getattr(args, "race_revision", None) or args.model_revision, + "fetch": race_report, + "statement": "the checkpoint was fetched WHILE this capture ran, in the order " + "the layer-outer schedule needed it. Scheduling only: the same " + "bytes went to the same converter in the same order, and the " + "capture_content_digest is the one a fetch-then-capture run " + "produces.", + } + if simulated: + manifest["not_submittable"] = True + manifest["disclosures"].append({ + "code": "simulated_fetch", "severity": "blocking", + "affects_comparability": True, + "detail": "--race-simulate-source was used: the 'fetch' copied from a " + "local directory with an injected delay. That is the offline " + "harness for measuring the SCHEDULE, not a fetch of a published " + "checkpoint. This dataset is not a measurement of anything."}) + if getattr(args, "preview_of", None): + _apply_preview_identity(args, manifest) + + # Ship the panel's build receipt byte-verbatim (spec section 2, + # `panel/panel-receipt.json`). `panel_receipt_sha256` is the receipt's + # declared semantic identity when a resolved binding is present; the raw + # file digest remains independently verified before these bytes are sealed. + # It must be written BEFORE `finish()`, or `checksums.txt` will not cover it + # and `verify` refuses the tree with `unlisted_file`. + if panel.receipt_sha256: + receipt_src = os.path.join(panel.root, "panel.receipt.json") + raw_receipt = open(receipt_src, "rb").read() + receipt_file_sha256 = hashlib.sha256(raw_receipt).hexdigest() + if receipt_file_sha256 != panel.receipt_file_sha256: + raise fail("panel receipt changed after load: expected %s, observed %s" + % (panel.receipt_file_sha256, receipt_file_sha256)) + writer.add_file("panel/panel-receipt.json", raw_receipt) + manifest["panel"]["panel_receipt_file"] = "panel/panel-receipt.json" + log(stage="panel_receipt", file="panel/panel-receipt.json", + declared_receipt_sha256=panel.receipt_sha256, + receipt_file_sha256=receipt_file_sha256, bytes=len(raw_receipt)) + + # README.md is REQUIRED by the spec, is covered by checksums.txt, and so has + # to exist BEFORE the seal. A capture that does not write one produces a + # tree that `verify` refuses -- which is exactly what happened the first + # time this engine ran. + body = (open(args.readme, "r", encoding="utf-8").read() if args.readme + else default_card_body(args, manifest, scope)) + writer.add_readme(render_card(args, manifest, body)) + + # The record is sealed into the dataset, so its subject is the dataset's + # own identity, never the directory it was written to: an absolute pod + # path ("/workspace/fidelity///dataset") made every capture + # before 2026-09-04 unpublishable under the private-path rule. + report = dsvalidate.Report("dataset:%s" % args.dataset_id) + report.ok("pre-seal") + manifest = writer.finish(manifest, panel_doc, capture_doc, head_doc, runtime_doc, + validation_report=report.to_dict()) + + logit_bytes = capture_doc["total_scored_rows"] * vocab_size * 4 + hidden_bytes = capture_doc["total_size_bytes"] + log(stage="sealed", out=args.out, dataset_sha256=manifest[F.SEAL_FIELD], + capture_content_digest=evidence, records=len(capture_records), + scored_rows=capture_doc["total_scored_rows"], + hidden_form_bytes=hidden_bytes, logit_form_bytes_equivalent=logit_bytes, + storage_ratio=round(logit_bytes / float(hidden_bytes), 1) if hidden_bytes else None, + elapsed_seconds=round(time.monotonic() - started, 1)) + return 0 + + +# --------------------------------------------------------------------------- +# CLI +# --------------------------------------------------------------------------- + + +def build_parser() -> argparse.ArgumentParser: + parser = argparse.ArgumentParser( + prog="hf_capture", description=__doc__, + formatter_class=argparse.RawDescriptionHelpFormatter) + parser.add_argument("--model", required=True, + help="HF repo id or a local checkpoint directory") + parser.add_argument("--model-revision", default=None) + parser.add_argument("--model-cache", default=None) + parser.add_argument("--panel", required=True, help="directory holding panel.json + arrays/") + parser.add_argument("--panel-role", default="final") + parser.add_argument("--panel-id", default=None) + parser.add_argument("--panel-name", default=None) + parser.add_argument("--panel-repository", default=None) + parser.add_argument("--panel-revision", default=None) + parser.add_argument("--windows", type=int, default=None, + help="cap the window count (a subset is disclosed in coverage)") + parser.add_argument("--tokenizer-id", default=None) + parser.add_argument( + "--progress-seconds", type=float, default=progress_meter.interval_from_env(), + help="how often to print a progress line when stdout is a FILE (default 30; " + "0 disables). On a TTY the meter updates in place instead and this is " + "ignored. Env override: FIDELITY_PROGRESS_SECONDS.") + parser.add_argument("--out", required=True, help="dataset root to WRITE (it is created)") + parser.add_argument("--panel-binding", default=None, metavar="JSON", + help="complete ResolvedPanel.to_dict() contract for this local tree") + parser.add_argument("--panel-binding-sha256", default=None, + help="SHA-256 of the exact --panel-binding JSON file bytes") + parser.add_argument("--panel-tokenizer-root", default=None, + help="directory holding the tokenizer files bound by the panel " + "(defaults to the resolved model directory)") + parser.add_argument("--role", choices=["root", "quant", "derived"], required=True) + parser.add_argument("--lane", required=True) + parser.add_argument("--device", default="cpu") + parser.add_argument("--trust-remote-code", action="store_true", + help="execute explicitly trusted Python only after immutable Hub code verification") + parser.add_argument("--code-revision", default=None, metavar="40_HEX_SHA", + help="required immutable code commit for --trust-remote-code") + parser.add_argument("--code-repository", default=None, metavar="OWNER/REPO", + help="reviewed code bundle repository, independently pinned from unchanged model weights/config") + parser.add_argument("--schedule", default=layer_outer.SCHEDULE_WINDOW_OUTER, + choices=[layer_outer.SCHEDULE_WINDOW_OUTER, + layer_outer.SCHEDULE_LAYER_OUTER], + help="window-outer (default) loads the model and pushes one window " + "at a time through the whole stack -- for a model that does " + "not fit, that pays for the weights once PER WINDOW. " + "layer-outer inverts the loop: for each layer { load it once; " + "for each window: push that window through it; free it }, so " + "the checkpoint tree is read once per RUN. Windows are still " + "pushed sequentially and the per-window arithmetic is " + "bit-identical; see docs/LAYER-OUTER.md for the proofs.") + parser.add_argument("--layer-residency", default=layer_outer.RESIDENCY_STREAM, + choices=[layer_outer.RESIDENCY_STREAM, layer_outer.RESIDENCY_RESIDENT], + help="layer-outer only. `stream` (default) builds the model on the " + "meta device and materialises one layer at a time -- the point " + "of the schedule. `resident` reorders the loop over a fully " + "loaded model; it saves nothing and exists so a digest " + "mismatch can be attributed to the loop or to the loader.") + parser.add_argument("--memory-report", default=None, + help="write measured peak memory for this run to this JSON path. " + "It is written OUTSIDE the dataset so it cannot disturb the " + "seal; the same figures are also logged as stage=peak_memory.") + parser.add_argument("--device-map", default=None, + help="transformers device_map ('auto', 'balanced', a JSON object, " + "...). When set, the model is DISPATCHED by accelerate and the " + "post-load `.to(--device)` is skipped -- the only way to load a " + "checkpoint larger than one device's memory.") + parser.add_argument("--drop-parallel-plan", action="store_true", + help="empty the config's base_model_tp_plan / base_model_ep_plan " + "before loading. Those plans are read only when the model is " + "split across ranks, which this tool never does, so this is " + "inert for the forward pass -- it exists because transformers " + "5.16.1's FP8 quantizer CRASHES rewriting a non-empty plan " + "(every deepseek_v4 FP8 repo). Recorded in the receipt.") + parser.add_argument("--max-memory", default=None, + help="JSON object passed to from_pretrained as max_memory, e.g. " + '\'{"0": "130GiB", "cpu": "250GiB"}\'') + parser.add_argument("--offload-folder", default=None, + help="accelerate disk-offload directory. NOTE: this writes a SECOND " + "full copy of the weights.") + parser.add_argument("--dtype", default="bfloat16", + choices=["bfloat16", "float16", "float32"]) + parser.add_argument("--dataset-id", required=True) + parser.add_argument("--dataset-name", required=True) + parser.add_argument("--run-name", default="hf-capture") + parser.add_argument("--cold-run", default=None, + help="a label for THIS process, recorded in every tensor's metadata") + parser.add_argument("--author", default="malaiwah") + parser.add_argument("--repository", default=None) + parser.add_argument("--dataset-license", choices=["mit", "other"], default="mit") + parser.add_argument( + "--weights-license-file", default=None, + help="source-model license text copied to LICENSE when dataset-license=other") + parser.add_argument("--weights-license-sha256", default=None) + parser.add_argument("--weights-license-bytes", type=int, default=None) + parser.add_argument("--base-capture", default=None) + parser.add_argument("--weights-repository", default=None) + parser.add_argument("--artifact-ref", default=None, + help="registry artifact id (artifact--...), if one exists") + parser.add_argument("--model-ref", default=None, + help="registry model id (model--...), if one exists") + parser.add_argument("--codec", default=None) + parser.add_argument("--declared-bits", type=float, default=None) + parser.add_argument("--scope-file", default=None, + help="JSON {policy, head_policy, kv_cache_dtype, assignments[]} -- " + "REQUIRED for a quantized candidate: the scope is the honest " + "description of what was changed") + parser.add_argument("--subset-detail", default=None) + parser.add_argument("--disclosures", default=None, help="JSON list") + parser.add_argument("--readme", default=None) + parser.add_argument("--allow-missing-weights", action="store_true", + help="capture even though transformers had to randomly initialise " + "parameters the checkpoint did not provide. Forces a BLOCKING " + "disclosure. Almost never the right flag.") + parser.add_argument("--allow-unexpected-tensors", action="store_true", + help="OBSOLETE compatibility spelling. Always REFUSED: broad " + "unexpected-tensor acceptance cannot support a measurement.") + parser.add_argument("--unexpected-tensors-allowlist", default=None, metavar="JSON", + help="exact JSON array of intentionally unused checkpoint keys") + parser.add_argument("--unexpected-tensors-allowlist-sha256", default=None, + help="SHA-256 of the exact allowlist file bytes") + parser.add_argument("--unexpected-tensors-name-sha256", default=None, + help="SHA-256 of compact canonical JSON over the sorted names") + parser.add_argument("--force", action="store_true") + + race = parser.add_argument_group( + "race mode -- overlap the fetch with the capture (engines/tools/race_fetch.py)") + race.add_argument("--race-repo", default=None, + help="fetch this HF repo IN THE BACKGROUND, in the order the " + "layer-outer schedule needs it, while the capture runs. " + "--model must be a directory already holding config.json, " + "the tokenizer and model.safetensors.index.json; the shards " + "land into it. Changes WHEN bytes arrive, never which.") + race.add_argument("--race-revision", default=None, + help="the pinned revision to fetch (defaults to --model-revision)") + race.add_argument("--race-workers", type=int, default=8, + help="parallel downloads (default 8). Ordering is by priority, so " + "raising this does not reorder the queue, it widens it.") + race.add_argument("--race-timeout-seconds", type=float, default=7200.0, + help="how long the capture will block for a layer's shards before " + "REFUSING (default 7200). A timeout is never a proceed.") + race.add_argument("--race-layer-key-regex", + default=race_fetch.DEFAULT_LAYER_KEY_REGEX, + help="how a checkpoint key names its decoder layer index. The " + "default matches model.layers.N., language_model.model." + "layers.N. and a bare layers.N.") + race.add_argument("--race-report", default=None, + help="write the measured fetch/overlap report to this JSON path") + race.add_argument("--race-simulate-source", default=None, metavar="DIR", + help="TEST HARNESS ONLY: fetch from this local directory instead " + "of the Hub, so the SCHEDULE can be measured offline and as a " + "controlled A/B. Stamps a BLOCKING disclosure -- a capture " + "made this way is not a measurement of anything.") + race.add_argument("--race-simulate-seconds", type=float, default=0.0, + help="TEST HARNESS ONLY: per-file delay for --race-simulate-source") + + sanity = parser.add_argument_group( + "generation sanity probe (engines/tools/generation_probe.py) -- on by default") + sanity.add_argument("--sanity-prompt", default=generation_probe.DEFAULT_PROMPT, + help="the prompt whose next token is checked. One extra window " + "through the schedule already running: ~1/N of an N-window " + "capture, and no extra weight loading at all.") + sanity.add_argument("--sanity-expect", default=None, + help="the expected continuation, e.g. Paris. Given, the probe is " + "FAIL-CLOSED on it; omitted, the probe still runs and is " + "still recorded, and only a degenerate (all-logits-equal) " + "distribution refuses.") + preview = parser.add_argument_group( + "preview identity (docs/RACE-MODE.md) -- a preview is a DIFFERENT dataset, " + "never an earlier version of the final one") + preview.add_argument("--preview-of", default=None, metavar="FINAL_DATASET_ID", + help="seal this capture as a PRELIMINARY dataset superseded by " + "FINAL_DATASET_ID. It gets its own dataset id (which is the " + "reference_id half of every comparability key computed " + "against it), a blocking `preview_capture` disclosure, and " + "not_submittable: true. It is sealed and immutable like any " + "other capture and is NEVER updated in place.") + sanity.add_argument("--no-sanity-check", dest="sanity_check", action="store_false", + default=True, + help="do not run the probe at all. The manifest then records that " + "it was disabled, because a check nobody ran is not a check " + "that passed.") + return parser + + +def main(argv: Optional[Sequence[str]] = None) -> int: + args = build_parser().parse_args(argv) + license_args = ( + args.weights_license_file, + args.weights_license_sha256, + args.weights_license_bytes) + if args.dataset_license == "other": + if not all(value is not None for value in license_args): + print( + "hf_capture: REFUSED: --dataset-license other requires " + "--weights-license-file, --weights-license-sha256, and " + "--weights-license-bytes.", file=sys.stderr) + return 3 + elif any(value is not None for value in license_args): + print( + "hf_capture: REFUSED: copied source-license bytes require " + "--dataset-license other.", file=sys.stderr) + return 3 + try: + if args.dataset_license == "other": + (args.weights_license_payload, + args.weights_license_binding) = load_weights_license(*license_args) + else: + args.weights_license_payload = None + args.weights_license_binding = None + except SystemExit as exc: + return int(exc.code or 1) + if args.allow_unexpected_tensors: + print("hf_capture: REFUSED: --allow-unexpected-tensors is obsolete and can never " + "authorize a capture. Use --unexpected-tensors-allowlist with both exact " + "SHA-256 bindings.", file=sys.stderr) + return 3 + allowlist_args = (args.unexpected_tensors_allowlist, + args.unexpected_tensors_allowlist_sha256, + args.unexpected_tensors_name_sha256) + if any(value is not None for value in allowlist_args) and not all( + value is not None for value in allowlist_args): + print("hf_capture: REFUSED: --unexpected-tensors-allowlist, " + "--unexpected-tensors-allowlist-sha256, and " + "--unexpected-tensors-name-sha256 are an all-or-none contract.", + file=sys.stderr) + return 3 + try: + args.unexpected_tensor_allowlist_binding = ( + load_unexpected_tensor_allowlist(*allowlist_args) + if allowlist_args[0] is not None else None) + except SystemExit as exc: + return int(exc.code or 1) + if args.device_map and args.device_map.strip().startswith("{"): + args.device_map = json.loads(args.device_map) + panel_binding_args = (args.panel_binding, args.panel_binding_sha256) + if any(value is not None for value in panel_binding_args) and not all( + value is not None for value in panel_binding_args): + print("hf_capture: REFUSED: --panel-binding and --panel-binding-sha256 are " + "an all-or-none contract.", file=sys.stderr) + return 3 + if args.cold_run is None: + args.cold_run = "%s-%d" % (time.strftime("%Y%m%dT%H%M%SZ", time.gmtime()), os.getpid()) + if os.path.exists(args.out): + if not args.force: + print("hf_capture: REFUSED: %s exists (pass --force)" % args.out, file=sys.stderr) + return 3 + import shutil + + shutil.rmtree(args.out) + if args.schedule == layer_outer.SCHEDULE_LAYER_OUTER and args.device_map: + # These are two different answers to the same question and they fight. + # `--device-map` hands the model to `accelerate`, which attaches + # `AlignDevicesHook`s that move weights around per module call; the + # layer-outer streamer owns residency itself and would be racing those + # hooks for the same parameters. They are also not complementary: the + # reason `--device-map` exists (docs/GLM53-ROOT-FEASIBILITY.md R2) is + # that the window-outer loop cannot fit the model, and layer-outer + # removes that need on a single device. Composing them is future work, + # not a silently-broken flag combination. + print("hf_capture: REFUSED: --schedule layer-outer with --device-map. The " + "layer-outer streamer manages residency itself (meta model, one layer " + "materialised at a time); accelerate's dispatch hooks move the same " + "parameters on their own schedule and the two would fight over them. " + "Drop --device-map: on a single device layer-outer is what --device-map " + "was working around. Multi-device layer-outer is not implemented.", + file=sys.stderr) + return 3 + if args.role != "root" and not args.scope_file: + print("hf_capture: REFUSED: --role %s without --scope-file. A candidate capture that " + "does not describe what was quantized is unreadable evidence." % args.role, + file=sys.stderr) + return 3 + try: + return run_capture(args) + except codepin.CodePinError as exc: + print("hf_capture: %s" % exc, file=sys.stderr) + return 3 + except SystemExit as exc: + return int(exc.code or 1) + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/raw/retained/engines--tools--layer_outer.py b/raw/retained/engines--tools--layer_outer.py new file mode 100644 index 0000000000000000000000000000000000000000..0d848b75794ca2f525d4f5cb768ceeb2a800e8d7 --- /dev/null +++ b/raw/retained/engines--tools--layer_outer.py @@ -0,0 +1,3869 @@ +#!/usr/bin/env python3 +"""The layer-outer, window-inner capture schedule -- and the streaming residency it needs. + +Why this file exists +-------------------- +`engines/tools/hf_capture.py` captures a panel the obvious way: load the model, then +push one window at a time through the whole stack. For a checkpoint that does +not fit in memory that is the wrong loop order, and the cost is not compute -- +it is WEIGHT LOADING. `docs/GLM53-ROOT-FEASIBILITY.md` puts the number on it: +`zai-org/GLM-5.3-BF16` materialises 1,486.8 GB, which is larger than any RAM +configuration we can rent, so the window-outer schedule cannot run at all; the +`--device-map` paths that make it *expressible* pay ~358 GB of host-to-device +traffic per window (B-1) or write a second full 1,486.8 GB copy to disk (B-2). + +This module inverts the loop: + + for each layer: load it once; for each window: push that window through it; free it + +Every layer's weights are materialised **exactly once for the whole panel** +instead of once per window, and only one layer is resident at a time. + +THE NUMBERS DO NOT MOVE +----------------------- +This is a *scheduling* change, never an arithmetic one. Windows are pushed +through each layer **sequentially, one at a time**, never batched: batching +would change the reduction order of the matmuls and therefore change the +numbers, and a measurement whose numbers moved is worth nothing. The engine +exists to make a measurement POSSIBLE, not to make it faster. + +How bit-identity is obtained, and why it is structural rather than hoped for +--------------------------------------------------------------------------- +The naive implementation of a layer-outer loop re-implements the model's +forward: embeddings, position ids, the causal-mask mapping, the rotary +embeddings, the per-layer kwargs, the carried state, the final norm. Every one +of those is a chance to differ from `transformers` by a detail, and several of +them are architecture-specific in ways that bite exactly on the architecture we +care about. `GlmMoeDsaModel.forward` threads a SECOND value between layers -- + + hidden_states, topk_indices = decoder_layer(..., prev_topk_indices=topk_indices) + +-- the DSA indexer's shared top-k selection, which only the `full` indexer +layers recompute; and `Glm5NextTextModel.forward` carries a hyper-channel +dimension (`hc_mult`) plus a different mask builder. A re-implementation that +knows about "hidden states" and not about those is silently wrong. + +So this module re-implements NOTHING. It runs the model's own +`forward` once per (layer, window) and replaces only the decoder layers with +proxies: + + * a proxy for a layer BELOW the one being computed returns, verbatim, the + value that layer's successor produced on the previous outer iteration -- + the whole return value, whatever its shape, so `topk_indices` and any other + carried state ride along untouched; + * the proxy for the layer being computed calls the real layer and memoises + its return value; + * a proxy for a layer ABOVE it raises `_Suspend`, which unwinds the forward. + +The model's own prologue therefore builds the embeddings, position ids, masks +and rotary embeddings; the model's own loop body computes the per-layer kwargs +and threads the carried state; the model's own epilogue runs the final norm and +the head. The only thing this file decides is WHEN each layer runs. The +per-window arithmetic is the same operations, in the same order, on the same +inputs -- which is why the capture digests compare equal rather than close. + +The price is that the prologue is recomputed once per (layer, window) instead +of once per window. It is an embedding gather, a mask build and a rotary +table: microseconds against a layer of a 753B-parameter MoE. It is paid on +purpose, to buy an implementation that cannot drift from the model's own code. + +Streaming residency +------------------- +Reordering the loop is only half of it. If the model is fully resident the new +order saves nothing, so this module also builds the model on the meta device +and materialises **one layer at a time** through `transformers`' own +`convert_and_load_state_dict_in_model` -- the same converter, the same +`WeightConverter` chain that fuses 256 per-expert matrices into one tensor, the +same dtype plan. Reusing it rather than re-deriving the fusion is what makes +the streamed weights byte-identical to the `from_pretrained` weights; that +identity is asserted directly by `selftest_layer_outer.py`, not assumed. + +`--layer-residency resident` keeps the new loop order over a fully loaded model. +It buys nothing operationally and exists so that a digest mismatch can be +attributed: `resident` isolates the schedule, `stream` adds the loader. + +THE TRAP THIS LOADER WALKS INTO, AND THE GUARD FOR IT +----------------------------------------------------- +Stage A found that `transformers` enumerates each shard's OWN safetensors +header rather than the checkpoint's pruned `model.safetensors.index.json`. A +per-layer loader reads shard headers directly, so it inherits the same +exposure: against a sparsely-fetched tree a tensor can be *named* by a header +whose bytes were never fetched, and a short read is not an error -- it is +ZEROS, and zeros load without complaint. `audit_checkpoint_tree` refuses +before the first window on the two signatures that produces: a shard shorter +than its own header requires, and a header/index key-set disagreement. +""" + +from __future__ import annotations + +import gc +import hashlib +import json +import os +import re +import struct +import sys +import time +from typing import Any, Callable, Dict, Iterable, List, Optional, Sequence, Set, Tuple + +SCHEDULE_WINDOW_OUTER = "window-outer" +SCHEDULE_LAYER_OUTER = "layer-outer" +RESIDENCY_STREAM = "stream" +RESIDENCY_RESIDENT = "resident" + + +class LayerOuterError(Exception): + """Something about this model or checkpoint the layer-outer engine will not guess at.""" + + +class _Suspend(Exception): + """Raised by a proxy above the layer being computed, to unwind the forward pass.""" + + +# --------------------------------------------------------------------------- +# locating the decoder stack +# --------------------------------------------------------------------------- + + +def find_decoder_layers(model) -> Tuple[str, Any]: + """The text decoder's `nn.ModuleList`, by structure rather than by name. + + Naming alone is not enough: `Glm5NextForConditionalGeneration` carries a + vision tower whose blocks are also a ModuleList, and its text stack is + nested two levels down at `model.language_model.layers`. The structural + signature of a text decoder stack is that its PARENT also owns the input + embedding (`embed_tokens` or the actual registered input embedding returned + by the model's getter), which the vision tower does not. + + Refuses on zero or several matches rather than picking one: running a + layer-outer schedule over the wrong ModuleList would produce a capture that + is wrong in a way no digest of ours would flag. + """ + import torch + + candidates = [] + modules = dict(model.named_modules()) + input_embedding = None + getter = getattr(model, "get_input_embeddings", None) + if callable(getter): + try: + input_embedding = getter() + except (AttributeError, NotImplementedError): + pass + for name, module in modules.items(): + if not isinstance(module, torch.nn.ModuleList) or len(module) == 0: + continue + parent_name, _, leaf = name.rpartition(".") + if leaf != "layers": + continue + parent = modules.get(parent_name) + owns_input = (parent is not None and isinstance(input_embedding, torch.nn.Embedding) + and any(child is input_embedding for child in parent.children())) + if parent is None or not (hasattr(parent, "embed_tokens") or owns_input): + continue + candidates.append((name, module)) + if not candidates: + raise LayerOuterError( + "could not find the text decoder's layer list: no `nn.ModuleList` named " + "'layers' whose parent module owns `embed_tokens` or the actual registered " + "input embedding. The layer-outer " + "schedule needs to know which modules are the per-layer weights it should " + "stream, and guessing is worse than refusing. Model class: %s" + % type(model).__name__) + if len(candidates) > 1: + raise LayerOuterError( + "found %d candidate decoder layer lists (%s); the layer-outer schedule " + "refuses to pick one. This model needs an explicit selector." + % (len(candidates), ", ".join(name for name, _ in candidates))) + return candidates[0] + + +# --------------------------------------------------------------------------- +# the checkpoint tree audit (the "holes reading as zeros" guard) +# --------------------------------------------------------------------------- + + +def _safetensors_header(path: str) -> Tuple[Dict[str, Any], int]: + """(header dict, the byte length the file must have for its own header to be readable).""" + with open(path, "rb") as handle: + raw = handle.read(8) + if len(raw) != 8: + raise LayerOuterError("%s is shorter than a safetensors header length field " + "(%d bytes)" % (path, len(raw))) + (header_len,) = struct.unpack(" Dict[str, Any]: + """Refuse a checkpoint whose shards can hand back holes instead of weights. + + `shards` restricts the audit to a NAMED SUBSET, for the overlapped fetch of + `engines/tools/race_fetch.py`: at the moment layer N is about to be loaded, the + shards for layer N+1 may legitimately still be downloading, and auditing + them would refuse a tree that is merely incomplete-so-far. The subset audit + is not weaker on what it covers -- each named shard is still checked against + its own header length, and the index/header key-set comparison is still + exact, restricted on BOTH sides to the named shards. Every shard is audited + exactly once, immediately before the first load that reads it. + + Stage A (docs/GLM53-ROOT-FEASIBILITY.md) found that `transformers` + enumerates each shard's own header, not the pruned index. A loader that + reads shards directly -- which this one does, per layer -- can therefore be + handed a tensor NAME whose BYTES were never fetched. safetensors does not + treat a short file as an error at open time; the tensor reads as zeros, the + load reports nothing, and the capture is a confident measurement of a hole. + + Two signatures are checked, both cheap and both before the first window: + + 1. a shard whose on-disk size is smaller than its own header requires -- + the signature of a range-fetched or interrupted download; + 2. a shard header and the checkpoint index disagreeing about which keys + exist, in either direction -- the signature of a pruned index over a + complete shard (extra header keys) or a truncated tree (missing ones). + + What it does NOT catch, stated so nobody relies on it: a shard that is the + right LENGTH but whose bytes were written as zeros (a sparse-file fetch), + and any corruption that preserves length. Only a content digest catches + those, and the checkpoint identity `hf_capture` already computes is that + digest -- for the tree as a whole, once. + """ + index_path = os.path.join(model_dir, "model.safetensors.index.json") + index_keys: Optional[set] = None + shard_names: List[str] + if os.path.isfile(index_path): + with open(index_path, "r", encoding="utf-8") as handle: + index = json.load(handle) + weight_map = index.get("weight_map") or {} + index_keys = set(weight_map) + shard_names = sorted(set(weight_map.values())) + if shards is not None: + wanted = set(shards) + unknown = sorted(wanted - set(shard_names)) + if unknown: + raise LayerOuterError( + "REFUSED: asked to audit %d shard(s) the checkpoint index does not " + "name: %s. A shard nothing in the index points at holds tensors no " + "load will ever ask for by name -- or the audit is being driven from " + "a stale plan." + % (len(unknown), ", ".join(unknown[:4]))) + shard_names = sorted(wanted) + index_keys = {key for key, shard in weight_map.items() if shard in wanted} + else: + shard_names = sorted(name for name in os.listdir(model_dir) + if name.endswith(".safetensors")) + if shards is not None: + raise LayerOuterError( + "REFUSED: a subset audit needs model.safetensors.index.json, which %s " + "does not have. Without the index there is no map from shard to tensor, " + "so 'these shards are complete' cannot be stated about a partial tree." + % model_dir) + if not shard_names: + raise LayerOuterError("no *.safetensors shards in %s" % model_dir) + + header_keys: set = set() + shards: List[Dict[str, Any]] = [] + for name in shard_names: + path = os.path.join(model_dir, name) + if not os.path.isfile(path): + raise LayerOuterError( + "REFUSED: the checkpoint index names shard %s, which is not present in " + "%s. A per-layer loader would simply not find that shard's tensors and " + "the layers they carry would stay unset." % (name, model_dir)) + size = os.path.getsize(path) + header, required = _safetensors_header(path) + if size < required: + raise LayerOuterError( + "REFUSED: shard %s is %d bytes but its own safetensors header requires " + "%d. This is the signature of a partially fetched shard, and it is the " + "dangerous case rather than a loud one: safetensors does not error on a " + "short file, the missing bytes read as ZEROS, and a capture over them is " + "a confident number for weights that were never present." + % (name, size, required)) + keys = {k for k in header if k != "__metadata__"} + header_keys |= keys + shards.append({"name": name, "size": size, "tensors": len(keys)}) + + if index_keys is not None and index_keys != header_keys: + only_header = sorted(header_keys - index_keys) + only_index = sorted(index_keys - header_keys) + raise LayerOuterError( + "REFUSED: the shard headers and model.safetensors.index.json disagree about " + "which tensors this checkpoint holds -- %d named only by a header, %d named " + "only by the index%s%s. transformers enumerates the HEADERS, so a tensor in " + "the first group is one a loader will happily read from a region of a file " + "the index says nothing about. Resolve the tree before capturing." + % (len(only_header), len(only_index), + ("; header-only e.g. %s" % ", ".join(only_header[:4])) if only_header else "", + ("; index-only e.g. %s" % ", ".join(only_index[:4])) if only_index else "")) + + return {"shards": len(shards), "tensors": len(header_keys), + "index_present": index_keys is not None, + "bytes": sum(s["size"] for s in shards)} + + +# --------------------------------------------------------------------------- +# streaming residency +# --------------------------------------------------------------------------- + + +def _require_transformers_internals(): + """The private loading API this streamer stands on, or a refusal naming it. + + Reusing `transformers`' converter is the whole reason the streamed weights + are byte-identical to the `from_pretrained` weights -- a MoE checkpoint's + per-expert matrices are fused by a `WeightConverter`, and re-deriving that + fusion by hand is precisely the kind of "close enough" this suite exists to + refuse. The API is private, so a build that does not offer it gets a + refusal that names what is missing, not a silent fallback to hand-rolled + loading. + """ + missing = [] + try: + from transformers.core_model_loading import convert_and_load_state_dict_in_model + except Exception as exc: # pragma: no cover - depends on the build + convert_and_load_state_dict_in_model = None + missing.append("transformers.core_model_loading.convert_and_load_state_dict_in_model (%s)" % exc) + try: + from transformers.modeling_utils import (LoadStateDictConfig, + _load_parameter_into_model, + patch_output_recorders) + except Exception as exc: # pragma: no cover + LoadStateDictConfig = _load_parameter_into_model = patch_output_recorders = None + missing.append("transformers.modeling_utils.{LoadStateDictConfig," + "_load_parameter_into_model,patch_output_recorders} (%s)" % exc) + try: + from transformers.conversion_mapping import get_model_conversion_mapping + except Exception as exc: # pragma: no cover + get_model_conversion_mapping = None + missing.append("transformers.conversion_mapping.get_model_conversion_mapping (%s)" % exc) + if missing: + raise LayerOuterError( + "REFUSED: --layer-residency stream needs transformers' own weight-conversion " + "loader so that a streamed layer is BYTE-IDENTICAL to what from_pretrained " + "would have built (a MoE checkpoint's experts are fused by a WeightConverter; " + "re-deriving that fusion by hand is exactly the kind of near-enough this suite " + "refuses). This build does not expose: %s. Use --layer-residency resident, " + "which reorders the loop over a fully loaded model and needs no private API." + % "; ".join(missing)) + return (convert_and_load_state_dict_in_model, LoadStateDictConfig, + _load_parameter_into_model, patch_output_recorders, + get_model_conversion_mapping) + + +class StreamedModel(object): + """A model whose decoder layers are materialised one at a time. + + Everything that is NOT a decoder-layer parameter -- embeddings, the final + norm, the head, every buffer including the per-layer ones -- is loaded once + and stays resident: that is the 37.78 GB "non-routed set" of + `docs/GLM53-ROOT-FEASIBILITY.md` §2, and it is the part a forward pass needs + at every layer anyway. Buffers are deliberately never streamed: they are + rotary tables and router correction biases, kilobytes against gigabytes, + and streaming them would add a way to get a forward pass wrong for no + saving at all. + """ + + def __init__(self, model, layers_prefix: str, layers, load_layer_keys, + load_call, free_call, report: Dict[str, Any]): + self.model = model + self.layers_prefix = layers_prefix + self.layers = layers + self._load_layer_keys = load_layer_keys + self._load_call = load_call + self._free_call = free_call + self.report = report + self.resident_layer: Optional[int] = None + + # -- the two operations the schedule needs -------------------------------- + + def load_layer(self, index: int) -> None: + self._load_call(index) + self.resident_layer = index + + def free_layer(self, index: int) -> None: + self._free_call(index) + if self.resident_layer == index: + self.resident_layer = None + + def close(self) -> None: + """Release the safetensors handles once the last layer has been loaded. + + They are held open for the whole layer loop on purpose: the state dict + is lazy slices over those mmaps, and closing early would break the + loads that have not happened yet. + """ + for pointer in getattr(self, "pointers", ()) or (): + try: + pointer.__exit__(None, None, None) + except Exception: # pragma: no cover - best effort cleanup + pass + self.pointers = [] + + +class _LayerCounts(object): + """A live view of "how many checkpoint tensors does layer N have". + + Not a snapshot: under a gate the layer subsets are still being filled in as + shards land, and a dict comprehension taken at build time would report 0 for + every layer that had not arrived yet -- in the log line whose whole job is to + say what was just loaded. + """ + + def __init__(self, layer_subset: Dict[int, Dict[str, Any]]): + self._subset = layer_subset + + def get(self, index: int, default: Any = None) -> Any: + subset = self._subset.get(int(index)) + return len(subset) if subset is not None else default + + def __getitem__(self, index: int) -> int: + return len(self._subset[int(index)]) + + def __len__(self) -> int: + return len(self._subset) + + def items(self): + return [(index, len(subset)) for index, subset in sorted(self._subset.items())] + + +def _index_weight_map(model_dir: str) -> Dict[str, str]: + path = os.path.join(model_dir, "model.safetensors.index.json") + if not os.path.isfile(path): + raise LayerOuterError( + "REFUSED: a gated (race-mode) streamed load needs %s -- it is the only " + "statement of which tensors the complete checkpoint holds, and without it " + "a tree that is merely still downloading is indistinguishable from a tree " + "that is missing tensors." % path) + with open(path, "r", encoding="utf-8") as handle: + return json.load(handle).get("weight_map") or {} + + +def _model_device(device: str): + import torch + + return torch.device(device) + + +# --------------------------------------------------------------------------- +# FP8 block-scaled checkpoints: decode to bf16 on the capture device, per +# tensor, under a host-parity gate +# --------------------------------------------------------------------------- + +FP8_DECODE_METHOD = "fp8-block-dequant-to-bf16" +#: The arithmetic this decoder reproduces, and the parity evidence that shows +#: it does so bitwise on real tensors: transformers 5.16.1 +#: `integrations.finegrained_fp8.Fp8Dequantize._dequantize_one` -- fp8 -> fp32, +#: one multiply per element by the block's fp32 scale, one cast to the +#: destination dtype. `engines/tools/selftest_fp8_decode_offline.py` asserts +#: equality against that function on synthetic and on real fetched shards. +FP8_DECODE_REFERENCE = "transformers.integrations.finegrained_fp8.Fp8Dequantize._dequantize_one" +FP8_SCALE_SUFFIX = "_scale_inv" + + +def fp8_checkpoint_plan(config) -> Optional[Dict[str, Any]]: + """The exact FP8 form this schedule decodes, read from the config, or None. + + Accepts only the FineGrainedFP8 checkpoint form `transformers` itself + loads with `dequantize=True`: `quant_method: fp8`, `fmt: e4m3`, a 2-D + `weight_block_size`, dynamic (or unstated) activation scaling. Anything + else is refused by the caller: a static activation scale is not a + weights-only artifact, and a packed format has other shapes. + """ + qc = getattr(config, "quantization_config", None) + if not qc: + return None + if not isinstance(qc, dict): + qc = qc.to_dict() if hasattr(qc, "to_dict") else dict(getattr(qc, "__dict__", {})) + method = qc.get("quant_method") + fmt = qc.get("fmt") + block = qc.get("weight_block_size") + activation = qc.get("activation_scheme") + ok = (method == "fp8" and fmt == "e4m3" + and isinstance(block, (list, tuple)) and len(block) == 2 + and all(isinstance(v, int) and not isinstance(v, bool) and v > 0 for v in block) + and activation in (None, "dynamic")) + if not ok: + raise LayerOuterError( + "REFUSED: quantization_config quant_method=%r fmt=%r weight_block_size=%r " + "activation_scheme=%r is not the block-scaled FP8 e4m3 weights-only form " + "this schedule decodes (the form transformers loads with dequantize=True). " + "Use --schedule window-outer, or author a decoder for this surface." + % (method, fmt, block, activation)) + return { + "quant_method": method, "fmt": fmt, + "weight_block_size": [int(block[0]), int(block[1])], + "activation_scheme": activation, + "modules_to_not_convert": sorted(str(m) for m in (qc.get("modules_to_not_convert") or [])), + } + + +def dequantize_block_fp8(quantized, scales, output_dtype, block_size=(128, 128)): + """fp8 e4m3 x fp32 block scale -> output dtype, the reference arithmetic exactly. + + `quantized` is (rows, cols); `scales` is (ceil(rows/bm), ceil(cols/bn)) in + fp32 -- the DeepSeek-V3 block form `weight_block_size` declares, where the + LAST block along either axis may be partial (GLM-5.3's kv_a_proj_with_mqa + is 576 x 6144 under a 128 x 128 block: a 5 x 48 grid). Each element is + promoted to fp32, multiplied ONCE by its block's scale in fp32, and cast + once to `output_dtype` (round to nearest even). No accumulation, no fused + multiply-add, no device-dependent kernel. + + Full blocks: bitwise `transformers` `Fp8Dequantize._dequantize_one`, which + performs this exact reshape-multiply-cast. Partial blocks: the same + arithmetic on the zero-padded tensor, cropped -- an element's value never + depends on its neighbours, so this equals the kernel rule every FP8 server + (DeepSeek `weight_dequant`, vLLM, DeepGEMM) applies: `s[i // bm, j // bn]`. + `engines/tools/fp8_parity.py` asserts both on real fetched shards. + """ + import torch + + if quantized.dtype != torch.float8_e4m3fn: + raise LayerOuterError( + "REFUSED: block-scaled FP8 decode was handed a %s tensor" % quantized.dtype) + if scales.dtype != torch.float32: + raise LayerOuterError( + "REFUSED: block-scaled FP8 decode expects fp32 scales, got %s" % scales.dtype) + if quantized.dim() != 2 or scales.dim() != 2: + raise LayerOuterError( + "REFUSED: block-scaled FP8 decode expects 2-D weight and scale, got %s and %s" + % (tuple(quantized.shape), tuple(scales.shape))) + block_m, block_n = int(block_size[0]), int(block_size[1]) + rows, cols = quantized.shape + scale_rows, scale_cols = scales.shape + if (scale_rows != -(-rows // block_m)) or (scale_cols != -(-cols // block_n)): + raise LayerOuterError( + "REFUSED: weight shape (%d, %d) under a (%d, %d) block needs a (%d, %d) " + "scale grid; the checkpoint carries (%d, %d)" + % (rows, cols, block_m, block_n, -(-rows // block_m), -(-cols // block_n), + scale_rows, scale_cols)) + pad_rows = scale_rows * block_m - rows + pad_cols = scale_cols * block_n - cols + q = quantized.to(torch.float32) + if pad_rows or pad_cols: + q = torch.nn.functional.pad(q, (0, pad_cols, 0, pad_rows)) + q = q.reshape(scale_rows, block_m, scale_cols, block_n) + s = scales.to(torch.float32).reshape(scale_rows, 1, scale_cols, 1) + out = (q * s).to(output_dtype).reshape(scale_rows * block_m, scale_cols * block_n) + if pad_rows or pad_cols: + out = out[:rows, :cols].contiguous() + return out + + +def _fp8_device_decode(quantized, scales, torch_dtype, block_size, device): + """The production FP8 decode: fp8 bytes + fp32 scales to `device`, then the + unchanged reference arithmetic there. Separated so a selftest can stand a + perturbing stub in its place and watch the parity gate refuse.""" + return dequantize_block_fp8(quantized.to(device, non_blocking=True), + scales.to(device), torch_dtype, block_size) + + +def _fp8_has_partial_block(quantized, block_size) -> bool: + rows, cols = quantized.shape + return bool(rows % int(block_size[0]) or cols % int(block_size[1])) + + +def materialize_fp8_subset(subset: Dict[str, Any], plan: Dict[str, Any], torch_dtype, + stats: Dict[str, int], device: str = "cpu", + parity_all: bool = False, + sink: Optional[Callable[[str, Any], bool]] = None, + device_decode: Optional[Callable[..., Any]] = None + ) -> Dict[str, Any]: + """Replace every (weight, weight_scale_inv) pair in a lazy subset by one decoded tensor. + + Keys keep their order and the weight keeps its name, so the model's own + conversion mapping sees exactly what it would see for a bf16 checkpoint. + A scale without its weight, or an fp8 tensor without a scale, is refused: + the second case is the silent one (the payload would load as bf16 with + the block scale never applied). + + DECODES ON `device`. The arithmetic is one fp8->fp32 promotion (exact), + one fp32 multiply and one round-to-nearest-even cast per element, none + of which is a reduction, so CPU and CUDA are expected to agree bitwise -- + and "expected" is not the standard here. Every run RE-DECODES ON THE HOST + and asserts `torch.equal` for (a) every tensor of the first decoded layer + (`parity_all`) and (b) every tensor whose shape leaves a partial block + under the plan's block size (GLM-5.3's 576-row kv_a_proj_with_mqa), on + every layer. A mismatch REFUSES the run by tensor, dtype, device and + max_abs_diff; it never falls back to the host result. On the pod this is + one layer's worth of the old host arithmetic per run instead of 75. The + counts land in `stats` and the receipt's weights_decode block says so. + + `sink(key, tensor) -> bool` receives each decoded tensor as soon as it + exists; when it returns True the tensor is NOT held in the returned dict + (the direct expert fill copies it into its fused slice and drops it, so a + layer's 19 GB of decoded experts never accumulates anywhere). + """ + import torch + + decode = device_decode if device_decode is not None else _fp8_device_decode + on_host = str(device) == "cpu" + block = plan["weight_block_size"] + out: Dict[str, Any] = {} + scale_keys = {key for key in subset if key.endswith(FP8_SCALE_SUFFIX)} + for key, value in subset.items(): + if key in scale_keys: + continue + scale_key = key + FP8_SCALE_SUFFIX + if scale_key in scale_keys: + quantized = _eager(value) + scales = _eager(subset[scale_key]) + if on_host: + decoded = dequantize_block_fp8(quantized, scales, torch_dtype, block) + else: + decoded = decode(quantized, scales, torch_dtype, block, device) + partial = _fp8_has_partial_block(quantized, block) + if parity_all or partial: + host = dequantize_block_fp8(quantized, scales, torch_dtype, block) + mirrored = decoded.to("cpu") + if mirrored.shape != host.shape or mirrored.dtype != host.dtype \ + or not torch.equal(host, mirrored): + diff = ((mirrored.to(torch.float32) - host.to(torch.float32)) + .abs().max().item() + if mirrored.shape == host.shape else float("inf")) + raise LayerOuterError( + "REFUSED: block-scaled FP8 decode of %s (%s, block %s) on %s " + "is not bitwise the host decode: max_abs_diff=%r, output " + "dtype %s. The receipt would claim %s and the bytes would " + "be something else; decode on the host with --device cpu " + "or fix the device arithmetic." + % (key, tuple(quantized.shape), tuple(block), device, diff, + torch_dtype, FP8_DECODE_REFERENCE)) + stats["device_parity_checked"] = stats.get("device_parity_checked", 0) + 1 + if partial: + stats["device_parity_partial_block_checked"] = ( + stats.get("device_parity_partial_block_checked", 0) + 1) + del host, mirrored + stats["dequantized"] += 1 + stats["scales_consumed"] += 1 + stats["fp8_bytes"] += int(quantized.numel()) + stats["decode_device"] = "cpu" if on_host else str(device) + if sink is not None and sink(key, decoded): + del decoded + continue + out[key] = decoded + continue + dtype = getattr(value, "dtype", None) + if dtype is None and hasattr(value, "get_dtype"): + dtype = value.get_dtype() + if str(dtype) in ("torch.float8_e4m3fn", "F8_E4M3", "float8_e4m3fn"): + raise LayerOuterError( + "REFUSED: %s is an fp8 tensor with no %s sibling in the checkpoint; " + "loading it as bf16 would apply no block scale" % (key, scale_key)) + out[key] = value + orphans = sorted(key for key in scale_keys + if key[:-len(FP8_SCALE_SUFFIX)] not in subset) + if orphans: + raise LayerOuterError( + "REFUSED: %d scale tensor(s) have no weight beside them: %s%s" + % (len(orphans), ", ".join(orphans[:4]), + " (+%d more)" % (len(orphans) - 4) if len(orphans) > 4 else "")) + return out + + +# --------------------------------------------------------------------------- +# EXL3 trellis checkpoints: decode to bf16 on the host, per module, per layer +# --------------------------------------------------------------------------- + +TRELLIS_DECODE_METHOD = "exl3-trellis-decode-to-bf16" +#: Every byte of decode math is `engines/tools/exl3hf_surface.py`'s +#: `decode_payload_hf` -- the exllamav3 v1.4.x `mul1`/`mcg` codebooks +#: transcribed from `exllamav3_ext/quant/codebook.cuh`, whose LUTs and anybits +#: unpack are proven bitwise offline against an independent fp64 route, against +#: `dione_surface`'s copy (K2/K3/K4/K6/K8) and against the campaign reader +#: (`engines/tools/selftest_exl3hf_offline.py`). This module adds NO +#: arithmetic: it groups a checkpoint's payload objects, picks each module's +#: codebook from the object that is actually present, and hands the decoded +#: dense tensor to the same converter a bf16 checkpoint would reach. +TRELLIS_DECODE_REFERENCE = "engines/tools/exl3hf_surface.py::decode_payload_hf" +TRELLIS_PAYLOAD_OBJECTS = ("trellis", "suh", "svh") +TRELLIS_CODEBOOKS = ("mul1", "mcg") +#: TP-SHARDED payloads. davidsyoung's TR3 releases store one projection as +#: `M.rank{r}.{trellis,suh,svh,mcg}`, r in 0..tp-1: the atoms are the +#: tensor-parallel shards their serving stack loads one per GPU, declared in +#: the artifact's own `config.hybrid_tr3_tail` (`tp`, `slicing`, `tensor_schema`) +#: and proven against the BF16 source they were encoded from: decoded per rank +#: and concatenated in ascending rank order along the ONE axis the shapes admit, +#: layer-3/expert-0 of the 3.25bpw release matches zai-org/GLM-5.3-BF16 at +#: cosine 0.9994/0.9992/0.9993 (rel_l2 0.067 = the K4 trellis error measured on +#: Fruit), the reversed order at cosine ~0, and the other axis is a shape +#: mismatch (engines/tools/layer-outer-evidence/glm53-exl3-tp-rank-and-zero-pad-parity.json). +#: The composition is therefore SHAPE-DETERMINED and verified, not read from +#: prose: the axis is the one along which `tp` parts tile the parameter's shape; +#: a declared `slicing` entry must agree when present; missing ranks, a rank +#: count that is not `tp`, or two admissible axes all refuse. +TRELLIS_TP_COMPOSE_METHOD = "exl3-trellis-tp-compose-to-bf16" +TRELLIS_RANK_RE = re.compile(r"^(?P.+)\.rank(?P\d+)$") +TRELLIS_RANK_SPLIT_RE = re.compile(r"\.rank\d+\.(?:%s)$" % "|".join( + TRELLIS_PAYLOAD_OBJECTS + TRELLIS_CODEBOOKS)) +#: Where each rotation layout's resolution rule is grounded -- the reader +#: that serves the artifact, cited file:line (see `exl3_rotation_groups` +#: below and bin/fidelity/hfmeta.py) -- and the real-tensor parity that +#: proves the decode against the BF16 source under each of them. +TRELLIS_LAYOUT_READERS = { + "per_module": "exllamav3 1.4.2 exllamav3/modules/linear.py:391-407 (load_exl3: " + "key+'.suh', key+'.svh', key+'.trellis' per module)", + "shared_h_v1": "brandonmusic/GLM-5.2-EXL3-TR3v4-3.5bpw-MTP78@7c73450f " + "runtime/r17-g64-q-only/exl3_overlay.py:353-357,1228-1239,1667-1703 " + "(experts.shared_h.{proj}.rank{r}.{suh|svh} -> experts.0.{proj}.{field}, " + "broadcast to every expert; a per-expert H-side vector refuses)", + "r7_shared": "brandonmusic/GLM-5.2-EXL3-TR3v4-3.5bpw-MTP78@7c73450f " + "runtime/r17-g64-q-only/exl3_overlay.py:1655-1664,2575-2583,2668-2673 " + "(r7_shared.gate_up_suh -> experts.0.gate_proj.suh aliased to up_proj; " + "r7_shared.down_svh -> experts.0.down_proj.svh) and " + "patches/patch_r7_broadcast_rotations.py:7-15", +} +TRELLIS_LAYOUT_EVIDENCE = "engines/tools/layer-outer-evidence/glm52-exl3-layouts-parity.json" +#: Serving-kernel ZERO PADDING. drowzeys' `kv_a_proj_with_mqa` ships as +#: [640, 6144] where its own config implies [576, 6144]; rows 0..575 are the +#: root's tensor bitwise (after FP8 dequant) and rows 576..639 are exactly zero +#: -- 640 = 5 x 128, an alignment pad for their kernel. Recoverable only under a +#: hard check: every excess row exactly zero, every other dim equal, and the +#: transformation recorded. A non-zero tail is a shape mismatch and refuses. +ZERO_PAD_METHOD = "trailing-zero-rows-truncated" + + +def _config_dict(value) -> Dict[str, Any]: + if value is None: + return {} + if isinstance(value, dict): + return value + if hasattr(value, "to_dict"): + return value.to_dict() + return dict(getattr(value, "__dict__", {})) + + +def trellis_tail_declaration(config) -> Optional[Dict[str, Any]]: + """`config.hybrid_tr3_tail` when it declares an exl3-trellis artifact, else None. + + davidsyoung's releases carry a leftover ModelOpt/NVFP4 `quantization_config` + (`quant_method: modelopt`, `num_bits: 4, type: float, group_size: 16`) that + describes NOTHING in the checkpoint; the exl3 declaration lives in this + top-level block (`format: exl3-trellis`, `codebook`, `tp`, `tensor_schema`). + Read from bytes it is the payload keys that decide; this block is what the + artifact SAYS, and the two must agree. + """ + tail = getattr(config, "hybrid_tr3_tail", None) + if tail is None and isinstance(config, dict): + tail = config.get("hybrid_tr3_tail") + tail = _config_dict(tail) + if not tail or tail.get("format") != "exl3-trellis": + return None + return tail + + +def _tail_declared_bits(tail) -> Any: + """Mirror of `fidelity.hfmeta.tr3_tail_declared_bits` (no bin/ import on the pod).""" + for key in ("bits_avg", "bits", "expert_bpw_mean"): + value = tail.get(key) + if isinstance(value, (int, float)) and not isinstance(value, bool): + return value + return tail.get("bits_avg", tail.get("bits")) + + +def _sidecar_declared_bits(doc, key, file, sha256): + """Mirror of `fidelity.hfmeta._sidecar_declared_bits` (no bin/ import on the + pod). The trellis selftest's [18c] rung asserts the two produce the same + block from the same sidecar bytes.""" + import hashlib # noqa: F401 -- stdlib + entries = [] + histogram = {} + for entry in doc.values(): + rates = entry.get(key) if isinstance(entry, dict) else None + if not isinstance(rates, list): + continue + for rate in rates: + if isinstance(rate, int) and not isinstance(rate, bool): + entries.append(rate) + srate = str(rate) + histogram[srate] = histogram.get(srate, 0) + 1 + if not entries: + raise LayerOuterError( + "REFUSED: sidecar %r key %r carries no per-expert integer bitrates" + % (file, key)) + mean = sum(entries) / len(entries) + source = { + "sidecar": file, + "key": key, + "entries": len(entries), + "histogram": dict(sorted(histogram.items())), + "sha256": sha256, + } + return mean, source + + +def _read_sidecar_from_dir(model_dir, file, config, tail, skey): + """Read `/`, validate it against the config's MoE layer + range and n_routed_experts, and return (doc, sha256). Refuses by name if + the file is absent, not strict JSON, has a layer set different from the + config's moe_layers, or any layer's list under `skey` is not exactly + n_routed_experts long.""" + import hashlib + path = os.path.join(model_dir, file) + if not os.path.isfile(path): + raise LayerOuterError( + "REFUSED: hybrid_tr3_tail.bits_per_expert names %r but it is absent " + "from the checkpoint directory %s" % (file, model_dir)) + try: + with open(path, "rb") as handle: + raw = handle.read() + doc = json.loads(raw) + except (OSError, ValueError) as exc: + raise LayerOuterError( + "REFUSED: sidecar %r is not strict JSON (%s)" % (file, exc)) from None + if not isinstance(doc, dict): + raise LayerOuterError( + "REFUSED: sidecar %r is not a JSON object" % (file,)) + moe_layers = (tail or {}).get("moe_layers") + expected_layers = None + if isinstance(moe_layers, list) and len(moe_layers) == 2 and all( + isinstance(x, int) and not isinstance(x, bool) for x in moe_layers): + expected_layers = set(range(moe_layers[0], moe_layers[1] + 1)) + n_experts = None + if isinstance(config, dict): + n_experts = config.get("n_routed_experts") + if n_experts is None: + n_experts = getattr(config, "n_routed_experts", None) + if n_experts is None: + n_experts = (tail or {}).get("experts_per_layer") + if not isinstance(n_experts, int) or isinstance(n_experts, bool): + n_experts = None + layers_seen = set() + for layer, entry in doc.items(): + try: + layers_seen.add(int(layer)) + except (TypeError, ValueError): + raise LayerOuterError( + "REFUSED: sidecar %r has a non-integer layer key %r" % (file, layer)) + if not isinstance(entry, dict): + raise LayerOuterError( + "REFUSED: sidecar %r layer %r is not an object" % (file, layer)) + rates = entry.get(skey) + if isinstance(rates, list) and n_experts is not None and len(rates) != n_experts: + raise LayerOuterError( + "REFUSED: sidecar %r layer %s key %r has %d entries but the config " + "declares n_routed_experts=%d" + % (file, layer, skey, len(rates), n_experts)) + if expected_layers is not None and layers_seen != expected_layers: + raise LayerOuterError( + "REFUSED: sidecar %r covers layers %s but hybrid_tr3_tail.moe_layers " + "declares %s" % (file, sorted(layers_seen), sorted(expected_layers))) + return doc, hashlib.sha256(raw).hexdigest() + + +#: The exl3 ROTATION LAYOUTS (per_module / shared_h_v1 / r7_shared): which +#: tensor carries each module's suh and svh. Read from the index names and +#: cross-checked against the declaration; the reader rules are cited in +#: bin/fidelity/hfmeta.py above `exl3_rotation_groups`, and the evidence is +#: engines/tools/layer-outer-evidence/glm52-exl3-layouts-parity.json. The +#: block below is BYTE-IDENTICAL to bin/fidelity/hfmeta.py (no bin/ import on +#: the pod; selftest_trellis_decode_offline rung [19] asserts the two texts). +EXL3_ROTATION_LAYOUTS = ("per_module", "shared_h_v1", "r7_shared") +EXL3_SHARED_H_TENSOR_SCHEMA = ( + "model.layers.{L}.mlp.experts.shared_h.{proj}.rank{r}.{suh|svh}") +_EXL3_OBJECTS = ("trellis", "suh", "svh") +_EXL3_CODEBOOKS = ("mul1", "mcg") +_EXL3_EXPERT_RE = re.compile( + r"^(?P.+\.experts)\.(?P\d+)\.(?Pgate_proj|up_proj|down_proj)" + r"(?:\.rank(?P\d+))?$") +_EXL3_SHARED_H_RE = re.compile( + r"^(?P.+\.experts)\.shared_h\.(?Pgate_proj|up_proj|down_proj)" + r"\.rank(?P\d+)\.(?Psuh|svh)$") +_EXL3_R7_SHARED_RE = re.compile( + r"^(?P.+\.experts)\.r7_shared\.(?Pgate_up_suh|down_svh)$") +_EXL3_RANK_SUFFIX_RE = re.compile(r"\.rank\d+$") + + +def exl3_rotation_groups(keys): + """Group `.{trellis,suh,svh,}` keys by module, resolving a + layer-shared H-side rotation vector BY NAME where a module's own group + omits it. + + Returns (groups, census). `groups[stem]` = {trellis, suh, svh: key, + codebook, marker, shared: None | (field, key, layout)}. `census` = + {layout, shared_vectors: sorted shared keys, per_layout: {layout: modules}}. + A group is complete only when all three objects resolve AND exactly one + codebook marker is present; a partial group, a module carrying its own + H-side vector beside a shared one, a shared vector no module resolves, or + two shared layouts in one checkpoint all raise ValueError. + """ + staged = {} + shared_h = {} + r7 = {} + for key in keys: + match = _EXL3_SHARED_H_RE.match(key) + if match is not None: + slot = (match.group("experts"), match.group("proj"), int(match.group("rank"))) + shared_h.setdefault(slot, {})[match.group("field")] = key + continue + match = _EXL3_R7_SHARED_RE.match(key) + if match is not None: + r7.setdefault(match.group("experts"), {})[match.group("field")] = key + continue + stem, _, last = key.rpartition(".") + if not stem: + continue + if last in _EXL3_OBJECTS: + staged.setdefault(stem, {})[last] = key + elif last in _EXL3_CODEBOOKS: + staged.setdefault(stem, {}).setdefault("codebooks", []).append(last) + groups = {} + partial = [] + consumers = {} + per_layout = {} + for stem, found in staged.items(): + marks = found.get("codebooks") or [] + missing = [name for name in _EXL3_OBJECTS if name not in found] + shared = None + expert = _EXL3_EXPERT_RE.match(stem) + if expert is not None: + proj = expert.group("proj") + h_side = "svh" if proj == "down_proj" else "suh" + if expert.group("rank") is not None: + slot = (expert.group("experts"), proj, int(expert.group("rank"))) + vector = shared_h.get(slot, {}).get(h_side) + layout = "shared_h_v1" + else: + vector = r7.get(expert.group("experts"), {}).get( + "down_svh" if proj == "down_proj" else "gate_up_suh") + layout = "r7_shared" + if vector is not None: + if h_side in found: + raise ValueError( + "%s carries its own %s beside the layer-shared %s; two " + "candidates for one rotation vector" % (stem, h_side, vector)) + found[h_side] = vector + missing = [name for name in missing if name != h_side] + shared = (h_side, vector, layout) + consumers[vector] = consumers.get(vector, 0) + 1 + if missing or len(marks) != 1: + partial.append("%s (missing %s, codebook markers %s)" + % (stem, missing or "none", sorted(marks) or "none")) + continue + groups[stem] = {name: found[name] for name in _EXL3_OBJECTS} + groups[stem]["codebook"] = marks[0] + groups[stem]["marker"] = "%s.%s" % (stem, marks[0]) + groups[stem]["shared"] = shared + layout = shared[2] if shared is not None else "per_module" + per_layout[layout] = per_layout.get(layout, 0) + 1 + if partial: + raise ValueError( + "%d incomplete trellis payload group(s): %s%s" + % (len(partial), "; ".join(sorted(partial)[:3]), + " (+%d more)" % (len(partial) - 3) if len(partial) > 3 else "")) + vectors = sorted(key for entry in list(shared_h.values()) + list(r7.values()) + for key in entry.values()) + orphans = [key for key in vectors if key not in consumers] + if orphans: + raise ValueError( + "%d layer-shared rotation vector(s) resolve no module (e.g. %s)" + % (len(orphans), orphans[0])) + layouts = sorted(name for name in per_layout if name != "per_module") + if len(layouts) > 1: + raise ValueError( + "two shared rotation layouts in one checkpoint: %s" % ", ".join(layouts)) + census = {"layout": layouts[0] if layouts else "per_module", + "shared_vectors": vectors, "per_layout": dict(sorted(per_layout.items()))} + return groups, census + + +def exl3_declared_module_bits(name, qc, tail): + """The bits an artifact declares for a NON-ROUTED exl3 module, or None. + + jpsequeira: hybrid_tr3_tail.protected_tensor_policy.tensors[name].bits; + brandonmusic: quantization_config.tensor_storage[name].bits_per_weight; + a stock inline exl3 config: quantization_config.head_bits for lm_head. + """ + entry = (((tail or {}).get("protected_tensor_policy") or {}).get("tensors") or {}).get(name) + if isinstance(entry, dict): + bits = entry.get("bits") + if isinstance(bits, (int, float)) and not isinstance(bits, bool): + return bits + entry = ((qc or {}).get("tensor_storage") or {}).get(name) + if isinstance(entry, dict): + bits = entry.get("bits_per_weight") + if isinstance(bits, (int, float)) and not isinstance(bits, bool): + return bits + if name == "lm_head": + bits = (qc or {}).get("head_bits") + if isinstance(bits, (int, float)) and not isinstance(bits, bool): + return bits + return None + + +def _exl3_names_sha256(names): + if not names: + return None + import hashlib + return hashlib.sha256("\n".join(sorted(names)).encode("utf-8")).hexdigest() + + +def exl3_layout_contract(keys, qc, tail): + """The rotation-layout half of an exl3 weights_decode contract, from the + index names and the config alone. + + Returns (contract, detail). `contract` is bound field for field into + `weights_decode.quantization_config` on both the controller and the pod: + rotation_layout, shared_vectors {count, names_sha256}, nonrouted_exl3 + {count, names_sha256, declared_bits histogram}, activation_scheme. + `detail` carries what the pod's decoder needs beyond the contract: the + groups, the census, the per-module declared bits of the non-routed + modules and the r7 k_values. Raises ValueError when the names and the + declaration disagree. + """ + qc = qc if isinstance(qc, dict) else {} + tail = tail if isinstance(tail, dict) else {} + groups, census = exl3_rotation_groups(keys) + layout = census["layout"] + declared_layout = tail.get("rotation_layout") + if layout == "shared_h_v1": + if (declared_layout != "shared_h_v1" + or tail.get("shared_h_tensor_schema") != EXL3_SHARED_H_TENSOR_SCHEMA): + raise ValueError( + "the index stores layer-shared H-side rotations under experts.shared_h " + "but hybrid_tr3_tail declares rotation_layout=%r, shared_h_tensor_schema=%r " + "(the authors' reader requires 'shared_h_v1' and %r)" + % (declared_layout, tail.get("shared_h_tensor_schema"), + EXL3_SHARED_H_TENSOR_SCHEMA)) + elif declared_layout not in (None, "per_expert_v1"): + raise ValueError( + "hybrid_tr3_tail declares rotation_layout=%r but the index carries no " + "experts.shared_h vector" % (declared_layout,)) + r7 = qc.get("r7_routed_experts") + if layout == "r7_shared": + if not isinstance(r7, dict) or not r7.get("schema"): + raise ValueError( + "the index stores layer-shared rotations under experts.r7_shared but " + "quantization_config declares no r7_routed_experts block (the authors' " + "reader keys the r7_shared aliasing on it)") + nonrouted = sorted({_EXL3_RANK_SUFFIX_RE.sub("", stem) for stem in groups + if _EXL3_EXPERT_RE.match(stem) is None}) + module_bits = {name: exl3_declared_module_bits(name, qc, tail) for name in nonrouted} + histogram = {} + for bits in module_bits.values(): + if isinstance(bits, float) and bits.is_integer(): + bits = int(bits) + label = str(bits) if bits is not None else "undeclared" + histogram[label] = histogram.get(label, 0) + 1 + overlay = tail.get("online_mxfp8_overlay") + activation = None + if isinstance(overlay, dict) and overlay: + activation = overlay.get("activation") or overlay.get("format") + if activation is None: + activation = qc.get("activation_scheme") + contract = { + "rotation_layout": layout, + "shared_vectors": {"count": len(census["shared_vectors"]), + "names_sha256": _exl3_names_sha256(census["shared_vectors"])}, + "nonrouted_exl3": {"count": len(nonrouted), + "names_sha256": _exl3_names_sha256(nonrouted), + "declared_bits": dict(sorted(histogram.items()))}, + "activation_scheme": str(activation) if activation is not None else None, + } + r7_k_values = sorted({int(k) for k in ((r7 or {}).get("k_values") or []) + if isinstance(k, int) and not isinstance(k, bool)}) \ + if isinstance(r7, dict) else [] + detail = {"groups": groups, "census": census, "nonrouted_bits": module_bits, + "r7_k_values": r7_k_values, + "r7_declaration": ({k: r7.get(k) for k in ("schema", "feature", "moe_layers", + "k_values", "bit_map_manifests", + "loader_implementation_status")} + if isinstance(r7, dict) else None)} + return contract, detail + + +def trellis_checkpoint_plan(config, declared_keys: Sequence[str], + model_dir: Optional[str] = None) -> Optional[Dict[str, Any]]: + """The exact EXL3 trellis form this schedule decodes, or None. + + Accepts `quant_method: exl3` whose payload groups are the stock + exllamav3 object layout `M.{trellis,suh,svh,}`, one group per + quantized module, `` in {mul1, mcg} PER MODULE -- drowzeys' + `keys-GLM-5.3-EXL3` uses `mcg` on layer 3 and `mul1` on layers 4-77, so + the codebook is read from the object each module actually carries and not + from `quantization_config.codebook`, which names only one of them -- and + the two layer-shared rotation layouts (`shared_h_v1`, `r7_shared`; see + `exl3_rotation_groups`), where a routed expert's H-side vector is resolved + BY NAME from the layer's shared tensor and refused when it cannot be. + """ + qc = _config_dict(getattr(config, "quantization_config", None) + if not isinstance(config, dict) else config.get("quantization_config")) + tail = trellis_tail_declaration(config) + declared_method = qc.get("quant_method") + if declared_method != "exl3" and tail is None: + return None + try: + layout, detail = exl3_layout_contract(declared_keys, qc, tail) + except ValueError as exc: + raise LayerOuterError("REFUSED: %s" % exc) from None + groups = detail["groups"] + if not groups: + raise LayerOuterError( + "REFUSED: the config declares an exl3 artifact (quant_method=%r, " + "hybrid_tr3_tail=%s) but the checkpoint carries no %s payload group; " + "loading it as-is would read trellis bytes as weights." + % (declared_method, "present" if tail else "absent", + "/".join(TRELLIS_PAYLOAD_OBJECTS))) + codebooks: Dict[str, int] = {} + for objects in groups.values(): + codebooks[objects["codebook"]] = codebooks.get(objects["codebook"], 0) + 1 + # TP-sharded groups: every rank-stem must belong to a module with EXACTLY + # tp ranks 0..tp-1, and tp must be declared by the artifact. + ranked: Dict[str, Set[int]] = {} + for stem in groups: + match = TRELLIS_RANK_RE.match(stem) + if match: + ranked.setdefault(match.group("module"), set()).add(int(match.group("rank"))) + composition = None + if ranked: + tp = (tail or {}).get("tp") + if isinstance(tp, bool) or not isinstance(tp, int) or tp < 2: + raise LayerOuterError( + "REFUSED: %d module(s) store rank-sharded trellis payloads (e.g. %s) " + "but the config declares no hybrid_tr3_tail.tp >= 2 to compose them " + "by; this schedule does not guess a shard count." + % (len(ranked), sorted(ranked)[0])) + bad = sorted(module for module, ranks in ranked.items() if ranks != set(range(tp))) + if bad: + raise LayerOuterError( + "REFUSED: %d module(s) do not carry exactly ranks 0..%d (e.g. %s: %s)" + % (len(bad), tp - 1, bad[0], sorted(ranked[bad[0]]))) + composition = { + "tp": tp, + "modules": len(ranked), + "declared_slicing": {str(k): str(v) for k, v in + ((tail or {}).get("slicing") or {}).items()}, + "tensor_schema": (tail or {}).get("tensor_schema"), + "k_values": [int(k) for k in ((tail or {}).get("k_values") or []) + if isinstance(k, int) and not isinstance(k, bool)], + } + # MIRRORS `measure_cloud._candidate_decode_plan`'s exl3 branch FIELD FOR + # FIELD, as the FP8 plan mirrors its own: `qualify_root` compares the + # capture's recorded quantization_config against the job's candidate block + # for exact equality, so an extra or renamed key here refuses the whole + # run after both cold runs and the self-compare have already passed. + # The observed census (module count, per-module codebook histogram) is + # NOT part of that contract and rides on the log line and the decode + # evidence instead. + if tail is not None: + # The tail block is the artifact's exl3 declaration; the leftover + # quantization_config is not. Mirrored by the controller. + contract = { + "quant_method": "exl3", + "codebook": str(tail["codebook"]) if tail.get("codebook") is not None else None, + # The first NUMERIC of bits_avg / bits / expert_bpw_mean -- willfalco's + # GLM-5.2 tails declare `bits: "mixed"` beside `expert_bpw_mean`; + # byte-identical to bin/fidelity/hfmeta.tr3_tail_declared_bits, which + # the controller mirror uses, so the contract's `bits` agrees. + "bits": _tail_declared_bits(tail), + "head_bits": None, + "modules_to_not_convert": [], + } + # jpsequeira's GLM-5.2 TR3 declares `bits: "mixed"` with no numeric + # and a `bits_per_expert: ":" sidecar shipped in the repo + # root. The pod reads `/`, validates its layer set + # against moe_layers and each list against n_routed_experts, and the + # declared bits become the exact float mean of every entry. The + # `declared_bits_source` block is byte-identical to the controller's + # mirror (same sha256). Without model_dir (e.g. the layout-parity + # tool) the legacy string stays, as today. + ref = tail.get("bits_per_expert") + if model_dir is not None and isinstance(ref, str) and ":" in ref: + sfile, _, skey = ref.partition(":") + sfile, skey = sfile.strip(), skey.strip() + if sfile and skey: + doc, sha = _read_sidecar_from_dir(model_dir, sfile, config, tail, skey) + mean, source = _sidecar_declared_bits(doc, skey, sfile, sha) + # A numeric declaration WINS as the value (hfmeta applies the + # same rule); the sidecar always contributes the evidence + # block. Taking the mean unconditionally made this plan and + # the controller mirror disagree whenever a tail carried + # both -- willfalco 3.25bpw was refused at qualify_root + # after both cold captures had passed (2026-09-06). + _numeric = _tail_declared_bits(tail) + if not isinstance(_numeric, (int, float)) or isinstance(_numeric, bool): + contract["bits"] = mean + contract["declared_bits_source"] = source + else: + contract = { + "quant_method": "exl3", + "codebook": str(qc["codebook"]) if qc.get("codebook") is not None else None, + "bits": qc.get("bits"), + "head_bits": qc.get("head_bits"), + "modules_to_not_convert": sorted( + str(m) for m in (qc.get("modules_to_not_convert") or [])), + } + # The rotation layout, the shared-vector and non-routed name digests and + # the declared activation overlay are CONTRACT: read from the index names + # on both sides by the byte-identical `exl3_layout_contract`. + contract.update(layout) + contract["_observed"] = { + "quantized_module_count": len(groups), + "codebook_histogram": dict(sorted(codebooks.items())), + "quant_method_declared": declared_method, + "declared_by": "hybrid_tr3_tail" if tail is not None else "quantization_config", + "composition": composition, + "rotation_layout": detail["census"]["layout"], + "modules_per_layout": detail["census"]["per_layout"], + "shared_vector_count": len(detail["census"]["shared_vectors"]), + "r7_declaration": detail["r7_declaration"], + # What the decoder checks each module's K against beyond the tail's + # k_values: the declared bits of every non-routed exl3 module and the + # r7 block's own k_values for the unsharded routed experts. + "module_bits_policy": {"nonrouted": detail["nonrouted_bits"], + "r7_k_values": detail["r7_k_values"]}, + } + return contract + + +def trellis_payload_groups(keys: Iterable[str]) -> Dict[str, Dict[str, Any]]: + """Group `.{trellis,suh,svh,}` keys by module. + + A group is returned only when all three payload objects AND exactly one + codebook marker are present; a partial group is a refusal, not a skip, + because a module whose trellis is loaded without its scales is the silent + failure this decoder exists to prevent. Under `shared_h_v1` / `r7_shared` + a routed expert's missing H-side vector resolves BY NAME to the layer's + shared tensor (`exl3_rotation_groups`); every group then names the exact + key each of its three objects is read from, and `shared` says which. + """ + try: + groups, _ = exl3_rotation_groups(list(keys)) + except ValueError as exc: + raise LayerOuterError("REFUSED: %s" % exc) from None + return groups + + +def _eager(value): + """Read a lazy safetensors slice, whatever its rank. + + `PySafeSlice[:]` raises `IndexError: slice() cannot be applied to a 0-dim + tensor`, and an exl3 codebook marker IS 0-dim -- an I32 scalar equal to the + codebook's own multiplier. `[...]` reads any rank. Hit at layer 3 of a live + wrldsuksgo2mars capture, after layers 0-2 (FP8 only, all rank>=1) decoded. + """ + if hasattr(value, "dtype"): + return value + try: + return value[...] + except (TypeError, IndexError): + return value[:] + + +def materialize_trellis_subset(subset: Dict[str, Any], plan: Dict[str, Any], torch_dtype, + stats: Dict[str, int], fp8_plan: Optional[Dict[str, Any]] = None, + fp8_stats: Optional[Dict[str, int]] = None, + device: str = "cpu", + composition: Optional[Dict[str, Any]] = None, + expected_shape: Optional[Callable[[str], Optional[Tuple[int, ...]]]] = None, + fp8_parity_all: bool = False, + sink: Optional[Callable[[str, Any], bool]] = None + ) -> Dict[str, Any]: + """Replace every trellis payload group in a lazy subset by one decoded `.weight`. + + Decodes on `device` -- the capture device, not the host. The trellis + decode is matmul-heavy (two 128x128 Hadamard passes plus a 65,536-entry + LUT gather per module) where the FP8 decode is one elementwise multiply, + and 768 modules per MoE layer x 75 layers on a CPU extrapolates to ~11 h + per cold run: measured on a live wrldsuksgo2mars pod, where layer 3 alone + did not finish loading in 8 minutes while the three FP8 layers before it + took ~1 s each. + + Composes with the FP8 decoder when the artifact keeps part of itself in + block-scaled FP8 beside the trellis payloads -- wrldsuksgo2mars' + `GLM-5.3-EXL3-K4-v1` keeps `shared_experts`/`self_attn` as + `weight_scale_inv` FP8 and quantizes only the routed experts, so one + subset carries both surfaces and both hooks must run over it. The FP8 + half decodes on `device` too, under `materialize_fp8_subset`'s parity gate. + + RANK-SHARDED modules are held per rank in `torch_dtype`, not fp32, and + composed the moment their last rank decodes: a concatenation places + elements and a cast rounds each element on its own, so cast-then-cat is + the same bytes as cat-then-cast (`selftest_trellis_decode_offline.py` + [6c] asserts it), and a 768-module layer no longer parks 38.7 GB of fp32 + shards on the device until the loop ends. `sink` is the direct expert + fill's hook, as in `materialize_fp8_subset`. + """ + surface = _exl3hf() + groups = trellis_payload_groups(subset) + # Every key a group reads -- including a layer-shared rotation vector + # several groups resolve to -- is consumed here and never reaches the + # converter as a stray tensor. + consumed = {key for objects in groups.values() + for name, key in objects.items() if name not in ("codebook", "shared")} + passthrough = {key: value for key, value in subset.items() if key not in consumed} + policy = stats.get("module_bits_policy") or {} + # The FP8 half counts into ITS OWN counter dict: the two decoders keep + # separate stats and the log line reads both by name, so handing the + # trellis dict to the FP8 decoder is a KeyError on the first dequantized + # tensor (it was, on a live wrldsuksgo2mars pod). + if fp8_plan is not None: + counters = fp8_stats if fp8_stats is not None else stats + for key in ("dequantized", "scales_consumed", "fp8_bytes"): + counters.setdefault(key, 0) + out: Dict[str, Any] = materialize_fp8_subset( + passthrough, fp8_plan, torch_dtype, counters, device=device, + parity_all=fp8_parity_all, sink=sink) + else: + # No FP8 plan means the index carries no scale tensor at all -- so an + # fp8 tensor here has NO scale anywhere and would load as bf16 with + # its block scale never applied: the M1 defect, refused by name in + # the FP8 path and, until 2026-09-04, silently accepted here. + for key, value in passthrough.items(): + dtype = getattr(value, "dtype", None) + if dtype is None and hasattr(value, "get_dtype"): + dtype = value.get_dtype() + if str(dtype) in ("torch.float8_e4m3fn", "F8_E4M3", "float8_e4m3fn", + "torch.float8_e5m2", "F8_E5M2", "float8_e5m2"): + raise LayerOuterError( + "REFUSED: %s is an fp8 tensor in a checkpoint that carries no " + "%s tensor anywhere; loading it as bf16 would apply no block scale" + % (key, FP8_SCALE_SUFFIX)) + out = dict(passthrough) + parts: Dict[str, Dict[int, Any]] = {} + tp = int(composition["tp"]) if composition is not None else None + + def emit(weight_key: str, tensor) -> None: + if sink is not None and sink(weight_key, tensor): + return + out[weight_key] = tensor + + for module, objects in groups.items(): + payload = {} + for name in TRELLIS_PAYLOAD_OBJECTS: + payload[name] = _eager(subset[objects[name]]) + marker = _eager(subset[objects["marker"]]) + expected = surface.CODEBOOK_OBJECTS[objects["codebook"]] + observed = int(marker.reshape(-1)[0]) + if observed != expected: + raise LayerOuterError( + "REFUSED: %s carries a %s marker of %d, not the codebook's own " + "multiplier %d; the payload was not written by the codebook it names" + % (module, objects["codebook"], observed, expected)) + decoded = surface.decode_payload_hf( + payload["trellis"].to(device), payload["suh"].to(device), + payload["svh"].to(device), codebook=objects["codebook"]).to(torch_dtype) + stats["decoded_modules"] += 1 + bits = int(payload["trellis"].shape[-1]) // 16 + stats["trellis_bits"] += bits + histogram = stats.setdefault("k_histogram", {}) + histogram[str(bits)] = histogram.get(str(bits), 0) + 1 + shared = objects.get("shared") + layouts = stats.setdefault("modules_per_layout", {}) + layout = shared[2] if shared is not None else "per_module" + layouts[layout] = layouts.get(layout, 0) + 1 + if shared is not None: + stats["shared_vectors_applied"] = stats.get("shared_vectors_applied", 0) + 1 + _check_declared_bits(module, bits, plan, composition, policy=policy, + layout=layout, shared=shared is not None) + ranked = TRELLIS_RANK_RE.match(module) + weight_key = "%s.weight" % (ranked.group("module") if ranked else module) + if weight_key in subset: + raise LayerOuterError( + "REFUSED: %s exists as a plain weight beside its trellis payload; the " + "checkpoint carries two versions of one tensor and this schedule will " + "not pick one" % weight_key) + if _EXL3_EXPERT_RE.match(module) is None: + # A NON-ROUTED exl3 module (o_proj, q_b_proj, indexer.wq_b, lm_head): + # decoded by the same function wherever it sits, and named with its + # K in the evidence -- the head's K is what hf_capture seals as the + # candidate's own dequantized head (HEAD-1d, own heads). + stats.setdefault("nonrouted_exl3_decoded", {})[weight_key[:-len(".weight")]] = bits + if ranked is None: + if layout == "r7_shared": + # brandonmusic's r7 encoder stores each expert with its + # INTERMEDIATE channels permuted (gate/up rows, down columns, + # one permutation per expert: r7_encoder/permutation.py + # permute_expert_hf); the layer manifest names it and the + # inverse puts the decoded module in the source's order. + decoded = _r7_unpermute(module, objects, decoded, stats) + emit(weight_key, decoded) + continue + if composition is None: + raise LayerOuterError( + "REFUSED: %s is a rank-sharded payload but the plan carries no " + "composition (the config declared no hybrid_tr3_tail.tp)" % module) + by_rank = parts.setdefault(ranked.group("module"), {}) + by_rank[int(ranked.group("rank"))] = decoded + stats["tp_rank_storage_dtype"] = str(decoded.dtype).replace("torch.", "") + if len(by_rank) >= tp: + del parts[ranked.group("module")] + emit(weight_key, _compose_tp_ranks(ranked.group("module"), by_rank, composition, + expected_shape, torch_dtype, stats)) + # A module still here never reached `tp` ranks; `_compose_tp_ranks` refuses + # it by name rather than letting a partial projection go missing quietly. + for module, by_rank in sorted(parts.items()): + emit("%s.weight" % module, _compose_tp_ranks( + module, by_rank, composition, expected_shape, torch_dtype, stats)) + return out + + +def _check_declared_bits(module: str, bits: int, plan: Dict[str, Any], + composition: Optional[Dict[str, Any]], + policy: Optional[Dict[str, Any]] = None, + layout: str = "per_module", shared: bool = False) -> None: + """The payload's own K against what the artifact declares. + + A uniform declaration (`bits: 4`) must equal every module's K. A TR3 tail + declares an AVERAGE (`bits_avg: 3.25`) over per-expert tiers with + `k_values: [3, 4]`, so the check is membership in k_values. A declaration + that is neither is not checkable and is recorded, not trusted: the row's + bit-width label then rests on the K histogram in the decode evidence. + + `policy` (the plan's `module_bits_policy`) adds two per-module rules: a + non-routed exl3 module must carry exactly the bits its artifact declares + for it (jpsequeira's protected_tensor_policy, brandonmusic's + tensor_storage, a stock config's head_bits), and an `r7_shared` routed + expert must carry a K in `quantization_config.r7_routed_experts.k_values` + -- the tail's k_values describe only the rank-sharded layer it covers. + """ + policy = policy or {} + name = _EXL3_RANK_SUFFIX_RE.sub("", module) + nonrouted = policy.get("nonrouted") or {} + if name in nonrouted: + declared_bits = nonrouted[name] + if declared_bits is not None and int(declared_bits) != bits: + raise LayerOuterError( + "REFUSED: %s is a K%d payload but the artifact declares %r bits for it" + % (module, bits, declared_bits)) + return + if shared and layout == "r7_shared": + r7_k = policy.get("r7_k_values") or [] + if r7_k and bits not in set(r7_k): + raise LayerOuterError( + "REFUSED: %s is a K%d payload but r7_routed_experts declares k_values %s" + % (module, bits, sorted(r7_k))) + return + declared = plan.get("bits") + k_values = (composition or {}).get("k_values") if composition else None + if k_values: + if bits not in {int(k) for k in k_values}: + raise LayerOuterError( + "REFUSED: %s is a K%d payload but the artifact declares k_values %s" + % (module, bits, sorted(k_values))) + return + if composition is not None: + # A TR3 tail declares bits_avg, an AVERAGE over per-expert tiers; with + # no k_values it is not checkable per module and stays a recorded + # label backed by the K histogram in the decode evidence. + return + if isinstance(declared, bool) or declared is None: + return + try: + declared_value = float(declared) + except (TypeError, ValueError): + return + if declared_value.is_integer() and int(declared_value) != bits: + raise LayerOuterError( + "REFUSED: %s is a K%d payload but the artifact declares bits=%r; the row " + "would be labelled with a bit-width its bytes do not carry" + % (module, bits, declared)) + + +R7_MANIFEST_RE = re.compile(r"^r7-experts-layer-(?P\d+)\.json$") +R7_UNPERMUTE_REFERENCE = ( + "brandonmusic/GLM-5.2-EXL3-TR3v4-3.5bpw-MTP78@7c73450f r7_encoder/permutation.py:99-114 " + "(permute_expert_hf: gate/up rows and down columns index_select'ed by the expert's " + "permutation before encoding), :91-96 (inverse_permutation) and r7_encoder/schema.py:268-272 " + "(the layer manifest's permutations[E].new_to_old is that permutation)") + + +class R7PermutationSource: + """The per-expert intermediate permutations of an `r7_shared` artifact. + + brandonmusic's r7 encoder permutes each expert's 2048 intermediate + channels (`energy_balanced` or identity, one permutation per expert, + applied identically to gate rows, up rows and down columns -- + `r7_encoder/permutation.py::permute_expert_hf`) BEFORE the trellis + encode, and writes `new_to_old` into the layer's manifest + `r7-experts-layer-{L:03d}.json` (`permutations[E]`), the files + `quantization_config.r7_routed_experts.bit_map_manifests` lists and the + repository ships beside its shards. Serving never undoes it (a permutation + of the intermediate axis is invisible to gate*up@down when all three carry + it); this decoder does, so the decoded module sits under the official name + in the SOURCE's channel order and can be proven against the BF16 rows + (evidence: TRELLIS_LAYOUT_EVIDENCE -- decoded as stored, cosine ~0 against + the source; inverse-permuted, the K-band). The same manifest's + `vector_refs[module]` must name exactly the suh/svh keys the name + resolution chose; a disagreement refuses. + """ + + def __init__(self, model_dir: str, manifests: Sequence[str], intermediate: int): + self.model_dir = model_dir + self.intermediate = int(intermediate) + self.by_layer: Dict[int, str] = {} + for name in manifests: + match = R7_MANIFEST_RE.match(str(name)) + if match is None: + raise LayerOuterError( + "REFUSED: r7_routed_experts.bit_map_manifests names %r, not an " + "r7-experts-layer-NNN.json manifest" % (name,)) + self.by_layer[int(match.group("layer"))] = str(name) + self._layers: Dict[int, Dict[str, Any]] = {} + self.stats: Dict[str, Any] = {"manifests_read": 0, "experts_unpermuted": 0, + "policies": {}, "manifest_sha256": {}} + + def verify_present(self) -> None: + missing = [name for name in self.by_layer.values() + if not os.path.isfile(os.path.join(self.model_dir, name))] + if missing: + raise LayerOuterError( + "REFUSED: %d r7 layer manifest(s) the config lists are absent from the " + "checkpoint (e.g. %s); the experts' intermediate permutations cannot be " + "undone without them" % (len(missing), missing[0])) + + def _layer(self, layer: int) -> Dict[str, Any]: + if layer in self._layers: + return self._layers[layer] + name = self.by_layer.get(layer) + if name is None: + raise LayerOuterError( + "REFUSED: layer %d stores r7_shared experts but r7_routed_experts." + "bit_map_manifests lists no manifest for it" % layer) + path = os.path.join(self.model_dir, name) + with open(path, "rb") as handle: + raw = handle.read() + doc = json.loads(raw.decode("utf-8")) + if int(doc.get("layer", -1)) != layer: + raise LayerOuterError( + "REFUSED: %s says layer %r, expected %d" % (name, doc.get("layer"), layer)) + self._layers[layer] = doc + self.stats["manifests_read"] += 1 + self.stats["manifest_sha256"][name] = hashlib.sha256(raw).hexdigest() + return doc + + def inverse(self, layer: int, expert: int, module: str, objects: Dict[str, Any]): + """The index that puts a decoded expert's intermediate axis back in + source order, after the manifest's vector_refs confirm the name resolution.""" + import torch + + doc = self._layer(layer) + refs = (doc.get("vector_refs") or {}).get(module) + chosen = {"suh": objects["suh"], "svh": objects["svh"]} + if refs != chosen: + raise LayerOuterError( + "REFUSED: %s: the layer manifest's vector_refs name %r but the index names " + "resolved %r" % (module, refs, chosen)) + entry = (doc.get("permutations") or {}).get(str(expert)) + perm = entry.get("new_to_old") if isinstance(entry, dict) else None + if (not isinstance(perm, list) or len(perm) != self.intermediate + or sorted(perm) != list(range(self.intermediate))): + raise LayerOuterError( + "REFUSED: %s: the layer manifest carries no valid %d-element permutation " + "for expert %d" % (module, self.intermediate, expert)) + policy = str(entry.get("policy")) + self.stats["policies"][policy] = self.stats["policies"].get(policy, 0) + 1 + self.stats["experts_unpermuted"] += 1 + inverse = torch.empty(self.intermediate, dtype=torch.long) + inverse[torch.tensor(perm, dtype=torch.long)] = torch.arange(self.intermediate) + return inverse + + +def _r7_unpermute(module: str, objects: Dict[str, Any], decoded, stats: Dict[str, Any]): + source = stats.get("r7_permutations") + if not isinstance(source, R7PermutationSource): + raise LayerOuterError( + "REFUSED: %s is an r7_shared expert but the decode carries no permutation " + "source (the layer manifests were not planned)" % module) + expert = _EXL3_EXPERT_RE.match(module) + layer_match = re.search(r"\.layers\.(\d+)\.", module) + if expert is None or layer_match is None: + raise LayerOuterError("REFUSED: %s is not a routed-expert projection" % module) + inverse = source.inverse(int(layer_match.group(1)), int(expert.group("expert")), module, objects) + axis = 1 if expert.group("proj") == "down_proj" else 0 + if decoded.shape[axis] != source.intermediate: + raise LayerOuterError( + "REFUSED: %s decodes to %s; its intermediate axis is not %d" + % (module, tuple(decoded.shape), source.intermediate)) + return decoded.index_select(axis, inverse.to(decoded.device)) + + +def r7_permutation_source(config, model_dir: str, declaration: Dict[str, Any]) -> R7PermutationSource: + """The permutation source an `r7_shared` decode needs, from the artifact's own + declaration (`r7_routed_experts.bit_map_manifests`) and geometry; every + listed manifest must be present in the checkpoint directory.""" + manifests = declaration.get("bit_map_manifests") or [] + if not isinstance(manifests, list) or not manifests: + raise LayerOuterError( + "REFUSED: the index stores r7_shared experts but r7_routed_experts declares no " + "bit_map_manifests; the experts' intermediate permutations live in those files") + text = _config_dict(getattr(config, "text_config", None) + if not isinstance(config, dict) else config.get("text_config")) + geometry = text if text else _config_dict(config) + intermediate = geometry.get("moe_intermediate_size") + if isinstance(intermediate, bool) or not isinstance(intermediate, int) or intermediate <= 0: + raise LayerOuterError( + "REFUSED: r7_shared experts need the config's moe_intermediate_size to validate " + "their permutations; got %r" % (intermediate,)) + source = R7PermutationSource(model_dir, manifests, intermediate) + source.verify_present() + return source + + +def _compose_tp_ranks(module: str, by_rank: Dict[int, Any], composition: Dict[str, Any], + expected_shape, torch_dtype, stats: Dict[str, int]): + """Concatenate tp decoded shards along the ONE axis the shapes admit. + + Ascending rank order is the artifact's declared and root-verified order + (see TRELLIS_TP_COMPOSE_METHOD). The axis is not read from prose: it is + the axis along which `tp` equal parts tile the parameter's expected shape, + and exactly one axis may qualify. A declared `slicing` entry for the + projection must agree when present. + """ + import torch + + tp = int(composition["tp"]) + if sorted(by_rank) != list(range(tp)): + raise LayerOuterError( + "REFUSED: %s carries ranks %s, not 0..%d" % (module, sorted(by_rank), tp - 1)) + shapes = {tuple(t.shape) for t in by_rank.values()} + if len(shapes) != 1: + raise LayerOuterError( + "REFUSED: %s rank shards differ in shape: %s" % (module, sorted(shapes))) + part = next(iter(shapes)) + if len(part) != 2: + raise LayerOuterError("REFUSED: %s rank shard is %d-D, not 2-D" % (module, len(part))) + want = expected_shape("%s.weight" % module) if expected_shape is not None else None + if want is None or len(want) != 2: + raise LayerOuterError( + "REFUSED: %s: no expected 2-D shape is known for the composed weight, so " + "the concatenation axis cannot be determined" % module) + axes = [axis for axis in (0, 1) + if part[axis] * tp == want[axis] and part[1 - axis] == want[1 - axis]] + if len(axes) != 1: + raise LayerOuterError( + "REFUSED: %s: %d shards of %s do not tile %s along exactly one axis " + "(admissible: %s)" % (module, tp, part, tuple(want), axes)) + axis = axes[0] + projection = module.rsplit(".", 1)[-1] + declared = (composition.get("declared_slicing") or {}).get(projection) + if declared is not None: + # davidsyoung writes "K-sliced: rank r = input cols"; the GLM-5.2 TR3 + # tails (willfalco, jpsequeira, brandonmusic) write "TP4 K-slice: rank r + # owns input columns [512r,512r+512)". The axis token is what is read; + # a declaration naming neither, or both, still refuses. + tokens = set(re.findall(r"\b([NK])-slice[d]?\b", str(declared))) + declared_axis = (0 if tokens == {"N"} else 1 if tokens == {"K"} else None) + if declared_axis != axis: + raise LayerOuterError( + "REFUSED: %s: the shapes admit concatenation along axis %d but the " + "artifact declares %r" % (module, axis, declared)) + # The shards arrive already in `torch_dtype` (see materialize_trellis_subset): + # the cat places bytes and the `.to` is then the identity. Kept so a caller + # handing fp32 shards still gets the declared dtype. + composed = torch.cat([by_rank[r] for r in range(tp)], dim=axis).to(torch_dtype) + stats["tp_composed_modules"] = stats.get("tp_composed_modules", 0) + 1 + seen = stats.setdefault("tp_axes", {}) + seen[projection] = axis + return composed + + +def truncate_zero_padded_rows(subset: Dict[str, Any], expected_shape, stats: Dict[str, Any], + consumed: Optional[Set[str]] = None) -> Dict[str, Any]: + """Drop all-zero trailing rows a serving kernel padded onto a plain weight. + + Applies only to a plain tensor whose expected parameter shape is known, has + the same rank, equal dims beyond the first, and FEWER rows than the + checkpoint's. Every excess row must be exactly zero; one non-zero element + in the tail refuses by name, because then the tensor is not padded but + different. Payload objects and scale tensors are never touched. Every + truncation is counted and named for the decode evidence and the dataset's + disclosures. + """ + out: Dict[str, Any] = {} + for key, value in subset.items(): + if consumed and key in consumed or key.endswith(FP8_SCALE_SUFFIX): + out[key] = value + continue + stem, _, last = key.rpartition(".") + if last in TRELLIS_PAYLOAD_OBJECTS or last in TRELLIS_CODEBOOKS: + out[key] = value + continue + shape = getattr(value, "shape", None) + if shape is None and hasattr(value, "get_shape"): + shape = value.get_shape() + shape = tuple(int(d) for d in shape) if shape is not None else None + want = expected_shape(key) if expected_shape is not None else None + if (shape is None or want is None or len(shape) != len(want) or len(shape) < 1 + or shape[0] <= want[0] or tuple(shape[1:]) != tuple(want[1:])): + out[key] = value + continue + tensor = _eager(value) + tail = tensor[want[0]:] + nonzero = int((tail != 0).sum()) + if nonzero: + raise LayerOuterError( + "REFUSED: %s is %s where the model expects %s and the %d excess row(s) " + "carry %d non-zero element(s): not padding, a different tensor" + % (key, shape, want, shape[0] - want[0], nonzero)) + out[key] = tensor[: want[0]].contiguous() + record = stats.setdefault("zero_padded_rows_truncated", {"count": 0, "rows": 0, "tensors": []}) + record["count"] += 1 + record["rows"] += shape[0] - want[0] + if len(record["tensors"]) < 8: + record["tensors"].append({"name": key, "stored": list(shape), "used": list(want)}) + return out + + +# --------------------------------------------------------------------------- +# NVFP4 (modelopt) checkpoints: decode to bf16 on the capture device, per module +# --------------------------------------------------------------------------- + +NVFP4_DECODE_METHOD = "nvfp4-modelopt-dequant-to-bf16" +#: Every byte of decode math is `engines/tools/nvfp4_surface.py`'s +#: `dequant_nvfp4(weight_scale_2=...)`: LOW nibble first, the e2m1 LUT +#: [0, .5, 1, 1.5, 2, 3, 4, 6] (nibble 0b1000 is -0.0), the f8e4m3 scale +#: promoted exactly to fp32 and multiplied ONCE by the fp32 `weight_scale_2`, +#: one multiply per element, one cast to bf16 -- proven bitwise against +#: compressed-tensors 0.18.0 `unpack_fp4_from_uint8` + the modelopt scale +#: convention on real ranged-fetched rows of all three flagship exports +#: (`engines/tools/nvfp4-evidence/glm53-nvfp4-parity.json`, max_abs_diff +#: exactly 0.0 in fp32 and after the bf16 cast; `selftest_nvfp4_offline.py` +#: rung 11 re-derives it live). This module adds NO arithmetic: it groups a +#: routed module's {weight, weight_scale, weight_scale_2} from the layer's +#: lazy subset, decodes on the capture device, and hands the dense tensor +#: under the OFFICIAL name to the same converter a bf16 checkpoint reaches. +#: `input_scale` is an ACTIVATION quantity (the static per-tensor scale a +#: W4A4 kernel applies to x) and is never applied to weights; the plan says +#: `activation_scheme: static-nvfp4-not-applied` so the receipt does too. +NVFP4_DECODE_REFERENCE = "engines/tools/nvfp4_surface.py::dequant_nvfp4" +NVFP4_PARITY_EVIDENCE = "engines/tools/nvfp4-evidence/glm53-nvfp4-parity.json" + + +def _nvfp4(): + """Import the decode ABI lazily, like `_exl3hf`.""" + here = os.path.dirname(os.path.abspath(__file__)) + if here not in sys.path: + sys.path.insert(0, here) + import nvfp4_surface + + return nvfp4_surface + + +def nvfp4_checkpoint_plan(config, model_dir: str) -> Optional[Dict[str, Any]]: + """The exact modelopt NVFP4 form this schedule decodes, or None. + + Pure detection from config.json + the index: `quant_method: modelopt`, + `quant_algo: NVFP4`, a group-16 4-bit weight declaration in either of the + two spellings modelopt exports use, no declared online transform, a + known family geometry, every routed module in the modelopt + {weight U8, weight_scale F8_E4M3, weight_scale_2 F32} (+input_scale) + layout, and a non-routed name set equal to the official BF16 release's. + Any other modelopt block is refused BY NAME by `nvfp4_surface`; a config + that is not modelopt at all returns None so the FP8 gate decides. + + The returned dict is the CONTRACT block (`quantization_config` in the + sealed receipt, compared field for field against the controller's + stdlib mirror in `measure_cloud._candidate_decode_plan`), with the index + census under the private `_observed` key the caller pops. + """ + if _quant_method(config) != "modelopt": + return None + surface = _nvfp4() + cfg = _config_dict(config) + cfg = dict(cfg) + cfg["quantization_config"] = _config_dict(cfg.get("quantization_config")) + algo = cfg["quantization_config"].get("quant_algo") + if algo != "NVFP4": + raise LayerOuterError( + "REFUSED: quantization_config quant_method='modelopt' quant_algo=%r is not the " + "NVFP4 form this schedule decodes (modelopt NVFP4: e2m1 group-16 routed experts); " + "another modelopt form needs its decoder authored and proven bitwise first." + % (algo,)) + weight_map = _index_weight_map(model_dir) + try: + plan = surface.modelopt_nvfp4_plan(cfg, weight_map) + except ValueError as exc: + raise LayerOuterError( + "REFUSED: %s. This schedule decodes the modelopt NVFP4 dialect only; " + "another modelopt form needs its decoder authored and proven bitwise first." + % exc) from None + contract = dict(plan["contract"]) + contract["_observed"] = dict(plan["observed"]) + contract["_geometry"] = plan["geometry"] + return contract + + +def materialize_nvfp4_subset(subset: Dict[str, Any], plan: Dict[str, Any], torch_dtype, + stats: Dict[str, Any], device: str = "cpu", + geometry=None) -> Dict[str, Any]: + """Replace every modelopt NVFP4 module in a lazy subset by one decoded `.weight`. + + Decodes on `device` -- the capture device, not the host: 768 modules per + MoE layer x 75 layers, and the host-side FP8 decode was measured at 80 % + of a cold run. Each module's three components are read from the lazy + slices, moved to the device as packed bytes (a quarter of the bf16 size), + decoded to exact fp32 there and cast once to `torch_dtype`. The decoded + tensor lands under the OFFICIAL per-expert name; the packed components + and the activation `input_scale` never reach the converter. + + Non-routed tensors pass through untouched when they are the official- + named bf16/fp32 tensors the plan verified by name; a packed dtype + (uint8, float8) outside a routed module is refused, because loading it + as-is would read encoded bytes as weights. A routed module missing a + component, or a routed name with a component this dialect does not + ship, is refused by name rather than skipped. + """ + import torch + + surface = _nvfp4() + geometry = geometry or plan.get("_geometry") or surface.GLM_MOE_DSA_GEOMETRY + expert_re = geometry.expert_re() + decode = tuple(surface.MO_NVFP4_DECODE) + activation = set(surface.MO_NVFP4_ACTIVATION) + modules: Dict[Tuple[int, int, str], Dict[str, str]] = {} + out: Dict[str, Any] = {} + for key, value in subset.items(): + match = expert_re.match(key) + if match is None: + dtype = getattr(value, "dtype", None) + if dtype is None and hasattr(value, "get_dtype"): + dtype = value.get_dtype() + name = str(dtype) + if name in ("torch.uint8", "U8", "uint8", "torch.float8_e4m3fn", "F8_E4M3", + "float8_e4m3fn", "torch.float8_e5m2", "F8_E5M2", "float8_e5m2"): + raise LayerOuterError( + "REFUSED: %s is a %s tensor outside a routed-expert module; the modelopt " + "NVFP4 dialect packs routed experts only, so this is a payload this " + "schedule has no decoder for" % (key, name)) + census = stats.setdefault("nonrouted_by_dtype", {}) + census[name] = census.get(name, 0) + 1 + if name not in ("torch.bfloat16", "BF16", "bfloat16"): + examples = stats.setdefault("nonrouted_non_bf16_examples", []) + if len(examples) < 8: + examples.append({"name": key, "dtype": name}) + out[key] = value + continue + layer, expert = int(match.group(1)), int(match.group(2)) + projection, component = match.group(3), match.group(4) + if component in activation: + stats["input_scales_skipped"] = stats.get("input_scales_skipped", 0) + 1 + continue + if component not in decode: + raise LayerOuterError( + "REFUSED: %s carries component %r, which the modelopt NVFP4 dialect does " + "not ship (%s)" % (key, component, "/".join(decode + tuple(activation)))) + modules.setdefault((layer, expert, projection), {})[component] = key + for (layer, expert, projection), keys in sorted(modules.items()): + weight_key = geometry.official_name(layer, expert, projection) + if set(keys) == {"weight"}: + # A routed module shipped WHOLE (the MTP layer's experts, or a + # producer that left a layer native): only bf16 passes, and only + # when the plan's census called that layer plain-weight. + value = subset[keys["weight"]] + dtype = getattr(value, "dtype", None) + if dtype is None and hasattr(value, "get_dtype"): + dtype = value.get_dtype() + if str(dtype) not in ("torch.bfloat16", "BF16", "bfloat16"): + raise LayerOuterError( + "REFUSED: %s ships as a lone %s `weight` with no weight_scale / " + "weight_scale_2 beside it; a packed tensor without its scales cannot " + "be decoded and a non-bf16 one is not the official form" + % (weight_key, dtype)) + out[weight_key] = value + stats["plain_modules_passed"] = stats.get("plain_modules_passed", 0) + 1 + continue + missing = [name for name in decode if name not in keys] + if missing: + raise LayerOuterError( + "REFUSED: %s is missing %s beside %s; a routed module with part of its " + "NVFP4 payload cannot be decoded and will not be loaded as-is" + % (weight_key, "/".join(missing), sorted(keys.values()))) + packed = _eager(subset[keys["weight"]]) + scale = _eager(subset[keys["weight_scale"]]) + scale_2 = _eager(subset[keys["weight_scale_2"]]) + if packed.dtype != torch.uint8: + raise LayerOuterError( + "REFUSED: %s packed weight is %s, not uint8" % (weight_key, packed.dtype)) + if scale.dtype != torch.float8_e4m3fn: + raise LayerOuterError( + "REFUSED: %s weight_scale is %s, not float8_e4m3fn" % (weight_key, scale.dtype)) + if scale_2.dtype != torch.float32 or tuple(scale_2.shape) not in ((), (1,)): + raise LayerOuterError( + "REFUSED: %s weight_scale_2 is %s %s, not an fp32 scalar" + % (weight_key, scale_2.dtype, tuple(scale_2.shape))) + try: + decoded = surface.dequant_nvfp4( + packed.to(device), scale.to(device), weight_scale_2=scale_2.to(device)) + except ValueError as exc: + raise LayerOuterError("REFUSED: %s: %s" % (weight_key, exc)) from None + want = geometry.projection_shape[projection] + if tuple(decoded.shape) != want: + raise LayerOuterError( + "REFUSED: %s decodes to %s, not the %s the geometry declares for %s" + % (weight_key, tuple(decoded.shape), want, projection)) + if not torch.isfinite(decoded).all(): + raise LayerOuterError( + "REFUSED: %s decodes to a non-finite value; a corrupt scale is never " + "clamped into plausibility" % weight_key) + out[weight_key] = decoded.to(torch_dtype) + stats["decoded_modules"] = stats.get("decoded_modules", 0) + 1 + stats["packed_bytes"] = stats.get("packed_bytes", 0) + int(packed.numel()) + stats["scales_consumed"] = stats.get("scales_consumed", 0) + 2 + return out + + +#: The llama.cpp GGUF lane. Every byte of decode math is +#: `engines/tools/gguf_surface.py`: block dequantizers transliterated from +#: gguf-py 0.19.0 and proven BITWISE against `gguf.quants.dequantize` on real +#: ranged-fetched blocks of the measured builds (F32/F16/BF16/Q8_0/Q4_K/Q5_K/ +#: Q6_K/Q3_K/IQ4_XS/IQ3_XXS/IQ3_S; gguf-evidence/dequant_*_ggufpy_ref.npy, +#: `selftest_gguf_offline.py` rung 1), plus the glm-dsa name map, the per-head +#: `kv_b_proj` composition and the fused-expert slot slicing, each proven EXACT +#: against zai-org/GLM-5.3-BF16 (gguf-evidence/glmdsa-layout-audit.json). This +#: module adds NO arithmetic: per layer it asks the surface for that layer's +#: tensors under their OFFICIAL names -- dequantized on the capture device, +#: composed, cast once to bf16 (official-float32 tensors kept fp32) -- and +#: hands them to the same converter a bf16 checkpoint reaches. There is no +#: safetensors tree at all: the "subset" of a layer is a set of official names +#: the container proves it carries, and the bytes are read at decode time. +GGUF_DECODE_METHOD = "gguf-dequant-to-bf16" +GGUF_DECODE_REFERENCE = "engines/tools/gguf_surface.py::materialize_layer" +GGUF_PARITY_EVIDENCE = ("engines/tools/gguf-evidence/manifest.json#dequant_fixtures + " + "engines/tools/gguf-evidence/glmdsa-layout-audit.json") + + +def _gguf(): + """Import the surface lazily, like `_exl3hf`.""" + here = os.path.dirname(os.path.abspath(__file__)) + if here not in sys.path: + sys.path.insert(0, here) + import gguf_surface + + return gguf_surface + + +def gguf_files_in(model_dir: str) -> List[str]: + """Every *.gguf under `model_dir` or exactly one build directory below it. + + A GGUF repo is a shelf of builds in subdirectories; the plan downloads one + build's files under its repo-relative path, so the tree on the pod is + `//*.gguf` (plus the sidecars at the top). Two build + directories is a refusal: a measurement describes ONE artifact. + """ + top = sorted(os.path.join(model_dir, n) for n in os.listdir(model_dir) + if n.endswith(".gguf") and os.path.isfile(os.path.join(model_dir, n))) + builds = {} + for name in sorted(os.listdir(model_dir)): + sub = os.path.join(model_dir, name) + if os.path.isdir(sub): + files = sorted(os.path.join(sub, n) for n in os.listdir(sub) if n.endswith(".gguf")) + if files: + builds[name] = files + if top and builds: + raise LayerOuterError( + "REFUSED: %s holds .gguf files both at its top level and under %s; which " + "build is the artifact?" % (model_dir, ", ".join(sorted(builds)))) + if len(builds) > 1: + raise LayerOuterError( + "REFUSED: %s holds %d GGUF build directories (%s); a measurement describes " + "ONE build" % (model_dir, len(builds), ", ".join(sorted(builds)))) + return top or (next(iter(builds.values())) if builds else []) + + +class _GgufSlot(object): + """The lazy 'slice' of one official tensor the GGUF lane will decode. + + Stands where a `PySafeSlice` stands in the layer subsets: it names the + layer whose decode produces the tensor (`RESIDENT_LAYER` for embed/norm/ + head). Nothing is read until `materialize_gguf_subset` decodes the layer. + """ + __slots__ = ("layer", "name") + + def __init__(self, layer: int, name: str): + self.layer = layer + self.name = name + + +def gguf_checkpoint_plan(config, model_dir: str) -> Optional[Dict[str, Any]]: + """The exact GGUF form this schedule decodes, or None when there is no GGUF. + + Pure detection from the container headers: `general.architecture` must be + one the surface's arch table knows (refused by name otherwise), the + geometry gate must hold, every tensor must be nameable and decodable, the + whole-file sha256 marker `gguf-files-verified.json` must sit beside the + build (the fetch stage writes it; without it the identity the receipt + claims is unverified), and the OFFICIAL config (the tree's config.json, + copied from the reference release) must say which layers own a DSA + indexer so the artifact's shared-layer copies can be recognised -- and + then PROVEN value-identical to their parents (`verify_shared_indexer_copies`) + before a single layer is decoded. + + Returns the CONTRACT block (`weights_decode` = {method, quantization_config}, + compared field for field against the controller's header-only mirror in + `measure_cloud._candidate_decode_plan`) with the loaded surface and its + partition under private `_` keys the caller pops. + """ + files = gguf_files_in(model_dir) + if not files: + return None + surface_mod = _gguf() + cfg = _config_dict(config) + try: + container = surface_mod.GgufContainer([surface_mod.GgufFile(f) for f in files]) + if container.architecture == "qwen35": + import gguf_qwen35 + surface = gguf_qwen35.load_gguf_surface(files, cfg, require_file_hashes=True) + plan = dict(gguf_qwen35.decode_contract(surface)["quantization_config"]) + plan["_surface"] = surface + plan["_bridge"] = gguf_qwen35 + plan["_observed"] = {"container_audit": surface_mod.audit_container(container)} + return plan + arch = surface_mod.arch_from_container(container, config=cfg) + full = surface_mod.indexer_full_layers_from_config(cfg, arch) + if arch.indexer_shared_copies and full is None: + raise LayerOuterError( + "REFUSED: %s carries indexer tensors on every layer and the tree's " + "config.json declares no indexer_types; copy the official release's " + "config.json beside the build (the candidate stage does)" % arch.key) + surface = surface_mod.load_gguf_surface( + files, repo=None, revision=None, require_file_hashes=True, + indexer_full_layers=full, config=cfg) + audit = surface_mod.audit_container(surface.container) + copies = surface_mod.verify_shared_indexer_copies(surface.container, surface.census) + except ValueError as exc: + raise LayerOuterError( + "REFUSED: %s. This schedule decodes the llama.cpp GGUF builds whose " + "architecture and ggml types gguf_surface has proven; another form needs " + "its kernel or name map authored and proven bitwise first." % exc) from None + # the official geometry the model will be built with must be the GGUF's + layers_declared = (cfg.get("text_config") or cfg).get("num_hidden_layers") + if layers_declared != arch.decoder_layers: + raise LayerOuterError( + "REFUSED: config.json declares %r decoder layers but the %s GGUF carries " + "%d decoder blocks" % (layers_declared, arch.key, arch.decoder_layers)) + build = os.path.basename(os.path.dirname(files[0])) if os.path.dirname(files[0]) != model_dir.rstrip("/") else "" + contract = surface_mod.decode_contract(surface.container, build) + plan = dict(contract["quantization_config"]) + plan["_surface"] = surface + plan["_partition"] = surface_mod.layer_partition(surface.census) + plan["_observed"] = { + "architecture": arch.key, + "family": arch.family, + "files_verified": surface.file_hash_verification, + "file_records": list(surface.file_records), + "container_audit": audit, + "shared_indexer_copies": copies, + "materialize_plan": surface_mod.materialize_plan(surface), + "checkpoint_identity_sha256": surface.checkpoint_identity_sha256(), + } + return plan + + +def gguf_subsets(plan: Dict[str, Any]) -> Dict[str, Any]: + """{official name: _GgufSlot} for every tensor the container carries. + + This is what stands in for opening the safetensors shards: the streamer + routes these names by layer exactly as it routes checkpoint keys, so the + MTP block's 791 official names land above the model's layer count and are + reported as unexpected (the authored allowlist), the resident set is the + three top-level tensors, and every decoder layer gets its own bucket. + """ + if "_bridge" in plan: + return {name: _GgufSlot(layer, name) + for name, layer in plan["_bridge"].slots(plan["_surface"]).items()} + surface_mod = _gguf() + surface = plan["_surface"] + arch, census = surface.arch, surface.census + slots: Dict[str, Any] = {} + for layer, names in plan["_partition"].items(): + for gguf_name in names: + role = surface_mod.classify_tensor(gguf_name, arch) + if role[0] == "top": + slots[role[1]] = _GgufSlot(layer, role[1]) + elif role[0] == "direct": + slots[role[2]] = _GgufSlot(layer, role[2]) + elif role[0] == "mla": + slots[arch.kv_b_name(layer)] = _GgufSlot(layer, arch.kv_b_name(layer)) + elif role[0] == "routed": + for expert in range(arch.num_experts): + name = arch.expert_name(layer, expert, role[2]) + slots[name] = _GgufSlot(layer, name) + return slots + + +def materialize_gguf_subset(subset: Dict[str, Any], plan: Dict[str, Any], torch_dtype, + stats: Dict[str, Any], device: str = "cpu") -> Dict[str, Any]: + """Decode one layer's GGUF tensors into official-named dense tensors. + + `subset` is a bucket of `_GgufSlot`s that all name ONE layer (the streamer + buckets by layer); the surface decodes that layer on `device` -- the + quantized bytes cross the bus, not fp32 -- and the result is offered to the + converter (or the direct expert fill) under the official names. The set of + names produced must equal the set the bucket named: a tensor the container + promised and did not deliver is a refusal, not a random initialisation. + """ + if not subset: + return {} + foreign = [key for key, value in subset.items() if not isinstance(value, _GgufSlot)] + if foreign: + raise LayerOuterError( + "REFUSED: a GGUF bucket holds %d keys that are not GGUF slots (e.g. %s)" + % (len(foreign), foreign[0])) + # A layer's bucket is that layer; the RESIDENT bucket is the three top-level + # tensors plus one router-correction BUFFER per MoE layer (the ungated + # streamer loads buffers resident), so it asks each of those layers for + # exactly that name and nothing else. + by_layer: Dict[int, List[str]] = {} + for key, value in subset.items(): + by_layer.setdefault(value.layer, []).append(key) + surface_mod = plan.get("_bridge") or _gguf() + out: Dict[str, Any] = {} + try: + for layer, names in sorted(by_layer.items()): + out.update(surface_mod.materialize_layer( + plan["_surface"], layer, torch_dtype=torch_dtype, device=device, + stats=stats, only=names)) + except ValueError as exc: + raise LayerOuterError("REFUSED: %s" % exc) from None + layer = max(by_layer) if len(by_layer) == 1 else -1 + if set(out) != set(subset): + missing = sorted(set(subset) - set(out))[:5] + stray = sorted(set(out) - set(subset))[:5] + raise LayerOuterError( + "REFUSED: the GGUF decode of layer %d produced %d tensors but the bucket " + "named %d (missing %s, stray %s)" % (layer, len(out), len(subset), missing, stray)) + stats["layers_decoded"] = stats.get("layers_decoded", 0) + 1 + return out + + +def _quant_method(config) -> Optional[str]: + qc = getattr(config, "quantization_config", None) + if not qc: + return None + if not isinstance(qc, dict): + qc = qc.to_dict() if hasattr(qc, "to_dict") else dict(getattr(qc, "__dict__", {})) + method = qc.get("quant_method") + return str(method) if method is not None else None + + +def fp8_checkpoint_plan_for_mixed(config) -> Dict[str, Any]: + """The FP8 half of a mixed trellis+FP8 artifact, defaulted where unstated. + + An EXL3 config declares `quant_method: exl3` and says nothing about the + tensors the quantizer LEFT in the source's block-scaled FP8, so the block + geometry cannot come from `quantization_config`. It comes from the source + release this artifact declares as its base -- GLM-5.3's own 128x128 e4m3 -- + and every decoded tensor is still checked against its own scale grid by + `dequantize_block_fp8`, which refuses a grid that does not match the + tensor's shape. + """ + qc = getattr(config, "quantization_config", None) or {} + if not isinstance(qc, dict): + qc = qc.to_dict() if hasattr(qc, "to_dict") else dict(getattr(qc, "__dict__", {})) + return { + "quant_method": "fp8", "fmt": "e4m3", + "weight_block_size": [128, 128], + "activation_scheme": None, + "modules_to_not_convert": sorted( + str(m) for m in (qc.get("modules_to_not_convert") or [])), + "block_size_source": "source release (zai-org/GLM-5.3) 128x128 e4m3; " + "the exl3 config declares no block geometry", + } + + +def _materialized(subset: Dict[str, Any], fp8_plan, trellis_plan, trellis_fp8_plan, + torch_dtype, fp8_stats, trellis_stats, + device: str = "cpu", expected_shape=None, + nvfp4_plan=None, nvfp4_stats=None, + fp8_parity_all: bool = False, sink=None, + gguf_plan=None, gguf_stats=None, packed_plan=None, + packed_stats=None, packed_slices=None) -> Dict[str, Any]: + """Whichever decoders this artifact needs, in the one order that is safe. + + `fp8_parity_all` and `sink` reach the FP8 and trellis decoders (see + `materialize_fp8_subset`); the NVFP4 decoder keeps its own contract and + hands back the decoded dict, which `do_load` then offers to the sink. + """ + if packed_plan is not None: + import quant_stream + try: + return quant_stream.materialize( + subset, packed_plan, packed_slices, torch_dtype, device, + packed_stats, _eager, sink=sink, expected_shape=expected_shape) + except ValueError as exc: + raise LayerOuterError("REFUSED: %s" % exc) from None + if trellis_plan is not None: + composition = (trellis_plan.get("_observed") or {}).get("composition") + if composition is None: + composition = trellis_stats.get("composition") + subset = truncate_zero_padded_rows(subset, expected_shape, trellis_stats) + return materialize_trellis_subset( + subset, trellis_plan, torch_dtype, trellis_stats, + fp8_plan=trellis_fp8_plan, fp8_stats=fp8_stats, device=device, + composition=composition, expected_shape=expected_shape, + fp8_parity_all=fp8_parity_all, sink=sink) + if nvfp4_plan is not None: + return materialize_nvfp4_subset( + subset, nvfp4_plan, torch_dtype, + nvfp4_stats if nvfp4_stats is not None else {}, device=device) + if gguf_plan is not None: + return materialize_gguf_subset( + subset, gguf_plan, torch_dtype, + gguf_stats if gguf_stats is not None else {}, device=device) + if fp8_plan is not None: + return materialize_fp8_subset(subset, fp8_plan, torch_dtype, fp8_stats, + device=device, parity_all=fp8_parity_all, sink=sink) + return subset + + +def _pin_fp32_matmul_policy() -> Dict[str, Any]: + """TF32 off, highest fp32 matmul precision; returns what was set and seen.""" + import torch + + before = { + "allow_tf32_matmul": bool(torch.backends.cuda.matmul.allow_tf32), + "allow_tf32_cudnn": bool(torch.backends.cudnn.allow_tf32), + "float32_matmul_precision": torch.get_float32_matmul_precision(), + "NVIDIA_TF32_OVERRIDE": os.environ.get("NVIDIA_TF32_OVERRIDE"), + } + torch.backends.cuda.matmul.allow_tf32 = False + torch.backends.cudnn.allow_tf32 = False + torch.set_float32_matmul_precision("highest") + return { + "pinned": {"allow_tf32_matmul": False, "allow_tf32_cudnn": False, + "float32_matmul_precision": "highest"}, + "before_pin": before, + "note": "the trellis decode's fp32 Hadamard GEMMs run on the capture device; " + "cuBLAS fp32 without TF32 is deterministic per device but not bitwise " + "against the CPU fixture proof, which is why per-host bitwise " + "reproduction is asserted by the two-cold-run qualification, not assumed", + } + + +# --------------------------------------------------------------------------- +# the direct expert fill: routed experts written straight into the fused +# parameter, around the converter's stack-and-cat transient +# --------------------------------------------------------------------------- + +EXPERT_FILL_DIRECT = "direct" +EXPERT_FILL_CONVERTER = "converter" +EXPERT_FILL_MODES = (EXPERT_FILL_DIRECT, EXPERT_FILL_CONVERTER) +#: What `transformers` does to a MoE layer's routed experts and what this +#: reproduces byte for byte: `MergeModulelist(dim=0)` stacks the E per-expert +#: sources of one pattern in natural-key order (expert 0..E-1), then +#: `Concatenate(dim=1)` cats the stacks in SOURCE-PATTERN ORDER (gate rows +#: first, then up). Measured on the H200 pod (review-efficiency section 3), +#: the cat is a second 12.9 GB copy of gate_up_proj on the device while the +#: 6.4 GB of down_proj sources are already resident: bf16 and FP8 GLM-5.3 +#: captures peak at 37.53 GB and the trellis one at 56.86 GB, so no <=48 GB +#: card can run them. Here the fused parameter is allocated ONCE and every +#: source is copied into its slice -- `gate_up[e, :I]`, `gate_up[e, I:]`, +#: `down[e]` -- through a small pinned staging ring (or straight from the +#: decoder's output tensor). A copy is a copy: `bin/selftest_layer_outer.py` +#: L4/L6 assert the result equals `from_pretrained`'s and the converter's own, +#: parameter by parameter. Every non-expert tensor still goes through the +#: converter, untouched. +EXPERT_FILL_REFERENCE = ("transformers.core_model_loading.MergeModulelist(dim=0) + " + "Concatenate(dim=1)") +_SAFETENSORS_DTYPE_NAMES = {"BF16": "bfloat16", "F16": "float16", "F32": "float32"} +_PATTERN_LITERAL_FORBIDDEN = set("[](){}+?^$|") + + +def _pattern_literal(pattern: str) -> Optional[str]: + """A conversion pattern as the literal key fragment it matches, or None + when the pattern carries regex syntax this fill does not model.""" + if any(ch in _PATTERN_LITERAL_FORBIDDEN for ch in pattern): + return None + return pattern.replace("\\.", ".") + + +class _StagingRing(object): + """A few reusable host buffers a checkpoint slice is read into, then DMA'd out. + + On CUDA the buffers are page-locked and the copy is asynchronous, so the + NVMe read of slice n+1 overlaps the bus transfer of slice n (the converter + moves each of the 768 per-expert slices as a synchronous pageable copy, + measured at 3.0 GB/s against the disk's 5.9 GB/s). A buffer is reused only + after the event recorded behind its copy has completed. On any other + device the same code runs with pageable buffers and synchronous copies: + the bytes are the same bytes, only their timing differs. + """ + + def __init__(self, device, slots: int = 4): + import torch + + self.device = torch.device(device) + self.pinned = self.device.type == "cuda" and torch.cuda.is_available() + self.buffers: List[Any] = [None] * int(slots) + self.events: List[Any] = [None] * int(slots) + self.next = 0 + self.bytes = 0 + self.reads = 0 + + def copy_into(self, dst, path: str, offset: int, nbytes: int) -> None: + import torch + + if int(dst.numel()) * dst.element_size() != nbytes: + raise LayerOuterError( + "REFUSED: %s bytes at %s+%d do not fill a %s %s slice" + % (nbytes, os.path.basename(path), offset, tuple(dst.shape), dst.dtype)) + slot = self.next + self.next = (slot + 1) % len(self.buffers) + buffer = self.buffers[slot] + if buffer is None or buffer.numel() < nbytes: + buffer = torch.empty(nbytes, dtype=torch.uint8, pin_memory=self.pinned) + self.buffers[slot] = buffer + if self.events[slot] is not None: + self.events[slot].synchronize() + self.events[slot] = None + view = buffer[:nbytes] + _read_exact(path, offset, view.numpy()) + dst.copy_(view.view(dst.dtype).view(dst.shape), non_blocking=self.pinned) + if self.pinned: + event = torch.cuda.Event() + event.record() + self.events[slot] = event + self.bytes += nbytes + self.reads += 1 + + def drain(self) -> None: + for index, event in enumerate(self.events): + if event is not None: + event.synchronize() + self.events[index] = None + + +def _read_exact(path: str, offset: int, into) -> None: + """Fill a writable buffer with exactly its length from `path` at `offset`.""" + view = memoryview(into).cast("B") + fd = os.open(path, os.O_RDONLY) + try: + done = 0 + total = len(view) + while done < total: + if hasattr(os, "preadv"): + got = os.preadv(fd, [view[done:]], offset + done) + else: # pragma: no cover - non-Linux hosts + chunk = os.pread(fd, total - done, offset + done) + got = len(chunk) + view[done:done + got] = chunk + if got <= 0: + raise LayerOuterError( + "REFUSED: %s ended %d bytes short of a tensor the header declares " + "at offset %d" % (path, total - done, offset)) + done += got + finally: + os.close(fd) + + +class _ExpertFill(object): + """One layer's fused expert parameters, allocated once and filled slice by slice. + + `plan` (from `plan_expert_fill`) maps every source key the converter + would have stacked to its (parameter, expert, part) slot. `offer(key, + value)` copies a decoded tensor or a lazy checkpoint slice into that slot + and reports whether it took it; anything it declines goes to the + converter exactly as before. `finish()` refuses a slot nobody filled -- + the converter would have reported a shape mismatch for the same + checkpoint, and this schedule does not run a layer on undefined bytes. + """ + + def __init__(self, model, plan: Dict[str, Any], device: str, load_param, + locator: Dict[str, Tuple[str, int, int, str, Tuple[int, ...]]], + ring: Optional[_StagingRing], stats: Dict[str, Any]): + import torch + + self.model = model + self.plan = plan + self.locator = locator + self.ring = ring + self.stats = stats + self.slots: Dict[str, Tuple[str, int, int]] = {} + self.filled: Set[str] = set() + self.params: Dict[str, Any] = {} + for name, target in plan["targets"].items(): + tensor = torch.empty(tuple(target["shape"]), dtype=getattr(torch, target["dtype"]), + device=device) + load_param(model, name, tensor) + param = model.get_parameter(name) + param._is_hf_initialized = True + self.params[name] = param + for key, (expert, part) in target["slots"].items(): + self.slots[key] = (name, expert, part) + + def _slice(self, name: str, expert: int, part: int): + target = self.plan["targets"][name] + param = self.params[name] + if target["parts"] == 1: + return param.data[expert] + width = int(target["shape"][1]) // int(target["parts"]) + return param.data[expert, part * width:(part + 1) * width] + + def offer(self, key: str, value) -> bool: + slot = self.slots.get(key) + if slot is None: + return False + if key in self.filled: + raise LayerOuterError( + "REFUSED: %s was handed to the expert fill twice; the checkpoint or a " + "decoder carries two versions of one expert slice" % key) + name, expert, part = slot + dst = self._slice(name, expert, part) + located = self.locator.get(key) if not hasattr(value, "dtype") else None + if located is not None: + path, offset, nbytes, dtype_name, shape = located + if tuple(shape) != tuple(dst.shape) \ + or _SAFETENSORS_DTYPE_NAMES.get(dtype_name) != str(dst.dtype).replace("torch.", ""): + raise LayerOuterError( + "REFUSED: %s is %s %s in the checkpoint but its fused slice is %s %s" + % (key, dtype_name, tuple(shape), dst.dtype, tuple(dst.shape))) + self.ring.copy_into(dst, path, offset, nbytes) + self.stats["staged_slices"] += 1 + else: + tensor = _eager(value) + if tuple(tensor.shape) != tuple(dst.shape) or tensor.dtype != dst.dtype: + raise LayerOuterError( + "REFUSED: %s decoded as %s %s but its fused slice is %s %s" + % (key, tensor.dtype, tuple(tensor.shape), dst.dtype, tuple(dst.shape))) + dst.copy_(tensor) + self.stats["decoded_slices"] += 1 + self.filled.add(key) + self.stats["slices_filled"] += 1 + self.stats["bytes_filled"] += int(dst.numel()) * dst.element_size() + return True + + def finish(self) -> None: + if self.ring is not None: + self.ring.drain() + unfilled = sorted(key for key in self.slots if key not in self.filled) + if unfilled: + raise LayerOuterError( + "REFUSED: %d expert slice(s) of %s were never delivered: %s%s. The " + "checkpoint (or its decoder) did not produce them and the fused " + "parameter would run on undefined bytes." + % (len(unfilled), ", ".join(sorted(self.plan["targets"])), ", ".join(unfilled[:6]), + " (+%d more)" % (len(unfilled) - 6) if len(unfilled) > 6 else "")) + self.stats["targets_filled"] += len(self.plan["targets"]) + self.stats["layers_filled"] += 1 + + +def plan_expert_fill(model, converters: Sequence[Any], layer_names: Sequence[str], + routing_key: Callable[[str], str], subset_keys: Iterable[str], + source_dtype: Callable[[str], Optional[str]], + source_shape: Callable[[str], Optional[Tuple[int, ...]]], + dtype_plan: Dict[str, Any], torch_dtype, + decoders_active: bool) -> Dict[str, Any]: + """Which of a layer's parameters the direct fill may build, and from which keys. + + Eligibility is derived from the model's OWN conversion mapping, never from + a name convention: a `WeightConverter` whose operations are exactly + `[MergeModulelist(dim=0)]` or `[MergeModulelist(dim=0), Concatenate(dim=1)]` + with one `*` per source pattern. For each such converter and each layer + parameter ending in its target, the E x parts candidate source keys are + constructed and each one is ROUND-TRIPPED through the same rename the + converter applies (`routing_key(candidate) == parameter`); a candidate + that does not route back, a subset key that routes to the parameter but + is not a candidate, a source whose stored dtype or shape is not the + slice's, a dtype-plan override this fill cannot evaluate, or (with no + decoder active) a candidate absent from the checkpoint, all make the + parameter INELIGIBLE -- it then goes through the converter exactly as + before, and the converter reports whatever it reports. Everything about + `declined` is in the returned plan so the receipt can say what was filled + directly and what was not. + """ + import torch + + try: + from transformers.core_model_loading import (Concatenate, MergeModulelist, + build_glob_alternation) + except Exception as exc: # pragma: no cover - depends on the build + return {"targets": {}, "declined": {"*": "transformers internals: %s" % exc}} + + plan_alternation = None + if dtype_plan: + alternation, by_group, _ = build_glob_alternation(list(dtype_plan.keys())) + plan_alternation = (alternation, by_group) + subset_keys = list(subset_keys) + key_set = set(subset_keys) + routed = {} + for key in subset_keys: + routed.setdefault(routing_key(key), []).append(key) + targets: Dict[str, Any] = {} + declined: Dict[str, str] = {} + for converter in converters: + operations = list(getattr(converter, "operations", None) or []) + if not operations or not isinstance(operations[0], MergeModulelist) \ + or getattr(operations[0], "dim", None) != 0: + continue + if len(operations) == 2: + if not isinstance(operations[1], Concatenate) or operations[1].dim != 1: + continue + elif len(operations) != 1: + continue + if len(converter.target_patterns) != 1: + continue + target_literal = _pattern_literal(converter.target_patterns[0]) + source_literals = [_pattern_literal(p) for p in converter.source_patterns] + if target_literal is None or any(s is None or s.count("*") != 1 for s in source_literals): + continue + for name in layer_names: + if not name.endswith(target_literal): + continue + prefix = name[:-len(target_literal)] + try: + param = model.get_parameter(name) + except AttributeError: + continue + shape = tuple(int(d) for d in param.shape) + parts = len(source_literals) + if len(shape) < 2 or (parts > 1 and (len(shape) < 3 or shape[1] % parts)): + declined[name] = "shape %s does not split into %d parts" % (shape, parts) + continue + experts = shape[0] + if parts == 1: + slice_shape = shape[1:] + else: + slice_shape = (shape[1] // parts,) + shape[2:] + target_dtype = str(param.dtype).replace("torch.", "") + if plan_alternation is not None: + matched = plan_alternation[0].search(name) + if matched is not None: + planned = dtype_plan[plan_alternation[1][matched.lastgroup]] + target_dtype = str(planned).replace("torch.", "") + slots: Dict[str, Tuple[int, int]] = {} + reason = None + for part, literal in enumerate(source_literals): + for expert in range(experts): + candidate = prefix + literal.replace("*", str(expert)) + if routing_key(candidate) != name: + reason = "%s does not route back to %s" % (candidate, name) + break + slots[candidate] = (expert, part) + if reason: + break + if reason is None: + present = routed.get(name, []) + strangers = [key for key in present if key not in slots] + if strangers: + reason = "%s routes here but is not an expert slice" % strangers[0] + elif not decoders_active and len(present) != len(slots): + reason = "%d of %d expert slices present in the checkpoint" % ( + len(present), len(slots)) + if reason is None: + for key in routed.get(name, []): + if decoders_active and (key + FP8_SCALE_SUFFIX) in key_set: + # A block-scaled FP8 pair: the decoder replaces it by a + # `torch_dtype` tensor of the same name, checked for + # dtype and shape when it is offered to the slot. + continue + dtype_name = source_dtype(key) + stored = source_shape(key) + if _SAFETENSORS_DTYPE_NAMES.get(dtype_name or "") != target_dtype: + reason = "%s is stored as %s, the parameter is %s" % ( + key, dtype_name, target_dtype) + break + if stored is not None and tuple(stored) != tuple(slice_shape): + reason = "%s is stored as %s, the slice is %s" % ( + key, tuple(stored), tuple(slice_shape)) + break + if reason is not None: + declined[name] = reason + continue + targets[name] = {"shape": shape, "dtype": target_dtype, "parts": parts, + "experts": experts, "slots": slots, + "sources": [prefix + s for s in source_literals]} + return {"targets": targets, "declined": declined} + + +def expert_fill_evidence(streamer: StreamedModel) -> Optional[Dict[str, Any]]: + """How the routed experts reached the device, for the runtime receipt.""" + stats = getattr(streamer, "expert_fill_stats", None) + if stats is None: + return None + return { + "mode": stats.get("mode"), + "reference": EXPERT_FILL_REFERENCE, + "layers_filled": int(stats.get("layers_filled", 0)), + "targets_filled": int(stats.get("targets_filled", 0)), + "slices_filled": int(stats.get("slices_filled", 0)), + "staged_slices": int(stats.get("staged_slices", 0)), + "decoded_slices": int(stats.get("decoded_slices", 0)), + "bytes_filled": int(stats.get("bytes_filled", 0)), + "staging": stats.get("staging"), + "declined": dict(stats.get("declined") or {}), + "identity": "a byte copy into the fused parameter's slice; bin/selftest_layer_outer.py " + "L4/L6 assert equality with from_pretrained and with the converter path", + } + + +def is_trellis_checkpoint(config) -> bool: + """One answer to "is this an EXL3 trellis artifact?" for EVERY gate. + + Two declarations count: an inline `quantization_config.quant_method: exl3` + (turboderp layout; drowzeys, wrldsuksgo2mars) and a top-level + `hybrid_tr3_tail` (davidsyoung, whose `quantization_config` is a leftover + ModelOpt block). The FP8 gate and the trellis gate MUST consult the same + predicate: on 2026-09-05 they did not, the FP8 gate saw only + `quant_method: modelopt` and refused three davidsyoung pods after their + fetch, while the trellis gate one line below would have accepted them. + """ + return _quant_method(config) == "exl3" or trellis_tail_declaration(config) is not None + + +def checkpoint_decode_plans(config, model_dir: str, log: Callable[..., None], gate=None): + """Resolve which host-side decoders this checkpoint needs, before anything is built. + + Returns `(fp8, trellis, trellis_fp8, trellis_stats, nvfp4, gguf, packed)`. + Legacy qualified readers keep their contracts. Affine and microfloat readers + require exhaustive metadata admission before the model can be constructed. + Native/legacy FP8 and trellis race loading retains incremental shard opening. + """ + gguf_plan = gguf_checkpoint_plan(config, model_dir) + if gguf_plan is not None: + observed = gguf_plan.pop("_observed", {}) + log(stage="gguf_decode_plan", method=GGUF_DECODE_METHOD, + reference=("engines/tools/gguf_qwen35.py::materialize_layer" + if "_bridge" in gguf_plan else GGUF_DECODE_REFERENCE), + parity=None if "_bridge" in gguf_plan else GGUF_PARITY_EVIDENCE, + observed={k: v for k, v in observed.items() if k != "file_records"}, + **{k: v for k, v in gguf_plan.items() if not k.startswith("_")}) + gguf_plan["_observed"] = observed + trellis_stats = {"decoded_modules": 0, "trellis_bits": 0} + return None, None, None, trellis_stats, None, gguf_plan, None + trellis = is_trellis_checkpoint(config) + if not trellis: + import quant_stream + try: + packed_plan = quant_stream.checkpoint_plan( + _config_dict(config), model_dir, _safetensors_header, gate=gate) + except ValueError as exc: + raise LayerOuterError("REFUSED: %s" % exc) from None + if packed_plan is not None: + log(stage="packed_decode_plan", method=quant_stream.METHODS[packed_plan["_reader"]], + modules=len(packed_plan["modules"]), components=len(packed_plan["consumed"]), + reference=packed_plan["reference"]) + return None, None, None, {"decoded_modules": 0, "trellis_bits": 0}, None, None, packed_plan + quantization = quant_stream.quantization(_config_dict(config)) + if quantization and not getattr(config, "quantization_config", None): + import copy + config = copy.deepcopy(config) + config.quantization_config = quantization + nvfp4_plan = None if trellis else nvfp4_checkpoint_plan(config, model_dir) + if nvfp4_plan is not None: + observed = nvfp4_plan.pop("_observed", {}) + log(stage="nvfp4_decode_plan", method=NVFP4_DECODE_METHOD, + reference=NVFP4_DECODE_REFERENCE, parity=NVFP4_PARITY_EVIDENCE, + observed=observed, + **{k: v for k, v in nvfp4_plan.items() if not k.startswith("_")}) + nvfp4_plan["_observed"] = observed + fp8_plan = None if (trellis or nvfp4_plan is not None) else fp8_checkpoint_plan(config) + if fp8_plan is not None: + log(stage="fp8_decode_plan", method=FP8_DECODE_METHOD, + reference=FP8_DECODE_REFERENCE, **fp8_plan) + trellis_plan = None + trellis_stats: Dict[str, Any] = {"decoded_modules": 0, "trellis_bits": 0} + trellis_fp8_plan = None + if trellis: + # The trellis decode is two fp32 128x128 GEMMs per module and runs on + # the capture device: pin the matmul policy exactly as stream_score + # does and RECORD it, so the sealed receipt can show that TF32 was off + # rather than assume torch's default (which NVIDIA_TF32_OVERRIDE can + # flip from the environment without a trace). + trellis_stats["numeric_policy"] = _pin_fp32_matmul_policy() + if str(os.environ.get("NVIDIA_TF32_OVERRIDE", "")).strip() == "1": + raise LayerOuterError( + "REFUSED: NVIDIA_TF32_OVERRIDE=1 forces TF32 in cuBLAS regardless of the " + "torch flags; the trellis decode's fp32 GEMMs would not be fp32. Unset it.") + keys = list(_index_weight_map(model_dir)) + trellis_plan = trellis_checkpoint_plan(config, keys, model_dir=model_dir) + if any(key.endswith(FP8_SCALE_SUFFIX) for key in keys): + trellis_fp8_plan = fp8_checkpoint_plan_for_mixed(config) + if trellis_plan is not None: + observed = trellis_plan.pop("_observed", {}) + trellis_stats["composition"] = observed.get("composition") + trellis_stats["quant_method_declared"] = observed.get("quant_method_declared") + trellis_stats["declared_by"] = observed.get("declared_by") + if observed.get("rotation_layout") == "r7_shared": + trellis_stats["r7_permutations"] = r7_permutation_source( + config, model_dir, observed.get("r7_declaration") or {}) + trellis_stats["rotation_layout"] = observed.get("rotation_layout") + trellis_stats["modules_per_layout_planned"] = observed.get("modules_per_layout") + trellis_stats["r7_declaration"] = observed.get("r7_declaration") + trellis_stats["module_bits_policy"] = observed.get("module_bits_policy") + log(stage="trellis_decode_plan", + method=(TRELLIS_TP_COMPOSE_METHOD if observed.get("composition") + else TRELLIS_DECODE_METHOD), + reference=TRELLIS_DECODE_REFERENCE, + mixed_fp8=trellis_fp8_plan is not None, observed=observed, + **trellis_plan) + trellis_stats["quantized_module_count"] = observed.get( + "quantized_module_count", 0) + trellis_stats["codebook_histogram"] = observed.get("codebook_histogram", {}) + return fp8_plan, trellis_plan, trellis_fp8_plan, trellis_stats, nvfp4_plan, None, None + + +def _exl3hf(): + """Import the decode ABI lazily: torch-heavy, and only a quant run needs it.""" + here = os.path.dirname(os.path.abspath(__file__)) + if here not in sys.path: + sys.path.insert(0, here) + import exl3hf_surface + + return exl3hf_surface + + +def build_streamed_model(model_dir: str, cls, config, dtype_name: str, device: str, + log: Callable[..., None], + layer_guard: Optional[Callable[[int, Dict[str, Any]], None]] = None, + gate: Optional[Any] = None, + expert_fill: str = EXPERT_FILL_DIRECT) -> StreamedModel: + """Instantiate on meta, load everything but the decoder layers, and return the streamer. + + `gate` turns the loader from "the tree is complete" into "the tree arrives + while I work" -- the overlapped fetch of `engines/tools/race_fetch.py`. It is any + object exposing `wait_for_shards(names)`, `wait_for_layer(i)` and `.plan` + (a `race_fetch.FetchPlan`). With a gate: + + * only the shards the RESIDENT load will read are opened and audited + before it -- computed here from the model's own stack prefix and the + conversion mapping's renames, not taken from the plan's bucket -- and + the audit is the same audit, restricted to them; + * layer N's shards are waited on, audited and opened inside `load_layer(N)` + -- i.e. at the last possible moment, which is the whole point; + * a buffer belonging to ONE layer rides with that layer rather than with + the resident set (see the comment on `deferred_buffers`); + * with `gate=None` the original code path runs untouched. + + Nothing about the ARITHMETIC differs between the two: the same slices go to + the same converter in the same per-shard, per-header order. What differs is + only when the bytes behind those slices arrived -- which + `bin/selftest_race_mode.py` R6 asserts by digest rather than by argument. + """ + import copy as _copy + + import torch + from transformers.utils.generic import ContextManagers + + (convert_and_load, LoadStateDictConfig, load_param_into_model, + patch_output_recorders, get_conversion_mapping) = _require_transformers_internals() + + from safetensors import safe_open + + torch_dtype = {"bfloat16": torch.bfloat16, "float16": torch.float16, + "float32": torch.float32}[dtype_name] + + gguf_tree = gate is None and bool(gguf_files_in(model_dir)) + if gate is None and not gguf_tree: + audit = audit_checkpoint_tree(model_dir) + log(stage="checkpoint_audit", **audit) + # A GGUF tree has no safetensors to audit; `gguf_checkpoint_plan` audits + # the container's own extents (and the whole-file digests) below. + # With a gate the audit is DEFERRED: which shards the resident load actually + # reads is not knowable until the module tree exists (it depends on the + # model's own buffer names and stack prefix), and auditing the whole tree + # would refuse a checkpoint that is merely still arriving. It happens a few + # dozen lines below, over exactly the shards the base load will open. + + # QUANTIZED CHECKPOINTS: one form is decoded here, every other is refused, + # and the reason this is a refusal rather than a comment is that one of + # the two ways it fails is silent. + # + # `from_pretrained` builds an `HfQuantizer`, which (a) replaces the module + # tree's Linear/Experts with quantized ones and (b) contributes weight + # conversions -- the `*.scale` -> `*.weight_scale_inv` rename and, on a + # machine with no FP8 kernel, `Fp8Dequantize`. `build_streamed_model` does + # neither: it calls `cls(config)` directly and takes only the MODEL's + # conversion mapping. What happens next depends on shapes: + # + # * FP4-packed experts (deepseek-ai/DeepSeek-V4-Flash-0731): the packed + # tensor's last dim is half the parameter's, so `transformers` reports + # "Reinit due to size mismatch" and raises. Loud, harmless. + # * A plain FP8 E4M3 weight: the shape is IDENTICAL to the bf16 parameter + # it is loaded into. The fp8 values are cast to bf16, the scale tensor + # falls out as `unexpected`, AND THE SCALE IS NEVER APPLIED. That is + # numerically the M1 Qwen3.8-27B-FP8 defect -- a confident number for a + # projection whose weights are off by a per-block factor. + # + # So the block-scaled FP8 e4m3 form is DECODED on the host, per tensor, + # before the subset reaches the converter (`materialize_fp8_subset`): the + # weight arrives as bf16 with its scale applied and the scale key never + # reaches the loader. "Dequantize-and-run, weights-only", the M1 method, + # under the streaming schedule. Any other quantization_config is refused + # by `fp8_checkpoint_plan` before anything is instantiated. + fp8_plan, trellis_plan, trellis_fp8_plan, trellis_stats, nvfp4_plan, gguf_plan, packed_plan = ( + checkpoint_decode_plans(config, model_dir, log, gate=gate)) + if gguf_plan is not None and gate is not None: + raise LayerOuterError("REFUSED: the GGUF lane has no gated (race-mode) loader") + if gguf_plan is not None: + log(stage="checkpoint_audit", **(gguf_plan.get("_observed") or {}).get("container_audit", {})) + fp8_stats = {"dequantized": 0, "scales_consumed": 0, "fp8_bytes": 0} + gguf_stats: Dict[str, Any] = {"tensors_decoded": 0, "official_tensors_produced": 0, + "gguf_bytes_read": 0, "ggml_types": {}, "layers_decoded": 0} + nvfp4_stats: Dict[str, Any] = {"decoded_modules": 0, "packed_bytes": 0, + "scales_consumed": 0, "input_scales_skipped": 0, + "plain_modules_passed": 0} + packed_stats = {"decoded_modules": 0, "formats": {}, "components": set(), "decoded_names": set(), "bytes_read": 0} + construction_config = _copy.deepcopy(config) + model_view = None + if gguf_plan is not None and "_bridge" in gguf_plan: + if not cls.__module__.startswith("transformers."): + raise LayerOuterError("REFUSED: native GGUF text view cannot replace a pinned custom model class") + cls, construction_config, model_view = gguf_plan["_bridge"].model_view(config) + gguf_plan["_model_view"] = model_view + if packed_plan is not None: + # Original config bytes/config object remain the checkpoint identity. + # Only a fully admitted decoder plan may remove quantizer construction. + for node in (construction_config, getattr(construction_config, "text_config", None)): + if node is not None: + for attr in ("quantization_config", "quantization"): + if hasattr(node, attr): + delattr(node, attr) + + # Build with the SAME context managers `from_pretrained` uses, so the module + # tree (kernel patches, dtype, tie-weight suppression) is the one the + # window-outer path would have built -- on meta, so nothing is allocated. + with ContextManagers(cls.get_init_context(torch_dtype, False, False, None)): + model = cls(construction_config) + patch_output_recorders(model) + model.eval() + + layers_prefix, layers = find_decoder_layers(model) + layer_pattern = re.compile(r"^" + re.escape(layers_prefix) + r"\.(\d+)\.") + + # Buffers are never streamed (see the class docstring), so a checkpoint key + # that targets one must be routed to the resident load. The checkpoint may + # address it with or without the base-model prefix, and getting that wrong + # would strand the buffer on meta and trip the refusal below for no reason, + # so both spellings are accepted. + prefix = getattr(model, "base_model_prefix", "") or "" + buffer_names = set() + for name, _ in model.named_buffers(): + buffer_names.add(name) + if prefix: + buffer_names.add(name.removeprefix(prefix + ".")) + buffer_names.add("%s.%s" % (prefix, name)) + streamed_params = {name for name, _ in model.named_parameters() + if layer_pattern.match(name)} + if not streamed_params: + raise LayerOuterError("no parameters under %s.. -- nothing to stream" + % layers_prefix) + + dtype_plan = model._get_dtype_plan(torch_dtype) + weight_mapping = get_conversion_mapping(model, None, None) + load_config = LoadStateDictConfig( + pretrained_model_name_or_path=model_dir, + device_map={"": str(_model_device(device))}, + dtype=torch_dtype, dtype_plan=dtype_plan, weight_mapping=weight_mapping) + + # The checkpoint, as lazy safetensors slices: opening every shard costs + # mmap handles, not bytes. Materialisation happens per parameter, inside + # `convert_and_load_state_dict_in_model`. + # + # With a gate only the shards that have landed are opened; the rest are + # opened in `do_load` as the capture reaches the layers that need them. + # Either way the keys are enumerated from each shard's OWN header, in shard + # order -- so the subsets handed to the converter carry the same keys in the + # same order on both paths. + pointers: List[Any] = [] + opened_shards: Dict[str, Any] = {} + # Where each key's bytes live: (shard path, absolute offset, byte length, + # stored dtype, shape) from the shard's own header. The direct expert fill + # reads a slice from here straight into its staging buffer -- the same + # bytes `PySafeSlice[...]` would hand back, without the intermediate copy. + locator: Dict[str, Tuple[str, int, int, str, Tuple[int, ...]]] = {} + packed_slices: Dict[str, Any] = {} + packed_consumed = set(packed_plan["consumed"]) if packed_plan is not None else set() + + def _open_shards(names: Sequence[str]) -> Dict[str, Any]: + """Open shards not yet open; return {key: lazy slice} for the NEW ones only.""" + fresh: Dict[str, Any] = {} + for name in sorted(names): + if name in opened_shards: + continue + path = os.path.join(model_dir, name) + pointer = safe_open(path, framework="pt", device="cpu") + opened_shards[name] = pointer + pointers.append(pointer) + header, _ = _safetensors_header(path) + with open(path, "rb") as handle: + (header_len,) = struct.unpack(" Optional[str]: + located = locator.get(key) + if packed_plan is not None and key in packed_plan["modules"]: + return gguf_decoded_dtype + if located is None and key in gguf_slot_keys: + return gguf_decoded_dtype + return located[3] if located is not None else None + + def _stored_shape(key: str) -> Optional[Tuple[int, ...]]: + if packed_plan is not None and key in packed_plan["modules"]: + return tuple(packed_plan["modules"][key]["shape"]) + located = locator.get(key) + return located[4] if located is not None else None + + def _subset_bytes(keys: Iterable[str]) -> int: + return sum(locator[key][2] for key in keys if key in locator + and not (packed_plan is not None and key in packed_plan["modules"])) + + ungated_shard_names = (sorted(name for name in os.listdir(model_dir) + if name.endswith(".safetensors")) + if gate is None and gguf_plan is None else []) + + # ROUTING IS DONE ON THE RENAMED KEY, not the raw one. + # + # `layer_pattern` is built from the MODEL's stack path. For GLM-5.3 the + # checkpoint spells that path the same way and matching the raw key works. + # For a VL checkpoint it does not: `MiniMaxAI/MiniMax-M3` ships + # `language_model.model.layers.N.` while the model holds + # `model.language_model.layers.N.`, so EVERY layer tensor missed the pattern, + # every one of them fell into the resident load, and the schedule then + # refused with "the checkpoint holds no tensors for + # model.language_model.layers.0" -- a true statement about the wrong name. + # + # The conversion mapping already knows the answer; `convert_and_load` uses it + # a few lines below on these same raw keys. Applying only its RENAMES here + # (converters collapse several sources into one target, which is fine: they + # all carry the same layer index) puts each key in the right bucket while the + # subsets still hold the raw names the loader expects. + # + # Where a rename cannot be computed the raw key is used, which is exactly the + # old behaviour -- so an architecture whose names already match is unaffected. + renames = list(weight_mapping.values() if isinstance(weight_mapping, dict) + else (weight_mapping or [])) + + def routing_key(key: str) -> str: + out = key + for rename in renames: + renamer = getattr(rename, "rename_source_key", None) + if renamer is None: + continue + try: + renamed = renamer(out) + except Exception: + return key + out = renamed[0] if isinstance(renamed, tuple) else renamed + if not isinstance(out, str): + return key + return out + + _expert_key = re.compile(r"\.mlp\.experts\.\d+\.(gate_proj|up_proj|down_proj)\.weight$") + + def expected_shape(key: str) -> Optional[Tuple[int, ...]]: + """The parameter shape the converter will load `key` into, or None. + + A plain parameter answers from the meta-device module tree. A routed + expert projection has no per-expert parameter (the model fuses them), + so its per-expert shape comes from the config's own geometry: + gate/up [moe_intermediate_size, hidden_size], down the transpose. + """ + match = _expert_key.search(key) + if match: + text = getattr(config, "text_config", None) or config + hidden = getattr(text, "hidden_size", None) + inter = getattr(text, "moe_intermediate_size", None) + if not isinstance(hidden, int) or not isinstance(inter, int): + return None + return (inter, hidden) if match.group(1) != "down_proj" else (hidden, inter) + try: + return tuple(int(d) for d in model.get_parameter(routing_key(key)).shape) + except (AttributeError, KeyError, ValueError): + return None + + base_subset: Dict[str, Any] = {} + layer_subset: Dict[int, Dict[str, Any]] = {} + routing_counts = {"routed": 0, "seen": 0} + + # A BUFFER THAT BELONGS TO ONE LAYER IS NOT PART OF THE RESIDENT SET, and + # under a gate it must not be treated as one. + # + # Found by running against the live `malaiwah/GLM-5.2-SIQ-Fruit-bf16`, not by + # reading the code: `model.layers.N.mlp.gate.e_score_correction_bias` is a + # router-correction BUFFER, so the ungated loader routes it to the resident + # load -- but it is four kilobytes living inside that layer's 845 MB shard. + # Blocking the resident load on it means blocking on ten of the fourteen + # shards, which serializes almost the whole fetch and deletes the overlap. + # And it is not a quiet failure either: `transformers` reported all ten + # MISSING, randomly initialised them, and CAPTURE-03 refused the capture. + # + # So under a gate these ride WITH their layer, which is the loop order's own + # logic -- layer N's everything loads when layer N loads, and the value is + # read only by layer N's forward. The set is derived from the MODULE TREE + # rather than from whichever shards happen to be open, because the resident + # load has to know which buffers it is not responsible for BEFORE it runs. + # + # The ungated path is untouched, deliberately: its bit-identity against + # `from_pretrained` is already proven, and two paths loading the same bytes + # at different moments is a scheduling difference, not an arithmetic one. + # `bin/selftest_race_mode.py` R6 asserts the two produce the same + # capture_content_digest rather than arguing that they must. + deferred_buffers: Set[str] = ( + {name for name, _ in model.named_buffers() if layer_pattern.match(name)} + if gate is not None else set()) + + def bucket(slices: Dict[str, Any]) -> None: + """Route freshly opened keys into the resident subset or a layer's subset. + + Called once for the whole tree without a gate, and once per landed + shard batch with one. + """ + for key, value in slices.items(): + if key in packed_consumed and not isinstance(value, quant_stream.WeightSlot): + packed_slices[key] = value + continue + routing_counts["seen"] += 1 + target = routing_key(key) + if target != key: + routing_counts["routed"] += 1 + match = layer_pattern.match(target) + is_buffer = key in buffer_names or target in buffer_names + if match is None or (is_buffer and gate is None): + base_subset[key] = value + else: + layer_subset.setdefault(int(match.group(1)), {})[key] = value + + if packed_plan is not None: + import quant_stream + bucket(quant_stream.slots(packed_plan)) + if gate is None: + bucket(_open_shards(ungated_shard_names)) + if gguf_plan is not None: + # the container's official names stand where the shard keys stand + slots = gguf_subsets(gguf_plan) + gguf_slot_keys.update(slots) + bucket(slots) + resident_shards: List[str] = [] + else: + # THE RESIDENT SET, computed rather than guessed. `gate.plan` decides the + # fetch ORDER; this decides what the base load actually blocks on, using + # the model's own stack prefix and the conversion mapping's renames. The + # two agree on every checkpoint whose keys the plan's regex matched, and + # where they do not, this one is right -- so the wait is for exactly + # these shards, not for the plan's bucket. + weight_map = _index_weight_map(model_dir) + resident_keys = [key for key in weight_map + if layer_pattern.match(routing_key(key)) is None] + resident_shards = sorted({weight_map[key] for key in resident_keys}) + if not resident_shards: + raise LayerOuterError( + "REFUSED: every tensor in the checkpoint index routes to a decoder " + "layer, so there is nothing to load resident -- no embeddings, no " + "final norm, no head. Either the index is partial or %s is not this " + "model's stack prefix." % layers_prefix) + waited = gate.wait_for_shards(resident_shards) + audit = audit_checkpoint_tree(model_dir, shards=resident_shards) + log(stage="checkpoint_audit", partial=True, + audited_shards=len(resident_shards), waited_seconds=round(waited, 3), + **audit) + bucket(_open_shards(resident_shards)) + if packed_plan is not None: + # Shared scales need not live in the canonical weight's layer or shard. + # The plan has already admitted every header; keep only lazy slices. + all_shards = packed_plan["_shards"] + audit_checkpoint_tree(model_dir, shards=all_shards if gate is not None else None) + bucket(_open_shards(all_shards)) + if routing_counts["routed"]: + log(stage="stream_routing", renamed_checkpoint_keys=routing_counts["routed"], + total_checkpoint_keys=routing_counts["seen"], layers_prefix=layers_prefix) + if fp8_plan is not None: + # A config that declares FP8 over a checkpoint with no scale tensors is + # lying about itself; decoding nothing and capturing as native would be + # a confident number for an artifact nobody described. + declared_keys = (list(base_subset) + [key for subset in layer_subset.values() + for key in subset] + if gate is None else list(_index_weight_map(model_dir))) + if not any(key.endswith(FP8_SCALE_SUFFIX) for key in declared_keys): + raise LayerOuterError( + "REFUSED: quantization_config declares block-scaled FP8 but the " + "checkpoint carries no *%s tensor; the payload cannot be decoded and " + "loading it as-is would apply no block scale. Use --schedule " + "window-outer with a quantizer that understands this artifact, or " + "fix the artifact's config." % FP8_SCALE_SUFFIX) + + aggregate = {"missing_keys": set(), "unexpected_keys": set(), "mismatched_keys": [], + "error_msgs": [], "conversion_errors": {}} + + # Checkpoint tensors addressed to a layer index the model does not build are + # never handed to the loader by this schedule, so they would never appear in + # any per-load `unexpected_keys` and the `checkpoint_tensors_not_loaded` + # disclosure the window-outer path emits would silently go missing. This is + # not hypothetical: GLM-5.3's MTP layer 78 (791 tensors, 18.5 GiB) and + # Fruit's layer 13 are exactly this case -- `transformers` builds + # `num_hidden_layers` layers and drops the next-token-prediction layer. + # + # With a gate the shards holding those tensors may not have landed yet, so + # the answer comes from the checkpoint INDEX -- which names every key in the + # tree without reading a byte of it -- rather than from the shards opened so + # far. Getting this from the index rather than from "what is on disk right + # now" is what stops race mode from quietly dropping a disclosure that the + # fetch-then-capture path would have made. + if gate is None: + over_index_keys = {index: set(subset) for index, subset in layer_subset.items()} + else: + over_index_keys = {} + for key in _index_weight_map(model_dir): + target = routing_key(key) + match = layer_pattern.match(target) + # Same buffer test `bucket` uses, so the two cannot disagree about + # what counts as a layer tensor. + if match is not None and key not in buffer_names \ + and target not in buffer_names: + over_index_keys.setdefault(int(match.group(1)), set()).add(key) + for index in sorted(over_index_keys): + if index >= len(layers): + aggregate["unexpected_keys"] |= over_index_keys[index] + + def _absorb(info) -> None: + aggregate["unexpected_keys"] |= set(info.unexpected_keys or set()) + for entry in (info.mismatched_keys or []): + aggregate["mismatched_keys"].append(entry) + aggregate["error_msgs"].extend(list(info.error_msgs or [])) + aggregate["conversion_errors"].update(dict(info.conversion_errors or {})) + + resident_started = time.monotonic() + base_info, _ = convert_and_load( + model, + _materialized(base_subset, fp8_plan, trellis_plan, trellis_fp8_plan, + torch_dtype, fp8_stats, trellis_stats, device=device, + expected_shape=expected_shape, + nvfp4_plan=nvfp4_plan, nvfp4_stats=nvfp4_stats, + fp8_parity_all=str(device) != "cpu", + gguf_plan=gguf_plan, gguf_stats=gguf_stats, + packed_plan=packed_plan, packed_stats=packed_stats, packed_slices=packed_slices), + load_config) + _absorb(base_info) + timing["resident_load_seconds"] = time.monotonic() - resident_started + timing["resident_bytes"] = _subset_bytes(base_subset) + packed_stats["bytes_read"] + timing["checkpoint_bytes_read"] += timing["resident_bytes"] + + # Finalisation would otherwise materialise AND randomly initialise every + # decoder-layer parameter -- exactly the allocation this schedule exists to + # avoid. Marking them initialised and dropping them from `missing_keys` + # confines finalisation to what it is actually needed for here: moving + # non-persistent buffers off meta (rotary tables), initialising genuinely + # absent non-layer keys, and tying weights. + for name in streamed_params: + model.get_parameter(name)._is_hf_initialized = True + base_info.missing_keys = {key for key in base_info.missing_keys + if key not in streamed_params + and key not in deferred_buffers} + cls._finalize_model_loading(model, load_config, base_info) + aggregate["missing_keys"] |= set(base_info.missing_keys or set()) + + stranded = [name for name, tensor in + list(model.named_parameters()) + list(model.named_buffers()) + if tensor.device.type == "meta" and name not in streamed_params + and name not in deferred_buffers] + if stranded: + raise LayerOuterError( + "REFUSED: %d parameter(s)/buffer(s) outside the streamed decoder layers are " + "still on the meta device after the resident load, so a forward pass would " + "read them as undefined: %s%s" + % (len(stranded), ", ".join(stranded[:6]), + " (+%d more)" % (len(stranded) - 6) if len(stranded) > 6 else "")) + + log(stage="stream_base", resident_tensors=len(base_subset), + streamed_layers=len(layers), streamed_params=len(streamed_params), + deferred_buffers=len(deferred_buffers), + resident_shards=len(resident_shards) or None, + layers_prefix=layers_prefix) + + def layer_param_names(index: int) -> List[str]: + head = "%s.%d." % (layers_prefix, index) + return sorted(name for name in streamed_params if name.startswith(head)) + + audited_shards: Set[str] = set(resident_shards) + + def do_load(index: int) -> None: + if gate is not None: + # THE BLOCK. Everything above this line ran while layer `index`'s + # bytes were still on the wire; this is where the capture stops and + # waits, and `race_fetch.ShardGate` records for how long. The audit + # runs on the shards that just landed, before a single tensor is + # read out of them -- a shard that arrived short would otherwise + # read as zeros, silently. + waited = gate.wait_for_layer(index) + wanted = gate.plan.shards_for_layer(index) + fresh = sorted(wanted - audited_shards) + if fresh: + audit_checkpoint_tree(model_dir, shards=fresh) + audited_shards.update(fresh) + bucket(_open_shards(fresh)) + if waited > 0.0 or fresh: + log(stage="race_layer_ready", index=index, + waited_seconds=round(waited, 3), audited_shards=len(fresh)) + subset = layer_subset.get(index) + if not subset: + raise LayerOuterError( + "REFUSED: the checkpoint holds no tensors for %s.%d. A layer with no " + "weights does not fail to run -- it runs on whatever the meta-device " + "placeholder is replaced by, which is nothing anybody measured." + % (layers_prefix, index)) + load_started = time.monotonic() + decoders_active = (fp8_plan is not None or trellis_plan is not None + or nvfp4_plan is not None or gguf_plan is not None or packed_plan is not None) + # THE DIRECT EXPERT FILL (see EXPERT_FILL_REFERENCE). Planned per layer + # from the model's own conversion mapping; the fused parameters are + # allocated here, once, and every routed-expert source -- a checkpoint + # slice or a decoder's output -- is copied into its slice as it + # appears. What the plan declines, and everything that is not a routed + # expert, reaches the converter exactly as before. + fill = None + if expert_fill == EXPERT_FILL_DIRECT: + fill_plan = plan_expert_fill( + model, renames, layer_param_names(index), routing_key, subset, + _stored_dtype, _stored_shape, dtype_plan, torch_dtype, decoders_active) + expert_fill_stats["declined"].update(fill_plan["declined"]) + if fill_plan["targets"]: + fill = _ExpertFill(model, fill_plan, device, load_param_into_model, + locator, ring, expert_fill_stats) + sink = fill.offer if fill is not None else None + timing["checkpoint_bytes_read"] += _subset_bytes(subset) + decode_log = None + if decoders_active: + # Decoded per layer into a transient dict: the streamer keeps the + # lazy slices, never the 19 GB of decoded bf16, across layers -- + # and with a fill in place the decoded experts are not even held + # for the layer: the sink copies each one into its slice and drops it. + before = dict(fp8_stats) + before_trellis = dict(trellis_stats) + before_nvfp4 = dict(nvfp4_stats) + before_gguf = dict(gguf_stats) + before_packed = packed_stats["decoded_modules"] + before_packed_bytes = packed_stats["bytes_read"] + # S1-2's gate: the FIRST layers decoded on a device re-decode every + # FP8 tensor on the host and must agree bitwise, until one layer + # that carries routed experts has passed; partial-block tensors + # are checked on every layer (materialize_fp8_subset). + parity_all = (str(device) != "cpu" + and not fp8_stats.get("device_parity_sparse_layer_done")) + started = time.monotonic() + decoded = _materialized(subset, fp8_plan, trellis_plan, trellis_fp8_plan, + torch_dtype, fp8_stats, trellis_stats, + device=device, expected_shape=expected_shape, + nvfp4_plan=nvfp4_plan, nvfp4_stats=nvfp4_stats, + fp8_parity_all=parity_all, sink=sink, + gguf_plan=gguf_plan, gguf_stats=gguf_stats, + packed_plan=packed_plan, packed_stats=packed_stats, + packed_slices=packed_slices) + decode_seconds = time.monotonic() - started + timing["decode_seconds"] += decode_seconds + if parity_all and fp8_stats["dequantized"] > before["dequantized"]: + fp8_stats.setdefault("device_parity_full_layers", []).append(index) + if fill is not None or expert_fill != EXPERT_FILL_DIRECT: + fp8_stats["device_parity_sparse_layer_done"] = True + decode_log = dict( + stage=("trellis_decode_layer" if trellis_plan is not None + else "nvfp4_decode_layer" if nvfp4_plan is not None + else "gguf_decode_layer" if gguf_plan is not None + else "packed_decode_layer" if packed_plan is not None + else "fp8_decode_layer"), index=index, + dequantized=fp8_stats["dequantized"] - before["dequantized"], + fp8_elements=fp8_stats["fp8_bytes"] - before["fp8_bytes"], + decoded_modules=((trellis_stats["decoded_modules"] + - before_trellis["decoded_modules"]) + + (nvfp4_stats["decoded_modules"] + - before_nvfp4["decoded_modules"]) + + (gguf_stats["tensors_decoded"] + - before_gguf["tensors_decoded"]) + + packed_stats["decoded_modules"] - before_packed) or None, + decode_seconds=round(decode_seconds, 3)) + timing["checkpoint_bytes_read"] += packed_stats["bytes_read"] - before_packed_bytes + if gguf_plan is not None: + timing["checkpoint_bytes_read"] += (gguf_stats["gguf_bytes_read"] + - before_gguf["gguf_bytes_read"]) + loader_subset = decoded + # The dict is the last holder of any decoded tensor the fill did + # not consume; the fill's `remaining` takes those over below. + del decoded + else: + loader_subset = subset + if fill is not None: + fill_started = time.monotonic() + remaining: Dict[str, Any] = {} + for key, value in loader_subset.items(): + if not fill.offer(key, value): + remaining[key] = value + fill.finish() + loader_subset = remaining + timing["fill_seconds"] += time.monotonic() - fill_started + timing["converter_bytes"] += _subset_bytes(loader_subset) + info, _ = convert_and_load(model, loader_subset, load_config) + del loader_subset + if decode_log is not None: + log(**decode_log) + _absorb(info) + timing["layers_loaded"] += 1 + timing["load_seconds"] += time.monotonic() - load_started + names = layer_param_names(index) + head = "%s.%d." % (layers_prefix, index) + # CAPTURE-03 is a per-LOAD guard, and this schedule performs one load + # per layer. Running it only on the resident set would leave every + # streamed layer -- i.e. 97.5% of GLM-5.3 by bytes -- unchecked, which + # is the exact blind spot Stage A closed for the window-outer path. + if layer_guard is not None: + layer_guard(index, { + "_load_report_observed": True, + "_load_report_has_conversion_errors": True, + "missing_keys": [], + "unexpected_keys": sorted(info.unexpected_keys or set()), + "mismatched_keys": [entry for entry in (info.mismatched_keys or []) + if str(entry[0] if isinstance(entry, (tuple, list)) + else entry).startswith(head)], + "error_msgs": list(info.error_msgs or []), + "conversion_errors": dict(info.conversion_errors or {}), + }) + # The guard that closes the hole Stage A found: it is not enough that + # the load raised nothing, every parameter of this layer must actually + # have left the meta device. A key the shard header named but did not + # deliver lands here, before any window is pushed through it. This one + # is NOT overridable: a meta parameter has no contents to disclose. + stuck = [name for name in names if model.get_parameter(name).device.type == "meta"] + # A buffer deferred to this layer -- a router correction bias -- must + # actually have been DELIVERED by this load. Its meta-ness cannot answer + # that: model finalisation materialises non-persistent buffers, so a + # buffer nobody supplied is off meta and holding whatever finalisation + # put there. What the resident path checked by reporting it missing, this + # path checks by name, here, before a window is pushed through the layer. + expected = {name for name in deferred_buffers if name.startswith(head)} + if expected: + delivered = {routing_key(key) for key in subset} + undelivered = sorted(expected - delivered) + if undelivered: + aggregate["missing_keys"] |= set(undelivered) + raise LayerOuterError( + "REFUSED: layer %d loaded but the checkpoint delivered none of " + "%d buffer(s) this layer's forward reads: %s. Under the gated " + "(race-mode) loader those ride with their layer instead of with " + "the resident set, so an absent one would otherwise be silently " + "replaced by whatever model finalisation initialised." + % (index, len(undelivered), ", ".join(undelivered[:6]))) + if stuck: + aggregate["missing_keys"] |= set(stuck) + raise LayerOuterError( + "REFUSED: layer %d loaded but %d of its %d parameters are still on the " + "meta device: %s%s. The checkpoint named them and did not deliver them." + % (index, len(stuck), len(names), ", ".join(stuck[:6]), + " (+%d more)" % (len(stuck) - 6) if len(stuck) > 6 else "")) + + def do_free(index: int) -> None: + for name in layer_param_names(index): + param = model.get_parameter(name) + if param.device.type == "meta": + continue + load_param_into_model(model, name, torch.empty_like(param, device="meta")) + # Freeing must actually free: drop the converter's leftovers and hand + # the allocator back its blocks, then say so in the log so the claim is + # a measurement rather than a hope. + gc.collect() + if torch.cuda.is_available(): + torch.cuda.empty_cache() + + streamer = StreamedModel(model, layers_prefix, layers, layer_param_names, + do_load, do_free, aggregate) + streamer.config = config + # `pointers` and `layer_subset` are the SAME objects the loader keeps + # appending to, so a gated build's later shards are closed at `close()` and + # counted here too. Snapshotting them would have made race mode leak mmap + # handles and under-report every layer that had not landed yet. + streamer.pointers = pointers + streamer.layer_counts = _LayerCounts(layer_subset) + streamer.expert_fill_stats = expert_fill_stats + streamer.timing = timing + streamer.fp8_plan = fp8_plan + streamer.fp8_stats = fp8_stats + streamer.trellis_plan = trellis_plan + streamer.trellis_stats = trellis_stats + streamer.trellis_fp8_plan = trellis_fp8_plan + streamer.nvfp4_plan = nvfp4_plan + streamer.nvfp4_stats = nvfp4_stats + streamer.gguf_plan = gguf_plan + streamer.gguf_stats = gguf_stats + streamer.packed_plan = packed_plan + streamer.packed_stats = packed_stats + streamer.output_dtype = dtype_name + streamer.model_view = model_view + return streamer + + +def weights_decode_evidence(streamer: StreamedModel) -> Optional[Dict[str, Any]]: + """What the streamer did to the checkpoint's bytes before the forward, for + the runtime receipt: None for a native checkpoint, else the FP8 plan and + the counts of tensors decoded and scale tensors consumed.""" + packed_plan = getattr(streamer, "packed_plan", None) + if packed_plan is not None: + import quant_stream + return quant_stream.evidence(packed_plan, streamer.packed_stats, streamer.output_dtype) + trellis_plan = getattr(streamer, "trellis_plan", None) + if trellis_plan is not None: + # The candidate identity the qualification binds: the capture must + # RECORD the decode it applied, or `qualify_root` refuses with + # `weights_decode=None` against a job that declares one -- which it + # did, after both cold runs and the self-compare had already passed. + stats = dict(getattr(streamer, "trellis_stats", {})) + mixed = getattr(streamer, "trellis_fp8_plan", None) + fp8_stats = dict(getattr(streamer, "fp8_stats", {})) + composition = stats.get("composition") + evidence = { + "method": (TRELLIS_TP_COMPOSE_METHOD if composition else TRELLIS_DECODE_METHOD), + "reference": TRELLIS_DECODE_REFERENCE, + "output_dtype": "bfloat16", + "quantization_config": trellis_plan, + "modules_decoded": int(stats.get("decoded_modules", 0)), + "trellis_bits_seen": int(stats.get("trellis_bits", 0)), + "k_histogram": dict(sorted((stats.get("k_histogram") or {}).items())), + "numeric_policy": dict(stats.get("numeric_policy") or {}), + "observed": { + "quantized_module_count": int(stats.get("quantized_module_count", 0)), + "codebook_histogram": dict(stats.get("codebook_histogram", {})), + "quant_method_declared": stats.get("quant_method_declared"), + "declared_by": stats.get("declared_by"), + }, + } + if composition: + evidence["tp_rank_composition"] = { + "tp": composition.get("tp"), + "modules_declared": composition.get("modules"), + "modules_composed": int(stats.get("tp_composed_modules", 0)), + "axes": dict(stats.get("tp_axes", {})), + "rank_order": "ascending", + "declared_slicing": composition.get("declared_slicing"), + "evidence": "engines/tools/layer-outer-evidence/" + "glm53-exl3-tp-rank-and-zero-pad-parity.json", + } + # The ROTATION LAYOUT the decoder resolved (contract keys ride inside + # quantization_config; this block is the census beside them). + layout = stats.get("rotation_layout") or trellis_plan.get("rotation_layout") + evidence["rotation_layout"] = { + "layout": layout, + "reader": TRELLIS_LAYOUT_READERS.get(layout), + "modules_per_layout": dict(sorted((stats.get("modules_per_layout") or {}).items())), + "shared_vectors_declared": int( + (trellis_plan.get("shared_vectors") or {}).get("count") or 0), + "shared_vectors_applied": int(stats.get("shared_vectors_applied", 0)), + "nonrouted_exl3_modules": [ + {"name": name, "K": int(bits)} + for name, bits in sorted((stats.get("nonrouted_exl3_decoded") or {}).items())], + "r7_declaration": stats.get("r7_declaration"), + "evidence": TRELLIS_LAYOUT_EVIDENCE, + } + permutations = stats.get("r7_permutations") + if isinstance(permutations, R7PermutationSource): + evidence["rotation_layout"]["r7_intermediate_unpermute"] = dict( + permutations.stats, intermediate=permutations.intermediate, + manifests_declared=len(permutations.by_layer), + reference=R7_UNPERMUTE_REFERENCE) + if stats.get("zero_padded_rows_truncated"): + evidence["zero_padded_rows_truncated"] = dict( + stats["zero_padded_rows_truncated"], method=ZERO_PAD_METHOD) + if mixed is not None: + evidence["mixed_fp8"] = { + "quantization_config": mixed, + "tensors_dequantized": int(fp8_stats.get("dequantized", 0)), + "scale_tensors_consumed": int(fp8_stats.get("scales_consumed", 0)), + "fp8_elements": int(fp8_stats.get("fp8_bytes", 0)), + } + evidence["mixed_fp8"].update(fp8_device_parity_evidence(fp8_stats)) + return evidence + nvfp4_plan = getattr(streamer, "nvfp4_plan", None) + if nvfp4_plan is not None: + stats = dict(getattr(streamer, "nvfp4_stats", {})) + observed = dict(nvfp4_plan.get("_observed") or {}) + evidence = { + "method": NVFP4_DECODE_METHOD, + "reference": NVFP4_DECODE_REFERENCE, + "parity_evidence": NVFP4_PARITY_EVIDENCE, + "output_dtype": "bfloat16", + # The CONTRACT block only: the census and geometry ride under + # private keys and are reported beside it, never inside it. + "quantization_config": {k: v for k, v in nvfp4_plan.items() + if not k.startswith("_")}, + "modules_decoded": int(stats.get("decoded_modules", 0)), + "packed_elements": int(stats.get("packed_bytes", 0)), + "scale_tensors_consumed": int(stats.get("scales_consumed", 0)), + "input_scale_tensors_not_applied": int(stats.get("input_scales_skipped", 0)), + "plain_bf16_modules_passed_through": int(stats.get("plain_modules_passed", 0)), + "decode_device": "capture-device", + "observed": observed, + } + # Every non-routed tensor by stored dtype. The official BF16 release + # keeps the 75 router correction biases in fp32; a producer that + # rounded them to bf16 shows up here as the ABSENCE of float32, and + # the scope file authored from the shard headers says the same. + evidence["nonrouted_by_dtype"] = dict(sorted( + (stats.get("nonrouted_by_dtype") or {}).items())) + evidence["nonrouted_non_bf16_examples"] = list( + stats.get("nonrouted_non_bf16_examples") or []) + return evidence + gguf_plan = getattr(streamer, "gguf_plan", None) + if gguf_plan is not None: + stats = dict(getattr(streamer, "gguf_stats", {})) + observed = dict(gguf_plan.get("_observed") or {}) + if "_bridge" in gguf_plan: + return dict(gguf_plan["_bridge"].decode_contract(gguf_plan["_surface"]), + output_dtype=streamer.output_dtype, model_view=streamer.model_view, + reference="engines/tools/gguf_qwen35.py::materialize_layer", + file_records=list(gguf_plan["_surface"].file_records), + files_verified=gguf_plan["_surface"].file_hash_verification, + head_source="artifact's own output.weight; text-only own-head capture", + tensors_decoded=stats.get("tensors_decoded", 0), + gguf_bytes_read=stats.get("gguf_bytes_read", 0), + comparison_class="advisory", scope="weights_reconstructed") + return { + "method": GGUF_DECODE_METHOD, + "reference": GGUF_DECODE_REFERENCE, + "parity_evidence": GGUF_PARITY_EVIDENCE, + "output_dtype": "bfloat16", + # The CONTRACT block only (header-derived, mirrored by the controller); + # the surface object and partition ride under private keys. + "quantization_config": {k: v for k, v in gguf_plan.items() + if not k.startswith("_")}, + "tensors_decoded": int(stats.get("tensors_decoded", 0)), + "official_tensors_produced": int(stats.get("official_tensors_produced", 0)), + "layers_decoded": int(stats.get("layers_decoded", 0)), + "gguf_bytes_read": int(stats.get("gguf_bytes_read", 0)), + "ggml_types_decoded": dict(sorted((stats.get("ggml_types") or {}).items())), + "decode_device": "capture-device", + "files_verified": observed.get("files_verified"), + "file_records": observed.get("file_records"), + "container_audit": observed.get("container_audit"), + "shared_indexer_copies": observed.get("shared_indexer_copies"), + "materialize_plan": observed.get("materialize_plan"), + "checkpoint_identity_sha256": observed.get("checkpoint_identity_sha256"), + "tokenizer_source": ("the reference root's tokenizer files; the GGUF's own " + "tokenizer.ggml.tokens/merges were proven equal to that " + "vocabulary by id (gguf_surface.tokenizer_matches, at plan " + "time and in gguf-evidence/glmdsa-tokenizer-order-audit.json)"), + "head_source": "the artifact's own output.weight, decoded (HEAD-1d own heads)", + } + plan = getattr(streamer, "fp8_plan", None) + if plan is None: + return None + stats = dict(getattr(streamer, "fp8_stats", {})) + evidence = { + "method": FP8_DECODE_METHOD, + "reference": FP8_DECODE_REFERENCE, + "output_dtype": "bfloat16", + "quantization_config": plan, + "tensors_dequantized": int(stats.get("dequantized", 0)), + "scale_tensors_consumed": int(stats.get("scales_consumed", 0)), + "fp8_elements": int(stats.get("fp8_bytes", 0)), + } + evidence.update(fp8_device_parity_evidence(stats)) + return evidence + + +def head_decode_identity(streamer: StreamedModel) -> Optional[Dict[str, Any]]: + """How the model's `lm_head.weight` came to be, for the sealed head identity. + + None when the head was loaded as shipped (native). When the trellis + decoder produced it from an exl3 payload group (jpsequeira's 8-bit + `lm_head.{trellis,suh,svh,mcg}`), the head hf_capture seals is the + candidate's OWN dequantized head: `quantized: true`, its payload K as + `bits`, `source: artifact_dequantized` (docs/FIDELITY-DATASET-SPEC.md, + head source table) -- and the comparison runs it under HEAD-1d, own + heads, so the head's quantization error is inside the number. + """ + packed = getattr(streamer, "packed_plan", None) + if packed is not None and "lm_head.weight" in streamer.packed_stats["decoded_names"]: + import quant_stream + return {"quantized": True, "bits": packed["modules"]["lm_head.weight"].get("bits"), + "source": "artifact_dequantized", "method": quant_stream.METHODS[packed["_reader"]], + "reference": packed["reference"]} + if getattr(streamer, "trellis_plan", None) is None: + return None + decoded = dict(getattr(streamer, "trellis_stats", {}) or {}).get("nonrouted_exl3_decoded") or {} + bits = decoded.get("lm_head") + if bits is None: + return None + return {"quantized": True, "bits": int(bits), "source": "artifact_dequantized", + "method": TRELLIS_DECODE_METHOD, "reference": TRELLIS_DECODE_REFERENCE} + + +def fp8_device_parity_evidence(stats: Dict[str, Any]) -> Dict[str, Any]: + """Where the FP8 decode ran and how much of it was re-derived on the host. + + `fp8_decode_device` is the device the bytes were dequantised on; + `fp8_device_parity_checked_tensors` counts the tensors ALSO decoded on the + CPU and asserted `torch.equal` (every tensor of the first layers, every + partial-block tensor of every layer), `..._partial_block` the subset of + those with a partial last block, `..._full_layers` the layer indices + checked in full. `fp8_device_parity` is "not-applicable" on a CPU run, + "passed" once anything was checked -- a failure never reaches a receipt, + it refuses the run. + """ + device = stats.get("decode_device") + checked = int(stats.get("device_parity_checked", 0)) + return { + "fp8_decode_device": device, + "fp8_device_parity_checked_tensors": checked, + "fp8_device_parity_checked_partial_block": int( + stats.get("device_parity_partial_block_checked", 0)), + "fp8_device_parity_full_layers": list(stats.get("device_parity_full_layers") or []), + "fp8_device_parity": ("not-applicable" if device in (None, "cpu") + else "passed" if checked else "unchecked"), + } + + +def streamed_loading_info(streamer: StreamedModel) -> Dict[str, Any]: + """The aggregate load report, in the shape `hf_capture.load_report` reads. + + The streaming loader calls `convert_and_load_state_dict_in_model` once per + layer plus once for the resident set, so there is no single + `LoadStateDictInfo` to hand to CAPTURE-03's guards. This unions them, and + keeps the two flags those guards refuse on -- `observed` and + `conversion_errors_visible` -- true only because this path went through the + library's own converter and read its report object directly, which is a + stronger position than the wrapped `to_dict()` the window-outer path needs. + """ + report = streamer.report + return { + "_load_report_observed": True, + "_load_report_has_conversion_errors": True, + "missing_keys": sorted(report["missing_keys"]), + "unexpected_keys": sorted(report["unexpected_keys"]), + "mismatched_keys": list(report["mismatched_keys"]), + "error_msgs": list(report["error_msgs"]), + "conversion_errors": dict(report["conversion_errors"]), + } + + +# --------------------------------------------------------------------------- +# the schedule +# --------------------------------------------------------------------------- + + +class LayerOuterSchedule(object): + """Proxy the decoder layers so the model's own forward can be run one layer at a time. + + `install()` must be paired with `remove()`; the proxies are instance + attributes on the layer modules, so `nn.Module.__call__` and every hook it + runs are untouched -- only the body of the layer is redirected. + """ + + def __init__(self, layers): + self.layers = layers + self.count = len(layers) + self._original: List[Any] = [] + self.active: Optional[int] = None + self.replay: Any = None + self.captured: Any = None + self.calls = 0 + self._installed = False + + def install(self) -> "LayerOuterSchedule": + if self._installed: + raise LayerOuterError("the layer proxies are already installed") + self._original = [layer.forward for layer in self.layers] + for index, layer in enumerate(self.layers): + layer.forward = self._proxy(index, self._original[index]) + self._installed = True + return self + + def remove(self) -> None: + if not self._installed: + return + for layer, original in zip(self.layers, self._original): + try: + del layer.forward + except AttributeError: # pragma: no cover - defensive + layer.forward = original + self._original = [] + self._installed = False + + def __enter__(self) -> "LayerOuterSchedule": + return self.install() + + def __exit__(self, *exc) -> bool: + self.remove() + return False + + def _proxy(self, index: int, original): + def forward(*args, **kwargs): + active = self.active + if active is None: # pragma: no cover - defensive + raise LayerOuterError("a layer proxy fired with no active layer set") + if index < active: + # Whatever the layer below returned last time round, verbatim: + # a bare tensor, a 2-tuple carrying `topk_indices`, anything. + # The model's own loop unpacks and re-threads it. + return self.replay + if index == active: + self.calls += 1 + out = original(*args, **kwargs) + self.captured = out + return out + raise _Suspend() + return forward + + +def run_panel(model, layers, forward_once: Callable[[int], None], window_count: int, + log: Callable[..., None], + on_layer_start: Optional[Callable[[int], None]] = None, + on_layer_end: Optional[Callable[[int], None]] = None, + collect: Optional[Callable[[int], Any]] = None) -> List[Any]: + """for each layer { load it once; for each window: push that window through it; free it }. + + `forward_once(window_index)` runs ONE `model(...)` call for that window -- + it is `hf_capture`'s own call, built from `hf_capture`'s own tensors, so + that the inputs cannot drift from the window-outer path. + + Windows are pushed through a layer ONE AT A TIME. They are never stacked + into a batch: a batched matmul reduces in a different order and would move + the numbers this engine exists to preserve. + + There is no separate epilogue pass. On the LAST layer no proxy is left + above to suspend the forward, so the model runs straight on into its own + final norm and head -- which is exactly the epilogue, executed by the + model's own code with the head pre-hook firing as it does on the + window-outer path. `collect(window_index)` is called there, once per + window, and returns whatever the caller wants kept. + """ + schedule = LayerOuterSchedule(layers) + memo: List[Any] = [None] * window_count + results: List[Any] = [None] * window_count + last = schedule.count - 1 + with schedule: + for layer_index in range(schedule.count): + if on_layer_start is not None: + on_layer_start(layer_index) + for window_index in range(window_count): + schedule.active = layer_index + schedule.replay = memo[window_index] + schedule.captured = None + schedule.calls = 0 + try: + forward_once(window_index) + except _Suspend: + pass + if schedule.calls != 1: + raise LayerOuterError( + "layer %d ran %d time(s) for window %d, expected exactly 1. The " + "layer-outer schedule assumes the decoder stack is executed as a " + "plain in-order loop, each layer called once per forward; this " + "model does something else and must not be captured this way." + % (layer_index, schedule.calls, window_index)) + memo[window_index] = schedule.captured + schedule.captured = None + if layer_index == last and collect is not None: + results[window_index] = collect(window_index) + memo[window_index] = None + schedule.replay = None + if on_layer_end is not None: + on_layer_end(layer_index) + log(stage="layer", index=layer_index, windows=window_count) + return results + + +# --------------------------------------------------------------------------- +# measured, not predicted +# --------------------------------------------------------------------------- + + +def resident_parameter_bytes(model) -> Dict[str, int]: + """Exactly how many bytes of weights are live right now, by arithmetic. + + Why this exists alongside RSS: on the CPU path `safetensors` mmaps the + shards, so every byte the loader reads becomes file-backed resident memory + that the OS is free to evict but `ru_maxrss` counts anyway. A layer-outer + run therefore shows an RSS close to the checkpoint size even though it never + holds more than one layer of anonymous weights -- the RSS is real, but what + it is measuring there is the page cache, not the schedule. This figure + measures the + schedule: it counts only tensors that are actually materialised, so it is + the number a "does GLM-5.3 fit in 141 GB" projection has to be built on. + `torch.cuda.max_memory_allocated` is the same idea for VRAM and has no page + cache to confuse it, which is why the CUDA numbers are the load-bearing + ones. + """ + parameters = 0 + buffers = 0 + for _, tensor in model.named_parameters(): + if tensor.device.type != "meta": + parameters += tensor.numel() * tensor.element_size() + for _, tensor in model.named_buffers(): + if tensor.device.type != "meta": + buffers += tensor.numel() * tensor.element_size() + return {"parameters": parameters, "buffers": buffers, + "total": parameters + buffers} + + +class ResidentWeightPeak(object): + """A high-water mark over `resident_parameter_bytes`, sampled at layer boundaries.""" + + def __init__(self, model): + self.model = model + self.peak = 0 + self.detail: Dict[str, int] = {} + + def sample(self) -> int: + current = resident_parameter_bytes(self.model) + if current["total"] > self.peak: + self.peak = current["total"] + self.detail = current + return current["total"] + + +def reset_peak_memory(device: str) -> None: + import torch + + if str(device).startswith("cuda") and torch.cuda.is_available(): + torch.cuda.reset_peak_memory_stats() + + +def peak_memory(device: str) -> Dict[str, Any]: + """What this process actually used, per the OS and the allocator. + + `ru_maxrss` is a high-water mark for the whole process, which is the number + a rental decision is made on. It is in BYTES on Darwin and KILOBYTES on + Linux -- a units bug here would silently misreport by 1024x, so the platform + is recorded next to the figure. + """ + import platform + import resource + + import torch + + raw = resource.getrusage(resource.RUSAGE_SELF).ru_maxrss + system = platform.system() + rss = int(raw) if system == "Darwin" else int(raw) * 1024 + out: Dict[str, Any] = {"peak_rss_bytes": rss, "peak_rss_gb": round(rss / 1e9, 3), + "rss_units_source": "%s ru_maxrss" % system} + if str(device).startswith("cuda") and torch.cuda.is_available(): + out["peak_cuda_allocated_bytes"] = int(torch.cuda.max_memory_allocated()) + out["peak_cuda_allocated_gb"] = round(torch.cuda.max_memory_allocated() / 1e9, 3) + out["peak_cuda_reserved_bytes"] = int(torch.cuda.max_memory_reserved()) + out["peak_cuda_reserved_gb"] = round(torch.cuda.max_memory_reserved() / 1e9, 3) + elif str(device).startswith("mps") and getattr(torch, "mps", None) is not None: + # MPS has no peak tracker; on unified memory the RSS figure already + # covers the weights, so say that rather than emitting a bogus zero. + out["mps_note"] = ("torch.mps exposes no peak-allocation counter; on unified " + "memory peak_rss_bytes already includes the weights") + return out diff --git a/raw/retained/engines--tools--microscale_surface.py b/raw/retained/engines--tools--microscale_surface.py new file mode 100644 index 0000000000000000000000000000000000000000..7fa68b9e7e1e0ed656e2b9cf3455889643cce415 --- /dev/null +++ b/raw/retained/engines--tools--microscale_surface.py @@ -0,0 +1,470 @@ +"""Metadata-planned weights-only floating microformats (no native quantized GEMM). + +Covered: compressed-tensors 0.18 MXFP4 (U8 weight_packed, U8 UE8M0 +weight_scale, K groups of 32), CT NVFP4 (groups of 16, E4M3 scales divided +by FP32 weight_global_scale), ModelOpt NVFP4 (same bytes, scales multiplied +by weight_scale_2), and DeepSeek-style block E4M3 + UE8M0 scales. +Matrices and explicit leading expert axes [E,N,K] are supported. No swizzles. +ModelOpt MIXED_PRECISION dispatches explicit ancestor targets to NVFP4, +FP8 per-tensor (including shared parent PLE shard scales), or FP8_PB_WO +128x128 blocks with BF16/F32 scales. Other constituents are refused. + +FP4 byte 0x21 decodes [0.5, 1.0]: low nibble first; nibble 8 is -0. +UE8M0 byte 0 is 2**-127, NOT zero; 255 is reserved NaN and refused. +FP32 scale arithmetic precedes FP32 element multiplication, then one output +cast. This is not CT's default BF16-intermediate decompressor or GPU parity. + +References (source audited, never executed by the reader): +https://github.com/vllm-project/compressed-tensors/tree/0.18.0/src/compressed_tensors/compressors + mxfp4/base.py, mx_utils.py, nvfp4/base.py, nvfp4/helpers.py +https://huggingface.co/deepseek-ai/DeepSeek-V4-Flash/blob/60d8d70770c6776ff598c94bb586a859a38244f1/inference/kernel.py + fp8_gemm_kernel: scales_b[ceil(N/128),ceil(K/128)] cast to FP32. +https://huggingface.co/nvidia/Qwen3.8-Flash-Next-NVFP4/blob/fc694b54fb0174e0913e6adf86691ef85a4ead47/config.json + quantized_layers; model-fp8-mtp-ple.safetensors header confirms shared + ngram_embedding.weight_scale BF16 [1] and MTP weight_scale_inv BF16 grids. + +DeepSeek V4's I8 .weight + F8_E8M0 .scale FP4 dialect is deliberately +REFUSED: it is not CT weight_packed, and no packed-nibble oracle has been +validated here. GPT-OSS blocks/scales, MLX MXFP4, CT MXFP8, ModelOpt MXFP8 +and online transforms are not implemented. Ordinary FP8 + FP32 checkpoints +stay on the legacy decoder; mixed ModelOpt block FP8 reuses its arithmetic. +""" +from __future__ import annotations + +import math +import re +from collections.abc import Mapping + +REFERENCE = "compressed-tensors@0.18.0; DeepSeek-V4-Flash@60d8d70770c6776ff598c94bb586a859a38244f1/inference/kernel.py; nvidia/Qwen3.8-Flash-Next-NVFP4@fc694b54fb0174e0913e6adf86691ef85a4ead47/config.json+headers" +FP8 = {"F8_E4M3", "F8_E4M3FN"} +UE8 = {"U8", "F8_E8M0", "F8_E8M0FNU"} +ACTIVATION_ROLES = {"input_scale", "input_global_scale", "input_scale_2", "output_scale", "output_global_scale"} +QUANT_ROLES = {"weight_packed", "weight_scale", "weight_scale_inv", "weight_global_scale", "weight_scale_2", "weight_shape", "weight_zero_point", "weight_g_idx", "qweight", "qzeros", "g_idx", "k_scale", "v_scale", "input_zero_point", "output_zero_point", "activation_scale"} | ACTIVATION_ROLES + + +def _fail(message): + return ValueError("microfloat: " + message) + + +def _quantization(config): + candidates = [config.get("quantization_config")] + for name in ("text_config", "language_config"): + nested = config.get(name) + if isinstance(nested, Mapping): + candidates.append(nested.get("quantization_config")) + candidates = [q for q in candidates if q is not None] + if not candidates: + return {} + if any(not isinstance(q, Mapping) for q in candidates): + raise _fail("quantization_config must be a mapping") + if any(q != candidates[0] for q in candidates[1:]): + raise _fail("conflicting top-level/text quantization_config") + return candidates[0] + + +def _shape(meta, key): + if key not in meta: + raise _fail(f"missing component {key}") + shape = meta[key].get("shape") + if not isinstance(shape, (list, tuple)) or any(type(x) is not int or x <= 0 for x in shape): + raise _fail(f"invalid shape for {key}: {shape!r}") + return list(shape) + + +def _require(meta, key, shape, dtypes): + if _shape(meta, key) != shape or meta[key].get("dtype") not in dtypes: + raise _fail(f"{key} must have shape {shape}, dtype {sorted(dtypes)}; got {meta[key]}") + + +def _matches(target, module): + if not isinstance(target, str): + raise _fail("quantization targets must be strings") + if target == "Linear": + return True + if target.startswith("re:"): + return re.match(target[3:], module) is not None + return target == module or module.endswith("." + target) + + +def _ct_group(quant, module): + groups = quant.get("config_groups") + if not isinstance(groups, Mapping) or not groups: + raise _fail("CT requires nonempty config_groups") + if any(_matches(t, module) for t in quant.get("ignore", [])): + raise _fail(f"packed module {module} conflicts with ignore declaration") + matched = [] + for group in groups.values(): + if not isinstance(group, Mapping): + raise _fail("invalid CT group") + targets = group.get("targets", []) + if any(_matches(t, module) for t in targets): + matched.append(group) + if not matched: + raise _fail(f"no CT group targets {module}") + if any(g != matched[0] for g in matched[1:]): + raise _fail(f"ambiguous overlapping CT groups for {module}") + group = matched[0] + weights = group.get("weights") or {} + if not isinstance(weights, Mapping): + raise _fail(f"invalid CT weights declaration for {module}") + fmt = group.get("format") or quant.get("format") + if fmt not in ("mxfp4-pack-quantized", "nvfp4-pack-quantized"): + raise _fail(f"unsupported CT format {fmt!r} for {module}") + size = 32 if fmt.startswith("mx") else 16 + if (weights.get("num_bits") != 4 or weights.get("type") != "float" + or weights.get("group_size") != size or weights.get("symmetric") is not True + or weights.get("dynamic") not in (None, False) + or weights.get("strategy") not in ("group", "tensor_group") + or weights.get("actorder") not in (None, False) + or weights.get("block_structure") is not None): + raise _fail(f"unsupported CT FP4 weight declaration for {module}: {weights}") + expected_scale = {None, "torch.uint8", "uint8"} if size == 32 else {None, "torch.float8_e4m3fn", "float8_e4m3fn"} + if weights.get("scale_dtype") not in expected_scale: + raise _fail(f"unsupported CT scale dtype for {module}") + if size == 32 and weights.get("strategy") != "group": + raise _fail("MXFP4 requires group strategy, without a global scale") + return fmt, group + + +def _modelopt_layer(quant, module): + """Longest explicit ancestor target; no substring or regex guessing.""" + layers = quant["quantized_layers"] + matches = [name for name in layers if module == name or module.startswith(name + ".")] + if not matches: + return None + target = max(matches, key=len) + declaration = layers[target] + algorithm = declaration["quant_algo"].upper() + matched_groups = [g for g in (quant.get("config_groups") or {}).values() + if any(module == t or module.startswith(t + ".") for t in g.get("targets", []))] + if len(matched_groups) > 1: + raise _fail(f"ambiguous ModelOpt config_groups for {module}") + group = matched_groups[0] if matched_groups else {} + weights = group.get("weights") or {} + if weights: + bits = 4 if algorithm == "NVFP4" else 8 + size = declaration.get("group_size") + if (weights.get("num_bits") != bits or weights.get("type") != "float" + or weights.get("dynamic") not in (None, False) + or weights.get("group_size") != size): + raise _fail(f"ModelOpt group/per-layer declaration conflict for {module}") + return target, declaration, group.get("input_activations") + + +def plan_modules(config_dict, tensor_metadata): + """Return a JSON plan; None only for unrecognized quant_method. + + Caller dispatches CT integer formats to affine_surface and ordinary FP8 + scales to the legacy FP8 reader. Recognized but unsupported formats fail. + No tensors or model code are loaded during planning. + """ + quant = _quantization(config_dict) + method = str(quant.get("quant_method", "")).lower() + if method not in ("compressed-tensors", "modelopt", "fp8"): + return None + if quant.get("transform_config") or quant.get("sparsity_config"): + raise _fail("transforms/sparsity must not be silently dropped") + groups = quant.get("config_groups") or {} + if not isinstance(groups, Mapping): + raise _fail("config_groups must be a mapping") + for group in groups.values(): + if not isinstance(group, Mapping) or not isinstance(group.get("targets", []), list): + raise _fail("each quantization group must declare a target list") + if any(not isinstance(t, str) for t in group.get("targets", [])): + raise _fail("group targets must be strings") + if group.get("weights") is not None and not isinstance(group["weights"], Mapping): + raise _fail("group weights must be a mapping") + if not isinstance(quant.get("ignore", []), list): + raise _fail("ignore must be a list") + if method == "modelopt": + from nvfp4_surface import MO_ONLINE_TRANSFORM_KEYS, modelopt_weight_declaration + modelopt_mixed = str(quant.get("quant_algo", "")).upper() == "MIXED_PRECISION" + if any(quant.get(k) not in (None, False) for k in MO_ONLINE_TRANSFORM_KEYS): + raise _fail("ModelOpt online transforms are unsupported") + if modelopt_mixed: + layers = quant.get("quantized_layers") + if not isinstance(layers, Mapping) or not layers: + raise _fail("ModelOpt mixed precision requires quantized_layers") + for target, declaration in layers.items(): + if not isinstance(target, str) or not isinstance(declaration, Mapping): + raise _fail("invalid ModelOpt per-layer declaration") + if set(declaration) - {"quant_algo", "group_size"}: + raise _fail(f"unsupported ModelOpt per-layer settings for {target}") + algo = str(declaration.get("quant_algo", "")).upper() + if algo not in ("NVFP4", "FP8", "FP8_PB_WO"): + raise _fail(f"unimplemented mixed ModelOpt constituent {target}: {algo}") + expected_group = {"NVFP4": 16, "FP8_PB_WO": 128, "FP8": None}[algo] + if declaration.get("group_size") != expected_group: + raise _fail(f"unsupported {algo} group size for {target}") + activation = {k: v.get("input_activations") for k, v in groups.items()} + else: + if str(quant.get("quant_algo", "")).upper() != "NVFP4" or quant.get("quantized_layers"): + raise _fail("unsupported homogeneous ModelOpt algorithm") + declaration = modelopt_weight_declaration(quant) + activation = declaration["input_activations"] + elif method == "fp8": + if quant.get("scale_fmt") != "ue8m0" or quant.get("fmt") != "e4m3": + raise _fail("only FP8 e4m3 with explicit scale_fmt=ue8m0 belongs to this reader") + block = quant.get("weight_block_size") + if not isinstance(block, (list, tuple)) or len(block) != 2 or any(type(x) is not int or x <= 0 for x in block): + raise _fail("FP8 weight_block_size must contain two positive integers") + activation = {"activation_scheme": quant.get("activation_scheme"), "scale_fmt": "ue8m0"} + else: + if not isinstance(groups, Mapping) or not groups: + raise _fail("CT requires config_groups") + activation = {k: {a: v.get(a) for a in ("input_activations", "output_activations")} + for k, v in groups.items() if isinstance(v, Mapping)} + modules = {} + consumed = set() + for key, meta in tensor_metadata.items(): + if method == "compressed-tensors": + if not key.endswith(".weight_packed"): + continue + module = key.rsplit(".", 1)[0] + fmt, group = _ct_group(quant, module) + size = 32 if fmt.startswith("mx") else 16 + global_role = None if size == 32 else "weight_global_scale" + elif method == "modelopt": + if not key.endswith(".weight"): + continue + module = key.rsplit(".", 1)[0] + modelopt_activation = activation + if modelopt_mixed: + selected = _modelopt_layer(quant, module) + if selected is None: + continue + target, layer_declaration, modelopt_activation = selected + algorithm = layer_declaration["quant_algo"].upper() + if algorithm != "NVFP4": + shape = _shape(tensor_metadata, key) + if len(shape) not in (2, 3) or meta.get("dtype") not in FP8: + raise _fail(f"{algorithm} needs E4M3 matrix/leading-expert storage: {key}") + if algorithm == "FP8": + # NVIDIA PLE shards share ONE parent weight_scale. + candidates = list(dict.fromkeys([module + ".weight_scale", target + ".weight_scale"])) + found = [k for k in candidates if k in tensor_metadata] + if len(found) != 1: + raise _fail(f"{key} requires one unambiguous local/declared-parent FP8 scale") + scale_key = found[0] + if _shape(tensor_metadata, scale_key) not in ([], [1]): + raise _fail(f"per-tensor FP8 scale must be scalar: {scale_key}") + fmt = "modelopt-fp8-tensor" + block_size = None + else: + scale_key = module + ".weight_scale_inv" + scale_shape = shape[:-2] + [math.ceil(shape[-2] / 128), math.ceil(shape[-1] / 128)] + _require(tensor_metadata, scale_key, scale_shape, {"F32", "BF16"}) + fmt, block_size = "modelopt-fp8-block", [128, 128] + if tensor_metadata[scale_key].get("dtype") not in ("F32", "BF16"): + raise _fail(f"ModelOpt FP8 scale must be F32/BF16: {scale_key}") + components = {"weight": key, "weight_scale": scale_key} + for role in ACTIVATION_ROLES: + if module + "." + role in tensor_metadata: + components[role] = module + "." + role + if isinstance(modelopt_activation, Mapping) and modelopt_activation.get("dynamic") is False and "input_scale" not in components: + raise _fail(f"{module}: static FP8 activations require input_scale") + modules[key] = {"format": fmt, "shape": shape, "block_size": block_size, + "components": components, "modelopt_target": target} + consumed.update(components.values()) + continue + elif meta.get("dtype") != "U8": + continue + fmt, size, global_role = "modelopt-nvfp4", 16, "weight_scale_2" + else: + if not key.endswith(".weight"): + continue + module = key.rsplit(".", 1)[0] + scale_names = [module + "." + s for s in ("scale", "weight_scale_inv", "weight_scale") if module + "." + s in tensor_metadata] + if not scale_names and meta.get("dtype") not in FP8: + continue + if meta.get("dtype") not in FP8: + raise _fail(f"unsupported DeepSeek FP4/other packed weight {key} ({meta.get('dtype')}); not CT/GPT-OSS MXFP4") + if len(scale_names) != 1: + raise _fail(f"{key} requires exactly one UE8M0 scale component") + shape = _shape(tensor_metadata, key) + if len(shape) not in (2, 3): + raise _fail(f"only matrix/leading-expert FP8 supported: {key}") + scale_shape = shape[:-2] + [math.ceil(shape[-2] / block[0]), math.ceil(shape[-1] / block[1])] + _require(tensor_metadata, scale_names[0], scale_shape, UE8) + spec = {"format": "fp8-ue8m0", "shape": shape, "block_size": list(block), + "components": {"weight": key, "weight_scale": scale_names[0]}} + modules[key] = spec + consumed.update(spec["components"].values()) + continue + packed_shape = _shape(tensor_metadata, key) + if len(packed_shape) not in (2, 3) or meta.get("dtype") != "U8": + raise _fail(f"{key} requires rank-2/3 U8 packed storage") + shape = packed_shape[:-1] + [packed_shape[-1] * 2] + if shape[-1] % size: + raise _fail(f"{key}: K={shape[-1]} must be divisible by {size}; padded FP4 tails are undeclared") + canonical = module + ".weight" + if canonical != key and canonical in tensor_metadata: + raise _fail(f"both dense and packed weight present for {module}") + scale_key = module + ".weight_scale" + _require(tensor_metadata, scale_key, shape[:-1] + [shape[-1] // size], UE8 if size == 32 else FP8) + components = {"weight_packed": key, "weight_scale": scale_key} + if global_role: + global_key = module + "." + global_role + global_shape = _shape(tensor_metadata, global_key) + permitted = [[], [1]] + if len(shape) == 3: + permitted += [[shape[0]], [shape[0], 1], [shape[0], 1, 1]] + if global_shape not in permitted or tensor_metadata[global_key].get("dtype") != "F32": + raise _fail(f"{global_key} must be FP32 scalar or one scalar per leading expert") + components[global_role] = global_key + shape_key = module + ".weight_shape" + if shape_key in tensor_metadata: + _require(tensor_metadata, shape_key, [len(shape)], {"I32", "I64"}) + if tensor_metadata[shape_key].get("value") != shape: + raise _fail(f"{shape_key} value must be supplied and equal {shape}") + components["weight_shape"] = shape_key + for role in ACTIVATION_ROLES: + act_key = module + "." + role + if act_key in tensor_metadata: + _shape(tensor_metadata, act_key) + if tensor_metadata[act_key].get("dtype") not in ({"F32", "F16", "BF16"} | FP8 | UE8): + raise _fail(f"unsupported activation scale dtype: {act_key}") + components[role] = act_key + required_activation = None + if method == "compressed-tensors": + declared_input = group.get("input_activations") + if isinstance(declared_input, Mapping) and declared_input.get("dynamic") is False: + required_activation = "input_global_scale" + elif isinstance(modelopt_activation, Mapping) and modelopt_activation.get("dynamic") is False: + required_activation = "input_scale" + if required_activation and required_activation not in components: + raise _fail(f"{module}: static activation declaration requires {required_activation}") + modules[canonical] = {"format": fmt, "shape": shape, "group_size": size, + "components": components, "nibble_order": "low-first"} + consumed.update(components.values()) + # Any quantization state not accounted for is an error, never silently discarded. + for key, meta in tensor_metadata.items(): + role = key.rsplit(".", 1)[-1] + quant_state = (role in QUANT_ROLES or role.startswith(("weight_scale", "weight_zero", "input_scale", "input_global_scale")) + or "quantizer" in key) + if key not in consumed and (quant_state or (role == "weight" and meta.get("dtype") in (FP8 | {"U8", "I8"}))): + raise _fail(f"unconsumed/unsupported quantization component {key}") + if not modules: + raise _fail(f"recognized {method} configuration but no supported encoded weights") + for spec in modules.values(): + spec["component_metadata"] = {role: dict(tensor_metadata[key]) + for role, key in spec["components"].items()} + return {"format": "microfloat", "method": method, "modules": modules, + "consumed": sorted(consumed), "reference": REFERENCE, + "quantization_config": dict(quant), + "activation_quantization": {"scope": "weights-reconstructed/advisory; activation-not-captured", + "applied_to_weights": False, "declared": activation, + "kv_cache_scheme": quant.get("kv_cache_scheme"), + "stored_components": sorted(k for k in consumed if k.rsplit(".", 1)[-1] in ACTIVATION_ROLES)}} + + +def _ue8m0(value): + import torch + if str(value.dtype) in ("torch.float8_e8m0fnu",): + value = value.view(torch.uint8) + if value.dtype != torch.uint8: + raise _fail(f"UE8M0 needs raw U8 or float8_e8m0fnu, got {value.dtype}") + if (value == 255).any(): + raise _fail("reserved UE8M0 NaN exponent 255") + return torch.ldexp(torch.ones_like(value, dtype=torch.float32), value.to(torch.int32) - 127) + + +def decode_module(payload, spec, *, dtype, device): + """Decode planned components in FP32; refuse nonfinite input/output. + + Activation components are validated/consumed but NEVER multiplied into W. + FP8 byte views (U8) may replace native float8 tensors on unsupported devices. + """ + import torch + from nvfp4_surface import dequant_nvfp4, f8e4m3_to_float32, unpack_e2m1 + if set(payload) != set(spec["components"]): + raise _fail("payload roles do not exactly match the module plan") + for role, meta in spec["component_metadata"].items(): + if list(payload[role].shape) != list(meta["shape"]): + raise _fail(f"{role} payload shape disagrees with planned metadata") + if dtype not in (torch.float32, torch.float16, torch.bfloat16, torch.float64): + raise _fail("output dtype must be a floating reconstruction dtype") + shape = list(spec["shape"]) + fmt = spec["format"] + for role in ACTIVATION_ROLES: + if role in payload: + value = payload[role] + if value.dtype == torch.uint8 or str(value.dtype) == "torch.float8_e8m0fnu": + _ue8m0(value) + elif not torch.isfinite(value.to(torch.float32)).all(): + raise _fail(f"nonfinite activation state {role}") + if "weight_shape" in payload and payload["weight_shape"].tolist() != shape: + raise _fail("weight_shape payload disagrees with plan") + if fmt in ("fp8-ue8m0", "modelopt-fp8-block", "modelopt-fp8-tensor"): + weight = payload["weight"].to(device) + if list(weight.shape) != shape or (weight.dtype != torch.uint8 and str(weight.dtype) != "torch.float8_e4m3fn"): + raise _fail("FP8 payload shape/dtype mismatch") + raw_scale = payload["weight_scale"].to(device) + if fmt == "fp8-ue8m0": + scale = _ue8m0(raw_scale) + else: + if raw_scale.dtype not in (torch.float32, torch.bfloat16): + raise _fail("ModelOpt FP8 scale must be F32/BF16") + scale = raw_scale.to(torch.float32) + if not torch.isfinite(scale).all() or (scale < 0).any(): + raise _fail("ModelOpt FP8 scales must be finite and nonnegative") + if fmt == "modelopt-fp8-tensor": + result = f8e4m3_to_float32(weight) * scale.reshape(()) + elif fmt == "modelopt-fp8-block": + # Reuse the existing FP8 block decoder, including its padded-tail math. + from layer_outer import dequantize_block_fp8 + native = weight.view(torch.float8_e4m3fn) if weight.dtype == torch.uint8 else weight + if len(shape) == 2: + result = dequantize_block_fp8(native, scale, torch.float32, spec["block_size"]) + else: + result = torch.empty(shape, dtype=torch.float32, device=device) + for expert in range(shape[0]): + result[expert] = dequantize_block_fp8(native[expert], scale[expert], torch.float32, spec["block_size"]) + else: + bm, bk = spec["block_size"] + expected = shape[:-2] + [math.ceil(shape[-2] / bm), math.ceil(shape[-1] / bk)] + if list(scale.shape) != expected: + raise _fail("FP8 scale payload shape mismatch") + weight = f8e4m3_to_float32(weight) + rows = torch.arange(shape[-2], device=device) // bm + cols = torch.arange(shape[-1], device=device) // bk + result = weight * scale[..., rows[:, None], cols[None, :]] + else: + packed = payload["weight_packed"].to(device) + scale = payload["weight_scale"].to(device) + size = spec["group_size"] + if list(packed.shape) != shape[:-1] + [shape[-1] // 2] or packed.dtype != torch.uint8: + raise _fail("FP4 packed payload shape/dtype mismatch") + if list(scale.shape) != shape[:-1] + [shape[-1] // size]: + raise _fail("FP4 scale payload shape mismatch") + rows = math.prod(shape[:-1]) + if fmt == "mxfp4-pack-quantized": + decoded = unpack_e2m1(packed.reshape(rows, -1)).reshape(*shape[:-1], -1, size) + result = (decoded * _ue8m0(scale).unsqueeze(-1)).reshape(shape) + elif fmt in ("nvfp4-pack-quantized", "modelopt-nvfp4"): + if str(scale.dtype) != "torch.float8_e4m3fn" and scale.dtype != torch.uint8: + raise _fail("NVFP4 scale payload must be E4M3 or its U8 byte view") + scale32 = f8e4m3_to_float32(scale) + if not torch.isfinite(scale32).all() or (scale32 < 0).any(): + raise _fail("NVFP4 scales must be finite and nonnegative") + role = "weight_global_scale" if fmt == "nvfp4-pack-quantized" else "weight_scale_2" + global_scale = payload[role].to(device) + if global_scale.dtype != torch.float32 or not torch.isfinite(global_scale).all() or (global_scale <= 0).any(): + raise _fail("NVFP4 global scales must be finite positive FP32") + if global_scale.numel() == 1: + result = dequant_nvfp4(packed.reshape(rows, -1), scale32.reshape(rows, -1), **{role: global_scale}).reshape(shape) + elif len(shape) == 3 and list(global_scale.shape) in ([shape[0]], [shape[0], 1], [shape[0], 1, 1]): + result = torch.empty(shape, dtype=torch.float32, device=device) + globals_flat = global_scale.reshape(-1) + for expert in range(shape[0]): + result[expert] = dequant_nvfp4(packed[expert], scale32[expert], **{role: globals_flat[expert]}) + else: + raise _fail("global scale payload must be scalar or one scalar per leading expert") + else: + raise _fail(f"unknown module format {fmt!r}") + if not torch.isfinite(result).all(): + raise _fail("nonfinite decoded weight (NaN code or FP32 overflow)") + result = result.to(dtype=dtype) + if not torch.isfinite(result).all(): + raise _fail("output dtype overflow") + return result diff --git a/raw/retained/engines--tools--quant_stream.py b/raw/retained/engines--tools--quant_stream.py new file mode 100644 index 0000000000000000000000000000000000000000..ba5f76cfa38eeeeb70ac47a096082a9a7b338125 --- /dev/null +++ b/raw/retained/engines--tools--quant_stream.py @@ -0,0 +1,193 @@ +"""Metadata-planned, module-at-a-time reconstruction for streamed capture. + +Storage components are never routed as model parameters. Virtual native-weight +slots route through the model's own converter; each slot fetches its exact +components (including shared ancestor scales) and releases its decoded temporary. +""" +from __future__ import annotations + +import hashlib +import importlib +import json +import os + +METHODS = {"affine_surface": "affine-weight-reconstruction", "microscale_surface": "microfloat-weight-reconstruction"} + + +def quantization(config): + declarations = [] + for node in (config, config.get("text_config") or {}): + for field in ("quantization_config", "quantization"): + value = node.get(field) + if value: + if not isinstance(value, dict): + raise ValueError("quantization declaration must be an object") + declarations.append(value) + if any(value != declarations[0] for value in declarations[1:]): + raise ValueError("conflicting top/text quantization declarations") + return declarations[0] if declarations else {} + + +def reader_for(config): + quant = quantization(config) + method = str(quant.get("quant_method", "")).lower() + if method in {"gptq", "awq", "mlx"} or (not method and "bits" in quant and "group_size" in quant): + return "affine_surface" + if method == "compressed-tensors": + return "affine_surface" if quant.get("format") == "pack-quantized" else "microscale_surface" + if method == "fp8" and quant.get("scale_fmt") == "ue8m0": + return "microscale_surface" + if method == "modelopt": + # Preserve the independently qualified flagship reader's exact contract. + # Other geometries use the format reader, never the flagship's constants. + if quant.get("quant_algo") == "MIXED_PRECISION": + return "microscale_surface" + if quant.get("quant_algo") == "NVFP4": + from nvfp4_surface import GEOMETRIES, geometry_for_config + try: + geometry_for_config(config) + except ValueError: + geometry = GEOMETRIES.get(config.get("model_type")) + if geometry is not None and tuple(config.get("architectures") or ()) != geometry.architectures: + raise + return "microscale_surface" + return None + + +def checkpoint_plan(config, model_dir, header_reader, gate=None): + reader = reader_for(config) + if reader is None: + return None + index_path = os.path.join(model_dir, "model.safetensors.index.json") + weight_map = {} + if os.path.isfile(index_path): + with open(index_path) as handle: + weight_map = json.load(handle).get("weight_map") or {} + if gate is not None and not weight_map: + raise ValueError("gated quantized capture requires a complete safetensors index") + names = sorted(set(weight_map.values())) if weight_map else sorted( + name for name in os.listdir(model_dir) if name.endswith(".safetensors")) + if not names: + raise ValueError("recognized quantization has no safetensors shards") + if gate is not None: + # Exhaustive format admission needs all headers before model construction. + # This barrier is explicit; legacy race formats retain incremental opening. + gate.wait_for_shards(names) + metadata = {} + for name in names: + path = os.path.join(model_dir, name) + header, required = header_reader(path) + if os.stat(path).st_size < required: + raise ValueError("short quantized shard: " + name) + for key, entry in header.items(): + if key == "__metadata__": + continue + if key in metadata or (weight_map and weight_map.get(key) != name): + raise ValueError("duplicate/misindexed quantized tensor: " + key) + metadata[key] = {"shape": list(entry["shape"]), "dtype": entry["dtype"]} + if key.endswith(".weight_shape"): + if entry["shape"] not in ([2], [3]) or entry["dtype"] not in {"I32", "I64"}: + raise ValueError("invalid small weight_shape tensor: " + key) + from safetensors import safe_open + with safe_open(path, framework="pt", device="cpu") as handle: + metadata[key]["value"] = handle.get_tensor(key).tolist() + if weight_map and set(weight_map) != set(metadata): + raise ValueError("quantized index/header tensor sets differ") + surface = importlib.import_module(reader) + plan = surface.plan_modules(config, metadata) + if plan is None: + raise ValueError("selected quantized reader did not recognize its declaration") + consumed = set(plan["consumed"]) + import affine_surface + import microscale_surface + quant_roles = affine_surface._QUANT_SUFFIXES | microscale_surface.QUANT_ROLES | {"scale"} + for key, meta in metadata.items(): + # No unscaled float8 or integer-packed weight can pass as a native float. + if key not in consumed and key.endswith(".weight") and meta["dtype"] not in {"BF16", "F16", "F32", "F64"}: + raise ValueError("unconsumed encoded weight: " + key) + if key not in consumed and (key.rsplit(".", 1)[-1] in quant_roles or "quantizer" in key): + raise ValueError("unconsumed quantization state: " + key) + plan["quantization_config"] = quantization(config) + plan["_reader"] = reader + plan["_metadata"] = metadata + plan["_shards"] = names + plan["_gate_header_barrier"] = gate is not None + return plan + + +class WeightSlot: + __slots__ = ("name", "spec") + + def __init__(self, name, spec): + self.name = name + self.spec = spec + + +def slots(plan): + return {name: WeightSlot(name, spec) for name, spec in plan["modules"].items()} + + +def materialize(subset, plan, payload_slices, dtype, device, stats, eager, sink=None, expected_shape=None): + surface = importlib.import_module(plan["_reader"]) + out = {} + for name, value in subset.items(): + if not isinstance(value, WeightSlot): + out[name] = value + continue + spec = value.spec + expected = expected_shape(name) if expected_shape else None + if expected is not None and tuple(spec["shape"]) != tuple(expected): + raise ValueError(f"decoded shape for {name}: {spec['shape']} differs from model {expected}") + missing = set(spec["components"].values()) - payload_slices.keys() + if missing: + raise ValueError("missing packed components: " + ", ".join(sorted(missing))) + payload = {role: eager(payload_slices[key]) for role, key in spec["components"].items()} + stats["bytes_read"] = stats.get("bytes_read", 0) + sum( + tensor.numel() * tensor.element_size() for tensor in payload.values()) + decoded = surface.decode_module(payload, spec, dtype=dtype, device=device) + del payload + stats["decoded_modules"] += 1 + stats["formats"][spec["format"]] = stats["formats"].get(spec["format"], 0) + 1 + stats["components"].update(spec["components"].values()) + stats["decoded_names"].add(name) + if sink is None or not sink(name, decoded): + out[name] = decoded + del decoded + return out + + +def source_files(plan): + names = ["quant_stream.py", "affine_surface.py", "microscale_surface.py"] + if plan["_reader"] == "affine_surface" and any(s["format"].startswith("mlx-") for s in plan["modules"].values()): + names.append("mlx_surface.py") + if plan["_reader"] == "microscale_surface": + names.append("nvfp4_surface.py") + return names + + +def evidence(plan, stats, dtype_name): + sources = {} + for name in source_files(plan): + with open(os.path.join(os.path.dirname(__file__), name), "rb") as handle: + sources["engines/tools/" + name] = hashlib.sha256(handle.read()).hexdigest() + public = {key: value for key, value in plan.items() if not key.startswith("_")} + digest = hashlib.sha256(json.dumps(public, sort_keys=True, separators=(",", ":")).encode()).hexdigest() + quant = plan["quantization_config"] + activation_declared = quant.get("activation_scheme") not in (None, "", "none") + activation_declared = activation_declared or bool(quant.get("kv_cache_scheme")) + for group in (quant.get("config_groups") or {}).values(): + activation_declared = activation_declared or any( + group.get(role) is not None for role in ("input_activations", "output_activations")) + return {"method": METHODS[plan["_reader"]], "reference": plan["reference"], + "output_dtype": dtype_name, "quantization_config": plan["quantization_config"], + "modules_decoded": stats["decoded_modules"], "modules_planned": len(plan["modules"]), + "formats_decoded": dict(sorted(stats["formats"].items())), + "components_consumed": len(stats["components"]), "components_planned": len(plan["consumed"]), + "modules_not_decoded": sorted(set(plan["modules"]) - stats["decoded_names"]), + "components_not_consumed": sorted(set(plan["consumed"]) - stats["components"]), + "checkpoint_bytes_read": stats.get("bytes_read", 0), + "activation_quantization": plan.get("activation_quantization") if activation_declared else None, + "reader_evidence": {"source_files": sources, "decode_plan_sha256": digest, + "gate_header_barrier": plan["_gate_header_barrier"]}, + "scope": "weights_reconstructed", "comparison_class": "advisory", + "scientific_disclosure": "Stored-weight reconstruction only; no native quantized GEMM, activation arithmetic, or quantizer optimization quality claim."} diff --git a/raw/retained/oracle-report.json b/raw/retained/oracle-report.json new file mode 100644 index 0000000000000000000000000000000000000000..95edc2e6718f16dee3f76db0961b6b2b7b90305d --- /dev/null +++ b/raw/retained/oracle-report.json @@ -0,0 +1,68 @@ +{ + "checks": [ + "all-e2m1-nibbles-low-first-signed-zero", + "ue8m0-exponent-0", + "ue8m0-exponent-1", + "ue8m0-exponent-126", + "ue8m0-exponent-254", + "reserved-ue8m0-255", + "fp32-overflow", + "ct-nvfp4-fp32-scale-first-order", + "ct-nvfp4-activation-not-applied", + "ct-nvfp4-invalid-global-nan", + "ct-nvfp4-invalid-global-inf", + "ct-nvfp4-invalid-global-0.0", + "ct-nvfp4-invalid-global--1.0", + "ct-nvfp4-reserved-e4m3-127", + "ct-nvfp4-reserved-e4m3-255", + "ct-nvfp4-expert-leading-axis", + "modelopt-nvfp4-fp32-scale-first-order", + "modelopt-nvfp4-activation-not-applied", + "modelopt-nvfp4-invalid-global-nan", + "modelopt-nvfp4-invalid-global-inf", + "modelopt-nvfp4-invalid-global-0.0", + "modelopt-nvfp4-invalid-global--1.0", + "modelopt-nvfp4-reserved-e4m3-127", + "modelopt-nvfp4-reserved-e4m3-255", + "modelopt-nvfp4-expert-leading-axis", + "fp8-ue8m0-blocks-experts-and-tails", + "fp8-weight-nan", + "fp16-output-overflow", + "missing-scale", + "fp4-undeclared-tail", + "unknown-quantization-state", + "conflicting-top-text-config", + "deepseek-i8-fp4-not-ct-dialect", + "mxfp4-scale-not-ue8m0", + "unrecognized-method-returns-none", + "static-activation-scale-missing", + "ct-mxfp4-zero-block", + "ct-nvfp4-zero-block", + "modelopt-nvfp4-zero-block", + "fp8-ue8m0-zero-block", + "mxfp4-leading-expert-axis", + "ct-mxfp4-rtn-encoder-parity", + "ct-nvfp4-rtn-encoder-parity", + "modelopt-nvfp4-rtn-encoder-parity", + "fp8-ue8m0-rtn-encoder-parity", + "mixed-modelopt-layer.nv.weight", + "mixed-modelopt-layer.block.weight", + "mixed-modelopt-layer.ple.shard_0.weight", + "mixed-modelopt-layer.ple.shard_1.weight", + "mixed-shared-parent-scale-consumed-once", + "mixed-unimplemented-constituent", + "mixed-ambiguous-local-parent-scale", + "mixed-group-algorithm-conflict", + "ct-0.18-fp4-unpack-oracle", + "ct-0.18-fp4-pack-oracle", + "ct-0.18-mx-scale-oracle" + ], + "count": 56, + "upstream_oracle": { + "requested": true, + "status": "passed", + "version": "0.18.0", + "scope": "packing and scale functions; not BF16 intermediate/full compressor/GPU kernels" + }, + "scope": "CPU codec reconstruction and refusals; no QFS comparison or GPU kernel validation" +} diff --git a/raw/retained/requirements-verified.txt b/raw/retained/requirements-verified.txt new file mode 100644 index 0000000000000000000000000000000000000000..dfcdee962ea9ce89d354a65e4f291daff50e6168 --- /dev/null +++ b/raw/retained/requirements-verified.txt @@ -0,0 +1,47 @@ +--extra-index-url https://download.pytorch.org/whl/cpu +accelerate==1.14.0 +annotated-doc==0.0.5 +annotated-types==0.8.0 +anyio==4.15.1 +certifi==2026.7.22 +charset-normalizer==3.5.1 +click==8.5.0 +compressed-tensors==0.18.0 +filelock==3.32.5 +fsspec==2026.7.0 +gguf==0.19.0 +h11==0.16.0 +hf-xet==1.6.0 +httpcore==1.0.9 +httpx==0.28.1 +huggingface-hub==1.30.0 +idna==3.19 +jinja2==3.1.6 +loguru==0.7.3 +markdown-it-py==4.2.0 +markupsafe==3.0.3 +mdurl==0.1.2 +mpmath==1.3.0 +networkx==3.6.1 +numpy==2.5.3 +packaging==26.3 +psutil==7.2.2 +pydantic==2.13.5 +pydantic-core==2.46.5 +pygments==2.21.0 +pyyaml==6.0.3 +regex==2026.9.3 +requests==2.34.2 +rich==15.0.0 +safetensors==0.8.0 +setuptools==81.0.0 +shellingham==1.5.4 +sympy==1.14.0 +tokenizers==0.23.2 +torch==2.11.0+cpu +tqdm==4.70.0 +transformers==5.16.1 +typer==0.27.2 +typing-extensions==4.16.0 +typing-inspection==0.4.4 +urllib3==2.7.0 diff --git a/raw/retained/smoke_capture.py b/raw/retained/smoke_capture.py new file mode 100644 index 0000000000000000000000000000000000000000..b5d6f0155d12ae3604c0bbe7856574bf35663db0 --- /dev/null +++ b/raw/retained/smoke_capture.py @@ -0,0 +1,104 @@ +#!/usr/bin/env python3 +"""Local real streamed captures and positive, advisory own-head comparison. + +No model downloads, publication, fake revisions, or decoded candidate substitutes. +The supplied root/candidate/panel must already exist. Output remains a local proof, +not a publication qualification. RTN fixtures are format tests, not optimizer tests. +""" +from __future__ import annotations +import argparse +import hashlib +import json +import math +from pathlib import Path +import subprocess +import sys + +BOOTSTRAP = "import runpy,sys,torch; torch.set_num_threads(2); torch.set_num_interop_threads(2); p=sys.argv.pop(1); sys.path.insert(0,str(__import__('pathlib').Path(p).parent)); sys.argv[0]=p; runpy.run_path(p,run_name='__main__')" + + +def main(args): + args.out.mkdir(parents=True, exist_ok=False) + sys.path.insert(0, str(args.qfs_root / "bin")) + from fidelity import panel + binding = panel.resolve_panel(args.panel, role="final", tokenizer_root=args.root).to_dict() + binding_path = args.out / "panel-binding.json" + binding_path.write_text(json.dumps(binding, indent=2) + "\n") + digest = hashlib.sha256(binding_path.read_bytes()).hexdigest() + calls = [] + + def run(name, entry, argv, allowed=(0,)): + command = [sys.executable, "-c", BOOTSTRAP, str(entry), *map(str, argv)] + result = subprocess.run(command, text=True, capture_output=True, timeout=args.timeout) + (args.out / (name + ".stdout.log")).write_text(result.stdout) + (args.out / (name + ".stderr.log")).write_text(result.stderr) + calls.append({"argv": command, "returncode": result.returncode}) + (args.out / "commands.json").write_text(json.dumps(calls, indent=2) + "\n") + if result.returncode not in allowed: + raise RuntimeError(f"{name}: exit {result.returncode}; see {args.out}") + + common = ["--panel", args.panel, "--panel-role", "final", "--panel-binding", binding_path, + "--panel-binding-sha256", digest, "--panel-tokenizer-root", args.root, + "--lane", "other", "--device", "cpu", "--dtype", "bfloat16", + "--author", args.author, + "--schedule", "layer-outer", "--layer-residency", "stream"] + if args.windows is not None: + common += ["--windows", args.windows] + if args.format_fixture: + common += ["--disclosures", json.dumps([{"code": "rtn_format_fixture", "severity": "info", + "affects_comparability": False, "detail": "Local RTN-format fixture; optimizer-not-run; no model-quality or serving-kernel equivalence claim."}])] + for name, model in (("root", args.root), ("candidate", args.candidate)): + options = [*common, "--model", model, "--out", args.out / name, + "--dataset-id", "fidelity--quant-integration." + name, + "--dataset-name", "Local quant integration " + name, + "--role", "root" if name == "root" else "quant"] + repository = getattr(args, name + "_repository") + revision = getattr(args, name + "_revision") + if repository: + options += ["--weights-repository", repository] + if revision: + options += ["--model-revision", revision] + if name == "candidate": + options += ["--codec", args.codec, "--declared-bits", args.bits, + "--scope-file", args.scope or args.candidate / "scope.json"] + run("capture-" + name, args.qfs_root / "engines/tools/hf_capture.py", options) + comparison = args.out / "comparison" + run("compare", args.qfs_root / "bin/fidelity_dataset.py", + ["compare", "--reference", args.out / "root", "--candidate", args.out / "candidate", + "--out", comparison, "--force-compute", "--device", "cpu", "--replay-device", "numpy", + "--replay-dtype", "float32", "--verify-tensors", "--own-heads"], allowed=(0, 2)) + receipt = json.loads((comparison / "comparison-receipt.json").read_text()) + value = receipt["metric"]["value"] + if not isinstance(value, (int, float)) or not math.isfinite(value) or value <= 0: + raise ValueError(f"expected positive finite own-head QFS, got {value}") + if receipt["comparability"]["class"] != "advisory" or "weights_reconstructed" not in json.dumps(receipt): + raise ValueError("comparison did not disclose advisory reconstruction") + runtime_files = list((args.out / "candidate").rglob("*runtime*.json")) + decodes = [json.loads(path.read_text()).get("capture_tool", {}).get("weights_decode") for path in runtime_files] + decodes = [value for value in decodes if value] + if len(decodes) != 1: + raise ValueError("expected one sealed decoder receipt") + decode = decodes[0] + if not (decode.get("modules_decoded", 0) or decode.get("tensors_decoded", 0)): + raise ValueError("reader decoded nothing") + result = {"kld_nats": value, "decode": decode, "comparison_class": "advisory"} + (args.out / "smoke-evidence.json").write_text(json.dumps(result, indent=2) + "\n") + print(json.dumps(result)) + + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--qfs-root", type=Path, default=Path("/tmp/qfs-explorer-development")) + parser.add_argument("--author", required=True) + for key in ("root", "candidate", "panel", "out"): + parser.add_argument("--" + key, type=Path, required=True) + for side in ("root", "candidate"): + parser.add_argument("--" + side + "-repository") + parser.add_argument("--" + side + "-revision") + parser.add_argument("--codec", required=True) + parser.add_argument("--bits", type=float, required=True) + parser.add_argument("--scope", type=Path) + parser.add_argument("--windows", type=int) + parser.add_argument("--format-fixture", action="store_true") + parser.add_argument("--timeout", type=int, default=900) + main(parser.parse_args()) diff --git a/source-inventory.json b/source-inventory.json new file mode 100644 index 0000000000000000000000000000000000000000..be5d459f774857754c74a22096c968d57a88e433 --- /dev/null +++ b/source-inventory.json @@ -0,0 +1,2131 @@ +{ + "bin--fidelity--dscompare.py": { + "files": { + "bin--fidelity--dscompare.py": { + "sha256": "4c09a63e1d5e01e9365c729fe986f3003be7486532522843cf0cdea7fd0ed11d", + "size": 112596 + } + }, + "kind": "source", + "original_path": "/tmp/qfs-explorer-development/bin/fidelity/dscompare.py" + }, + "build_microfloat.py": { + "files": { + "build_microfloat.py": { + "sha256": "9fae546b8cb91df32468bcc7019c0bfbf10e41569526c7f55384f27afafe8699", + "size": 15456 + } + }, + "kind": "script", + "original_path": "/tmp/qfs-quant-microfloat-release/build_microfloat.py" + }, + "candidate:ct-mxfp4": { + "files": { + "evidence/candidate/README.md": { + "sha256": "9456750e9e6193900df9bd4361ce92e6f7539b62255a120bbe9e3afdbc4880e9", + "size": 3615 + }, + "evidence/candidate/capture/hidden_0000.safetensors": { + "sha256": "0d1f5e1f4c7b7306fe5734fc8327b15888b0783aba848e04ae760404c5037960", + "size": 8337 + }, + "evidence/candidate/capture/hidden_0001.safetensors": { + "sha256": "a5749a836a7ed4349e649e7c9a0a641f990f1aee64b762540dd3af6977aa56ee", + "size": 8337 + }, + "evidence/candidate/capture/hidden_0002.safetensors": { + "sha256": "f0a719e3c2aa47a15bea2c00572b37fe09a9877384a4b388c1ace9666496e4db", + "size": 8337 + }, + "evidence/candidate/capture/hidden_0003.safetensors": { + "sha256": "fb02c95788a64ef2cc00523c399efb7b62586bd286e74af0df9b9c8426536149", + "size": 8337 + }, + "evidence/candidate/capture/manifest.json": { + "sha256": "78ea9d1cadee7df930e55fa9dbac6a6cd8fa457cffcaa7d1ac7aab166d72ff1f", + "size": 5896 + }, + "evidence/candidate/checksums.txt": { + "sha256": "838cf94a88ea50cab58a834076243558521828afa3df5f46fc20ef18c9d3c5e9", + "size": 1868 + }, + "evidence/candidate/fidelity-dataset.json": { + "sha256": "5bbdb501d75aa389e877a6f656378b57d3778585e2c666ab88e2eef3a5391434", + "size": 16825 + }, + "evidence/candidate/head/head.json": { + "sha256": "777b038f747bed25d1f5db8adbfd2a78c7762fb5c870ff8c3c785a984d48a168", + "size": 1105 + }, + "evidence/candidate/head/weight.safetensors": { + "sha256": "07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913", + "size": 33365 + }, + "evidence/candidate/panel/masks/context-0000.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/candidate/panel/masks/context-0001.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/candidate/panel/masks/context-0002.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/candidate/panel/masks/context-0003.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/candidate/panel/panel-receipt.json": { + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "size": 7808 + }, + "evidence/candidate/panel/panel.json": { + "sha256": "68efa258ea3c5d4ba759c3c15aadd6e8c984711831bea3f335903109345cdcef", + "size": 7650 + }, + "evidence/candidate/panel/tokens/context-0000.json": { + "sha256": "08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315", + "size": 202 + }, + "evidence/candidate/panel/tokens/context-0001.json": { + "sha256": "5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46", + "size": 203 + }, + "evidence/candidate/panel/tokens/context-0002.json": { + "sha256": "51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07", + "size": 204 + }, + "evidence/candidate/panel/tokens/context-0003.json": { + "sha256": "8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d", + "size": 203 + }, + "evidence/candidate/runtime/capture-runtime.json": { + "sha256": "6838263dda3c253365372dece3f23a449687b4cf1a2175b54d9f264da3e16748", + "size": 18554 + }, + "evidence/candidate/validation/structural-validation.json": { + "sha256": "d3024ee8845d123018358b9c98a844bcdc3c985fbbc92d9e1b8565b121fe8a45", + "size": 381 + }, + "evidence/capture-candidate.stderr.log": { + "sha256": "b9bcade7de92480310f489b670aa2531442235d94b421766b891a0406d319e6a", + "size": 717 + }, + "evidence/capture-candidate.stdout.log": { + "sha256": "d811355ddabf86a7739eee42fb3aef505f41c861ef3a1c626978d41a127a1a65", + "size": 5454 + }, + "evidence/capture-root.stderr.log": { + "sha256": "16cd413edb55800734276cb92906f570ea4a64cd812166b2a6bd0aa432a0978e", + "size": 718 + }, + "evidence/capture-root.stdout.log": { + "sha256": "51f37cc0b21ed67686c88ab23660fd6a088a41b2b37ae430e8f47b9fc2fe099c", + "size": 4588 + }, + "evidence/commands.json": { + "sha256": "3b65739d378fa160c00ca252d09323ee203f5d249a8c189383f5401aeef0fa26", + "size": 4176 + }, + "evidence/compare.stderr.log": { + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "size": 0 + }, + "evidence/compare.stdout.log": { + "sha256": "7eeb1fe38f833fed126321b16333ca3613902e0e3ad117bb99010cf7a2d4dfb6", + "size": 947 + }, + "evidence/comparison/comparison-receipt.json": { + "sha256": "c8a4ea7eb65d3ad812514a3faadd0913f27d2cf03e45f11d170682ded1b6726d", + "size": 16748 + }, + "evidence/comparison/tokenwise-kld.npy": { + "sha256": "9970e64072dd76ae08651c684214da51b94e81fedfc6177c878326d03e55181b", + "size": 2144 + }, + "evidence/panel-binding.json": { + "sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "size": 3506 + }, + "evidence/root/README.md": { + "sha256": "df28a18b7e9c0d39ac079235136da25818038cc09314a890063058e94bf1c226", + "size": 3452 + }, + "evidence/root/capture/hidden_0000.safetensors": { + "sha256": "a7d5a505a8bdb71b45df052427ee2f917c390c4eb751dc586bfc213192c273e5", + "size": 8337 + }, + "evidence/root/capture/hidden_0001.safetensors": { + "sha256": "9fbd2c627ad45d2c1c39520ab9ba17f5d8aa1d1e73952682a488b732764574a6", + "size": 8337 + }, + "evidence/root/capture/hidden_0002.safetensors": { + "sha256": "eaf7e5903afff4ebeff8ba42353c3ebd58cc120c009d5038ea9393242bf82e4d", + "size": 8337 + }, + "evidence/root/capture/hidden_0003.safetensors": { + "sha256": "9b7729fe05d7c7ef4b80be6eb94f511e262765e417037cceb7d98ce80c17685d", + "size": 8337 + }, + "evidence/root/capture/manifest.json": { + "sha256": "3880f9a0ee35848dcae0ce89149c9b720d066f788b6d724c0710e69aa3251b40", + "size": 5897 + }, + "evidence/root/checksums.txt": { + "sha256": "654ea33f52cbbdf4643fb7abdfc11ebd3e5dc73bd9d448556d5cc1a46a13ae06", + "size": 1868 + }, + "evidence/root/fidelity-dataset.json": { + "sha256": "216c314183887b2c210cf5e04494d61fa9c1ec0b20df27a13473d5aa63270b61", + "size": 12796 + }, + "evidence/root/head/head.json": { + "sha256": "777b038f747bed25d1f5db8adbfd2a78c7762fb5c870ff8c3c785a984d48a168", + "size": 1105 + }, + "evidence/root/head/weight.safetensors": { + "sha256": "07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913", + "size": 33365 + }, + "evidence/root/panel/masks/context-0000.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/root/panel/masks/context-0001.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/root/panel/masks/context-0002.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/root/panel/masks/context-0003.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/root/panel/panel-receipt.json": { + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "size": 7808 + }, + "evidence/root/panel/panel.json": { + "sha256": "68efa258ea3c5d4ba759c3c15aadd6e8c984711831bea3f335903109345cdcef", + "size": 7650 + }, + "evidence/root/panel/tokens/context-0000.json": { + "sha256": "08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315", + "size": 202 + }, + "evidence/root/panel/tokens/context-0001.json": { + "sha256": "5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46", + "size": 203 + }, + "evidence/root/panel/tokens/context-0002.json": { + "sha256": "51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07", + "size": 204 + }, + "evidence/root/panel/tokens/context-0003.json": { + "sha256": "8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d", + "size": 203 + }, + "evidence/root/runtime/capture-runtime.json": { + "sha256": "60510dc79ef1eb967e64492e56911dec31e885c167c9b0d2ffa7d083e27a941b", + "size": 9998 + }, + "evidence/root/validation/structural-validation.json": { + "sha256": "769c103cf430360bf1b79a4d027f5bd073ce3f61204d9da77adf3ad494c27e73", + "size": 376 + }, + "evidence/smoke-evidence.json": { + "sha256": "5278a8808b0631ebbd37d89852eeefcf8b6e855e303dc50ed6361913df3126ad", + "size": 7887 + }, + "model/LICENSE": { + "sha256": "6456969dd395bff476628945088b4cbd9d9c761b01a64e281c07b09daf9f94c3", + "size": 1071 + }, + "model/build-manifest.json": { + "sha256": "57d74b2e6dcc8a789f51f86d251e51b2ec73c6772c329ad56f6132e08626eced", + "size": 41130 + }, + "model/config.json": { + "sha256": "c6cc76ca973555cae99d0c42da0a9385bf1ac67c67f4748cac0b4c0778ff5d90", + "size": 7517 + }, + "model/cpu-comparison-receipt.json": { + "sha256": "fcfcee1383dc0d50b42bbd97c9f2fc5ebe127c97cab791eeac01bf530d06f178", + "size": 15861 + }, + "model/cpu-reproduction-summary.json": { + "sha256": "41f8263ddacbac1379c67637f83fdef2ed843ca4973179817531855939866a55", + "size": 40258 + }, + "model/generation_config.json": { + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "size": 216 + }, + "model/hub-checkpoint-verification.json": { + "sha256": "3a4681f9c2876da6ae303592ede176ab17c6abdface107683fa2fe8386de7d36", + "size": 1001 + }, + "model/loader-verification.json": { + "sha256": "086b7c5481cfbae5ee958b3bdeb85264128c59142fb005611bd837533fbdf7b0", + "size": 1395 + }, + "model/model.safetensors": { + "sha256": "9222707b17727c48479eb37416d96289344b48d70eee2d919b282063ccee3b3d", + "size": 236880 + }, + "model/model.safetensors.index.json": { + "sha256": "50c90adf1fd00d4ca5d63488c6355fab3d4f08115c84b53b9ff23b174fc60148", + "size": 19255 + }, + "model/panel.binding.json": { + "sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "size": 3506 + }, + "model/panel.sha256.json": { + "sha256": "7fbfbaa8a3b1d7533177e1c2e774f5686e6a3f6b9564be7f2a99d0f66bff92fd", + "size": 2939 + }, + "model/provenance.json": { + "sha256": "d15344f84bc979ce72c8bb98a416193cdbef09e94ba9406cd41afc8dd577b5d5", + "size": 17045 + }, + "model/qfs-source.json": { + "sha256": "624fc5b9568aa8bf12b1fc5cb3d54aef94d5e5ad72d73a55bd761dd6ca659cae", + "size": 655 + }, + "model/scope.json": { + "sha256": "579ce3986da88093fe335f8bf2880eca4a336d9222c43e3bde70dc24587b9a52", + "size": 5372 + }, + "model/tokenizer.json": { + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "size": 6763 + }, + "model/tokenizer_config.json": { + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63", + "size": 236 + }, + "source-pin-evidence.json": { + "sha256": "d15344f84bc979ce72c8bb98a416193cdbef09e94ba9406cd41afc8dd577b5d5", + "size": 17045 + }, + "source/LICENSE": { + "sha256": "6456969dd395bff476628945088b4cbd9d9c761b01a64e281c07b09daf9f94c3", + "size": 1071 + }, + "source/README.md": { + "sha256": "7921e3c1d32b3fc7b9541320459c5803627778aa0458733ab13ae46729c37c6b", + "size": 9030 + }, + "source/build-manifest.json": { + "sha256": "57d74b2e6dcc8a789f51f86d251e51b2ec73c6772c329ad56f6132e08626eced", + "size": 41130 + }, + "source/build_fixture.py": { + "sha256": "19c3489f1bc7e8e9323cb26afbead562816a6918d6823af252eb6d04dff8e81e", + "size": 8262 + }, + "source/build_panel.py": { + "sha256": "f17b17262816676d6ededcc969756ac07ff991eab73117040ec41005f6ff63f3", + "size": 13878 + }, + "source/config.json": { + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "size": 1479 + }, + "source/cpu-comparison-receipt.json": { + "sha256": "fcfcee1383dc0d50b42bbd97c9f2fc5ebe127c97cab791eeac01bf530d06f178", + "size": 15861 + }, + "source/cpu-reproduction-summary.json": { + "sha256": "41f8263ddacbac1379c67637f83fdef2ed843ca4973179817531855939866a55", + "size": 40258 + }, + "source/generation_config.json": { + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "size": 216 + }, + "source/hub-checkpoint-verification.json": { + "sha256": "3a4681f9c2876da6ae303592ede176ab17c6abdface107683fa2fe8386de7d36", + "size": 1001 + }, + "source/loader-verification.json": { + "sha256": "086b7c5481cfbae5ee958b3bdeb85264128c59142fb005611bd837533fbdf7b0", + "size": 1395 + }, + "source/model.safetensors": { + "sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1", + "size": 571000 + }, + "source/panel.binding.json": { + "sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "size": 3506 + }, + "source/panel.sha256.json": { + "sha256": "7fbfbaa8a3b1d7533177e1c2e774f5686e6a3f6b9564be7f2a99d0f66bff92fd", + "size": 2939 + }, + "source/panel/arrays/causal-mask-64.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "source/panel/arrays/final-0000.tokens.npy": { + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af", + "size": 384 + }, + "source/panel/arrays/final-0001.tokens.npy": { + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea", + "size": 384 + }, + "source/panel/arrays/final-0002.tokens.npy": { + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c", + "size": 384 + }, + "source/panel/arrays/final-0003.tokens.npy": { + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a", + "size": 384 + }, + "source/panel/panel.json": { + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6", + "size": 4195 + }, + "source/panel/panel.receipt.json": { + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "size": 7808 + }, + "source/qfs-source.json": { + "sha256": "624fc5b9568aa8bf12b1fc5cb3d54aef94d5e5ad72d73a55bd761dd6ca659cae", + "size": 655 + }, + "source/requirements-cpu.txt": { + "sha256": "3bfca77a0c0a4a197ae8fdede60dba8c2c9bedf908b7138036409697f58bc4e8", + "size": 696 + }, + "source/tokenizer.json": { + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "size": 6763 + }, + "source/tokenizer_config.json": { + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63", + "size": 236 + }, + "source/verify_cpu.py": { + "sha256": "2e507993f0085a72d5236527942a7143fd036d56b82223b26e90889de5cd9f98", + "size": 18036 + } + }, + "original_model": "/tmp/qfs-quant-microfloat-release/stage-main/ct-mxfp4" + }, + "candidate:ct-nvfp4": { + "files": { + "evidence/candidate/README.md": { + "sha256": "93ac6cc3211e9c3a9a48ddd6014dce7db05dbccda84bedef1b758d08f6957e15", + "size": 3620 + }, + "evidence/candidate/capture/hidden_0000.safetensors": { + "sha256": "2331403bf611ca0ed33be7422842c29dbd0964641ac5485335449f6238ecf7c6", + "size": 8337 + }, + "evidence/candidate/capture/hidden_0001.safetensors": { + "sha256": "6d8abf57e92429d13c1aa816a89388a19dff167bedd0b82b55fe08732959a8cf", + "size": 8337 + }, + "evidence/candidate/capture/hidden_0002.safetensors": { + "sha256": "534417361864473b7230b795e4260529573d78eb7c09194093baa9070916c8b3", + "size": 8337 + }, + "evidence/candidate/capture/hidden_0003.safetensors": { + "sha256": "d897e1c57202f0105d7b1bee96ce37e338bf8acaa31930e6a4b5b0bac7123add", + "size": 8337 + }, + "evidence/candidate/capture/manifest.json": { + "sha256": "f50fe2cba7808faebc1ad7814d7390cabe6dd7f6aa81a0771e23a5a7622c5858", + "size": 5896 + }, + "evidence/candidate/checksums.txt": { + "sha256": "9ae1ff35fde8681b9c271740a76981e96a63bcd092954ed8880c083ef77d38be", + "size": 1868 + }, + "evidence/candidate/fidelity-dataset.json": { + "sha256": "af50f36d643b6c30fca32c369518d95a60f3a3773089939a57da5a9715ae7b3b", + "size": 16700 + }, + "evidence/candidate/head/head.json": { + "sha256": "777b038f747bed25d1f5db8adbfd2a78c7762fb5c870ff8c3c785a984d48a168", + "size": 1105 + }, + "evidence/candidate/head/weight.safetensors": { + "sha256": "07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913", + "size": 33365 + }, + "evidence/candidate/panel/masks/context-0000.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/candidate/panel/masks/context-0001.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/candidate/panel/masks/context-0002.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/candidate/panel/masks/context-0003.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/candidate/panel/panel-receipt.json": { + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "size": 7808 + }, + "evidence/candidate/panel/panel.json": { + "sha256": "68efa258ea3c5d4ba759c3c15aadd6e8c984711831bea3f335903109345cdcef", + "size": 7650 + }, + "evidence/candidate/panel/tokens/context-0000.json": { + "sha256": "08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315", + "size": 202 + }, + "evidence/candidate/panel/tokens/context-0001.json": { + "sha256": "5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46", + "size": 203 + }, + "evidence/candidate/panel/tokens/context-0002.json": { + "sha256": "51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07", + "size": 204 + }, + "evidence/candidate/panel/tokens/context-0003.json": { + "sha256": "8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d", + "size": 203 + }, + "evidence/candidate/runtime/capture-runtime.json": { + "sha256": "a554d047e719159b1edc62240015e0607c7b2e8633d372a83dcb4e2e09b63a81", + "size": 18776 + }, + "evidence/candidate/validation/structural-validation.json": { + "sha256": "d3024ee8845d123018358b9c98a844bcdc3c985fbbc92d9e1b8565b121fe8a45", + "size": 381 + }, + "evidence/capture-candidate.stderr.log": { + "sha256": "931cae13271d125b317c62dd9e2e45997a99b32ea1ed41841234080b54b6ddd4", + "size": 718 + }, + "evidence/capture-candidate.stdout.log": { + "sha256": "d89a507afaf7f3ce5d6ad07e78a4eaf669b2bc7c88f7b4d9b560868d9f3044c9", + "size": 5454 + }, + "evidence/capture-root.stderr.log": { + "sha256": "b383152e7b48f68b5f9e3230c525eadb618dc3c547f5d75d84ada017b06758de", + "size": 718 + }, + "evidence/capture-root.stdout.log": { + "sha256": "d1840d4ddfd7dbba2bd3770b82b0623526b636fb24352ec01c6bf766d2f27be2", + "size": 4585 + }, + "evidence/commands.json": { + "sha256": "230de949fd458cc5388e5d6dbf25eb2f5960b454621c8f3b32d3329469592664", + "size": 4176 + }, + "evidence/compare.stderr.log": { + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "size": 0 + }, + "evidence/compare.stdout.log": { + "sha256": "aaa926b6d8004837e96fa4f57643a8054f7c86b6ac46a5e8d135ad57e96d63c9", + "size": 948 + }, + "evidence/comparison/comparison-receipt.json": { + "sha256": "53824e510d77db71eefa6beb9403fbe7db4a4290cef2a119dc02b2ec9ffb3d1a", + "size": 16753 + }, + "evidence/comparison/tokenwise-kld.npy": { + "sha256": "d115385407c3bbce7cd6e466496e7ef92a8643839b8154a05b4dcfe8d95efba7", + "size": 2144 + }, + "evidence/panel-binding.json": { + "sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "size": 3506 + }, + "evidence/root/README.md": { + "sha256": "df28a18b7e9c0d39ac079235136da25818038cc09314a890063058e94bf1c226", + "size": 3452 + }, + "evidence/root/capture/hidden_0000.safetensors": { + "sha256": "2aa106ed8412fa80c1b807c82bf037db2f15593e4286ae8e0252b1346f5a0311", + "size": 8337 + }, + "evidence/root/capture/hidden_0001.safetensors": { + "sha256": "30d610a7a6efdafcd09fe07b8ef5ba317efbf22b6364582591a6c31263b4addd", + "size": 8337 + }, + "evidence/root/capture/hidden_0002.safetensors": { + "sha256": "e997e4f8db7f89251373e6bd9cf92afc08a2c9b3f62068b8209c8f381fca8bba", + "size": 8337 + }, + "evidence/root/capture/hidden_0003.safetensors": { + "sha256": "c8847ae711a567b36148b82bd2315d5613398a57525a79ef11b14046df071ade", + "size": 8337 + }, + "evidence/root/capture/manifest.json": { + "sha256": "eb4f0b08a3a53c704994a8b86e40f87a81c51869bb217aef0b2750268fd0f707", + "size": 5897 + }, + "evidence/root/checksums.txt": { + "sha256": "6f0c926bcc8d40861499b2a7f0dfaf7c7fd2403807588d380cd33040050b3957", + "size": 1868 + }, + "evidence/root/fidelity-dataset.json": { + "sha256": "61681e49303c0a1036882552d22a2d29dd15f98ffb92ba3113b00943deb8684e", + "size": 12796 + }, + "evidence/root/head/head.json": { + "sha256": "777b038f747bed25d1f5db8adbfd2a78c7762fb5c870ff8c3c785a984d48a168", + "size": 1105 + }, + "evidence/root/head/weight.safetensors": { + "sha256": "07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913", + "size": 33365 + }, + "evidence/root/panel/masks/context-0000.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/root/panel/masks/context-0001.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/root/panel/masks/context-0002.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/root/panel/masks/context-0003.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/root/panel/panel-receipt.json": { + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "size": 7808 + }, + "evidence/root/panel/panel.json": { + "sha256": "68efa258ea3c5d4ba759c3c15aadd6e8c984711831bea3f335903109345cdcef", + "size": 7650 + }, + "evidence/root/panel/tokens/context-0000.json": { + "sha256": "08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315", + "size": 202 + }, + "evidence/root/panel/tokens/context-0001.json": { + "sha256": "5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46", + "size": 203 + }, + "evidence/root/panel/tokens/context-0002.json": { + "sha256": "51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07", + "size": 204 + }, + "evidence/root/panel/tokens/context-0003.json": { + "sha256": "8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d", + "size": 203 + }, + "evidence/root/runtime/capture-runtime.json": { + "sha256": "a8068c471e36a871db3517160cf5016041d0a6d8a528f70485efb0defe7b1e2a", + "size": 9998 + }, + "evidence/root/validation/structural-validation.json": { + "sha256": "769c103cf430360bf1b79a4d027f5bd073ce3f61204d9da77adf3ad494c27e73", + "size": 376 + }, + "evidence/smoke-evidence.json": { + "sha256": "5f65c45ed0cb92e07b0a59625308c78d224e7ff9301c305c88fb11555050d7db", + "size": 8103 + }, + "model/LICENSE": { + "sha256": "6456969dd395bff476628945088b4cbd9d9c761b01a64e281c07b09daf9f94c3", + "size": 1071 + }, + "model/build-manifest.json": { + "sha256": "57d74b2e6dcc8a789f51f86d251e51b2ec73c6772c329ad56f6132e08626eced", + "size": 41130 + }, + "model/config.json": { + "sha256": "188450fd2bed8cf0c6e06d785410192143b3777bcbbff315151fcecb96cd267e", + "size": 7724 + }, + "model/cpu-comparison-receipt.json": { + "sha256": "fcfcee1383dc0d50b42bbd97c9f2fc5ebe127c97cab791eeac01bf530d06f178", + "size": 15861 + }, + "model/cpu-reproduction-summary.json": { + "sha256": "41f8263ddacbac1379c67637f83fdef2ed843ca4973179817531855939866a55", + "size": 40258 + }, + "model/generation_config.json": { + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "size": 216 + }, + "model/hub-checkpoint-verification.json": { + "sha256": "3a4681f9c2876da6ae303592ede176ab17c6abdface107683fa2fe8386de7d36", + "size": 1001 + }, + "model/loader-verification.json": { + "sha256": "086b7c5481cfbae5ee958b3bdeb85264128c59142fb005611bd837533fbdf7b0", + "size": 1395 + }, + "model/model.safetensors": { + "sha256": "640f3d7ea214015d8834a94b56b2dee2c2326dc50245cdd0ded5778799b0d300", + "size": 249080 + }, + "model/model.safetensors.index.json": { + "sha256": "75d9ad1ceee75a14bfde401669399f14cbc80dd609ddd4c0c87a4aa4aa922d3b", + "size": 29058 + }, + "model/panel.binding.json": { + "sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "size": 3506 + }, + "model/panel.sha256.json": { + "sha256": "7fbfbaa8a3b1d7533177e1c2e774f5686e6a3f6b9564be7f2a99d0f66bff92fd", + "size": 2939 + }, + "model/provenance.json": { + "sha256": "183f9ee1b3c0e730ccc810e9827674603e9b43ced38dda2db3342e2b1c03b26c", + "size": 18388 + }, + "model/qfs-source.json": { + "sha256": "624fc5b9568aa8bf12b1fc5cb3d54aef94d5e5ad72d73a55bd761dd6ca659cae", + "size": 655 + }, + "model/scope.json": { + "sha256": "bbe6c75de3f40ff62d70c9ac55d7828740cb133e345dca3ded2dc1234af0be93", + "size": 5242 + }, + "model/tokenizer.json": { + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "size": 6763 + }, + "model/tokenizer_config.json": { + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63", + "size": 236 + }, + "source-pin-evidence.json": { + "sha256": "183f9ee1b3c0e730ccc810e9827674603e9b43ced38dda2db3342e2b1c03b26c", + "size": 18388 + }, + "source/LICENSE": { + "sha256": "6456969dd395bff476628945088b4cbd9d9c761b01a64e281c07b09daf9f94c3", + "size": 1071 + }, + "source/README.md": { + "sha256": "7921e3c1d32b3fc7b9541320459c5803627778aa0458733ab13ae46729c37c6b", + "size": 9030 + }, + "source/build-manifest.json": { + "sha256": "57d74b2e6dcc8a789f51f86d251e51b2ec73c6772c329ad56f6132e08626eced", + "size": 41130 + }, + "source/build_fixture.py": { + "sha256": "19c3489f1bc7e8e9323cb26afbead562816a6918d6823af252eb6d04dff8e81e", + "size": 8262 + }, + "source/build_panel.py": { + "sha256": "f17b17262816676d6ededcc969756ac07ff991eab73117040ec41005f6ff63f3", + "size": 13878 + }, + "source/config.json": { + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "size": 1479 + }, + "source/cpu-comparison-receipt.json": { + "sha256": "fcfcee1383dc0d50b42bbd97c9f2fc5ebe127c97cab791eeac01bf530d06f178", + "size": 15861 + }, + "source/cpu-reproduction-summary.json": { + "sha256": "41f8263ddacbac1379c67637f83fdef2ed843ca4973179817531855939866a55", + "size": 40258 + }, + "source/generation_config.json": { + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "size": 216 + }, + "source/hub-checkpoint-verification.json": { + "sha256": "3a4681f9c2876da6ae303592ede176ab17c6abdface107683fa2fe8386de7d36", + "size": 1001 + }, + "source/loader-verification.json": { + "sha256": "086b7c5481cfbae5ee958b3bdeb85264128c59142fb005611bd837533fbdf7b0", + "size": 1395 + }, + "source/model.safetensors": { + "sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1", + "size": 571000 + }, + "source/panel.binding.json": { + "sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "size": 3506 + }, + "source/panel.sha256.json": { + "sha256": "7fbfbaa8a3b1d7533177e1c2e774f5686e6a3f6b9564be7f2a99d0f66bff92fd", + "size": 2939 + }, + "source/panel/arrays/causal-mask-64.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "source/panel/arrays/final-0000.tokens.npy": { + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af", + "size": 384 + }, + "source/panel/arrays/final-0001.tokens.npy": { + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea", + "size": 384 + }, + "source/panel/arrays/final-0002.tokens.npy": { + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c", + "size": 384 + }, + "source/panel/arrays/final-0003.tokens.npy": { + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a", + "size": 384 + }, + "source/panel/panel.json": { + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6", + "size": 4195 + }, + "source/panel/panel.receipt.json": { + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "size": 7808 + }, + "source/qfs-source.json": { + "sha256": "624fc5b9568aa8bf12b1fc5cb3d54aef94d5e5ad72d73a55bd761dd6ca659cae", + "size": 655 + }, + "source/requirements-cpu.txt": { + "sha256": "3bfca77a0c0a4a197ae8fdede60dba8c2c9bedf908b7138036409697f58bc4e8", + "size": 696 + }, + "source/tokenizer.json": { + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "size": 6763 + }, + "source/tokenizer_config.json": { + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63", + "size": 236 + }, + "source/verify_cpu.py": { + "sha256": "2e507993f0085a72d5236527942a7143fd036d56b82223b26e90889de5cd9f98", + "size": 18036 + } + }, + "original_model": "/tmp/qfs-quant-microfloat-release/stage-main/ct-nvfp4" + }, + "candidate:fp8-ue8m0": { + "files": { + "evidence/candidate/README.md": { + "sha256": "eae14cb939ad0e3c9e5598fd470db04f30e804caf8af6ba65b27904b578df3ec", + "size": 3629 + }, + "evidence/candidate/capture/hidden_0000.safetensors": { + "sha256": "40cd1cd108cb70d6b33b4add2a08115d9b9c8de4ebcff3fd7e69c4fff205757b", + "size": 8337 + }, + "evidence/candidate/capture/hidden_0001.safetensors": { + "sha256": "dd67772c7ffe8c3d1a6efa229ed374333d63f1ff7ac8eac1c62c18122221850e", + "size": 8337 + }, + "evidence/candidate/capture/hidden_0002.safetensors": { + "sha256": "875bbbf99aa5e09d7d11ed617d02baed83fafac6c50c9c2f454d5abd45d94148", + "size": 8337 + }, + "evidence/candidate/capture/hidden_0003.safetensors": { + "sha256": "037443576b69a6505b8cbc9c161e025992886cbcc0b08762ef9b906e9214cd0f", + "size": 8337 + }, + "evidence/candidate/capture/manifest.json": { + "sha256": "6bf2749c054ac3f028cc1008dff42a02c549f0a253e49f2c5be9a2b60dc051b3", + "size": 5897 + }, + "evidence/candidate/checksums.txt": { + "sha256": "881aff799afa4f76a8538da3ebdece4d7ffef20db7b22bf626d1bb90d084b2cf", + "size": 1868 + }, + "evidence/candidate/fidelity-dataset.json": { + "sha256": "b5890b2985844ad14a041b49eadde3210d2b8829435175d53c682e4a54d811c7", + "size": 16718 + }, + "evidence/candidate/head/head.json": { + "sha256": "777b038f747bed25d1f5db8adbfd2a78c7762fb5c870ff8c3c785a984d48a168", + "size": 1105 + }, + "evidence/candidate/head/weight.safetensors": { + "sha256": "07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913", + "size": 33365 + }, + "evidence/candidate/panel/masks/context-0000.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/candidate/panel/masks/context-0001.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/candidate/panel/masks/context-0002.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/candidate/panel/masks/context-0003.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/candidate/panel/panel-receipt.json": { + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "size": 7808 + }, + "evidence/candidate/panel/panel.json": { + "sha256": "68efa258ea3c5d4ba759c3c15aadd6e8c984711831bea3f335903109345cdcef", + "size": 7650 + }, + "evidence/candidate/panel/tokens/context-0000.json": { + "sha256": "08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315", + "size": 202 + }, + "evidence/candidate/panel/tokens/context-0001.json": { + "sha256": "5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46", + "size": 203 + }, + "evidence/candidate/panel/tokens/context-0002.json": { + "sha256": "51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07", + "size": 204 + }, + "evidence/candidate/panel/tokens/context-0003.json": { + "sha256": "8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d", + "size": 203 + }, + "evidence/candidate/runtime/capture-runtime.json": { + "sha256": "7f88841b83658acc28cf414abd0a61716073118f8a9c70190c56b711a0e20c0a", + "size": 12508 + }, + "evidence/candidate/validation/structural-validation.json": { + "sha256": "d3024ee8845d123018358b9c98a844bcdc3c985fbbc92d9e1b8565b121fe8a45", + "size": 381 + }, + "evidence/capture-candidate.stderr.log": { + "sha256": "00308f68bdec6bd99fcea46d18dfa34084124af527406bdc9cfeb93bbb8e66b2", + "size": 717 + }, + "evidence/capture-candidate.stdout.log": { + "sha256": "291883eff79a40dd6ee49974b5690dc819531fc0a4b0f44140e5ed3c4ac9ca9b", + "size": 5460 + }, + "evidence/capture-root.stderr.log": { + "sha256": "2e85028915db4f009c91b15d79aafd019a73fcb251a551443801df36cfea895e", + "size": 717 + }, + "evidence/capture-root.stdout.log": { + "sha256": "88b57ba2439b61093efe892540cd9b506b886432412d9ab30712c3f304363561", + "size": 4586 + }, + "evidence/commands.json": { + "sha256": "091bf714d77b0818f9bb500623ffb2d02004a62dd5f94ffe26367e484f0262a5", + "size": 4188 + }, + "evidence/compare.stderr.log": { + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "size": 0 + }, + "evidence/compare.stdout.log": { + "sha256": "a05a3966436d8afb744d9111094f5d8c9538386c392cb03934ed0f288fdd43db", + "size": 1022 + }, + "evidence/comparison/comparison-receipt.json": { + "sha256": "0db49970160ff0d412b90abce7062ef372cd1ad62c016cf9614cb6a834f3470e", + "size": 17420 + }, + "evidence/comparison/tokenwise-kld.npy": { + "sha256": "f2e0f6c3b58443d6371a4d48a19be19ac75432c3951e09d2d1aebd3812791e0e", + "size": 2144 + }, + "evidence/panel-binding.json": { + "sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "size": 3506 + }, + "evidence/root/README.md": { + "sha256": "df28a18b7e9c0d39ac079235136da25818038cc09314a890063058e94bf1c226", + "size": 3452 + }, + "evidence/root/capture/hidden_0000.safetensors": { + "sha256": "1d90bd93643e3a7c966b038aa9f9b0055cb443651449e428ba78183056b55591", + "size": 8337 + }, + "evidence/root/capture/hidden_0001.safetensors": { + "sha256": "2d5958f829bf504016f4abc37863bf1f8ed84c1a4328453902c38eb4b10f7a41", + "size": 8337 + }, + "evidence/root/capture/hidden_0002.safetensors": { + "sha256": "d338b42bc1f0b582671b9e5672f6c5a8160c10765b4dddde7d00148df49a3f11", + "size": 8337 + }, + "evidence/root/capture/hidden_0003.safetensors": { + "sha256": "52dc114d85f9d89821e332ada73be3ffabcac270906b89165ca2a7a51c684f94", + "size": 8337 + }, + "evidence/root/capture/manifest.json": { + "sha256": "b89ed72d77544f47068c33e9de7b70579874dc5bd6c1e970a0567ac91540eac0", + "size": 5897 + }, + "evidence/root/checksums.txt": { + "sha256": "feba1278b95ddd3cbe4f4e95234055ac499659cd4f409f8c9d6ffca531c3b62a", + "size": 1868 + }, + "evidence/root/fidelity-dataset.json": { + "sha256": "4c18c187504e77b19c2691d043f0f2e9542f25295d50534ae1c42de67f91085d", + "size": 12796 + }, + "evidence/root/head/head.json": { + "sha256": "777b038f747bed25d1f5db8adbfd2a78c7762fb5c870ff8c3c785a984d48a168", + "size": 1105 + }, + "evidence/root/head/weight.safetensors": { + "sha256": "07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913", + "size": 33365 + }, + "evidence/root/panel/masks/context-0000.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/root/panel/masks/context-0001.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/root/panel/masks/context-0002.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/root/panel/masks/context-0003.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/root/panel/panel-receipt.json": { + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "size": 7808 + }, + "evidence/root/panel/panel.json": { + "sha256": "68efa258ea3c5d4ba759c3c15aadd6e8c984711831bea3f335903109345cdcef", + "size": 7650 + }, + "evidence/root/panel/tokens/context-0000.json": { + "sha256": "08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315", + "size": 202 + }, + "evidence/root/panel/tokens/context-0001.json": { + "sha256": "5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46", + "size": 203 + }, + "evidence/root/panel/tokens/context-0002.json": { + "sha256": "51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07", + "size": 204 + }, + "evidence/root/panel/tokens/context-0003.json": { + "sha256": "8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d", + "size": 203 + }, + "evidence/root/runtime/capture-runtime.json": { + "sha256": "d7da58d6426d19b129ef09638c0a30ca982b36597fe7978a2efd33d292f539c5", + "size": 9998 + }, + "evidence/root/validation/structural-validation.json": { + "sha256": "769c103cf430360bf1b79a4d027f5bd073ce3f61204d9da77adf3ad494c27e73", + "size": 376 + }, + "evidence/smoke-evidence.json": { + "sha256": "f07f079ffd1bbc06264cc8a56f20b0b24f99f70b40aec6aa9e35a3db2f9878e8", + "size": 2065 + }, + "model/LICENSE": { + "sha256": "6456969dd395bff476628945088b4cbd9d9c761b01a64e281c07b09daf9f94c3", + "size": 1071 + }, + "model/build-manifest.json": { + "sha256": "57d74b2e6dcc8a789f51f86d251e51b2ec73c6772c329ad56f6132e08626eced", + "size": 41130 + }, + "model/config.json": { + "sha256": "cbf3fcc7cdf78aec98f645c6920345f2fdebde6764223349249f6389606229ec", + "size": 1673 + }, + "model/cpu-comparison-receipt.json": { + "sha256": "fcfcee1383dc0d50b42bbd97c9f2fc5ebe127c97cab791eeac01bf530d06f178", + "size": 15861 + }, + "model/cpu-reproduction-summary.json": { + "sha256": "41f8263ddacbac1379c67637f83fdef2ed843ca4973179817531855939866a55", + "size": 40258 + }, + "model/generation_config.json": { + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "size": 216 + }, + "model/hub-checkpoint-verification.json": { + "sha256": "3a4681f9c2876da6ae303592ede176ab17c6abdface107683fa2fe8386de7d36", + "size": 1001 + }, + "model/loader-verification.json": { + "sha256": "086b7c5481cfbae5ee958b3bdeb85264128c59142fb005611bd837533fbdf7b0", + "size": 1395 + }, + "model/model.safetensors": { + "sha256": "e26433482b4d0c4e0cf15cd313cfaf140708378cce3e73866bb8badc8298a159", + "size": 340878 + }, + "model/model.safetensors.index.json": { + "sha256": "830192dca5cae29400ba34528a3e334ef274dedd2ea74dac37ebe38b057461e4", + "size": 18047 + }, + "model/panel.binding.json": { + "sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "size": 3506 + }, + "model/panel.sha256.json": { + "sha256": "7fbfbaa8a3b1d7533177e1c2e774f5686e6a3f6b9564be7f2a99d0f66bff92fd", + "size": 2939 + }, + "model/provenance.json": { + "sha256": "01bd9ab3b0c8f5077f9b0b4a373e3dc2558cb2d09a36d1306b5bcb58f33f7365", + "size": 17728 + }, + "model/qfs-source.json": { + "sha256": "624fc5b9568aa8bf12b1fc5cb3d54aef94d5e5ad72d73a55bd761dd6ca659cae", + "size": 655 + }, + "model/scope.json": { + "sha256": "b186631b93ad29d8ddd9da74e40c66b67e8376b011524fc3762195bb5f4886b5", + "size": 5250 + }, + "model/tokenizer.json": { + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "size": 6763 + }, + "model/tokenizer_config.json": { + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63", + "size": 236 + }, + "source-pin-evidence.json": { + "sha256": "01bd9ab3b0c8f5077f9b0b4a373e3dc2558cb2d09a36d1306b5bcb58f33f7365", + "size": 17728 + }, + "source/LICENSE": { + "sha256": "6456969dd395bff476628945088b4cbd9d9c761b01a64e281c07b09daf9f94c3", + "size": 1071 + }, + "source/README.md": { + "sha256": "7921e3c1d32b3fc7b9541320459c5803627778aa0458733ab13ae46729c37c6b", + "size": 9030 + }, + "source/build-manifest.json": { + "sha256": "57d74b2e6dcc8a789f51f86d251e51b2ec73c6772c329ad56f6132e08626eced", + "size": 41130 + }, + "source/build_fixture.py": { + "sha256": "19c3489f1bc7e8e9323cb26afbead562816a6918d6823af252eb6d04dff8e81e", + "size": 8262 + }, + "source/build_panel.py": { + "sha256": "f17b17262816676d6ededcc969756ac07ff991eab73117040ec41005f6ff63f3", + "size": 13878 + }, + "source/config.json": { + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "size": 1479 + }, + "source/cpu-comparison-receipt.json": { + "sha256": "fcfcee1383dc0d50b42bbd97c9f2fc5ebe127c97cab791eeac01bf530d06f178", + "size": 15861 + }, + "source/cpu-reproduction-summary.json": { + "sha256": "41f8263ddacbac1379c67637f83fdef2ed843ca4973179817531855939866a55", + "size": 40258 + }, + "source/generation_config.json": { + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "size": 216 + }, + "source/hub-checkpoint-verification.json": { + "sha256": "3a4681f9c2876da6ae303592ede176ab17c6abdface107683fa2fe8386de7d36", + "size": 1001 + }, + "source/loader-verification.json": { + "sha256": "086b7c5481cfbae5ee958b3bdeb85264128c59142fb005611bd837533fbdf7b0", + "size": 1395 + }, + "source/model.safetensors": { + "sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1", + "size": 571000 + }, + "source/panel.binding.json": { + "sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "size": 3506 + }, + "source/panel.sha256.json": { + "sha256": "7fbfbaa8a3b1d7533177e1c2e774f5686e6a3f6b9564be7f2a99d0f66bff92fd", + "size": 2939 + }, + "source/panel/arrays/causal-mask-64.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "source/panel/arrays/final-0000.tokens.npy": { + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af", + "size": 384 + }, + "source/panel/arrays/final-0001.tokens.npy": { + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea", + "size": 384 + }, + "source/panel/arrays/final-0002.tokens.npy": { + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c", + "size": 384 + }, + "source/panel/arrays/final-0003.tokens.npy": { + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a", + "size": 384 + }, + "source/panel/panel.json": { + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6", + "size": 4195 + }, + "source/panel/panel.receipt.json": { + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "size": 7808 + }, + "source/qfs-source.json": { + "sha256": "624fc5b9568aa8bf12b1fc5cb3d54aef94d5e5ad72d73a55bd761dd6ca659cae", + "size": 655 + }, + "source/requirements-cpu.txt": { + "sha256": "3bfca77a0c0a4a197ae8fdede60dba8c2c9bedf908b7138036409697f58bc4e8", + "size": 696 + }, + "source/tokenizer.json": { + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "size": 6763 + }, + "source/tokenizer_config.json": { + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63", + "size": 236 + }, + "source/verify_cpu.py": { + "sha256": "2e507993f0085a72d5236527942a7143fd036d56b82223b26e90889de5cd9f98", + "size": 18036 + } + }, + "original_model": "/tmp/qfs-quant-microfloat-release/stage-main/fp8-ue8m0" + }, + "candidate:modelopt-mixed": { + "files": { + "evidence/candidate/README.md": { + "sha256": "d2910fb80cfd368eec5a13873e256ef31bc32473b6c904ed63500e03b95d5e36", + "size": 3727 + }, + "evidence/candidate/capture/hidden_0000.safetensors": { + "sha256": "d58e6020d49e8ebc9ec37adef717eced6bcfbb7839b6e78760d190f76d5532ac", + "size": 8337 + }, + "evidence/candidate/capture/hidden_0001.safetensors": { + "sha256": "c82073ece4ff765650d14a750f155cf825a1211382501182cceb86c6ac4e2972", + "size": 8337 + }, + "evidence/candidate/capture/hidden_0002.safetensors": { + "sha256": "bb1e18fd435c3f563fb0e87f3a30415cb71bd617b2524dace39342a15d5f23c6", + "size": 8337 + }, + "evidence/candidate/capture/hidden_0003.safetensors": { + "sha256": "a0c5e35132c06bad5ae2fa3c3285406309fe8649c097b75860c98bc69d2d2160", + "size": 8337 + }, + "evidence/candidate/capture/manifest.json": { + "sha256": "95b6648a9c17d9fb70058995a7c09d326a3b6b8db1908e356fd16a8dd1167515", + "size": 5896 + }, + "evidence/candidate/checksums.txt": { + "sha256": "2cdec1c75b050f6cabeb443c993c1afa3ffded31997a23d03f99a5c68a06783a", + "size": 1868 + }, + "evidence/candidate/fidelity-dataset.json": { + "sha256": "414494a9ef12eb8e2ffb18e3fe4280d83594ca4682e47262b29fb0aedaf47a2d", + "size": 19191 + }, + "evidence/candidate/head/head.json": { + "sha256": "777b038f747bed25d1f5db8adbfd2a78c7762fb5c870ff8c3c785a984d48a168", + "size": 1105 + }, + "evidence/candidate/head/weight.safetensors": { + "sha256": "07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913", + "size": 33365 + }, + "evidence/candidate/panel/masks/context-0000.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/candidate/panel/masks/context-0001.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/candidate/panel/masks/context-0002.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/candidate/panel/masks/context-0003.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/candidate/panel/panel-receipt.json": { + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "size": 7808 + }, + "evidence/candidate/panel/panel.json": { + "sha256": "68efa258ea3c5d4ba759c3c15aadd6e8c984711831bea3f335903109345cdcef", + "size": 7650 + }, + "evidence/candidate/panel/tokens/context-0000.json": { + "sha256": "08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315", + "size": 202 + }, + "evidence/candidate/panel/tokens/context-0001.json": { + "sha256": "5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46", + "size": 203 + }, + "evidence/candidate/panel/tokens/context-0002.json": { + "sha256": "51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07", + "size": 204 + }, + "evidence/candidate/panel/tokens/context-0003.json": { + "sha256": "8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d", + "size": 203 + }, + "evidence/candidate/runtime/capture-runtime.json": { + "sha256": "4ce6318c2063b8cc18b8b0b4f0301b71ab82b0961c25c31779e1d13b78b94cd9", + "size": 25528 + }, + "evidence/candidate/validation/structural-validation.json": { + "sha256": "d3024ee8845d123018358b9c98a844bcdc3c985fbbc92d9e1b8565b121fe8a45", + "size": 381 + }, + "evidence/capture-candidate.stderr.log": { + "sha256": "d029eeb7da3b2f08b2195a16443601d4ba011a2ded427e6ebdb501923431a8bf", + "size": 718 + }, + "evidence/capture-candidate.stdout.log": { + "sha256": "d58304ca124ce0dca7082068a5ae61a10c79896927fdc6d5b915a3ef4b91ac49", + "size": 5469 + }, + "evidence/capture-root.stderr.log": { + "sha256": "2cc5c9da64a0cfcc38601a47e8b93252be73d333d38c369c83355bde03a44021", + "size": 717 + }, + "evidence/capture-root.stdout.log": { + "sha256": "df79a7428105eb52ddbb8cba70f95c5a50a5c8ab6a848008d82bf071deaa08c2", + "size": 4593 + }, + "evidence/commands.json": { + "sha256": "a0da6790fc78d0eae39826145330a3065a0cb5e06ea7bcef7d62c1b4c8d6e277", + "size": 4230 + }, + "evidence/compare.stderr.log": { + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "size": 0 + }, + "evidence/compare.stdout.log": { + "sha256": "6a1c9f0c0f3f1d59016d65ca44aa437baf3ebed402e1d058c3a449616cf56cb1", + "size": 955 + }, + "evidence/comparison/comparison-receipt.json": { + "sha256": "3a8413a6ebb35c46f92ba0ef5513d8fa9ce93cb26024f2d00bf5a4b1bf176136", + "size": 16861 + }, + "evidence/comparison/tokenwise-kld.npy": { + "sha256": "4da6ba6e82e5e379d03634af43735c735aea683eaeafb942f215e32dc27ad92b", + "size": 2144 + }, + "evidence/panel-binding.json": { + "sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "size": 3506 + }, + "evidence/root/README.md": { + "sha256": "df28a18b7e9c0d39ac079235136da25818038cc09314a890063058e94bf1c226", + "size": 3452 + }, + "evidence/root/capture/hidden_0000.safetensors": { + "sha256": "6ac2eb5f48b52d80e5f52d1ebb32fa3961ed7043785b4d767e9d01695b74e9af", + "size": 8337 + }, + "evidence/root/capture/hidden_0001.safetensors": { + "sha256": "59aa229dbba96d170d23416d9afe7f4b4fd10b632f465ea6dda5f06104d239ff", + "size": 8337 + }, + "evidence/root/capture/hidden_0002.safetensors": { + "sha256": "5fb0d3cf1816d189372d0071c8280eafa16ff6c246fa0edf1e3b8929c205be78", + "size": 8337 + }, + "evidence/root/capture/hidden_0003.safetensors": { + "sha256": "b87f9bb8817af51eceb4de7e683517e09da1526dc2030907591533abf0649728", + "size": 8337 + }, + "evidence/root/capture/manifest.json": { + "sha256": "eb91e840c7ccef44af187b89afe7732868e9a081e8af9e1f39228c79c22e8b5e", + "size": 5897 + }, + "evidence/root/checksums.txt": { + "sha256": "618f195db5212d6e8199a65a456cb74aa6574a96f2e0eb388c385a255ba3f35e", + "size": 1868 + }, + "evidence/root/fidelity-dataset.json": { + "sha256": "38560d8b8d719201206641c5550097ff544d83f1279a2db4af5dc765944f6467", + "size": 12796 + }, + "evidence/root/head/head.json": { + "sha256": "777b038f747bed25d1f5db8adbfd2a78c7762fb5c870ff8c3c785a984d48a168", + "size": 1105 + }, + "evidence/root/head/weight.safetensors": { + "sha256": "07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913", + "size": 33365 + }, + "evidence/root/panel/masks/context-0000.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/root/panel/masks/context-0001.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/root/panel/masks/context-0002.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/root/panel/masks/context-0003.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/root/panel/panel-receipt.json": { + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "size": 7808 + }, + "evidence/root/panel/panel.json": { + "sha256": "68efa258ea3c5d4ba759c3c15aadd6e8c984711831bea3f335903109345cdcef", + "size": 7650 + }, + "evidence/root/panel/tokens/context-0000.json": { + "sha256": "08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315", + "size": 202 + }, + "evidence/root/panel/tokens/context-0001.json": { + "sha256": "5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46", + "size": 203 + }, + "evidence/root/panel/tokens/context-0002.json": { + "sha256": "51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07", + "size": 204 + }, + "evidence/root/panel/tokens/context-0003.json": { + "sha256": "8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d", + "size": 203 + }, + "evidence/root/runtime/capture-runtime.json": { + "sha256": "05ac0a428495ffb0cc9d663169d5fe5b3fb903a1dcb2cc507227b5e643671b2b", + "size": 9997 + }, + "evidence/root/validation/structural-validation.json": { + "sha256": "769c103cf430360bf1b79a4d027f5bd073ce3f61204d9da77adf3ad494c27e73", + "size": 376 + }, + "evidence/smoke-evidence.json": { + "sha256": "18873320621fe015d093be2ddc17cc44a6dd33a996d883185775abc8b1d76695", + "size": 14293 + }, + "model/LICENSE": { + "sha256": "6456969dd395bff476628945088b4cbd9d9c761b01a64e281c07b09daf9f94c3", + "size": 1071 + }, + "model/build-manifest.json": { + "sha256": "57d74b2e6dcc8a789f51f86d251e51b2ec73c6772c329ad56f6132e08626eced", + "size": 41130 + }, + "model/config.json": { + "sha256": "33f139cf6a6c6de8e40791cff02405adc77c4447419863d9ce801642a484e958", + "size": 13306 + }, + "model/cpu-comparison-receipt.json": { + "sha256": "fcfcee1383dc0d50b42bbd97c9f2fc5ebe127c97cab791eeac01bf530d06f178", + "size": 15861 + }, + "model/cpu-reproduction-summary.json": { + "sha256": "41f8263ddacbac1379c67637f83fdef2ed843ca4973179817531855939866a55", + "size": 40258 + }, + "model/generation_config.json": { + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "size": 216 + }, + "model/hub-checkpoint-verification.json": { + "sha256": "3a4681f9c2876da6ae303592ede176ab17c6abdface107683fa2fe8386de7d36", + "size": 1001 + }, + "model/loader-verification.json": { + "sha256": "086b7c5481cfbae5ee958b3bdeb85264128c59142fb005611bd837533fbdf7b0", + "size": 1395 + }, + "model/model.safetensors": { + "sha256": "9a5c06dffc5c8c08aa0cb0109c87274d044d8297db132405828d914762370199", + "size": 310622 + }, + "model/model.safetensors.index.json": { + "sha256": "69f417db73c9884a2ce0529cfeaa5f79772ec61db74af607777e6d923bd60079", + "size": 21972 + }, + "model/panel.binding.json": { + "sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "size": 3506 + }, + "model/panel.sha256.json": { + "sha256": "7fbfbaa8a3b1d7533177e1c2e774f5686e6a3f6b9564be7f2a99d0f66bff92fd", + "size": 2939 + }, + "model/provenance.json": { + "sha256": "099de722f0b28b0fc274f0cf76570ee526ef4e0188c405637ad8d34c00acb4c0", + "size": 18907 + }, + "model/qfs-source.json": { + "sha256": "624fc5b9568aa8bf12b1fc5cb3d54aef94d5e5ad72d73a55bd761dd6ca659cae", + "size": 655 + }, + "model/scope.json": { + "sha256": "cb9473f3fab8c5ac5738252a4593d822d85b395e602e9ae2588422022aa99603", + "size": 7598 + }, + "model/tokenizer.json": { + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "size": 6763 + }, + "model/tokenizer_config.json": { + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63", + "size": 236 + }, + "source-pin-evidence.json": { + "sha256": "099de722f0b28b0fc274f0cf76570ee526ef4e0188c405637ad8d34c00acb4c0", + "size": 18907 + }, + "source/LICENSE": { + "sha256": "6456969dd395bff476628945088b4cbd9d9c761b01a64e281c07b09daf9f94c3", + "size": 1071 + }, + "source/README.md": { + "sha256": "7921e3c1d32b3fc7b9541320459c5803627778aa0458733ab13ae46729c37c6b", + "size": 9030 + }, + "source/build-manifest.json": { + "sha256": "57d74b2e6dcc8a789f51f86d251e51b2ec73c6772c329ad56f6132e08626eced", + "size": 41130 + }, + "source/build_fixture.py": { + "sha256": "19c3489f1bc7e8e9323cb26afbead562816a6918d6823af252eb6d04dff8e81e", + "size": 8262 + }, + "source/build_panel.py": { + "sha256": "f17b17262816676d6ededcc969756ac07ff991eab73117040ec41005f6ff63f3", + "size": 13878 + }, + "source/config.json": { + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "size": 1479 + }, + "source/cpu-comparison-receipt.json": { + "sha256": "fcfcee1383dc0d50b42bbd97c9f2fc5ebe127c97cab791eeac01bf530d06f178", + "size": 15861 + }, + "source/cpu-reproduction-summary.json": { + "sha256": "41f8263ddacbac1379c67637f83fdef2ed843ca4973179817531855939866a55", + "size": 40258 + }, + "source/generation_config.json": { + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "size": 216 + }, + "source/hub-checkpoint-verification.json": { + "sha256": "3a4681f9c2876da6ae303592ede176ab17c6abdface107683fa2fe8386de7d36", + "size": 1001 + }, + "source/loader-verification.json": { + "sha256": "086b7c5481cfbae5ee958b3bdeb85264128c59142fb005611bd837533fbdf7b0", + "size": 1395 + }, + "source/model.safetensors": { + "sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1", + "size": 571000 + }, + "source/panel.binding.json": { + "sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "size": 3506 + }, + "source/panel.sha256.json": { + "sha256": "7fbfbaa8a3b1d7533177e1c2e774f5686e6a3f6b9564be7f2a99d0f66bff92fd", + "size": 2939 + }, + "source/panel/arrays/causal-mask-64.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "source/panel/arrays/final-0000.tokens.npy": { + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af", + "size": 384 + }, + "source/panel/arrays/final-0001.tokens.npy": { + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea", + "size": 384 + }, + "source/panel/arrays/final-0002.tokens.npy": { + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c", + "size": 384 + }, + "source/panel/arrays/final-0003.tokens.npy": { + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a", + "size": 384 + }, + "source/panel/panel.json": { + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6", + "size": 4195 + }, + "source/panel/panel.receipt.json": { + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "size": 7808 + }, + "source/qfs-source.json": { + "sha256": "624fc5b9568aa8bf12b1fc5cb3d54aef94d5e5ad72d73a55bd761dd6ca659cae", + "size": 655 + }, + "source/requirements-cpu.txt": { + "sha256": "3bfca77a0c0a4a197ae8fdede60dba8c2c9bedf908b7138036409697f58bc4e8", + "size": 696 + }, + "source/tokenizer.json": { + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "size": 6763 + }, + "source/tokenizer_config.json": { + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63", + "size": 236 + }, + "source/verify_cpu.py": { + "sha256": "2e507993f0085a72d5236527942a7143fd036d56b82223b26e90889de5cd9f98", + "size": 18036 + } + }, + "original_model": "/tmp/qfs-quant-microfloat-release/stage-main/modelopt-mixed" + }, + "candidate:modelopt-nvfp4": { + "files": { + "evidence/candidate/README.md": { + "sha256": "01fe610eaf77b35a23fdb66d55b2256ea9a21b4ca30490a0aca2f77d48bf2612", + "size": 3674 + }, + "evidence/candidate/capture/hidden_0000.safetensors": { + "sha256": "95ae792612a09ab7981fd568edc2151ad16b739f58d0778664ee6728dc25cdeb", + "size": 8337 + }, + "evidence/candidate/capture/hidden_0001.safetensors": { + "sha256": "d70646e6758e6a17c9cc1a70ce6feb43050f98013e1835fd66ab905c2bc36b82", + "size": 8337 + }, + "evidence/candidate/capture/hidden_0002.safetensors": { + "sha256": "4ae420424ce1fcc680883425c5bb6b054c9dab7a0613b2e556b8a8e5c8acc6c7", + "size": 8337 + }, + "evidence/candidate/capture/hidden_0003.safetensors": { + "sha256": "d05493ad9cb77584d6105a9902dd3cb236f6b02c38474bda10a0bc753e4e4314", + "size": 8337 + }, + "evidence/candidate/capture/manifest.json": { + "sha256": "da682fe4e6d61719b34a17f08bbeb1f3c09d46eef3ce09653f8fce0a32af087f", + "size": 5897 + }, + "evidence/candidate/checksums.txt": { + "sha256": "e3eb417ccf2d617559fb939ac1109132978827a3b4acafe5dee52ae9dac1ca98", + "size": 1868 + }, + "evidence/candidate/fidelity-dataset.json": { + "sha256": "630645250806ce64351238c0ba278e9495ff81b22bd1372ca3ea5b8e4241aa53", + "size": 16795 + }, + "evidence/candidate/head/head.json": { + "sha256": "777b038f747bed25d1f5db8adbfd2a78c7762fb5c870ff8c3c785a984d48a168", + "size": 1105 + }, + "evidence/candidate/head/weight.safetensors": { + "sha256": "07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913", + "size": 33365 + }, + "evidence/candidate/panel/masks/context-0000.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/candidate/panel/masks/context-0001.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/candidate/panel/masks/context-0002.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/candidate/panel/masks/context-0003.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/candidate/panel/panel-receipt.json": { + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "size": 7808 + }, + "evidence/candidate/panel/panel.json": { + "sha256": "68efa258ea3c5d4ba759c3c15aadd6e8c984711831bea3f335903109345cdcef", + "size": 7650 + }, + "evidence/candidate/panel/tokens/context-0000.json": { + "sha256": "08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315", + "size": 202 + }, + "evidence/candidate/panel/tokens/context-0001.json": { + "sha256": "5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46", + "size": 203 + }, + "evidence/candidate/panel/tokens/context-0002.json": { + "sha256": "51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07", + "size": 204 + }, + "evidence/candidate/panel/tokens/context-0003.json": { + "sha256": "8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d", + "size": 203 + }, + "evidence/candidate/runtime/capture-runtime.json": { + "sha256": "5b627d516f779bb56427e7c47e92f988636771a861296b6d736635b3cbae3b04", + "size": 12187 + }, + "evidence/candidate/validation/structural-validation.json": { + "sha256": "d3024ee8845d123018358b9c98a844bcdc3c985fbbc92d9e1b8565b121fe8a45", + "size": 381 + }, + "evidence/capture-candidate.stderr.log": { + "sha256": "71d22894e0b0ec8372c04d0c8bb085c71be140d9ba8f0336d7de7251088d424d", + "size": 717 + }, + "evidence/capture-candidate.stdout.log": { + "sha256": "345aa096c5364c4c96d38073a5d76fc63d70a5a15060b75e5f223a494268571f", + "size": 5471 + }, + "evidence/capture-root.stderr.log": { + "sha256": "2ac5b8c74f4b10395287d8fee9f42f01b8dd6e8dab99d9d5f45e85ada5a8cc10", + "size": 718 + }, + "evidence/capture-root.stdout.log": { + "sha256": "212dfa0af4b5a7aa912c868b5c90167972b932ef4413197f4b50ac68ae0970f9", + "size": 4591 + }, + "evidence/commands.json": { + "sha256": "4e24632d76fcfe376abcfe7243d11741c957e614cbb1e995a517b888b0bd3594", + "size": 4230 + }, + "evidence/compare.stderr.log": { + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "size": 0 + }, + "evidence/compare.stdout.log": { + "sha256": "537f3c96248bc2905cb48f6a58bf8bdd6e8ec1834647a1fc4d1b990c19dd80a9", + "size": 954 + }, + "evidence/comparison/comparison-receipt.json": { + "sha256": "5dcaf9dda1bf5084fa38578a18531f6aed8c99ee64aedffee8f70b1c4063bb4b", + "size": 16804 + }, + "evidence/comparison/tokenwise-kld.npy": { + "sha256": "f2f79e8dcdb0b258d751ff25789d977f83e967073034bc2f5c18dae4eb0c0d46", + "size": 2144 + }, + "evidence/panel-binding.json": { + "sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "size": 3506 + }, + "evidence/root/README.md": { + "sha256": "df28a18b7e9c0d39ac079235136da25818038cc09314a890063058e94bf1c226", + "size": 3452 + }, + "evidence/root/capture/hidden_0000.safetensors": { + "sha256": "35644ef03cebd9198c2e2454f2fda21bb096455091a2f2bc808abc5f3c6efdd3", + "size": 8337 + }, + "evidence/root/capture/hidden_0001.safetensors": { + "sha256": "9094ab9af1fdcf560bc7f7455692599ca9668314681eaa40f19b079400fba447", + "size": 8337 + }, + "evidence/root/capture/hidden_0002.safetensors": { + "sha256": "eef84a1a12323c4de257ea4d787fbc9255e298253385dbb80b19e96491a18460", + "size": 8337 + }, + "evidence/root/capture/hidden_0003.safetensors": { + "sha256": "efad24b8ba179b06415dfe2af31f61c4bef63135a07bd33f46b4750c083a5025", + "size": 8337 + }, + "evidence/root/capture/manifest.json": { + "sha256": "06407746aa2ffd5f58a8b22055be6c4676783e40806d9f84f95d5ea3db829a41", + "size": 5897 + }, + "evidence/root/checksums.txt": { + "sha256": "402a57b711097b609002c640dd2f3b6f7453f1e393d3caea3af9cd4c1d2ec38f", + "size": 1868 + }, + "evidence/root/fidelity-dataset.json": { + "sha256": "99564dc3b3c2f531c8d67c9fc933fa6d876f41816e3e981cc252b936440f9308", + "size": 12796 + }, + "evidence/root/head/head.json": { + "sha256": "777b038f747bed25d1f5db8adbfd2a78c7762fb5c870ff8c3c785a984d48a168", + "size": 1105 + }, + "evidence/root/head/weight.safetensors": { + "sha256": "07b6cafe9bd551f79e76e98d2fd2441927a2244bd30e93b528b525bf4db1b913", + "size": 33365 + }, + "evidence/root/panel/masks/context-0000.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/root/panel/masks/context-0001.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/root/panel/masks/context-0002.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/root/panel/masks/context-0003.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "evidence/root/panel/panel-receipt.json": { + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "size": 7808 + }, + "evidence/root/panel/panel.json": { + "sha256": "68efa258ea3c5d4ba759c3c15aadd6e8c984711831bea3f335903109345cdcef", + "size": 7650 + }, + "evidence/root/panel/tokens/context-0000.json": { + "sha256": "08f8d8d449f7f679b24ada75dc4db5b0108508e16ccefb0f61cad6144593e315", + "size": 202 + }, + "evidence/root/panel/tokens/context-0001.json": { + "sha256": "5bc88e4e47faf077b2fc85ae0758eee5308003ff0fefa5d6691a7f24f22ecc46", + "size": 203 + }, + "evidence/root/panel/tokens/context-0002.json": { + "sha256": "51b956fbf40161ce10fe3da6c1e186368a567676467030535468064aea0d7d07", + "size": 204 + }, + "evidence/root/panel/tokens/context-0003.json": { + "sha256": "8653267d2a6dc67550759c29ccb80a7a5529d927e6c367c681f5018d55497a2d", + "size": 203 + }, + "evidence/root/runtime/capture-runtime.json": { + "sha256": "12e5a219cfd5d0b892e6e992b5fa1cf804dac8763383feeb854530390e63c7f4", + "size": 9997 + }, + "evidence/root/validation/structural-validation.json": { + "sha256": "769c103cf430360bf1b79a4d027f5bd073ce3f61204d9da77adf3ad494c27e73", + "size": 376 + }, + "evidence/smoke-evidence.json": { + "sha256": "7396a99a3a352dab54b0f89a7303b3efa4e9746469e8f7539c893df7385b2900", + "size": 1760 + }, + "model/LICENSE": { + "sha256": "6456969dd395bff476628945088b4cbd9d9c761b01a64e281c07b09daf9f94c3", + "size": 1071 + }, + "model/build-manifest.json": { + "sha256": "57d74b2e6dcc8a789f51f86d251e51b2ec73c6772c329ad56f6132e08626eced", + "size": 41130 + }, + "model/config.json": { + "sha256": "932f17d4ee472ee814a296cfa3b521bf0b9daefc57cef0f3406995fdb341e7fe", + "size": 1641 + }, + "model/cpu-comparison-receipt.json": { + "sha256": "fcfcee1383dc0d50b42bbd97c9f2fc5ebe127c97cab791eeac01bf530d06f178", + "size": 15861 + }, + "model/cpu-reproduction-summary.json": { + "sha256": "41f8263ddacbac1379c67637f83fdef2ed843ca4973179817531855939866a55", + "size": 40258 + }, + "model/generation_config.json": { + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "size": 216 + }, + "model/hub-checkpoint-verification.json": { + "sha256": "3a4681f9c2876da6ae303592ede176ab17c6abdface107683fa2fe8386de7d36", + "size": 1001 + }, + "model/loader-verification.json": { + "sha256": "086b7c5481cfbae5ee958b3bdeb85264128c59142fb005611bd837533fbdf7b0", + "size": 1395 + }, + "model/model.safetensors": { + "sha256": "07cf6fbb7ad67852d9fc66c58d94e7d9e09dafc04f1358523a80cd1478c58004", + "size": 247760 + }, + "model/model.safetensors.index.json": { + "sha256": "2d67927b83c1396fade9bd12166cfc81edb525d62cb3378ae7b4b472c00a8b12", + "size": 27738 + }, + "model/panel.binding.json": { + "sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "size": 3506 + }, + "model/panel.sha256.json": { + "sha256": "7fbfbaa8a3b1d7533177e1c2e774f5686e6a3f6b9564be7f2a99d0f66bff92fd", + "size": 2939 + }, + "model/provenance.json": { + "sha256": "f057d9995d8cff965cb26c507176d2f6f5c13d9c056e0a2d830d0a0f997927c2", + "size": 18911 + }, + "model/qfs-source.json": { + "sha256": "624fc5b9568aa8bf12b1fc5cb3d54aef94d5e5ad72d73a55bd761dd6ca659cae", + "size": 655 + }, + "model/scope.json": { + "sha256": "5e1d9091e1fe20d5f4e87d1f0d0c4deda441a099ba485105315c9f21a16cc822", + "size": 5290 + }, + "model/tokenizer.json": { + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "size": 6763 + }, + "model/tokenizer_config.json": { + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63", + "size": 236 + }, + "source-pin-evidence.json": { + "sha256": "f057d9995d8cff965cb26c507176d2f6f5c13d9c056e0a2d830d0a0f997927c2", + "size": 18911 + }, + "source/LICENSE": { + "sha256": "6456969dd395bff476628945088b4cbd9d9c761b01a64e281c07b09daf9f94c3", + "size": 1071 + }, + "source/README.md": { + "sha256": "7921e3c1d32b3fc7b9541320459c5803627778aa0458733ab13ae46729c37c6b", + "size": 9030 + }, + "source/build-manifest.json": { + "sha256": "57d74b2e6dcc8a789f51f86d251e51b2ec73c6772c329ad56f6132e08626eced", + "size": 41130 + }, + "source/build_fixture.py": { + "sha256": "19c3489f1bc7e8e9323cb26afbead562816a6918d6823af252eb6d04dff8e81e", + "size": 8262 + }, + "source/build_panel.py": { + "sha256": "f17b17262816676d6ededcc969756ac07ff991eab73117040ec41005f6ff63f3", + "size": 13878 + }, + "source/config.json": { + "sha256": "7d5880677655ece868c12425a204f539243244af121bc8ad09b881a7546930d7", + "size": 1479 + }, + "source/cpu-comparison-receipt.json": { + "sha256": "fcfcee1383dc0d50b42bbd97c9f2fc5ebe127c97cab791eeac01bf530d06f178", + "size": 15861 + }, + "source/cpu-reproduction-summary.json": { + "sha256": "41f8263ddacbac1379c67637f83fdef2ed843ca4973179817531855939866a55", + "size": 40258 + }, + "source/generation_config.json": { + "sha256": "1d59e0fb61ca550ea84bd37a6bdf553ab364bc2689b17ba69f6a1adbc9d61e34", + "size": 216 + }, + "source/hub-checkpoint-verification.json": { + "sha256": "3a4681f9c2876da6ae303592ede176ab17c6abdface107683fa2fe8386de7d36", + "size": 1001 + }, + "source/loader-verification.json": { + "sha256": "086b7c5481cfbae5ee958b3bdeb85264128c59142fb005611bd837533fbdf7b0", + "size": 1395 + }, + "source/model.safetensors": { + "sha256": "9efe50a1685e157c1b99c3824094cf4fe269c7d332bdd0006145264949c5cec1", + "size": 571000 + }, + "source/panel.binding.json": { + "sha256": "333b063b8f4cac60c9ee62a8a4cc5913dbdb3c7e3055680dcc3fa7bc5c208d69", + "size": 3506 + }, + "source/panel.sha256.json": { + "sha256": "7fbfbaa8a3b1d7533177e1c2e774f5686e6a3f6b9564be7f2a99d0f66bff92fd", + "size": 2939 + }, + "source/panel/arrays/causal-mask-64.npy": { + "sha256": "a38fba8bfd9cd25a81b0e37fa144e8e13e84f769ae7f609ceebc94a64f4f5d02", + "size": 192 + }, + "source/panel/arrays/final-0000.tokens.npy": { + "sha256": "d60234f4b3b6044fb21eca18f7df82de9822f388e4d93d19d8a4eb69d6d490af", + "size": 384 + }, + "source/panel/arrays/final-0001.tokens.npy": { + "sha256": "20188213e4dfaaed04b1396a4ec46a5a2a6236c87d870c64d7102568d585ceea", + "size": 384 + }, + "source/panel/arrays/final-0002.tokens.npy": { + "sha256": "00341b323c286034a1c3a80ae66318cb6ce67153c08b1eedf6990b7a0310662c", + "size": 384 + }, + "source/panel/arrays/final-0003.tokens.npy": { + "sha256": "a13ec9b40a39027396ec752ee8595e0613569b78e27ef25d254f4f9a82d8775a", + "size": 384 + }, + "source/panel/panel.json": { + "sha256": "fe67acc87ce549ce174fa521a775e9e41c8e1ccbc66155ee673a080fea5e24a6", + "size": 4195 + }, + "source/panel/panel.receipt.json": { + "sha256": "b0ffc18b0de3b30bb797855a55097083222f6c651bf207dad58c3a7f02384263", + "size": 7808 + }, + "source/qfs-source.json": { + "sha256": "624fc5b9568aa8bf12b1fc5cb3d54aef94d5e5ad72d73a55bd761dd6ca659cae", + "size": 655 + }, + "source/requirements-cpu.txt": { + "sha256": "3bfca77a0c0a4a197ae8fdede60dba8c2c9bedf908b7138036409697f58bc4e8", + "size": 696 + }, + "source/tokenizer.json": { + "sha256": "8557198de5989f11dc18c955f6bc98143d2f301c141a8dcab7461a14f78591da", + "size": 6763 + }, + "source/tokenizer_config.json": { + "sha256": "e0b489082ac322f131a544ca0833983e1cecb99c2817b2e72184e5ffbdb6ce63", + "size": 236 + }, + "source/verify_cpu.py": { + "sha256": "2e507993f0085a72d5236527942a7143fd036d56b82223b26e90889de5cd9f98", + "size": 18036 + } + }, + "original_model": "/tmp/qfs-quant-microfloat-release/stage-main/modelopt-nvfp4" + }, + "engines--tools--affine_surface.py": { + "files": { + "engines--tools--affine_surface.py": { + "sha256": "37e7074797d53ae836e0af12fdbd2dc36c88778098aa44c72c1cd936d2b4c053", + "size": 19161 + } + }, + "kind": "source", + "original_path": "/tmp/qfs-explorer-development/engines/tools/affine_surface.py" + }, + "engines--tools--gguf_qwen35.py": { + "files": { + "engines--tools--gguf_qwen35.py": { + "sha256": "fba136fc40523d13083a1683efe91f91e004b2181162f9198aed0da6d9654e12", + "size": 14581 + } + }, + "kind": "source", + "original_path": "/tmp/qfs-explorer-development/engines/tools/gguf_qwen35.py" + }, + "engines--tools--gguf_surface.py": { + "files": { + "engines--tools--gguf_surface.py": { + "sha256": "2f3a5fbab7aedb9675cfc8541173d24247e73190bead9acec7ba306034f0316a", + "size": 138552 + } + }, + "kind": "source", + "original_path": "/tmp/qfs-explorer-development/engines/tools/gguf_surface.py" + }, + "engines--tools--hf_capture.py": { + "files": { + "engines--tools--hf_capture.py": { + "sha256": "44afcdac9f7c9cb26a35a2b7d9c1aed562344b76c8045a753651d2f2dbae99d0", + "size": 162766 + } + }, + "kind": "source", + "original_path": "/tmp/qfs-explorer-development/engines/tools/hf_capture.py" + }, + "engines--tools--layer_outer.py": { + "files": { + "engines--tools--layer_outer.py": { + "sha256": "e3ea5715112663b1b60cf596eeffc2140e49b399809ece89a174bce41a969274", + "size": 202609 + } + }, + "kind": "source", + "original_path": "/tmp/qfs-explorer-development/engines/tools/layer_outer.py" + }, + "engines--tools--microscale_surface.py": { + "files": { + "engines--tools--microscale_surface.py": { + "sha256": "588923f0a4700436221923c794a8c112971d9f08e75c746742b0f0ede7921682", + "size": 27085 + } + }, + "kind": "source", + "original_path": "/tmp/qfs-explorer-development/engines/tools/microscale_surface.py" + }, + "engines--tools--quant_stream.py": { + "files": { + "engines--tools--quant_stream.py": { + "sha256": "7c6cc4cbe399d066eaff80ccf1e3d3190185f194644f738a404d3c537ad8e1ab", + "size": 9765 + } + }, + "kind": "source", + "original_path": "/tmp/qfs-explorer-development/engines/tools/quant_stream.py" + }, + "oracle-report.json": { + "files": { + "oracle-report.json": { + "sha256": "5eb90b5808b7429f88f74c4f7c2f38cc8ee3f6df7b109acd58e8978dd64fe2f2", + "size": 2303 + } + }, + "kind": "oracle", + "original_path": "/tmp/qfs-quant-microfloat-release/probe-main.json" + }, + "publisher": { + "original_path": "/tmp/qfs-quant-integration/publish_fixtures.py", + "sha256": "149e90fbe82161f89c0309ffecd2b8174d869ced952587a311c3515103165a99" + }, + "requirements-verified.txt": { + "files": { + "requirements-verified.txt": { + "sha256": "7979a93952e9afcb1a8f045ff3db6cdb3f0c2a82f27de2ef1f24ccfcf9870efd", + "size": 847 + } + }, + "kind": "dependency", + "original_path": "/tmp/qfs-quant-integration/requirements-verified.txt" + }, + "smoke_capture.py": { + "files": { + "smoke_capture.py": { + "sha256": "12c30125b750f9095e4fd704c18679cdfd3c564b789a5ed52f5a1ccc8281e224", + "size": 5891 + } + }, + "kind": "script", + "original_path": "/tmp/qfs-quant-integration/smoke_capture.py" + } +}