Text Generation
Transformers
PyTorch
English
t5
text2text-generation
question answering
Eval Results (legacy)
text-generation-inference
Instructions to use lmqg/t5-small-tweetqa-qa with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lmqg/t5-small-tweetqa-qa with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="lmqg/t5-small-tweetqa-qa")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("lmqg/t5-small-tweetqa-qa") model = AutoModelForSeq2SeqLM.from_pretrained("lmqg/t5-small-tweetqa-qa", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use lmqg/t5-small-tweetqa-qa with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lmqg/t5-small-tweetqa-qa" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lmqg/t5-small-tweetqa-qa", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/lmqg/t5-small-tweetqa-qa
- SGLang
How to use lmqg/t5-small-tweetqa-qa 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 "lmqg/t5-small-tweetqa-qa" \ --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": "lmqg/t5-small-tweetqa-qa", "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 "lmqg/t5-small-tweetqa-qa" \ --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": "lmqg/t5-small-tweetqa-qa", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use lmqg/t5-small-tweetqa-qa with Docker Model Runner:
docker model run hf.co/lmqg/t5-small-tweetqa-qa
Download trainer_config.json from lmqg/t5-small-tweetqa-qa: direct link, hf CLI and curl.
- Browser
- Download file 346 Bytes
-
https://huggingface.co/lmqg/t5-small-tweetqa-qa/resolve/main/trainer_config.json
- Command line
-
hf download hf://lmqg/t5-small-tweetqa-qa/trainer_config.json
-
curl -L -o trainer_config.json https://huggingface.co/lmqg/t5-small-tweetqa-qa/resolve/main/trainer_config.json
346 Bytes
| {"dataset_path": "lmqg/qg_tweetqa", "dataset_name": "default", "input_types": ["paragraph_question"], "output_types": ["answer"], "prefix_types": null, "model": "t5-small", "max_length": 512, "max_length_output": 32, "epoch": 7, "batch": 64, "lr": 0.0001, "fp16": false, "random_seed": 1, "gradient_accumulation_steps": 1, "label_smoothing": 0.0} |