Text Generation
Transformers
PyTorch
Safetensors
gpt2
chatbot
dialogue
distilgpt2
ai-msgbot
text-generation-inference
Instructions to use ethzanalytics/distilgpt2-tiny-conversational with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ethzanalytics/distilgpt2-tiny-conversational with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ethzanalytics/distilgpt2-tiny-conversational")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ethzanalytics/distilgpt2-tiny-conversational") model = AutoModelForCausalLM.from_pretrained("ethzanalytics/distilgpt2-tiny-conversational", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ethzanalytics/distilgpt2-tiny-conversational with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ethzanalytics/distilgpt2-tiny-conversational" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ethzanalytics/distilgpt2-tiny-conversational", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ethzanalytics/distilgpt2-tiny-conversational
- SGLang
How to use ethzanalytics/distilgpt2-tiny-conversational 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 "ethzanalytics/distilgpt2-tiny-conversational" \ --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": "ethzanalytics/distilgpt2-tiny-conversational", "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 "ethzanalytics/distilgpt2-tiny-conversational" \ --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": "ethzanalytics/distilgpt2-tiny-conversational", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ethzanalytics/distilgpt2-tiny-conversational with Docker Model Runner:
docker model run hf.co/ethzanalytics/distilgpt2-tiny-conversational
Commit History
-
Adding `safetensors` variant of this model (#1)
- Adding `safetensors` variant of this model (0ddd2b79bce669c917729d503ad8cca0bbfee5ab) Co-authored-by: Safetensors convertbot <SFconvertbot@users.noreply.huggingface.co>e26403c
-
Update README.md
374785c
-
tags and üarams
1546be8
-
Update README.md
2c29321
-
Update README.md
ac37ba7
-
Update README.md
575c037 -
Update README.md
37ec79e -
Update README.md
6dbbeca -
Update README.md
ddb0cb8 -
add model
28c78a3 -
add tokenizer
e3396af -
add model
0f50319 -
update model card README.md
152ca25 -
End of training
0afa3fd -
Training in progress, epoch 0
467a60b -
initial commit
76690b2