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")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("luanngo/PoetGPT") model = AutoModelForCausalLM.from_pretrained("luanngo/PoetGPT", device_map="auto") - 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
luannd131277c -
prefix mua thu
luanndf4514e4 -
update readme
luannd4b74717 -
fix bug readme
luannd106f2b6 -
change readme
luannd3ea4f9c -
update widgets
luannda0fb627
-
update model card README.md
c6a2105 -
Model save
fb6b810 -
Training in progress, epoch 14
882148f -
Training in progress, epoch 13
190c277 -
Training in progress, epoch 10
e2fff7b -
Training in progress, epoch 9
315af67 -
Training in progress, epoch 8
a9e8ff6 -
Training in progress, epoch 7
8c5a827 -
Training in progress, epoch 6
e34a364 -
Training in progress, epoch 5
2f9d6bc -
Training in progress, epoch 4
4074e1c -
Training in progress, epoch 3
ab23f28 -
Training in progress, epoch 2
49e68e7 -
Training in progress, epoch 1
164c6f0 -
initial commit
b4415e6