Text Generation
Transformers
Safetensors
English
t5
text2text-generation
code
text-generation-inference
Instructions to use prhegde/t5-query-reformulation-RL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prhegde/t5-query-reformulation-RL with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="prhegde/t5-query-reformulation-RL")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("prhegde/t5-query-reformulation-RL") model = AutoModelForSeq2SeqLM.from_pretrained("prhegde/t5-query-reformulation-RL", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use prhegde/t5-query-reformulation-RL with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prhegde/t5-query-reformulation-RL" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prhegde/t5-query-reformulation-RL", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/prhegde/t5-query-reformulation-RL
- SGLang
How to use prhegde/t5-query-reformulation-RL 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 "prhegde/t5-query-reformulation-RL" \ --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": "prhegde/t5-query-reformulation-RL", "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 "prhegde/t5-query-reformulation-RL" \ --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": "prhegde/t5-query-reformulation-RL", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use prhegde/t5-query-reformulation-RL with Docker Model Runner:
docker model run hf.co/prhegde/t5-query-reformulation-RL
Upload T5ForConditionalGeneration
Browse files- README.md +10 -12
- config.json +1 -1
- model.safetensors +1 -1
README.md
CHANGED
|
@@ -1,22 +1,20 @@
|
|
| 1 |
---
|
| 2 |
-
|
|
|
|
| 3 |
license: apache-2.0
|
|
|
|
| 4 |
datasets:
|
| 5 |
- ms_marco
|
| 6 |
-
language:
|
| 7 |
-
- en
|
| 8 |
pipeline_tag: text2text-generation
|
| 9 |
-
|
| 10 |
widget:
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
inference_config:
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
---
|
| 21 |
|
| 22 |
## Model Summary
|
|
|
|
| 1 |
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
license: apache-2.0
|
| 5 |
+
library_name: transformers
|
| 6 |
datasets:
|
| 7 |
- ms_marco
|
|
|
|
|
|
|
| 8 |
pipeline_tag: text2text-generation
|
|
|
|
| 9 |
widget:
|
| 10 |
+
- text: how to bake perfect cookie
|
| 11 |
+
pipeline_tag: text2text-generation
|
|
|
|
| 12 |
inference_config:
|
| 13 |
+
generation_config:
|
| 14 |
+
max_length: 35
|
| 15 |
+
num_beams: 1
|
| 16 |
+
do_sample: true
|
| 17 |
+
repetition_penalty: 1.8
|
| 18 |
---
|
| 19 |
|
| 20 |
## Model Summary
|
config.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "/home/ubuntu/QueryReformulationRL/models/
|
| 3 |
"architectures": [
|
| 4 |
"T5ForConditionalGeneration"
|
| 5 |
],
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "/home/ubuntu/QueryReformulationRL/models/QueryReformulationRLRepPenalty_300",
|
| 3 |
"architectures": [
|
| 4 |
"T5ForConditionalGeneration"
|
| 5 |
],
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 891644712
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c53c11b35861cca585ab3f46f5472a8f3b27e8135ecc959165600eee5b5a2271
|
| 3 |
size 891644712
|