Text Generation
Transformers
Safetensors
English
t5
text2text-generation
fact-updating
wikipedia
text-generation-inference
Instructions to use gamemaker1/t5edit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use gamemaker1/t5edit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="gamemaker1/t5edit")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("gamemaker1/t5edit") model = AutoModelForSeq2SeqLM.from_pretrained("gamemaker1/t5edit", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use gamemaker1/t5edit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "gamemaker1/t5edit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "gamemaker1/t5edit", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/gamemaker1/t5edit
- SGLang
How to use gamemaker1/t5edit 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 "gamemaker1/t5edit" \ --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": "gamemaker1/t5edit", "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 "gamemaker1/t5edit" \ --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": "gamemaker1/t5edit", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use gamemaker1/t5edit with Docker Model Runner:
docker model run hf.co/gamemaker1/t5edit
File size: 547 Bytes
70f0877 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | {
"train": "/home/diffusedit/data/split/train.jsonl",
"val": "/home/diffusedit/data/split/val.jsonl",
"test": "/home/diffusedit/data/split/test.jsonl",
"out": "/home/diffusedit/full/runs/editor",
"model": "google/flan-t5-large",
"predict_only": false,
"max_input": 1024,
"max_new_tokens": 384,
"lr": 0.0001,
"batch": 4,
"accum": 8,
"epochs": 5,
"patience": 1,
"predict_batch": 8,
"gradient_checkpointing": true,
"log_every": 50,
"limit": null,
"seed": 42,
"n_train": 12180,
"n_val": 1564,
"n_test": 1602
} |