Instructions to use unicamp-dl/monoptt5-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use unicamp-dl/monoptt5-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="unicamp-dl/monoptt5-base")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("unicamp-dl/monoptt5-base") model = AutoModelForSeq2SeqLM.from_pretrained("unicamp-dl/monoptt5-base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use unicamp-dl/monoptt5-base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "unicamp-dl/monoptt5-base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "unicamp-dl/monoptt5-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/unicamp-dl/monoptt5-base
- SGLang
How to use unicamp-dl/monoptt5-base 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 "unicamp-dl/monoptt5-base" \ --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": "unicamp-dl/monoptt5-base", "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 "unicamp-dl/monoptt5-base" \ --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": "unicamp-dl/monoptt5-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use unicamp-dl/monoptt5-base with Docker Model Runner:
docker model run hf.co/unicamp-dl/monoptt5-base
Commit History
-
Fix arXiv link for ptt5-v2 paper reference (2008.09144 -> 2406.10806) (#2)
- Fix arXiv link for ptt5-v2 paper reference (2008.09144 -> 2406.10806) (d7bfb0820d7ece41358c3c746ea63b32a0657089)a1e0b7a
-
Update README.md
Verified signature46872c7
-
Update README.md
Verified signaturefbe6807
-
Update README.md
Verified signature14ef681
-
Create README.md
Verified signature1c39b49
-
Upload folder using huggingface_hub
Verified signature4d1b2b2 -
initial commit
Verified signature51ce8f5