from transformers import GPT2LMHeadModel | |
# Create model with random weights | |
model = GPT2LMHeadModel.from_pretrained("gpt2") | |
# Save the model weights | |
model.save_pretrained("LopezLLM") | |
# Verify the saved files | |
import os | |
print("Saved files:", os.listdir("LopezLLM")) | |