Text Generation
Transformers
TensorBoard
Safetensors
gpt2
Generated from Trainer
text-generation-inference
Instructions to use Loess/gpt2-wikitext2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Loess/gpt2-wikitext2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Loess/gpt2-wikitext2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Loess/gpt2-wikitext2") model = AutoModelForCausalLM.from_pretrained("Loess/gpt2-wikitext2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Loess/gpt2-wikitext2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Loess/gpt2-wikitext2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Loess/gpt2-wikitext2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Loess/gpt2-wikitext2
- SGLang
How to use Loess/gpt2-wikitext2 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 "Loess/gpt2-wikitext2" \ --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": "Loess/gpt2-wikitext2", "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 "Loess/gpt2-wikitext2" \ --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": "Loess/gpt2-wikitext2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Loess/gpt2-wikitext2 with Docker Model Runner:
docker model run hf.co/Loess/gpt2-wikitext2
Commit History
-
Training in progress, step 2000
Verified signatured18416e -
Training in progress, step 1500
Verified signature49a0912 -
Training in progress, step 1000
Verified signature820136e -
Training in progress, step 500
Verified signatured6fa4b4 -
Upload tokenizer
Verified signature47e5cb6 -
Upload model
Verified signatureabf9c04 -
End of training
Verified signatureeb80be6 -
Training in progress, step 18000
Verified signature135dc21 -
Training in progress, step 17500
Verified signature566e611 -
Training in progress, step 17000
Verified signaturedd0d254 -
Training in progress, step 16500
Verified signature544a4dd -
Training in progress, step 16000
Verified signature822ba4c -
Training in progress, step 15500
Verified signaturec509dbd -
Training in progress, step 15000
Verified signature13de7fa -
Training in progress, step 14500
Verified signaturea1b4979 -
Training in progress, step 14000
Verified signature490f034 -
Training in progress, step 13500
Verified signature9d5a9bd -
Training in progress, step 13000
Verified signature1acb7da -
Training in progress, step 12500
Verified signaturea5a2630 -
Training in progress, step 12000
Verified signature04210b2 -
Training in progress, step 11500
Verified signature6cf9cfb -
Training in progress, step 11000
Verified signatureac90b92 -
Training in progress, step 10500
Verified signature2b07898 -
Training in progress, step 10000
Verified signature19fa005 -
Training in progress, step 9500
Verified signature54c85cb -
Training in progress, step 9000
Verified signatureaa79a18 -
Training in progress, step 8500
Verified signaturef9c6bf2 -
Training in progress, step 8000
Verified signature6c07438 -
Training in progress, step 7500
Verified signature7ddcde4 -
Training in progress, step 7000
Verified signature5fb20d1 -
Training in progress, step 6500
Verified signatureb347c32 -
Training in progress, step 6000
Verified signature7cd4d18 -
Training in progress, step 5500
Verified signatureebf0447 -
Training in progress, step 5000
Verified signaturebc0ae8a -
Training in progress, step 4500
Verified signaturea900710 -
Training in progress, step 4000
Verified signatureaa4697a -
Training in progress, step 3500
Verified signature1afd834 -
Training in progress, step 3000
Verified signatured258788 -
Training in progress, step 2500
Verified signaturecbfd6ac
-
Training in progress, step 2000
Verified signaturec78d639 -
Training in progress, step 1500
Verified signatured61172f -
Training in progress, step 1000
Verified signature9a63a48 -
Training in progress, step 500
Verified signature76c5d3d -
Training in progress, step 18000
Verified signature36e2d17 -
Training in progress, step 17500
Verified signaturee800b82 -
Training in progress, step 17000
Verified signature0c6889c -
Training in progress, step 16500
Verified signature972134f -
Training in progress, step 16000
Verified signature3f30efd -
Training in progress, step 15500
Verified signature3efa083 -
Training in progress, step 15000
Verified signature9ebf3f7