"Once I was zero epochs old, my model said to me... Go make yourself some predictions, don't wait for labeled data."
MKTAYIAKQRQISFVKSHFSRQLEERLGLIEVQAPILSRVGDGTQDNLSGAEKAVQVKVKALPDAQFEVVH...train_esm2_embeddings.pkl (427 MB) - Pre-computed ESM-2 embeddings for 82,404 training proteinstest_esm2_embeddings.pkl (1.16 GB) - Pre-computed ESM-2 embeddings for test proteinsgo_parser.pkl (25.7 MB) - Gene Ontology hierarchy parser with 40,122 GO terms.gitattributes - Git LFS configuration for large files| Ontology | Proteins with Labels | Avg Labels/Protein | Sparsity |
|---|---|---|---|
| MFO | 49,751 (60.4%) | 54.2 | 89.2% |
| BPO | 44,382 (53.9%) | 6.6 | 99.2% |
| CCO | 58,505 (71.0%) | 36.5 | 90.9% |
pip install torch biopython transformers huggingface_hub numpy1from huggingface_hub import hf_hub_download
2import pickle
3
4# Download embeddings
5embeddings_path = hf_hub_download(
6 repo_id="nl45/Protein1",
7 filename="train_esm2_embeddings.pkl"
8)
9
10# Load embeddings
11with open(embeddings_path, 'rb') as f:
12 embeddings = pickle.load(f)
13
14# embeddings is a dict: {protein_id: embedding_vector}
15print(f"Loaded embeddings for {len(embeddings)} proteins")
16print(f"Embedding dimension: {list(embeddings.values())[0].shape}")1from transformers import AutoTokenizer, EsmModel
2import torch
3
4# Load ESM-2 model
5tokenizer = AutoTokenizer.from_pretrained("facebook/esm2_t33_650M_UR50D")
6model = EsmModel.from_pretrained("facebook/esm2_t33_650M_UR50D")
7
8# Your protein sequence
9sequence = "MKTAYIAKQRQISFVKSHFSRQLE..."
10
11# Generate embedding
12inputs = tokenizer(sequence, return_tensors="pt", padding=True)
13with torch.no_grad():
14 outputs = model(**inputs)
15 embedding = outputs.last_hidden_state.mean(dim=1) # Shape: [1, 1280]
16
17print(f"Generated embedding shape: {embedding.shape}")1# Download GO parser
2parser_path = hf_hub_download(
3 repo_id="nl45/Protein1",
4 filename="go_parser.pkl"
5)
6
7# Load parser
8with open(parser_path, 'rb') as f:
9 go_parser = pickle.load(f)
10
11# Example: Get GO term information
12term_info = go_parser.get_term_info("GO:0003674")
13print(f"Term: {term_info['name']}")
14print(f"Namespace: {term_info['namespace']}")Input: ESM-2 Embeddings (1280-dim)
↓
[Dense 2048] → BatchNorm → ReLU → Dropout(0.3)
↓
[Dense 1024] → BatchNorm → ReLU → Dropout(0.3)
↓
[Dense 512] → BatchNorm → ReLU → Dropout(0.3)
↓
[Dense Output] → Sigmoid
↓
Multi-label Predictionsfacebook/esm2_t33_650M_UR50D1@misc{nl45_cafa6_2026,
2 title={CAFA 6 Protein Function Prediction with ESM-2 Embeddings},
3 author={nl45},
4 year={2026},
5 publisher={Hugging Face},
6 howpublished={\url{https://huggingface.co/nl45/Protein1}}
7}