Spaces:
Sleeping
Sleeping
Update model_split.py
Browse files- model_split.py +2 -2
model_split.py
CHANGED
|
@@ -60,6 +60,6 @@ def auto_split_model(model, num_stages=3, output_dir="model_stage_files"):
|
|
| 60 |
|
| 61 |
# === Example Usage ===
|
| 62 |
if __name__ == "__main__":
|
| 63 |
-
|
| 64 |
-
|
| 65 |
auto_split_model(model, num_stages=3)
|
|
|
|
| 60 |
|
| 61 |
# === Example Usage ===
|
| 62 |
if __name__ == "__main__":
|
| 63 |
+
from transformers import GPT2Model
|
| 64 |
+
model = GPT2Model.from_pretrained("gpt2")
|
| 65 |
auto_split_model(model, num_stages=3)
|