Instructions to use miguelvictor/python-t5-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use miguelvictor/python-t5-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="miguelvictor/python-t5-base")# Load model directly from transformers import AutoTokenizer, AutoModelWithLMHead tokenizer = AutoTokenizer.from_pretrained("miguelvictor/python-t5-base") model = AutoModelWithLMHead.from_pretrained("miguelvictor/python-t5-base") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use miguelvictor/python-t5-base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "miguelvictor/python-t5-base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "miguelvictor/python-t5-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/miguelvictor/python-t5-base
- SGLang
How to use miguelvictor/python-t5-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 "miguelvictor/python-t5-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": "miguelvictor/python-t5-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 "miguelvictor/python-t5-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": "miguelvictor/python-t5-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use miguelvictor/python-t5-base with Docker Model Runner:
docker model run hf.co/miguelvictor/python-t5-base
Commit ·
d35be36
1
Parent(s): 5949458
added model checkpoint
Browse files- config.json +53 -0
- events.out.tfevents.1615618962.f0063f4441e2.468.0 +0 -0
- pytorch_model.bin +3 -0
config.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": ["T5WithLMHeadModel"],
|
| 3 |
+
"d_ff": 3072,
|
| 4 |
+
"d_kv": 64,
|
| 5 |
+
"d_model": 768,
|
| 6 |
+
"decoder_start_token_id": 0,
|
| 7 |
+
"dropout_rate": 0.1,
|
| 8 |
+
"eos_token_id": 1,
|
| 9 |
+
"feed_forward_proj": "relu",
|
| 10 |
+
"initializer_factor": 1.0,
|
| 11 |
+
"is_encoder_decoder": true,
|
| 12 |
+
"layer_norm_epsilon": 1e-6,
|
| 13 |
+
"model_type": "t5",
|
| 14 |
+
"n_positions": 512,
|
| 15 |
+
"num_decoder_layers": 12,
|
| 16 |
+
"num_heads": 12,
|
| 17 |
+
"num_layers": 12,
|
| 18 |
+
"output_past": true,
|
| 19 |
+
"pad_token_id": 0,
|
| 20 |
+
"relative_attention_num_buckets": 32,
|
| 21 |
+
"task_specific_params": {
|
| 22 |
+
"summarization": {
|
| 23 |
+
"early_stopping": true,
|
| 24 |
+
"length_penalty": 2.0,
|
| 25 |
+
"max_length": 200,
|
| 26 |
+
"min_length": 30,
|
| 27 |
+
"no_repeat_ngram_size": 3,
|
| 28 |
+
"num_beams": 4,
|
| 29 |
+
"prefix": "summarize: "
|
| 30 |
+
},
|
| 31 |
+
"translation_en_to_de": {
|
| 32 |
+
"early_stopping": true,
|
| 33 |
+
"max_length": 300,
|
| 34 |
+
"num_beams": 4,
|
| 35 |
+
"prefix": "translate English to German: "
|
| 36 |
+
},
|
| 37 |
+
"translation_en_to_fr": {
|
| 38 |
+
"early_stopping": true,
|
| 39 |
+
"max_length": 300,
|
| 40 |
+
"num_beams": 4,
|
| 41 |
+
"prefix": "translate English to French: "
|
| 42 |
+
},
|
| 43 |
+
"translation_en_to_ro": {
|
| 44 |
+
"early_stopping": true,
|
| 45 |
+
"max_length": 300,
|
| 46 |
+
"num_beams": 4,
|
| 47 |
+
"prefix": "translate English to Romanian: "
|
| 48 |
+
}
|
| 49 |
+
},
|
| 50 |
+
"transformers_version": "4.3.3",
|
| 51 |
+
"use_cache": true,
|
| 52 |
+
"vocab_size": 32128
|
| 53 |
+
}
|
events.out.tfevents.1615618962.f0063f4441e2.468.0
ADDED
|
Binary file (1.64 MB). View file
|
|
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ee945250d303012cc8cbe0902461e81708e6ae3e9991f642550e253bf215df1e
|
| 3 |
+
size 891737400
|