mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-07-14 05:31:12 +08:00
Update convert.py
Docs are right, however, the code has a typo.
This commit is contained in:
parent
9a02dce35c
commit
2206e8f7d9
@ -16,7 +16,7 @@ if __name__ == "__main__":
|
|||||||
)
|
)
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
model_path = Path(args.model_path)
|
model_path = Path(args.model_path)
|
||||||
state = torch.load(str(model_path / "consolidated.00.pt"))
|
state = torch.load(str(model_path / "consolidated.00.pth"))
|
||||||
np.savez(
|
np.savez(
|
||||||
str(model_path / "weights.npz"),
|
str(model_path / "weights.npz"),
|
||||||
**{k: v.to(torch.float16).numpy() for k, v in state.items()},
|
**{k: v.to(torch.float16).numpy() for k, v in state.items()},
|
||||||
|
Loading…
Reference in New Issue
Block a user