Created
May 19, 2026 08:14
-
-
Save joemaddalone/f07cf8a575e78ba9a61def91b3ae1bd8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import struct | |
| import main | |
| with open(main.pathToModel, 'rb') as f: | |
| magic = f.read(4).decode('utf-8') | |
| version = struct.unpack('<I', f.read(4))[0] | |
| tensor_count = struct.unpack('<Q', f.read(8))[0] | |
| kv_count = struct.unpack('<Q', f.read(8))[0] | |
| print(f'Magic: {magic}') | |
| print(f'Version: {version}') | |
| print(f'Tensors: {tensor_count}') | |
| print(f'Metadata pairs: {kv_count}')% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment