Create tf_model.h5
Browse files- tf_model.h5 +10 -0
tf_model.h5
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import TFGPT2LMHeadModel
|
2 |
+
|
3 |
+
# Load model
|
4 |
+
tf_model = TFGPT2LMHeadModel.from_pretrained("gpt2")
|
5 |
+
|
6 |
+
# Save TensorFlow model
|
7 |
+
tf_model.save_pretrained("LopezLLM", saved_model=False)
|
8 |
+
|
9 |
+
import os
|
10 |
+
print("Saved files:", os.listdir("LopezLLM"))
|