algo2217 commited on
Commit
60df24b
·
verified ·
1 Parent(s): 87a2ece

Upload folder using huggingface_hub

Browse files
README.md CHANGED
@@ -5,3 +5,5 @@ This repository contains the final trained model and intermediate checkpoints.
5
  - The main directory contains the fully trained model (checkpoint 0).
6
  - The `checkpoints` directory contains all intermediate checkpoints.
7
 
 
 
 
5
  - The main directory contains the fully trained model (checkpoint 0).
6
  - The `checkpoints` directory contains all intermediate checkpoints.
7
 
8
+ Now updated to match tetrahedron format
9
+
checkpoints/checkpoint-100.pt CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:8ff7f82119e283431e20ac67a435fc12057b0eea0bab2394b03a5b579181ebd7
3
- size 3252234
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bdddf11f6c354f0fe93e9e0304366e3c753926157bc0ef8d6b726d850adcd139
3
+ size 2480362
checkpoints/checkpoint-25.pt CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:03c5f53e08a4c2801e6c15b60c4838fecfb00c65b15a114f48484f10bca5219d
3
- size 3252119
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b47a7288186dd7e81fc0b4dff55ea628b4305471cf642159bb5fbefdfdc6c927
3
+ size 2480328
checkpoints/checkpoint-50.pt CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:b2bfdfd1f19ac378a3558705f82912da77eadb4730893d62d8eb6d4345602158
3
- size 3252119
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:404c5ce1e19ed45746ed0d35635e4f1081dd1917fb12cae1b1a63ca7208bd0c7
3
+ size 2480328
checkpoints/checkpoint-75.pt CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:891f63bac1d31784a5978a8749d549b580ef6ba9027f2df95db216bbd0733a92
3
- size 3252119
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3beb8688ec66697e58f601b78412a8d38a05ff7f8fbf8cb0f9e91a2e2a51989e
3
+ size 2480328
convert_checkpoints.py ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # convert_and_replace.py
2
+ import os
3
+ from pathlib import Path
4
+
5
+ import torch
6
+
7
+
8
+ def convert_checkpoint_format(checkpoint_path):
9
+ """Convert nested format to direct format in place."""
10
+ # Load the checkpoint
11
+ checkpoint = torch.load(checkpoint_path, map_location='cpu')
12
+
13
+ # Extract just the model state dict
14
+ if 'model' in checkpoint:
15
+ model_state_dict = checkpoint['model']
16
+ print(f"Converting {checkpoint_path}: nested -> direct format")
17
+
18
+ # Save back in direct format
19
+ torch.save(model_state_dict, checkpoint_path)
20
+ print(f"Updated: {checkpoint_path}")
21
+ else:
22
+ print(f"Already in direct format: {checkpoint_path}")
23
+
24
+ def convert_all_checkpoints():
25
+ """Convert all checkpoint files in the current directory."""
26
+ checkpoints_dir = Path("checkpoints")
27
+
28
+ if not checkpoints_dir.exists():
29
+ print("No checkpoints directory found")
30
+ return
31
+
32
+ # Convert all .pt files
33
+ for checkpoint_file in checkpoints_dir.glob("*.pt"):
34
+ convert_checkpoint_format(checkpoint_file)
35
+
36
+ if __name__ == "__main__":
37
+ convert_all_checkpoints()