Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import torch
|
|
5 |
def count_parameters(model_path):
|
6 |
try:
|
7 |
# Load model on CPU
|
8 |
-
model = AutoModel.from_pretrained(model_path, device_map="cpu")
|
9 |
|
10 |
# Count trainable parameters (accounting for weight tying)
|
11 |
unique_params = {}
|
|
|
5 |
def count_parameters(model_path):
|
6 |
try:
|
7 |
# Load model on CPU
|
8 |
+
model = AutoModel.from_pretrained(model_path, device_map="cpu", trust_remote_code=True)
|
9 |
|
10 |
# Count trainable parameters (accounting for weight tying)
|
11 |
unique_params = {}
|