Update AppleAI-converter-colab.py
Browse files
AppleAI-converter-colab.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import os
|
2 |
-
os.system('pip install mlx')
|
3 |
import mlx as mx
|
4 |
import mlx.nn as mx_nn
|
5 |
import torch
|
@@ -71,4 +71,4 @@ except FileNotFoundError:
|
|
71 |
except FileNotFoundError:
|
72 |
print("No model file found, starting from scratch.")
|
73 |
weights = {k: v.detach().cpu().numpy() for k, v in model.state_dict().items()}
|
74 |
-
np.savez("chessy_model_mlx.npz", **weights)
|
|
|
1 |
import os
|
2 |
+
os.system('pip install mlx[cpu]')
|
3 |
import mlx as mx
|
4 |
import mlx.nn as mx_nn
|
5 |
import torch
|
|
|
71 |
except FileNotFoundError:
|
72 |
print("No model file found, starting from scratch.")
|
73 |
weights = {k: v.detach().cpu().numpy() for k, v in model.state_dict().items()}
|
74 |
+
np.savez("NeoChess/chessy_model_mlx.npz", **weights)
|