Text Generation
Transformers
PyTorch
Safetensors
English
t5
text2text-generation
Generated from Trainer
text-generation-inference
Instructions to use kargaranamir/T5R-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kargaranamir/T5R-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="kargaranamir/T5R-base")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("kargaranamir/T5R-base") model = AutoModelForSeq2SeqLM.from_pretrained("kargaranamir/T5R-base") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use kargaranamir/T5R-base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kargaranamir/T5R-base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kargaranamir/T5R-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/kargaranamir/T5R-base
- SGLang
How to use kargaranamir/T5R-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 "kargaranamir/T5R-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": "kargaranamir/T5R-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 "kargaranamir/T5R-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": "kargaranamir/T5R-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use kargaranamir/T5R-base with Docker Model Runner:
docker model run hf.co/kargaranamir/T5R-base
Commit ·
dc68044
1
Parent(s): 737e47b
Edit Examples
Browse files
README.md
CHANGED
|
@@ -12,26 +12,21 @@ pipeline_tag: text2text-generation
|
|
| 12 |
language:
|
| 13 |
- en
|
| 14 |
widget:
|
| 15 |
-
- text:
|
| 16 |
-
Instruction: X
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
the German Army in World War I. In 1919, he joined the German Workers'
|
| 20 |
-
Party (DAP), the precursor of the Nazi Party, and was appointed leader of
|
| 21 |
-
the Nazi Party in 1921. In 1923, he attempted to seize governmental power
|
| 22 |
-
in a failed coup in Munich and was imprisoned with a sentence of five
|
| 23 |
-
years.\nWhat kind of instruction could this be the answer to?\nX:
|
| 24 |
example_title: Example 1
|
| 25 |
-
- text:
|
| 26 |
-
Instruction: X
|
| 27 |
-
lots of fruit and veg. 3- Eat more fish, including a portion of oily fish.
|
| 28 |
-
this be the answer to?
|
|
|
|
| 29 |
example_title: Example 2
|
| 30 |
---
|
| 31 |
|
| 32 |
-
|
| 33 |
# T5-Reverse (T5R)
|
| 34 |
|
| 35 |
This model can generate prompts (instruction) for any text!
|
| 36 |
|
| 37 |
-
This model is an instruction-tuned version of [google/flan-t5-base](https://huggingface.co/google/flan-t5-base) on [alpaca dataset](https://huggingface.co/datasets/tatsu-lab/alpaca) but in **reverse format**!
|
|
|
|
| 12 |
language:
|
| 13 |
- en
|
| 14 |
widget:
|
| 15 |
+
- text: |
|
| 16 |
+
Instruction: X
|
| 17 |
+
Output: Adolf Hitler (German: [ˈadɔlf ˈhɪtlɐ] (listen); 20 April 1889 – 30 April 1945) was an Austrian-born German politician who was the dictator of Germany from 1933 until his suicide in 1945. He rose to power as the leader of the Nazi Party,[a] becoming the chancellor in 1933 and then taking the title of Führer und Reichskanzler in 1934.[b] During his dictatorship, he initiated World War II in Europe by invading Poland on 1 September 1939. He was closely involved in military operations throughout the war and was central to the perpetration of the Holocaust: the genocide of about six million Jews and millions of other victims.
|
| 18 |
+
X:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
example_title: Example 1
|
| 20 |
+
- text: |
|
| 21 |
+
Instruction: X
|
| 22 |
+
Output: 1- Base your meals on higher fibre starchy carbohydrates. 2- Eat lots of fruit and veg. 3- Eat more fish, including a portion of oily fish.
|
| 23 |
+
What kind of instruction could this be the answer to?
|
| 24 |
+
X:
|
| 25 |
example_title: Example 2
|
| 26 |
---
|
| 27 |
|
|
|
|
| 28 |
# T5-Reverse (T5R)
|
| 29 |
|
| 30 |
This model can generate prompts (instruction) for any text!
|
| 31 |
|
| 32 |
+
This model is an instruction-tuned version of [google/flan-t5-base](https://huggingface.co/google/flan-t5-base) on [alpaca dataset](https://huggingface.co/datasets/tatsu-lab/alpaca) but in **reverse format**!
|