Text Generation
Transformers
TensorBoard
Safetensors
gpt2
Generated from Trainer
text-generation-inference
Instructions to use frett/clm-gpt2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use frett/clm-gpt2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="frett/clm-gpt2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("frett/clm-gpt2") model = AutoModelForCausalLM.from_pretrained("frett/clm-gpt2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use frett/clm-gpt2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "frett/clm-gpt2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "frett/clm-gpt2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/frett/clm-gpt2
- SGLang
How to use frett/clm-gpt2 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 "frett/clm-gpt2" \ --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": "frett/clm-gpt2", "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 "frett/clm-gpt2" \ --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": "frett/clm-gpt2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use frett/clm-gpt2 with Docker Model Runner:
docker model run hf.co/frett/clm-gpt2
Commit History
-
End of training
Verified signature646fd45 -
Model save
Verified signature0a3f082 -
Training in progress, step 11500
Verified signature1be8c2a -
Training in progress, step 11000
Verified signature96d36c4 -
Training in progress, step 2000
Verified signature63b1371
-
Training in progress, step 10500
Verified signature791faa2 -
Training in progress, step 10000
Verified signature3d69ee4 -
Training in progress, step 9500
Verified signature3754cd1 -
Training in progress, step 9000
Verified signatured747636 -
Training in progress, step 8500
Verified signature3146890 -
Training in progress, step 8000
Verified signature1067d40 -
Training in progress, step 7500
Verified signaturee691e92 -
Training in progress, step 1500
Verified signature53ff4da -
Training in progress, step 7000
Verified signature28e7d67 -
Training in progress, step 6500
Verified signature75c03a5 -
Training in progress, step 6000
Verified signatureb460852 -
Training in progress, step 5500
Verified signature4b8101c -
Training in progress, step 5000
Verified signature239ccdb -
Training in progress, step 4500
Verified signaturedbb3c1b -
Training in progress, step 1000
Verified signature90fe14a -
Training in progress, step 4000
Verified signaturea921adc -
Training in progress, step 3500
Verified signature5506a10 -
Training in progress, step 3000
Verified signature1f3465d -
Training in progress, step 2500
Verified signatured282ab6 -
Training in progress, step 2000
Verified signature7c9bb20 -
Training in progress, step 1500
Verified signature4690c08 -
Training in progress, step 1000
Verified signature915dcb8 -
Training in progress, step 500
Verified signaturee6f27f4 -
Training in progress, step 500
Verified signaturebccf2c2 -
initial commit
Verified signature447d7a2