Text Generation
Transformers
PyTorch
Vietnamese
gpt2
Luc bat poem
GPT2
Causal-lm
text-generation-inference
Instructions to use luanngo/PoetGPT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use luanngo/PoetGPT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="luanngo/PoetGPT")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("luanngo/PoetGPT") model = AutoModelForCausalLM.from_pretrained("luanngo/PoetGPT") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use luanngo/PoetGPT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "luanngo/PoetGPT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "luanngo/PoetGPT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/luanngo/PoetGPT
- SGLang
How to use luanngo/PoetGPT 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 "luanngo/PoetGPT" \ --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": "luanngo/PoetGPT", "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 "luanngo/PoetGPT" \ --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": "luanngo/PoetGPT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use luanngo/PoetGPT with Docker Model Runner:
docker model run hf.co/luanngo/PoetGPT
Commit History
change prefix to ngay xuan 131277c
luannd commited on
prefix mua thu f4514e4
luannd commited on
update readme 4b74717
luannd commited on
fix bug readme 106f2b6
luannd commited on
change readme 3ea4f9c
luannd commited on
update widgets a0fb627
luannd commited on