Downloads · 30 days
25
100% of all-time downloads
palsetuf/BacPT-large
BacPT-large is a feature extraction model from palsetuf. Use it when you need embeddings to search or compare text. It is set up for transformers. The card lists the license as mit.
BacPT-large is a bacterial proteome foundation model that contextualizes ESM2 protein embeddings using the order of proteins in a genome. It uses a 19-layer RoFormer backbone with rotary position embeddings and contai…
Downloads · 30 days
25
100% of all-time downloads
All-time downloads
25
Public
Parameters
74.4M
298 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors298 MB · 100%
From the Hugging Face model README
BacPT-large is a bacterial proteome foundation model that contextualizes ESM2 protein embeddings using the order of proteins in a genome. It uses a 19-layer RoFormer backbone with rotary position embeddings and contains 74,387,328 parameters.
This repository contains the inference-only weights from training checkpoint epoch 1099, the exact model configuration, and the fitted input scaler.
The command accepts a protein FASTA already ordered by genomic position. It does not annotate a nucleotide genome or determine gene order. The supplied pipeline:
esm2_t12_35M_UR50D, averaging layer 12 over amino-acid positions;pip install -r requirements.txt
Download this model repository and run:
python inference.py \
--fasta ordered_proteins.faa \
--output bacpt_large_embeddings.npz \
--device cuda
The original FAIR ESM v2.0.0 code and ESM2 weights are downloaded through
PyTorch Hub on first use. Add --all-layers to retain every hidden layer.
The output NPZ contains:
protein_ids: identifiers in model order;last_hidden_state: contextual protein embeddings with shape
[proteins, 480];reconstruction: reconstructed ESM2 vectors produced by the self-supervised
training head, with shape [proteins, 480];omitted_protein_ids: proteins longer than 2,250 amino acids; andtruncated_protein_ids: proteins beyond model position 5,000.With --all-layers, it also contains hidden_states with shape
[20, proteins, 480], including the embedding output and all 19 transformer
layers.
CPU inference is supported in float32. CUDA inference uses float16 autocasting to reproduce the original inference procedure more closely.
BacPT-large produces contextual representations for proteins in complete or draft bacterial proteomes. These representations are intended as features for research tasks such as functional, genomic-context, trait, and ecological prediction.
The model expects proteins to be provided in genomic order. It does not annotate genomes, translate nucleotide sequences, handle circular-genome rotation, or choose an ordering for unordered proteins. It was trained on bacterial genomes and has not been validated as a general model for archaeal, eukaryotic, or viral proteomes. Downstream predictions require separate task models and validation.
Bacterial proteome foundation model enhances functional prediction from enzymes to ecological interactions. Citation details will be added when the manuscript record is public.