Text Generation
Transformers
TensorBoard
Safetensors
gpt2
Generated from Trainer
text-generation-inference
Instructions to use dwb2023/lyric-gpt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dwb2023/lyric-gpt with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dwb2023/lyric-gpt")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("dwb2023/lyric-gpt") model = AutoModelForCausalLM.from_pretrained("dwb2023/lyric-gpt") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use dwb2023/lyric-gpt with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dwb2023/lyric-gpt" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dwb2023/lyric-gpt", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/dwb2023/lyric-gpt
- SGLang
How to use dwb2023/lyric-gpt 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 "dwb2023/lyric-gpt" \ --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": "dwb2023/lyric-gpt", "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 "dwb2023/lyric-gpt" \ --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": "dwb2023/lyric-gpt", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use dwb2023/lyric-gpt with Docker Model Runner:
docker model run hf.co/dwb2023/lyric-gpt
lyric-gpt
This model is a fine-tuned version of gpt2 on the None dataset. It achieves the following results on the evaluation set:
- Loss: 5.4529
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 0.0001
- train_batch_size: 8
- eval_batch_size: 8
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 30
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 3.406 | 1.0 | 92 | 3.1840 |
| 2.8788 | 2.0 | 184 | 3.2090 |
| 2.92 | 3.0 | 276 | 3.2549 |
| 2.8856 | 4.0 | 368 | 3.2943 |
| 2.5725 | 5.0 | 460 | 3.3856 |
| 2.3395 | 6.0 | 552 | 3.5080 |
| 2.167 | 7.0 | 644 | 3.6203 |
| 1.9773 | 8.0 | 736 | 3.7681 |
| 1.9391 | 9.0 | 828 | 3.8787 |
| 1.6115 | 10.0 | 920 | 4.0798 |
| 1.6445 | 11.0 | 1012 | 4.1552 |
| 1.528 | 12.0 | 1104 | 4.3184 |
| 1.3714 | 13.0 | 1196 | 4.4737 |
| 1.269 | 14.0 | 1288 | 4.5747 |
| 1.0994 | 15.0 | 1380 | 4.6625 |
| 1.0443 | 16.0 | 1472 | 4.8032 |
| 0.9456 | 17.0 | 1564 | 4.9048 |
| 0.8008 | 18.0 | 1656 | 4.9934 |
| 0.8819 | 19.0 | 1748 | 5.0594 |
| 0.8631 | 20.0 | 1840 | 5.1399 |
| 0.7939 | 21.0 | 1932 | 5.1844 |
| 0.717 | 22.0 | 2024 | 5.2256 |
| 0.8029 | 23.0 | 2116 | 5.2945 |
| 0.7064 | 24.0 | 2208 | 5.3211 |
| 0.6867 | 25.0 | 2300 | 5.3637 |
| 0.6398 | 26.0 | 2392 | 5.3977 |
| 0.5992 | 27.0 | 2484 | 5.4118 |
| 0.5986 | 28.0 | 2576 | 5.4357 |
| 0.5909 | 29.0 | 2668 | 5.4557 |
| 0.512 | 30.0 | 2760 | 5.4529 |
Framework versions
- Transformers 4.41.1
- Pytorch 2.3.0+cu121
- Datasets 2.19.1
- Tokenizers 0.19.1
- Downloads last month
- 3
Model tree for dwb2023/lyric-gpt
Base model
openai-community/gpt2