Instructions to use hskang0906/t5-small-custom with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hskang0906/t5-small-custom with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="hskang0906/t5-small-custom")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("hskang0906/t5-small-custom") model = AutoModelForCausalLM.from_pretrained("hskang0906/t5-small-custom") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hskang0906/t5-small-custom with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hskang0906/t5-small-custom" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hskang0906/t5-small-custom", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/hskang0906/t5-small-custom
- SGLang
How to use hskang0906/t5-small-custom 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 "hskang0906/t5-small-custom" \ --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": "hskang0906/t5-small-custom", "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 "hskang0906/t5-small-custom" \ --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": "hskang0906/t5-small-custom", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use hskang0906/t5-small-custom with Docker Model Runner:
docker model run hf.co/hskang0906/t5-small-custom
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Model Card for t5_small Summarization Model
Model Details
This model is a fine-tuned version of t5_small on the CNN/Daily Mail dataset for summarization tasks.
Training Data
The model was trained on the CNN/Daily Mail dataset.
Training Procedure
- Learning Rate: 5e-5
- Epochs: 3
- Batch Size: 16
How to Use
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("hskang/cnn_dailymail_t5_small")
model = AutoModelForSeq2SeqLM.from_pretrained("hskang/cnn_dailymail_t5_small")
input_text = "upstage tutorial text summarization code"
inputs = tokenizer.encode(input_text, return_tensors="pt")
outputs = model.generate(inputs)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Evaluation
- ROUGE-1: 23.45
- ROUGE-2: 7.89
- ROUGE-L: 21.34
- BLEU: 13.56
Limitations
The model may generate biased or inappropriate content due to the nature of the training data. It is recommended to use the model with caution and apply necessary filters.
Ethical Considerations
Bias: The model may inherit biases present in the training data. Misuse: The model can be misused to generate misleading or harmful content. Copyright and License This model is licensed under the MIT License.
- Downloads last month
- 3