Text Generation
Transformers
PyTorch
JAX
English
gpt2
huggingartists
lyrics
lm-head
causal-lm
text-generation-inference
Instructions to use huggingartists/ghost with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use huggingartists/ghost with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="huggingartists/ghost")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("huggingartists/ghost") model = AutoModelForCausalLM.from_pretrained("huggingartists/ghost", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use huggingartists/ghost with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "huggingartists/ghost" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "huggingartists/ghost", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/huggingartists/ghost
- SGLang
How to use huggingartists/ghost 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/ghost" \ --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/ghost", "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/ghost" \ --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/ghost", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use huggingartists/ghost with Docker Model Runner:
docker model run hf.co/huggingartists/ghost
| { | |
| "best_metric": 2.9821596145629883, | |
| "best_model_checkpoint": "output/ghost/checkpoint-76", | |
| "epoch": 4.0, | |
| "global_step": 76, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.26, | |
| "learning_rate": 0.00011506151581352585, | |
| "loss": 3.8815, | |
| "step": 5 | |
| }, | |
| { | |
| "epoch": 0.53, | |
| "learning_rate": 6.293505690059801e-05, | |
| "loss": 3.9129, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 0.79, | |
| "learning_rate": 1.4464961055407408e-05, | |
| "loss": 3.5855, | |
| "step": 15 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "eval_loss": 3.072023868560791, | |
| "eval_runtime": 1.4457, | |
| "eval_samples_per_second": 21.444, | |
| "eval_steps_per_second": 2.767, | |
| "step": 19 | |
| }, | |
| { | |
| "epoch": 1.05, | |
| "learning_rate": 9.35614586573241e-07, | |
| "loss": 3.6273, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 1.32, | |
| "learning_rate": 3.1079356352801514e-05, | |
| "loss": 3.2682, | |
| "step": 25 | |
| }, | |
| { | |
| "epoch": 1.58, | |
| "learning_rate": 8.54403044178588e-05, | |
| "loss": 3.8264, | |
| "step": 30 | |
| }, | |
| { | |
| "epoch": 1.84, | |
| "learning_rate": 0.00012893189933276512, | |
| "loss": 3.2622, | |
| "step": 35 | |
| }, | |
| { | |
| "epoch": 2.0, | |
| "eval_loss": 3.008462905883789, | |
| "eval_runtime": 1.4442, | |
| "eval_samples_per_second": 21.466, | |
| "eval_steps_per_second": 2.77, | |
| "step": 38 | |
| }, | |
| { | |
| "epoch": 2.11, | |
| "learning_rate": 0.00013348306278066356, | |
| "loss": 3.1918, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 2.37, | |
| "learning_rate": 9.615630613119375e-05, | |
| "loss": 3.2537, | |
| "step": 45 | |
| }, | |
| { | |
| "epoch": 2.63, | |
| "learning_rate": 4.1043693868806304e-05, | |
| "loss": 3.0971, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 2.89, | |
| "learning_rate": 3.7169372193364486e-06, | |
| "loss": 2.9811, | |
| "step": 55 | |
| }, | |
| { | |
| "epoch": 3.0, | |
| "eval_loss": 2.9955391883850098, | |
| "eval_runtime": 1.4389, | |
| "eval_samples_per_second": 21.544, | |
| "eval_steps_per_second": 2.78, | |
| "step": 57 | |
| }, | |
| { | |
| "epoch": 3.16, | |
| "learning_rate": 8.268100667234827e-06, | |
| "loss": 2.811, | |
| "step": 60 | |
| }, | |
| { | |
| "epoch": 3.42, | |
| "learning_rate": 5.175969558214116e-05, | |
| "loss": 3.1649, | |
| "step": 65 | |
| }, | |
| { | |
| "epoch": 3.68, | |
| "learning_rate": 0.0001061206436471984, | |
| "loss": 2.7835, | |
| "step": 70 | |
| }, | |
| { | |
| "epoch": 3.95, | |
| "learning_rate": 0.00013626438541342674, | |
| "loss": 2.9919, | |
| "step": 75 | |
| }, | |
| { | |
| "epoch": 4.0, | |
| "eval_loss": 2.9821596145629883, | |
| "eval_runtime": 1.4488, | |
| "eval_samples_per_second": 21.397, | |
| "eval_steps_per_second": 2.761, | |
| "step": 76 | |
| } | |
| ], | |
| "max_steps": 380, | |
| "num_train_epochs": 20, | |
| "total_flos": 76297273344000.0, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |