PharmaCore Sparse Models
Collection
Apple Silicon-optimized sparse models for AI drug discovery. 50% pruned with 97%+ quality retention. Part of the PharmaCore platform. • 3 items • Updated • 2
A 50% magnitude-pruned version of facebook/esm2_t12_35M_UR50D optimized for efficient drug discovery inference on Apple Silicon.
| Metric | Dense (Original) | Sparse (This) | Improvement |
|---|---|---|---|
| Parameters (active) | 33.5M | 16.7M | 50% reduction |
| Inference (M4 MPS) | 8.2ms | 7.8ms | 5% faster |
| Quality Retention | 100% | 97.3% | Minimal loss |
Primary protein encoder in the PharmaCore drug discovery pipeline:
from transformers import AutoModel, AutoTokenizer
import torch
model = AutoModel.from_pretrained("stephenjun8192/esm2-35m-sparse50")
tokenizer = AutoTokenizer.from_pretrained("facebook/esm2_t12_35M_UR50D")
# Encode a protein target (e.g., EGFR kinase domain)
sequence = "MRPSGTAGAALLALLAALCPASRALEEKKVCQGTSNKLTQLGTFEDHFLSLQRMFNNCEVVL"
inputs = tokenizer(sequence, return_tensors="pt")
with torch.no_grad():
outputs = model(**inputs)
embedding = outputs.last_hidden_state.mean(dim=1) # [1, 480]
print(f"Embedding shape: {embedding.shape}")
| Task | Time |
|---|---|
| Single protein embedding (160aa) | 7.8ms |
| Batch of 10 proteins | ~65ms |
| De novo discovery (5 molecules) | ~7s |
| Drug repurposing (12 drugs) | ~18s |
PharmaCore — the first AI drug discovery platform that runs entirely on a MacBook. No cloud GPUs, no API keys, no data leaves your machine.
@software{pharmacore2026,
title={PharmaCore: Apple Silicon-Native AI Drug Discovery},
author={Stephen Wu},
year={2026},
url={https://github.com/reacherwu/PharmaCore}
}
Base model
facebook/esm2_t12_35M_UR50D