File size: 585 Bytes
03f2ff2
 
7d6b4cd
 
5eff19f
03f2ff2
 
5eff19f
7d6b4cd
 
 
5eff19f
 
 
5044df2
5eff19f
 
 
7665fc0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import os
import torch
from evo_model import EvoTransformerForClassification, EvoTransformerConfig

# βœ… Create directory if it doesn't exist
os.makedirs("trained_model", exist_ok=True)

# βœ… Create config and model
config = EvoTransformerConfig()
model = EvoTransformerForClassification(config)

# βœ… Save like Hugging Face expects
torch.save(model.state_dict(), "trained_model/pytorch_model.bin")

# βœ… Save minimal config
with open("trained_model/config.json", "w") as f:
    f.write(config.to_json_string())

print("βœ… EvoTransformer initial model saved to 'trained_model/'")