Instructions to use unicamp-dl/monoptt5-large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use unicamp-dl/monoptt5-large with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="unicamp-dl/monoptt5-large")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("unicamp-dl/monoptt5-large") model = AutoModelForSeq2SeqLM.from_pretrained("unicamp-dl/monoptt5-large") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use unicamp-dl/monoptt5-large with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "unicamp-dl/monoptt5-large" # 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-large", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/unicamp-dl/monoptt5-large
- SGLang
How to use unicamp-dl/monoptt5-large 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-large" \ --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-large", "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-large" \ --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-large", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use unicamp-dl/monoptt5-large with Docker Model Runner:
docker model run hf.co/unicamp-dl/monoptt5-large
Upload folder using huggingface_hub
Browse files- .gitattributes +2 -0
- config.json +31 -0
- generation_config.json +7 -0
- mesh_tensorflow_checkpoint/model.ckpt-2860700.data-00000-of-00002 +0 -0
- mesh_tensorflow_checkpoint/model.ckpt-2860700.data-00001-of-00002 +3 -0
- mesh_tensorflow_checkpoint/model.ckpt-2860700.index +0 -0
- mesh_tensorflow_checkpoint/model.ckpt-2860700.meta +3 -0
- pytorch_model.bin +3 -0
- spiece.model +3 -0
- spiece.vocab +0 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
mesh_tensorflow_checkpoint/model.ckpt-2860700.data-00001-of-00002 filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
mesh_tensorflow_checkpoint/model.ckpt-2860700.meta filter=lfs diff=lfs merge=lfs -text
|
config.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"T5ForConditionalGeneration"
|
| 4 |
+
],
|
| 5 |
+
"classifier_dropout": 0.0,
|
| 6 |
+
"d_ff": 4096,
|
| 7 |
+
"d_kv": 64,
|
| 8 |
+
"d_model": 1024,
|
| 9 |
+
"decoder_start_token_id": 0,
|
| 10 |
+
"dense_act_fn": "relu",
|
| 11 |
+
"dropout_rate": 0.1,
|
| 12 |
+
"eos_token_id": 1,
|
| 13 |
+
"feed_forward_proj": "relu",
|
| 14 |
+
"initializer_factor": 1.0,
|
| 15 |
+
"is_encoder_decoder": true,
|
| 16 |
+
"is_gated_act": false,
|
| 17 |
+
"layer_norm_epsilon": 1e-06,
|
| 18 |
+
"model_type": "t5",
|
| 19 |
+
"n_positions": 512,
|
| 20 |
+
"num_decoder_layers": 24,
|
| 21 |
+
"num_heads": 16,
|
| 22 |
+
"num_layers": 24,
|
| 23 |
+
"output_past": true,
|
| 24 |
+
"pad_token_id": 0,
|
| 25 |
+
"relative_attention_max_distance": 128,
|
| 26 |
+
"relative_attention_num_buckets": 32,
|
| 27 |
+
"torch_dtype": "float32",
|
| 28 |
+
"transformers_version": "4.33.1",
|
| 29 |
+
"use_cache": true,
|
| 30 |
+
"vocab_size": 32128
|
| 31 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"decoder_start_token_id": 0,
|
| 4 |
+
"eos_token_id": 1,
|
| 5 |
+
"pad_token_id": 0,
|
| 6 |
+
"transformers_version": "4.33.1"
|
| 7 |
+
}
|
mesh_tensorflow_checkpoint/model.ckpt-2860700.data-00000-of-00002
ADDED
|
Binary file (8 Bytes). View file
|
|
|
mesh_tensorflow_checkpoint/model.ckpt-2860700.data-00001-of-00002
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e461b0c680cbe763ab029f9f4c1c25018ea3b4f29d9e1a2e5e379153d7b2fec3
|
| 3 |
+
size 1480297984
|
mesh_tensorflow_checkpoint/model.ckpt-2860700.index
ADDED
|
Binary file (56.4 kB). View file
|
|
|
mesh_tensorflow_checkpoint/model.ckpt-2860700.meta
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:063a1ed73a327996357565a39f678e6b6b0609c8c0b6ebd1fd00c28e53a982b0
|
| 3 |
+
size 41120009
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:37e1b683802e7c81c1200c9144882ce65a68594e1ae1383b749762238564f401
|
| 3 |
+
size 2950841790
|
spiece.model
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fcb25b1d67f04fce0e710d58430b606b4ee9887144fa2da22d123c44061cc62e
|
| 3 |
+
size 755569
|
spiece.vocab
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|