Run this model with HF Jobs
Run mila-intel/protst-esm1b-for-sequential-classification 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/mila-intel/protst-esm1b-for-sequential-classification. 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/mila-intel/protst-esm1b-for-sequential-classification 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 mila-intel/protst-esm1b-for-sequential-classification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mila-intel/protst-esm1b-for-sequential-classification with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="mila-intel/protst-esm1b-for-sequential-classification", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("mila-intel/protst-esm1b-for-sequential-classification", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Delete configuration_protst.py
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051from transformers import PretrainedConfigfrom transformers.utils import loggingfrom transformers.models.esm import EsmConfigfrom transformers.models.bert import BertConfig
logger = logging.get_logger(__name__)
class ProtSTConfig(PretrainedConfig): r""" This is the configuration class to store the configuration of a [`ProtSTModel`]. Configuration objects inherit from [`PretrainedConfig`] and can be used to control the model outputs. Read the documentation from [`PretrainedConfig`] for more information. Args: protein_config (`dict`, *optional*): Dictionary of configuration options used to initialize [`EsmForProteinRepresentation`]. text_config (`dict`, *optional*): Dictionary of configuration options used to initialize [`BertForPubMed`]. ```"""
model_type = "protst"
def __init__( self, protein_config=None, text_config=None, **kwargs, ): super().__init__(**kwargs)
if protein_config is None: protein_config = {} logger.info("`protein_config` is `None`. Initializing the `ProtSTTextConfig` with default values.")
if text_config is None: text_config = {} logger.info("`text_config` is `None`. Initializing the `ProtSTVisionConfig` with default values.")
self.protein_config = EsmConfig(**protein_config) self.text_config = BertConfig(**text_config)
@classmethod def from_protein_text_configs( cls, protein_config: EsmConfig, text_config: BertConfig, **kwargs ): r""" Instantiate a [`ProtSTConfig`] (or a derived class) from ProtST text model configuration. Returns: [`ProtSTConfig`]: An instance of a configuration object """
return cls(protein_config=protein_config.to_dict(), text_config=text_config.to_dict(), **kwargs)configuration_protst.pyDeleted-51