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
Download run_config.json from gamemaker1/t5edit: direct link, hf CLI and curl.
- Browser
- Download file 547 Bytes
-
https://huggingface.co/gamemaker1/t5edit/resolve/main/run_config.json
- Command line
-
hf download hf://gamemaker1/t5edit/run_config.json
-
curl -L -o run_config.json https://huggingface.co/gamemaker1/t5edit/resolve/main/run_config.json
547 Bytes
| { | |
| "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 | |
| } |