Spaces:
Running
Running
File size: 503 Bytes
8e22eea |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# init_model.py
import os
import torch
from evo_model import EvoTransformerForClassification, EvoTransformerConfig
# β
Make sure the folder exists
os.makedirs("trained_model", exist_ok=True)
# β
Create config and model
config = EvoTransformerConfig()
model = EvoTransformerForClassification(config)
# β
Save the model and config in HF format
model.save_pretrained("trained_model") # includes config.json + pytorch_model.bin
print("β
EvoTransformer initial model saved to 'trained_model/'")
|