diff --git a/dump_checkpoint_keys.py b/dump_checkpoint_keys.py index a30953ae..53e3bcb0 100644 --- a/dump_checkpoint_keys.py +++ b/dump_checkpoint_keys.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -"""Dump checkpoint key names and shapes — attention and compressor keys only.""" +"""Dump checkpoint key names and shapes.""" import json from pathlib import Path @@ -11,16 +11,24 @@ def main(): if index_path.exists(): with open(index_path) as f: weight_map = json.load(f).get("weight_map", {}) + + # Get all unique prefixes for layer 0-3 and 59-60 for li in [0, 1, 2, 3, 59, 60]: prefix = f"model.layers.{li}." keys = sorted(k for k in weight_map if k.startswith(prefix)) - # Filter: show everything EXCEPT individual expert weights - filtered = [k for k in keys if '.experts.' not in k] - print(f"\n=== Layer {li} keys (non-expert) ===") - for k in filtered: + print(f"\n=== Layer {li} keys ({len(keys)} total) ===") + for k in keys: print(f" {k}") + + # Also show non-layer keys + other_keys = sorted(k for k in weight_map if not k.startswith("model.layers.")) + print(f"\n=== Non-layer keys ===") + for k in other_keys: + print(f" {k}") else: - print("No index file found!") + print("No index file found, listing directory...") + for f in sorted(cdir.glob("*.safetensors"))[:3]: + print(f" {f.name}") if __name__ == "__main__": main()