Downloads · 30 days
0
frankmorales2020/governed-evo2-7b-topo
governed-evo2-7b-topo is a machine learning model from frankmorales2020. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
CODE: https://github.com/frank-morales2020/AST/blob/main/EVO2TOPOAITRANSFORMERMULTRUNCORRECTED.ipynb
Downloads · 30 days
0
Access
Public
Updated Aug 7, 2026
Repo size
13.2 GB
Likes
0
Public
Click a slice to open those files.
.pt13.2 GB · 100%
From the Hugging Face model README
CODE: https://github.com/frank-morales2020/AST/blob/main/EVO2_TOPOAI_TRANSFORMER_MULTRUN_CORRECTED.ipynb
import torch
from huggingface_hub import hf_hub_download
from evo2 import Evo2
from warnings import filterwarnings
filterwarnings('ignore')
# 1. Initialize fresh base Evo 2 manager
device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')
print(f"Initializing official Evo 2 Manager for evo2_7b on {device}...")
evo_manager = Evo2('evo2_7b')
model = getattr(evo_manager, 'model', evo_manager)
# 2. Download your governed artifact directly from Hugging Face Hub
repo_id = "frankmorales2020/governed-evo2-7b-topo"
filename = "governed_evo2_weights.pt"
print(f"Downloading governed weights from Hugging Face Hub ({repo_id})...")
checkpoint_path = hf_hub_download(repo_id=repo_id, filename=filename)
# 3. Load the checkpoint and restore state
print("Restoring governed weights and TOPO invariant anchors...")
checkpoint = torch.load(checkpoint_path, map_location=device)
model.load_state_dict(checkpoint["model_state_dict"])
anchors = checkpoint["topo_anchors"]
print(f"Successfully loaded TOPO anchors for layers: {list(anchors.keys())}")
# 4. Run inference test
test_prompt = "ACGTTGCAATGCGATCG"
input_seqs = [test_prompt]
print(f"Running inference test with prompt: '{test_prompt}'")
generated_output = evo_manager.generate(
input_seqs,
n_tokens=30,
temperature=0.7,
top_k=4
)
print("\nInference Output from HF Loaded Governed Model:")
print(generated_output)