Text generation produces output sequences from an input context or prompt. The same next-token approach used for language and code can generate protein sequences, including de novo candidates for design and engineering. section 8.2
Operational tradeoffs shape how generation is deployed:
- Use prompts ranging from a starting amino acid to an oligomer, fragment, or complete protein. section 8.2
- Balance sequence quality against inference speed, hardware requirements, and compute cost. section 8.2 section 4.1
- Apply the workflow to general-purpose or domain-specific models exposed through Transformers and Accelerate. section 4.1
Generating de novo proteins
ProtGPT2 generates ten protein sequences in a zero-shot setting. Its outputs preserve features such as amino acid propensities, secondary-structure content, and globularity while exploring previously unseen protein-space regions. section 8.2
from transformers import pipeline
protgpt2 = pipeline('text-generation', model="nferruz/ProtGPT2")
Load ProtGPT2 through a Transformers text-generation pipeline before supplying prompts and generation settings. section 8.2



















