rmagesh commited on
Commit
01458cd
·
verified ·
1 Parent(s): 08dec31

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +28 -0
app.py CHANGED
@@ -76,6 +76,34 @@ CHECKPOINT_PATH = os.path.join(
76
  print("LatticeSpike repo downloaded successfully.")
77
  print("Checkpoint:", CHECKPOINT_PATH)
78
  print("Checkpoint exists:", os.path.exists(CHECKPOINT_PATH))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
 
80
  # LLM_MODEL = "meta-llama/Llama-3.2-1B-Instruct"
81
  LLM_MODEL = "openai/gpt-oss-20b"
 
76
  print("LatticeSpike repo downloaded successfully.")
77
  print("Checkpoint:", CHECKPOINT_PATH)
78
  print("Checkpoint exists:", os.path.exists(CHECKPOINT_PATH))
79
+ print("Checkpoint exists:", os.path.exists(CHECKPOINT_PATH))
80
+
81
+ import torch
82
+ print("\n Loading RSNN checkpoint...")
83
+
84
+ checkpoint = torch.load(
85
+ CHECKPOINT_PATH,
86
+ map_location="cpu",
87
+ weights_only=False,
88
+
89
+ )
90
+ print("Checkpoint loaded successfully!")
91
+ print("Checkpoint type:", type(checkpoint))
92
+
93
+ if isinstance(checkpoint, dict):
94
+ print("Top-level keys:", checkpoint.keys())
95
+
96
+ # Print a little more information without dumping all weights
97
+ for key, value in checkpoint.items():
98
+ if isinstance(value, dict):
99
+ print(f"{key}: dict with {len(value)} entries")
100
+ print(" First few keys:", list(value.keys())[:10])
101
+ elif torch.is_tensor(value):
102
+ print(f"{key}: tensor {tuple(value.shape)}")
103
+ else:
104
+ print(f"{key}: {type(value)} -> {value}")
105
+
106
+
107
 
108
  # LLM_MODEL = "meta-llama/Llama-3.2-1B-Instruct"
109
  LLM_MODEL = "openai/gpt-oss-20b"