Text Generation
Transformers
TensorBoard
Safetensors
gpt2
Generated from Trainer
text-generation-inference
Instructions to use impuneetg/gpt2-wikitext2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use impuneetg/gpt2-wikitext2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="impuneetg/gpt2-wikitext2")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("impuneetg/gpt2-wikitext2") model = AutoModelForCausalLM.from_pretrained("impuneetg/gpt2-wikitext2") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use impuneetg/gpt2-wikitext2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "impuneetg/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": "impuneetg/gpt2-wikitext2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/impuneetg/gpt2-wikitext2
- SGLang
How to use impuneetg/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 "impuneetg/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": "impuneetg/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 "impuneetg/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": "impuneetg/gpt2-wikitext2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use impuneetg/gpt2-wikitext2 with Docker Model Runner:
docker model run hf.co/impuneetg/gpt2-wikitext2
Ctrl+K
- Jun01_22-00-13_ip-10-192-12-193
- Jun01_22-01-51_ip-10-192-12-193
- Jun01_22-07-01_ip-10-192-12-21
- Jun01_22-16-26_ip-10-192-12-21
- Jun01_22-22-40_ip-10-192-12-21
- Jun01_22-23-49_ip-10-192-12-21
- Jun01_22-25-05_ip-10-192-12-21
- Jun01_22-29-23_ip-10-192-12-21
- Jun01_22-29-38_ip-10-192-12-21
- Jun01_22-35-07_ip-10-192-12-21
- Jun01_22-36-14_ip-10-192-12-21
- Jun01_22-49-13_ip-10-192-12-21
- Jun01_22-50-49_ip-10-192-12-21
- Jun01_22-51-58_ip-10-192-12-21
- Jun01_22-53-00_ip-10-192-12-21
- Jun01_23-32-48_ip-10-192-11-16
- Jun01_23-35-00_ip-10-192-11-16
- Jun01_23-46-08_ip-10-192-11-16
- Jun02_00-25-54_ip-10-192-11-209
- Jun02_00-41-56_ip-10-192-11-209
- Jun02_11-00-27_ip-10-192-11-99
- Jun02_11-00-55_ip-10-192-11-99
- Jun02_11-01-55_ip-10-192-11-99
- Jun02_11-03-07_ip-10-192-11-99
- Jun02_11-04-48_ip-10-192-11-99
- Jun02_11-38-24_ip-10-192-11-99
- Jun02_11-38-44_ip-10-192-11-99
- Jun02_11-46-20_ip-10-192-11-99
- Jun02_12-17-44_ip-10-192-11-99
- Jun02_12-19-09_ip-10-192-11-99
- Jun02_12-53-14_ip-10-192-11-99
- Jun02_12-55-23_ip-10-192-11-99
- Jun02_13-13-59_ip-10-192-11-99
- Jun02_13-14-53_ip-10-192-11-99
- Jun03_13-37-53_ip-10-192-11-152
- Jun03_13-42-21_ip-10-192-11-152
- Jun03_16-50-58_ip-10-192-12-138
- Jun03_16-59-24_ip-10-192-12-138
- Jun03_17-45-55_ip-10-192-11-219
- Jun04_03-27-52_ip-10-192-11-48
- Jun04_03-41-42_ip-10-192-11-48
- Jun04_03-53-21_ip-10-192-11-48
- Jun04_03-55-20_ip-10-192-11-48
- Jun04_03-57-25_ip-10-192-11-48