Upload app.py
Browse files
app.py
CHANGED
|
@@ -44,7 +44,7 @@ def load_model():
|
|
| 44 |
|
| 45 |
#model.load_state_dict(torch.load(checkpoint_path, map_location=torch.device('cpu')))
|
| 46 |
checkpoint = torch.load(checkpoint_path, map_location=device)
|
| 47 |
-
config = checkpoint['config']
|
| 48 |
model = SmolLM(vocab_size, embed_dim, num_heads, num_layers, max_seq_len)
|
| 49 |
model.load_state_dict(checkpoint['model_state_dict'])
|
| 50 |
model.to(device)
|
|
|
|
| 44 |
|
| 45 |
#model.load_state_dict(torch.load(checkpoint_path, map_location=torch.device('cpu')))
|
| 46 |
checkpoint = torch.load(checkpoint_path, map_location=device)
|
| 47 |
+
#config = checkpoint['config']
|
| 48 |
model = SmolLM(vocab_size, embed_dim, num_heads, num_layers, max_seq_len)
|
| 49 |
model.load_state_dict(checkpoint['model_state_dict'])
|
| 50 |
model.to(device)
|