Text Generation
Transformers
PyTorch
JAX
English
gpt2
huggingartists
lyrics
lm-head
causal-lm
text-generation-inference
Instructions to use huggingartists/gspd with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use huggingartists/gspd with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="huggingartists/gspd")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("huggingartists/gspd") model = AutoModelForCausalLM.from_pretrained("huggingartists/gspd", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use huggingartists/gspd with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "huggingartists/gspd" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "huggingartists/gspd", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/huggingartists/gspd
- SGLang
How to use huggingartists/gspd 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 "huggingartists/gspd" \ --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": "huggingartists/gspd", "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 "huggingartists/gspd" \ --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": "huggingartists/gspd", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use huggingartists/gspd with Docker Model Runner:
docker model run hf.co/huggingartists/gspd
| { | |
| "best_metric": 1.6192371845245361, | |
| "best_model_checkpoint": "output/gspd/checkpoint-102", | |
| "epoch": 1.0, | |
| "global_step": 102, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.05, | |
| "learning_rate": 0.00013638815138477438, | |
| "loss": 1.4771, | |
| "step": 5 | |
| }, | |
| { | |
| "epoch": 0.1, | |
| "learning_rate": 0.00013397182122930294, | |
| "loss": 1.6873, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 0.15, | |
| "learning_rate": 0.0001300082017869573, | |
| "loss": 1.5944, | |
| "step": 15 | |
| }, | |
| { | |
| "epoch": 0.2, | |
| "learning_rate": 0.0001245911081876368, | |
| "loss": 1.563, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 0.25, | |
| "learning_rate": 0.0001178487579222207, | |
| "loss": 1.5602, | |
| "step": 25 | |
| }, | |
| { | |
| "epoch": 0.29, | |
| "learning_rate": 0.00010994073605561706, | |
| "loss": 1.5302, | |
| "step": 30 | |
| }, | |
| { | |
| "epoch": 0.34, | |
| "learning_rate": 0.00010105421799895028, | |
| "loss": 1.5424, | |
| "step": 35 | |
| }, | |
| { | |
| "epoch": 0.39, | |
| "learning_rate": 9.139953924430467e-05, | |
| "loss": 1.6088, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 0.44, | |
| "learning_rate": 8.120521692221671e-05, | |
| "loss": 1.6842, | |
| "step": 45 | |
| }, | |
| { | |
| "epoch": 0.49, | |
| "learning_rate": 7.071254101695329e-05, | |
| "loss": 1.5729, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 0.54, | |
| "learning_rate": 6.0169863260400656e-05, | |
| "loss": 1.4031, | |
| "step": 55 | |
| }, | |
| { | |
| "epoch": 0.59, | |
| "learning_rate": 4.9826718881055135e-05, | |
| "loss": 1.4452, | |
| "step": 60 | |
| }, | |
| { | |
| "epoch": 0.64, | |
| "learning_rate": 3.992792034076664e-05, | |
| "loss": 1.6059, | |
| "step": 65 | |
| }, | |
| { | |
| "epoch": 0.69, | |
| "learning_rate": 3.0707762854909365e-05, | |
| "loss": 1.4848, | |
| "step": 70 | |
| }, | |
| { | |
| "epoch": 0.74, | |
| "learning_rate": 2.2384478845846205e-05, | |
| "loss": 1.531, | |
| "step": 75 | |
| }, | |
| { | |
| "epoch": 0.78, | |
| "learning_rate": 1.515507258753902e-05, | |
| "loss": 1.4834, | |
| "step": 80 | |
| }, | |
| { | |
| "epoch": 0.83, | |
| "learning_rate": 9.190657300387498e-06, | |
| "loss": 1.4458, | |
| "step": 85 | |
| }, | |
| { | |
| "epoch": 0.88, | |
| "learning_rate": 4.6324050628612214e-06, | |
| "loss": 1.5666, | |
| "step": 90 | |
| }, | |
| { | |
| "epoch": 0.93, | |
| "learning_rate": 1.588205401691401e-06, | |
| "loss": 1.5073, | |
| "step": 95 | |
| }, | |
| { | |
| "epoch": 0.98, | |
| "learning_rate": 1.3011164863877445e-07, | |
| "loss": 1.4195, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "eval_loss": 1.6192371845245361, | |
| "eval_runtime": 3.8612, | |
| "eval_samples_per_second": 44.287, | |
| "eval_steps_per_second": 5.698, | |
| "step": 102 | |
| } | |
| ], | |
| "max_steps": 204, | |
| "num_train_epochs": 2, | |
| "total_flos": 105823272960000.0, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |