Text Generation
Transformers
Safetensors
English
t5
text2text-generation
Generated from Trainer
Eval Results (legacy)
text-generation-inference
Instructions to use mohammedaly22/t5-small-question-generation with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mohammedaly22/t5-small-question-generation with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mohammedaly22/t5-small-question-generation")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("mohammedaly22/t5-small-question-generation") model = AutoModelForSeq2SeqLM.from_pretrained("mohammedaly22/t5-small-question-generation", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mohammedaly22/t5-small-question-generation with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mohammedaly22/t5-small-question-generation" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mohammedaly22/t5-small-question-generation", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/mohammedaly22/t5-small-question-generation
- SGLang
How to use mohammedaly22/t5-small-question-generation 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 "mohammedaly22/t5-small-question-generation" \ --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": "mohammedaly22/t5-small-question-generation", "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 "mohammedaly22/t5-small-question-generation" \ --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": "mohammedaly22/t5-small-question-generation", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use mohammedaly22/t5-small-question-generation with Docker Model Runner:
docker model run hf.co/mohammedaly22/t5-small-question-generation
Mohammed Aly commited on
Update README.md
Browse files
README.md
CHANGED
|
@@ -5,7 +5,31 @@ tags:
|
|
| 5 |
- generated_from_trainer
|
| 6 |
model-index:
|
| 7 |
- name: t5-small-squad-qg-v2
|
| 8 |
-
results:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
widget:
|
| 10 |
- text: "Generate a question whose answer is highlighted by <h> from the context delimited by the triple backticks \ncontext:```During the 2011–12 season, he set the La Liga and European records for most goals scored in a single season, while establishing himself as Barcelona all-time top scorer. The following two seasons, Messi finished second for the Ballon d'Or behind Cristiano Ronaldo (his perceived career rival), before regaining his best form during the 2014–15 campaign, becoming the all-time top scorer in La Liga and leading Barcelona to a historic second treble, after which he was awarded a fifth Ballon d'Or in 2015. Messi assumed captaincy of Barcelona in 2018, and won a record sixth Ballon d'Or in 2019. Out of contract, he signed for French club Paris Saint-Germain in August 2021, spending two seasons at the club and winning Ligue 1 twice. Messi joined American club <h> Inter Miami <h> in July 2023, winning the Leagues Cup in August of that year.```"
|
| 11 |
datasets:
|
|
|
|
| 5 |
- generated_from_trainer
|
| 6 |
model-index:
|
| 7 |
- name: t5-small-squad-qg-v2
|
| 8 |
+
results:
|
| 9 |
+
- task:
|
| 10 |
+
type: text2text-generation
|
| 11 |
+
metrics:
|
| 12 |
+
- name: BLEU
|
| 13 |
+
type: BLEU
|
| 14 |
+
value: 20.00
|
| 15 |
+
- name: Rouge1
|
| 16 |
+
type: Rouge1
|
| 17 |
+
value: 47.69
|
| 18 |
+
- name: Rouge2
|
| 19 |
+
type: Rouge2
|
| 20 |
+
value: 26.43
|
| 21 |
+
- name: RougeL
|
| 22 |
+
type: RougeL
|
| 23 |
+
value: 44.15
|
| 24 |
+
- name: RougeLSum
|
| 25 |
+
type: RougeLSum
|
| 26 |
+
value: 44.15
|
| 27 |
+
- name: METEOR
|
| 28 |
+
type: METEOR
|
| 29 |
+
value: 45.84
|
| 30 |
+
- name: BertScore
|
| 31 |
+
type: BertScore
|
| 32 |
+
value: 91.82
|
| 33 |
widget:
|
| 34 |
- text: "Generate a question whose answer is highlighted by <h> from the context delimited by the triple backticks \ncontext:```During the 2011–12 season, he set the La Liga and European records for most goals scored in a single season, while establishing himself as Barcelona all-time top scorer. The following two seasons, Messi finished second for the Ballon d'Or behind Cristiano Ronaldo (his perceived career rival), before regaining his best form during the 2014–15 campaign, becoming the all-time top scorer in La Liga and leading Barcelona to a historic second treble, after which he was awarded a fifth Ballon d'Or in 2015. Messi assumed captaincy of Barcelona in 2018, and won a record sixth Ballon d'Or in 2019. Out of contract, he signed for French club Paris Saint-Germain in August 2021, spending two seasons at the club and winning Ligue 1 twice. Messi joined American club <h> Inter Miami <h> in July 2023, winning the Leagues Cup in August of that year.```"
|
| 35 |
datasets:
|