Text Generation
Transformers
TensorBoard
Safetensors
gpt2
Generated from Trainer
text-generation-inference
Instructions to use armaanp/gpt2-wikitext2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use armaanp/gpt2-wikitext2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="armaanp/gpt2-wikitext2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("armaanp/gpt2-wikitext2") model = AutoModelForCausalLM.from_pretrained("armaanp/gpt2-wikitext2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use armaanp/gpt2-wikitext2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "armaanp/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": "armaanp/gpt2-wikitext2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/armaanp/gpt2-wikitext2
- SGLang
How to use armaanp/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 "armaanp/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": "armaanp/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 "armaanp/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": "armaanp/gpt2-wikitext2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use armaanp/gpt2-wikitext2 with Docker Model Runner:
docker model run hf.co/armaanp/gpt2-wikitext2
Commit History
-
Training in progress, step 3000
Verified signature71418c5 -
Training in progress, step 2500
Verified signature66ccc51 -
Training in progress, step 2000
Verified signaturec50fa26 -
Training in progress, step 1500
Verified signature89f55f1 -
Training in progress, step 1000
Verified signaturea4c4b8a -
Training in progress, step 500
Verified signature87295eb -
End of training
Verified signaturea6f5aba -
Training in progress, step 3000
Verified signature546a2fd -
Training in progress, step 2500
Verified signatureba5ff75 -
Training in progress, step 2000
Verified signaturebc3ab88 -
Training in progress, step 1500
Verified signaturee740789 -
Training in progress, step 1000
Verified signature05bb87d -
Training in progress, step 500
Verified signaturef7bef60 -
Training in progress, step 1000
Verified signature14e37d6 -
Training in progress, step 500
Verified signaturebe7115f -
Training in progress, step 1000
Verified signaturef0de5c6 -
Training in progress, step 500
Verified signature07b6e24 -
Training in progress, step 1000
Verified signature175ed1d -
Training in progress, step 500
Verified signature459356a -
Training in progress, step 1000
Verified signature1bdc3e4 -
Training in progress, step 500
Verified signature0a7a119 -
Training in progress, step 1000
Verified signature2b33411 -
Training in progress, step 500
Verified signatureac51d4c -
Training in progress, step 1000
Verified signaturec63e58c -
Training in progress, step 500
Verified signature888ab7e -
Training in progress, step 1000
Verified signature5503879 -
Training in progress, step 500
Verified signature38869ab -
Training in progress, step 1000
Verified signature7f7b2fb -
Training in progress, step 500
Verified signaturee1eaf5a -
End of training
Verified signature4a88faf -
Training in progress, step 3000
Verified signature983ea40 -
Training in progress, step 2500
Verified signature6322275
-
Training in progress, step 2000
Verified signature2ead11d -
Training in progress, step 1500
Verified signature70e91d1 -
Training in progress, step 1000
Verified signatured1a21c4 -
Training in progress, step 500
Verified signature8296ff9 -
Training in progress, step 1000
Verified signatureb545777 -
Training in progress, step 500
Verified signatured614e6b -
Training in progress, step 1000
Verified signaturec668af8 -
Training in progress, step 500
Verified signature591a6fa -
Training in progress, step 1000
Verified signature3bec12c -
Training in progress, step 500
Verified signature4a158b3 -
Training in progress, step 1000
Verified signature7142aa0 -
Training in progress, step 500
Verified signature5b950bf -
Training in progress, step 1000
Verified signature1e210d8 -
Training in progress, step 500
Verified signature0159caa -
Training in progress, step 1000
Verified signature5795669 -
Training in progress, step 500
Verified signaturef59304e -
Training in progress, step 1000
Verified signaturea45a05d -
Training in progress, step 500
Verified signature87da7aa