Text Generation
Transformers
PyTorch
TensorFlow
JAX
Safetensors
English
t5
text2text-generation
paraphrase-generation
Conditional Generation
text-generation-inference
Instructions to use Vamsi/T5_Paraphrase_Paws with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Vamsi/T5_Paraphrase_Paws with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Vamsi/T5_Paraphrase_Paws")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Vamsi/T5_Paraphrase_Paws") model = AutoModelForSeq2SeqLM.from_pretrained("Vamsi/T5_Paraphrase_Paws", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Vamsi/T5_Paraphrase_Paws with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Vamsi/T5_Paraphrase_Paws" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Vamsi/T5_Paraphrase_Paws", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Vamsi/T5_Paraphrase_Paws
- SGLang
How to use Vamsi/T5_Paraphrase_Paws 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 "Vamsi/T5_Paraphrase_Paws" \ --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": "Vamsi/T5_Paraphrase_Paws", "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 "Vamsi/T5_Paraphrase_Paws" \ --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": "Vamsi/T5_Paraphrase_Paws", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Vamsi/T5_Paraphrase_Paws with Docker Model Runner:
docker model run hf.co/Vamsi/T5_Paraphrase_Paws
Commit Β·
f8c3ded
1
Parent(s): c6a296c
Update README.md (#2)
Browse files- Update README.md (46805a927a5cc1843e50f7bf3f620fb554e2b359)
Co-authored-by: Gokul Adethya T <FrozenWolf@users.noreply.huggingface.co>
README.md
CHANGED
|
@@ -6,7 +6,7 @@ tags:
|
|
| 6 |
- Conditional Generation
|
| 7 |
inference: false
|
| 8 |
---
|
| 9 |
-
|
| 10 |
# Paraphrase-Generation
|
| 11 |
β
|
| 12 |
## Model description
|
|
@@ -14,14 +14,14 @@ inference: false
|
|
| 14 |
T5 Model for generating paraphrases of english sentences. Trained on the [Google PAWS](https://github.com/google-research-datasets/paws) dataset.
|
| 15 |
β
|
| 16 |
## How to use
|
| 17 |
-
β
|
| 18 |
PyTorch and TF models available
|
| 19 |
β
|
| 20 |
```python
|
| 21 |
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
| 22 |
β
|
| 23 |
tokenizer = AutoTokenizer.from_pretrained("Vamsi/T5_Paraphrase_Paws")
|
| 24 |
-
model = AutoModelForSeq2SeqLM.from_pretrained("Vamsi/T5_Paraphrase_Paws")
|
| 25 |
β
|
| 26 |
sentence = "This is something which i cannot understand at all"
|
| 27 |
|
|
|
|
| 6 |
- Conditional Generation
|
| 7 |
inference: false
|
| 8 |
---
|
| 9 |
+
|
| 10 |
# Paraphrase-Generation
|
| 11 |
β
|
| 12 |
## Model description
|
|
|
|
| 14 |
T5 Model for generating paraphrases of english sentences. Trained on the [Google PAWS](https://github.com/google-research-datasets/paws) dataset.
|
| 15 |
β
|
| 16 |
## How to use
|
| 17 |
+
β## Requires sentencepiece: # !pip install sentencepiece
|
| 18 |
PyTorch and TF models available
|
| 19 |
β
|
| 20 |
```python
|
| 21 |
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
| 22 |
β
|
| 23 |
tokenizer = AutoTokenizer.from_pretrained("Vamsi/T5_Paraphrase_Paws")
|
| 24 |
+
model = AutoModelForSeq2SeqLM.from_pretrained("Vamsi/T5_Paraphrase_Paws").to('cuda')
|
| 25 |
β
|
| 26 |
sentence = "This is something which i cannot understand at all"
|
| 27 |
|