(path)
| 4 | import numpy as np, torch, gguf |
| 5 | |
| 6 | def parse_mvn(path): |
| 7 | with open(path) as f: txt=f.read() |
| 8 | b=[np.array([float(x) for x in m.split()],np.float32) for m in re.findall(r"\[([^\]]*)\]",txt)] |
| 9 | v=[x for x in b if x.size>1]; return v[0], v[1] # shift, scale (both 400-dim) |
| 10 | |
| 11 | def main(): |
| 12 | ap=argparse.ArgumentParser() |