fix: memmap mode=r, tool parser json.loads, greedy decode

This commit is contained in:
2026-07-19 16:38:28 +08:00
parent 663ef900fc
commit 88ec786e39
4 changed files with 47 additions and 9 deletions
+1 -1
View File
@@ -100,7 +100,7 @@ def load_bin(file_path: str) -> Dict[str, List[Tensor]]:
arr = np.memmap(
os.path.join(file_path, f"{key}.bin"),
dtype=info["dtype"],
mode="r+",
mode="r",
shape=tuple(info["shape"]),
)
segments[key] = [torch.from_numpy(arr)]