Text Generation
Transformers
PyTorch
English
prot2text
feature-extraction
Causal Language Modeling
GPT2
ESM2
Proteins
GNN
custom_code
Instructions to use habdine/Prot2Text-Small-v1-0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use habdine/Prot2Text-Small-v1-0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="habdine/Prot2Text-Small-v1-0", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("habdine/Prot2Text-Small-v1-0", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use habdine/Prot2Text-Small-v1-0 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-0" # 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-0", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/habdine/Prot2Text-Small-v1-0
- SGLang
How to use habdine/Prot2Text-Small-v1-0 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-0" \ --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-0", "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-0" \ --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-0", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use habdine/Prot2Text-Small-v1-0 with Docker Model Runner:
docker model run hf.co/habdine/Prot2Text-Small-v1-0
Upload README.md
Browse files
README.md
CHANGED
|
@@ -9,8 +9,17 @@ library_name: transformers
|
|
| 9 |
pipeline_tag: text-generation
|
| 10 |
language:
|
| 11 |
- en
|
| 12 |
-
|
| 13 |
license: cc-by-nc-4.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
---
|
| 15 |
# Prot2Text Model Card
|
| 16 |
|
|
@@ -20,7 +29,7 @@ license: cc-by-nc-4.0
|
|
| 20 |
**Paper:** [https://arxiv.org/abs/2307.14367](https://arxiv.org/abs/2307.14367) <br>
|
| 21 |
**Github:** [https://github.com/hadi-abdine/Prot2Text](https://github.com/hadi-abdine/Prot2Text) <br>
|
| 22 |
**Authors:** Hadi Abdine<sup>(1)</sup>, Michail Chatzianastasis<sup>(1)</sup>, Costas Bouyioukos<sup>(2, 3)</sup>, Michalis Vazirgiannis<sup>(1)</sup><br>
|
| 23 |
-
<sup>**(1)**</sup>DaSciM, LIX,
|
| 24 |
<sup>**(2)**</sup>Epigenetics and Cell Fate, CNRS UMR7216, Université Paris Cité, Paris, France.<br>
|
| 25 |
<sup>**(3)**</sup>Bioinformatics Research Laboratory, Department of Biological Sciences, University of Cyprus, Nicosia, Cyprus.<br>
|
| 26 |
|
|
|
|
| 9 |
pipeline_tag: text-generation
|
| 10 |
language:
|
| 11 |
- en
|
|
|
|
| 12 |
license: cc-by-nc-4.0
|
| 13 |
+
datasets:
|
| 14 |
+
- habdine/Prot2Text-Data
|
| 15 |
+
metrics:
|
| 16 |
+
- bertscore
|
| 17 |
+
- bleu
|
| 18 |
+
- rouge
|
| 19 |
+
base_model:
|
| 20 |
+
- openai-community/gpt2
|
| 21 |
+
- facebook/esm2_t12_35M_UR50D
|
| 22 |
+
- facebook/esm2_t6_8M_UR50D
|
| 23 |
---
|
| 24 |
# Prot2Text Model Card
|
| 25 |
|
|
|
|
| 29 |
**Paper:** [https://arxiv.org/abs/2307.14367](https://arxiv.org/abs/2307.14367) <br>
|
| 30 |
**Github:** [https://github.com/hadi-abdine/Prot2Text](https://github.com/hadi-abdine/Prot2Text) <br>
|
| 31 |
**Authors:** Hadi Abdine<sup>(1)</sup>, Michail Chatzianastasis<sup>(1)</sup>, Costas Bouyioukos<sup>(2, 3)</sup>, Michalis Vazirgiannis<sup>(1)</sup><br>
|
| 32 |
+
<sup>**(1)**</sup>DaSciM, LIX, École Polytechnique, Institut Polytechnique de Paris, France.<br>
|
| 33 |
<sup>**(2)**</sup>Epigenetics and Cell Fate, CNRS UMR7216, Université Paris Cité, Paris, France.<br>
|
| 34 |
<sup>**(3)**</sup>Bioinformatics Research Laboratory, Department of Biological Sciences, University of Cyprus, Nicosia, Cyprus.<br>
|
| 35 |
|