Instructions to use Locutusque/gpt2-large-conversational with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Locutusque/gpt2-large-conversational with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Locutusque/gpt2-large-conversational")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Locutusque/gpt2-large-conversational") model = AutoModelForCausalLM.from_pretrained("Locutusque/gpt2-large-conversational", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Locutusque/gpt2-large-conversational with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Locutusque/gpt2-large-conversational" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Locutusque/gpt2-large-conversational", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Locutusque/gpt2-large-conversational
- SGLang
How to use Locutusque/gpt2-large-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 "Locutusque/gpt2-large-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": "Locutusque/gpt2-large-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 "Locutusque/gpt2-large-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": "Locutusque/gpt2-large-conversational", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Locutusque/gpt2-large-conversational with Docker Model Runner:
docker model run hf.co/Locutusque/gpt2-large-conversational
Commit History
-
Update README.md
3f4f249
-
Adding Evaluation Results (#2)
- Adding Evaluation Results (694c7d5f844dbd2c6f5147d953b5fbd6b639705e) Co-authored-by: Open LLM Leaderboard PR Bot <leaderboard-pr-bot@users.noreply.huggingface.co>b39929a
-
Delete adapter_config.json
a020a56
-
Update README.md
3be2db4
-
Update README.md
6674ad1
-
Update README.md
f0703e4
-
Update README.md
ea47fa3
-
Update README.md
e809d5d
-
Update README.md
dd888ab
-
Update README.md
927b82e -
Upload pytorch_model.bin
bd6b737
-
Update README.md
d30000f
-
Update README.md
3fbbc7a -
Update README.md
0e51a5f -
Delete pytorch_model.bin
de9600a -
Adding `safetensors` variant of this model (#1)
- Adding `safetensors` variant of this model (95b4011aff940a7eae54900705a6c0118bd0bda8) Co-authored-by: Safetensors convertbot <SFconvertbot@users.noreply.huggingface.co>e948ca7
-
Update README.md
a71c421 -
Upload pytorch_model.bin
945a6a3 -
Update README.md
7e5f3de -
Delete pytorch_model.bin
2a07a82 -
Update README.md
d1e2690
-
Update README.md
30e58c8 -
Create README.md
1bf2378 -
Upload 11 files
af9da65 -
initial commit
0a74920