Text Generation
Transformers
TensorBoard
Safetensors
gpt2
Generated from Trainer
text-generation-inference
Instructions to use metoonhathung/music-generation with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use metoonhathung/music-generation with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="metoonhathung/music-generation")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("metoonhathung/music-generation") model = AutoModelForCausalLM.from_pretrained("metoonhathung/music-generation", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use metoonhathung/music-generation with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "metoonhathung/music-generation" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "metoonhathung/music-generation", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/metoonhathung/music-generation
- SGLang
How to use metoonhathung/music-generation 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 "metoonhathung/music-generation" \ --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": "metoonhathung/music-generation", "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 "metoonhathung/music-generation" \ --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": "metoonhathung/music-generation", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use metoonhathung/music-generation with Docker Model Runner:
docker model run hf.co/metoonhathung/music-generation
music-generation
This model is a fine-tuned version of gpt2 on an unknown dataset. It achieves the following results on the evaluation set:
- Loss: 0.5312
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: 16
- eval_batch_size: 16
- seed: 42
- gradient_accumulation_steps: 16
- total_train_batch_size: 256
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: cosine
- lr_scheduler_warmup_steps: 100
- num_epochs: 20
- mixed_precision_training: Native AMP
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 3.7238 | 0.9217 | 100 | 2.8460 |
| 2.4643 | 1.8387 | 200 | 1.8829 |
| 1.8339 | 2.7558 | 300 | 1.4234 |
| 1.5013 | 3.6728 | 400 | 1.2203 |
| 1.3125 | 4.5899 | 500 | 1.0966 |
| 1.1899 | 5.5069 | 600 | 1.0028 |
| 1.0982 | 6.4240 | 700 | 0.9353 |
| 1.0302 | 7.3410 | 800 | 0.8779 |
| 0.9766 | 8.2581 | 900 | 0.8276 |
| 0.9243 | 9.1751 | 1000 | 0.7757 |
| 0.8825 | 10.0922 | 1100 | 0.7345 |
| 0.845 | 11.0092 | 1200 | 0.7000 |
| 0.8083 | 11.9309 | 1300 | 0.6624 |
| 0.7784 | 12.8479 | 1400 | 0.6328 |
| 0.7502 | 13.7650 | 1500 | 0.6052 |
| 0.7281 | 14.6820 | 1600 | 0.5816 |
| 0.7072 | 15.5991 | 1700 | 0.5622 |
| 0.6903 | 16.5161 | 1800 | 0.5486 |
| 0.6796 | 17.4332 | 1900 | 0.5386 |
| 0.6705 | 18.3502 | 2000 | 0.5335 |
| 0.6646 | 19.2673 | 2100 | 0.5312 |
Framework versions
- Transformers 4.55.0
- Pytorch 2.6.0+cu124
- Datasets 4.0.0
- Tokenizers 0.21.4
- Downloads last month
- 96
Model tree for metoonhathung/music-generation
Base model
openai-community/gpt2