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_metrics.json from gamemaker1/t5edit: direct link, hf CLI and curl.
- Browser
- Download file 1.39 kB
-
https://huggingface.co/gamemaker1/t5edit/resolve/main/run_metrics.json
- Command line
-
hf download hf://gamemaker1/t5edit/run_metrics.json
-
curl -L -o run_metrics.json https://huggingface.co/gamemaker1/t5edit/resolve/main/run_metrics.json
1.39 kB
| { | |
| "train_lengths": { | |
| "input": { | |
| "p50": 193.0, | |
| "p90": 338.0, | |
| "p95": 389.0, | |
| "p99": 507.2099999999991, | |
| "mean": 213.64573070607554, | |
| "max": 1520, | |
| "over": 7 | |
| }, | |
| "target": { | |
| "p50": 27.0, | |
| "p90": 90.0, | |
| "p95": 111.0, | |
| "p99": 157.0, | |
| "mean": 39.33522167487685, | |
| "max": 970, | |
| "over": 6 | |
| }, | |
| "evidence_cut": 4, | |
| "article_cut": 3 | |
| }, | |
| "val_history": [ | |
| { | |
| "epoch": 1, | |
| "train_loss": 0.20339470065752346, | |
| "val_loss": 0.059932903280978694 | |
| }, | |
| { | |
| "epoch": 2, | |
| "train_loss": 0.060603164612924705, | |
| "val_loss": 0.04503743698826844 | |
| }, | |
| { | |
| "epoch": 3, | |
| "train_loss": 0.0403840439127009, | |
| "val_loss": 0.04387998025125058 | |
| }, | |
| { | |
| "epoch": 4, | |
| "train_loss": 0.029914886026241098, | |
| "val_loss": 0.044346317642450714 | |
| } | |
| ], | |
| "best_val_loss": 0.04387998025125058, | |
| "epochs_run": 4, | |
| "best_epoch": 3, | |
| "train_seconds": 3814.4, | |
| "articles": 1602, | |
| "fallbacks": 3, | |
| "fallback_reasons": { | |
| "copy_text": 3 | |
| }, | |
| "articles_with_fallback": 3, | |
| "restored_words": 109, | |
| "sentences": { | |
| "copied": 3565, | |
| "rewritten": 1630, | |
| "deleted": 417 | |
| }, | |
| "mean_output_words": 61.51622971285892, | |
| "mean_output_sentences": 3.2428214731585516, | |
| "mean_raw_chars": 136.54681647940075, | |
| "seconds_per_article": 0.3500464130727837 | |
| } |