Text Generation
Transformers
TensorBoard
Safetensors
Thai
English
t5
text2text-generation
Generated from Trainer
code-fixing
bug-detection
code-repair
python
syntax-fix
ai-debugger
text-generation-inference
Instructions to use Athipan01/t5-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Athipan01/t5-model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Athipan01/t5-model")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Athipan01/t5-model") model = AutoModelForSeq2SeqLM.from_pretrained("Athipan01/t5-model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Athipan01/t5-model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Athipan01/t5-model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Athipan01/t5-model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Athipan01/t5-model
- SGLang
How to use Athipan01/t5-model 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 "Athipan01/t5-model" \ --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": "Athipan01/t5-model", "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 "Athipan01/t5-model" \ --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": "Athipan01/t5-model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Athipan01/t5-model with Docker Model Runner:
docker model run hf.co/Athipan01/t5-model
Update README.md
Browse files
README.md
CHANGED
|
@@ -4,9 +4,27 @@ license: apache-2.0
|
|
| 4 |
base_model: t5-base
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
model-index:
|
| 8 |
- name: t5-model
|
| 9 |
results: []
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
|
@@ -50,4 +68,4 @@ The following hyperparameters were used during training:
|
|
| 50 |
- Transformers 4.51.3
|
| 51 |
- Pytorch 2.6.0+cu124
|
| 52 |
- Datasets 3.6.0
|
| 53 |
-
- Tokenizers 0.21.1
|
|
|
|
| 4 |
base_model: t5-base
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
| 7 |
+
- code-fixing
|
| 8 |
+
- bug-detection
|
| 9 |
+
- t5
|
| 10 |
+
- code-repair
|
| 11 |
+
- python
|
| 12 |
+
- syntax-fix
|
| 13 |
+
- ai-debugger
|
| 14 |
model-index:
|
| 15 |
- name: t5-model
|
| 16 |
results: []
|
| 17 |
+
datasets:
|
| 18 |
+
- codeparrot/github-code
|
| 19 |
+
- codeparrot/github-code-clean
|
| 20 |
+
- bigcode/the-stack
|
| 21 |
+
language:
|
| 22 |
+
- th
|
| 23 |
+
- en
|
| 24 |
+
metrics:
|
| 25 |
+
- accuracy
|
| 26 |
+
- bleu
|
| 27 |
+
pipeline_tag: text2text-generation
|
| 28 |
---
|
| 29 |
|
| 30 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
|
|
|
| 68 |
- Transformers 4.51.3
|
| 69 |
- Pytorch 2.6.0+cu124
|
| 70 |
- Datasets 3.6.0
|
| 71 |
+
- Tokenizers 0.21.1
|