Text Generation
Transformers
PyTorch
English
prot2text
feature-extraction
Causal Language Modeling
GPT2
ESM2
Proteins
GNN
custom_code
Instructions to use habdine/Prot2Text-Small-v1-1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use habdine/Prot2Text-Small-v1-1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="habdine/Prot2Text-Small-v1-1", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("habdine/Prot2Text-Small-v1-1", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use habdine/Prot2Text-Small-v1-1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "habdine/Prot2Text-Small-v1-1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "habdine/Prot2Text-Small-v1-1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/habdine/Prot2Text-Small-v1-1
- SGLang
How to use habdine/Prot2Text-Small-v1-1 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "habdine/Prot2Text-Small-v1-1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "habdine/Prot2Text-Small-v1-1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "habdine/Prot2Text-Small-v1-1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "habdine/Prot2Text-Small-v1-1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use habdine/Prot2Text-Small-v1-1 with Docker Model Runner:
docker model run hf.co/habdine/Prot2Text-Small-v1-1
Commit History
-
Update README.md
Verified signature216c68e -
Upload 2 files
Verified signature6b5811a -
Update README.md
Verified signature5099750 -
Upload README.md
Verified signatured688591 -
Update code
Verified signature78302d3 -
Update modeling_prot2text.py
Verified signatureb8cc45f -
Update modeling_prot2text.py
Verified signaturee1f8bd2 -
Update tokenizer_config.json
Verified signature549bc61 -
Update tokenizer_config.json
Verified signatured0be4a3 -
Update tokenizer_config.json
Verified signature4a6b61f -
Update tokenizer_config.json
Verified signature803d7dd -
Update tokenizer_config.json
Verified signature2b34ceb -
Update tokenizer_config.json
Verified signatureb6c5f36 -
Update modeling_prot2text.py
Verified signatureb83bac8 -
Update configuration_prot2text.py
Verified signature192c05b -
Update config.json
Verified signatureedd4de9 -
Update config.json
Verified signature102f38a -
Upload configuration_prot2text.py
Verified signature0a29ef9 -
Update config.json
Verified signature91dcd4d -
Update config.json
Verified signature05aad4f -
Update config.json
Verified signature0d80097 -
Upload code
Verified signaturee06705c -
Upload model and tokenizer
Verified signatured49d708 -
initial commit
Verified signaturea80b330