Feature Extraction
Transformers
Safetensors
protenrich
proteins
bioinformatics
drug-discovery
custom_code
Run this model with HF Jobs
Run SaeedLab/ProtEnrich-ProtBERT on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/SaeedLab/ProtEnrich-ProtBERT. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/SaeedLab/ProtEnrich-ProtBERT on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use SaeedLab/ProtEnrich-ProtBERT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SaeedLab/ProtEnrich-ProtBERT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="SaeedLab/ProtEnrich-ProtBERT", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("SaeedLab/ProtEnrich-ProtBERT", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
b482fe2
1
Parent(s): 65ad73f
upload
Browse files1# ProtBERT12345678910111213141516171819202122232425# ProtBERT```pythonfrom transformers import AutoTokenizer, AutoModelimport torchtokenizer = AutoTokenizer.from_pretrained("Rostlab/prot_bert")encoder = AutoModel.from_pretrained("Rostlab/prot_bert")protenrich = AutoModel.from_pretrained("SaeedLab/ProtEnrich-ProtBERT", trust_remote_code=True)seqs = ["MKTFFVLLL"]seqs = [" ".join(i) for i in seqs]inputs = tokenizer(seqs, return_tensors="pt", padding=True)with torch.no_grad():outputs = encoder(**inputs)pooled = outputs.last_hidden_state[0, 1:-1].mean(axis=0)enriched = protenrich(pooled)print('H enrich:', enriched.h_enrich)print('H anchor:', enriched.h_anchor)print('H algn:', enriched.h_algn)print('Structure:', enriched.struct)print('Dynamics:', enriched.dyn)```
README.md+25-1