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/'")