torchcell.models.llm.PeptideModel

class PeptideModel(model_name: str)[source]

Bases: ABC

Abstract interface for peptide-sequence language models.

property max_sequence_size: int

Returns the maximum sequence size for the transformer model.

abstractmethod load_model(model_name: str) → None[source]

Load the tokenizer and model weights for the given model name.

abstractmethod embed(sequences: list[str], mean_embedding: bool = False) → Tensor[source]

Return embeddings for the given sequences.