genomenet/twin-uniref50-faiss
Twin-Model UniRef50 FAISS Index FAISS index over Twin model mean-pooled embeddings of all UniRef50 representative proteins (~49.8M). The Twin model is a two-tower contrastive encoder fine-tuned on Resnik GO similarity: Custom tower: AA-vocab Transformer → padding-masked mean pool → MLP → 512-dim ESM tower: facebook/esm2_t33_650M_UR50D (frozen) → masked mean pool → MLP → 512-dim Output: concat(custom, esm) → 1024-dim Checkpoint:… See the full description on the dataset page: https://huggingface.co/datasets/genomenet/twin-uniref50-faiss.
Twin-Model UniRef50 FAISS Index
FAISS index over Twin model mean-pooled embeddings of all UniRef50 representative proteins (~49.8M). The Twin model is a two-tower contrastive encoder fine-tuned on Resnik GO similarity:
- Custom tower: AA-vocab Transformer → padding-masked mean pool → MLP → 512-dim
- ESM tower:
facebook/esm2_t33_650M_UR50D(frozen) → masked mean pool → MLP → 512-dim - Output: concat(custom, esm) → 1024-dim
Checkpoint: train_point_BP_20251221_std_ft_bs32ga4/cp_best.pt (Biological Process aspect). Used by the genomenet/functional-distance Space alongside the ESM2 baseline index.
Files
Usage
import faiss, numpy as np
from huggingface_hub import snapshot_download
local = snapshot_download(repo_id="genomenet/twin-uniref50-faiss", repo_type="dataset")
index = faiss.read_index(f"{local}/twin_uniref50.index")
ids = np.load(f"{local}/ids.npy")
# Embed the query with the Twin encoder (1024-dim, L2-normalize), then:
# scores, idxs = index.search(query_emb, k=10)Embedding the query requires the Twin encoder (scripts/twin_baseline/twin_model.py in the upstream repo). The output of that encoder is what was indexed here.
