mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2025-01-02 14:54:35 +00:00
remove script with unclear purpose
This commit is contained in:
parent
9af7f58b7b
commit
f7cb0a65ef
19
undump.py
19
undump.py
@ -1,19 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
import struct
|
|
||||||
import numpy as np
|
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
def undump(fn):
|
|
||||||
with open(fn, 'rb') as df:
|
|
||||||
dims = struct.unpack('=QQQQ', df.read(8*4))
|
|
||||||
(dsz,) = struct.unpack('=Q', df.read(8))
|
|
||||||
## assume f32
|
|
||||||
data = df.read(dsz)
|
|
||||||
data = [i for (i,) in struct.iter_unpack('=f', data)]
|
|
||||||
return np.array(data).reshape(dims).squeeze()
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
for dfn in sorted(Path('.').glob('*.dump')):
|
|
||||||
darr = undump(dfn)
|
|
||||||
print(f'{dfn}: {darr.shape}\n{darr}')
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user