lintlintlint
This commit is contained in:
parent
c8c2e95069
commit
5315a5a8e4
1 changed files with 2 additions and 0 deletions
|
@ -6,6 +6,7 @@ from gguf.gguf_reader import GGUFReader
|
||||||
|
|
||||||
sys.path.insert(0, str(Path(__file__).parent.parent))
|
sys.path.insert(0, str(Path(__file__).parent.parent))
|
||||||
|
|
||||||
|
|
||||||
def read_gguf_file(gguf_file_path):
|
def read_gguf_file(gguf_file_path):
|
||||||
"""
|
"""
|
||||||
Reads and prints key-value pairs and tensor information from a GGUF file in an improved format.
|
Reads and prints key-value pairs and tensor information from a GGUF file in an improved format.
|
||||||
|
@ -35,6 +36,7 @@ def read_gguf_file(gguf_file_path):
|
||||||
quantization_str = tensor.tensor_type.name
|
quantization_str = tensor.tensor_type.name
|
||||||
print(tensor_info_format.format(tensor.name, shape_str, size_str, quantization_str))
|
print(tensor_info_format.format(tensor.name, shape_str, size_str, quantization_str))
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
if len(sys.argv) < 2:
|
if len(sys.argv) < 2:
|
||||||
print("Usage: reader.py <path_to_gguf_file>")
|
print("Usage: reader.py <path_to_gguf_file>")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue