Text Generation
Transformers
PyTorch
TensorBoard
Safetensors
gpt2
Generated from Trainer
text-generation-inference
Instructions to use aabidk/distilgpt2-sd with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use aabidk/distilgpt2-sd with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="aabidk/distilgpt2-sd")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("aabidk/distilgpt2-sd") model = AutoModelForCausalLM.from_pretrained("aabidk/distilgpt2-sd", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use aabidk/distilgpt2-sd with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "aabidk/distilgpt2-sd" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "aabidk/distilgpt2-sd", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/aabidk/distilgpt2-sd
- SGLang
How to use aabidk/distilgpt2-sd 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 "aabidk/distilgpt2-sd" \ --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": "aabidk/distilgpt2-sd", "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 "aabidk/distilgpt2-sd" \ --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": "aabidk/distilgpt2-sd", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use aabidk/distilgpt2-sd with Docker Model Runner:
docker model run hf.co/aabidk/distilgpt2-sd
Commit History
-
Adding `safetensors` variant of this model (#6)
- Adding `safetensors` variant of this model (709c13d75444c8c565b18d23694780f759b19478) Co-authored-by: Safetensors convertbot <SFconvertbot@users.noreply.huggingface.co>33c9281 -
Adding `safetensors` variant of this model (#7)
- Adding `safetensors` variant of this model (8a2e0f24d08d9f007a62842fe05ce2ddd94053ef) Co-authored-by: Safetensors convertbot <SFconvertbot@users.noreply.huggingface.co>5e1fb66
-
Update README.md
283c6be -
update model card README.md
be257cf -
End of training
3d7b7de -
Training in progress, step 27500
65b7718 -
Training in progress, step 27000
9702342 -
Training in progress, step 26500
be076ed -
Training in progress, step 26000
a5616e5 -
Training in progress, step 25500
36bd826 -
Training in progress, step 25000
b7f8406 -
Training in progress, step 24500
d7e3f65 -
Training in progress, step 24000
d6c9603 -
Training in progress, step 23500
2374ea9 -
Training in progress, step 23000
7710c66 -
Training in progress, step 22500
6b31ef5 -
Training in progress, step 22000
9344484 -
Training in progress, step 21500
9c1f056 -
Training in progress, step 21000
0f68c65 -
Training in progress, step 20500
1ea4368 -
Training in progress, step 20000
faef993 -
Training in progress, step 19500
485bfea -
Training in progress, step 19000
157180d -
Training in progress, step 18500
d911ed6 -
Training in progress, step 18000
6eca2ac -
Training in progress, step 17500
11d507c -
Training in progress, step 17000
001a6b7 -
Training in progress, step 16500
f6e29ca -
Training in progress, step 16000
6cf6e1e -
Training in progress, step 15500
3fdac6a -
Training in progress, step 15000
ecf6873 -
Training in progress, step 14500
6f1cbfb -
Training in progress, step 14000
e425cd0 -
Training in progress, step 13500
d7fcdf5 -
Training in progress, step 13000
6f94282 -
Training in progress, step 12500
f547a42 -
Training in progress, step 12000
41b7d6a -
Training in progress, step 11500
e57d80d -
Training in progress, step 11000
b92b900 -
Training in progress, step 10500
f2e77e3 -
Training in progress, step 10000
f8ff635 -
Training in progress, step 9500
85a5e90 -
Training in progress, step 9000
95f4c65 -
Training in progress, step 8500
cfc5932 -
Training in progress, step 8000
52235b6 -
Training in progress, step 7500
d6cafde -
Training in progress, step 7000
1142fbe -
Training in progress, step 6500
5141b2d -
Training in progress, step 6000
89665eb -
Training in progress, step 5500
e100ada