Downloads · 30 days
26
100% of all-time downloads
Shuofang127/ESMCapsid-C
ESMCapsid-C is a feature extraction model from Shuofang127. Use it when you need embeddings to search or compare text. It is set up for transformers. The card lists the license as other.
Downloads · 30 days
26
100% of all-time downloads
All-time downloads
26
Public
Parameters
575M
1.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.2 GB · 100%
From the Hugging Face model README
Built with ESM.
ESMCapsid-C is a continued masked-language-model fine-tune of Synthyra/ESMplusplus_large for the representation stage of the ESMCapsid workflow. The repository includes the model weights, tokenizer, configuration, and custom Transformers implementation required for loading the model.
ESM++ Large provides a Transformers-compatible implementation of ESMC 600M. ESMCapsid-C was initialized from that checkpoint and continued with masked-language-model training. In the released ESMCapsid pipeline, sequences passing the ESMCapsid-S screen are encoded with Layer 35 and attention-mask mean pooling.
| Property | Value |
|---|---|
| Base model | Synthyra/ESMplusplus_large |
| Model type | Continued MLM fine-tune |
| Transformer layers | 36 |
| Hidden size | 1,152 |
| Attention heads | 18 |
| ESMCapsid representation | Layer 35, attention-mask mean pooling |
pip install torch transformers tokenizers
import torch
from transformers import AutoModel, AutoTokenizer
model_id = "Shuofang127/ESMCapsid-C"
tokenizer = AutoTokenizer.from_pretrained(
model_id,
trust_remote_code=True,
)
model = AutoModel.from_pretrained(
model_id,
trust_remote_code=True,
).eval()
batch = tokenizer(
["MSTNPKPQRKTKRNT", "MKTIIALSYIFCLVFA"],
padding=True,
return_tensors="pt",
)
with torch.inference_mode():
output = model(**batch, output_hidden_states=True)
# hidden_states[0] is the input embedding; encoder Layer 35 is index 36.
layer35 = output.hidden_states[1 + 35]
mask = batch["attention_mask"].unsqueeze(-1).to(layer35.dtype)
embedding = (layer35 * mask).sum(dim=1) / mask.sum(dim=1).clamp_min(1)
print(embedding.shape) # (batch_size, 1152)
For offline loading, replace model_id with the local model directory and set local_files_only=True in both from_pretrained calls.
Shuofang127/ESMCapsid-S for candidate screening.trust_remote_code=True. Review the code before loading it.modeling_esm_plusplus.py is the runtime implementation for this release; features added later to the base repository are not automatically supported here.Synthyra/ESMplusplus_large, DOI 10.57967/hf/3726.10.5281/zenodo.16466575.10.64898/2026.09.06.749605.ESMCapsid-C is a derivative of ESM++ Large and ESMC 600M. Review the repository's LICENSE and NOTICE.txt before use or redistribution.