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: 1,394 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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | {
"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
} |