Text Generation
Transformers
PyTorch
JAX
English
gpt2
huggingartists
lyrics
lm-head
causal-lm
text-generation-inference
Instructions to use huggingartists/tool with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use huggingartists/tool with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="huggingartists/tool")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("huggingartists/tool") model = AutoModelForCausalLM.from_pretrained("huggingartists/tool", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use huggingartists/tool with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "huggingartists/tool" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "huggingartists/tool", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/huggingartists/tool
- SGLang
How to use huggingartists/tool 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/tool" \ --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/tool", "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/tool" \ --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/tool", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use huggingartists/tool with Docker Model Runner:
docker model run hf.co/huggingartists/tool
| { | |
| "best_metric": 2.4025585651397705, | |
| "best_model_checkpoint": "output/tool/checkpoint-55", | |
| "epoch": 5.0, | |
| "global_step": 55, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.45, | |
| "learning_rate": 7.836279790554737e-05, | |
| "loss": 3.2081, | |
| "step": 5 | |
| }, | |
| { | |
| "epoch": 0.91, | |
| "learning_rate": 2.778782010045488e-06, | |
| "loss": 3.1621, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "eval_loss": 2.746370792388916, | |
| "eval_runtime": 0.6285, | |
| "eval_samples_per_second": 22.274, | |
| "eval_steps_per_second": 3.182, | |
| "step": 11 | |
| }, | |
| { | |
| "epoch": 1.36, | |
| "learning_rate": 4.0102530108070535e-05, | |
| "loss": 2.9659, | |
| "step": 15 | |
| }, | |
| { | |
| "epoch": 1.82, | |
| "learning_rate": 0.000126309992352219, | |
| "loss": 2.8367, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 2.0, | |
| "eval_loss": 2.761970043182373, | |
| "eval_runtime": 0.6295, | |
| "eval_samples_per_second": 22.239, | |
| "eval_steps_per_second": 3.177, | |
| "step": 22 | |
| }, | |
| { | |
| "epoch": 2.27, | |
| "learning_rate": 0.00011352344634864655, | |
| "loss": 2.6931, | |
| "step": 25 | |
| }, | |
| { | |
| "epoch": 2.73, | |
| "learning_rate": 2.3676553651353525e-05, | |
| "loss": 2.6297, | |
| "step": 30 | |
| }, | |
| { | |
| "epoch": 3.0, | |
| "eval_loss": 2.716337203979492, | |
| "eval_runtime": 0.6316, | |
| "eval_samples_per_second": 22.166, | |
| "eval_steps_per_second": 3.167, | |
| "step": 33 | |
| }, | |
| { | |
| "epoch": 3.18, | |
| "learning_rate": 1.0890007647780947e-05, | |
| "loss": 2.7361, | |
| "step": 35 | |
| }, | |
| { | |
| "epoch": 3.64, | |
| "learning_rate": 9.709746989192932e-05, | |
| "loss": 2.4185, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 4.0, | |
| "eval_loss": 2.619758367538452, | |
| "eval_runtime": 0.5572, | |
| "eval_samples_per_second": 23.33, | |
| "eval_steps_per_second": 3.589, | |
| "step": 44 | |
| }, | |
| { | |
| "epoch": 4.09, | |
| "learning_rate": 0.00013442121798995453, | |
| "loss": 2.4054, | |
| "step": 45 | |
| }, | |
| { | |
| "epoch": 4.55, | |
| "learning_rate": 5.883720209445262e-05, | |
| "loss": 2.2843, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 5.0, | |
| "learning_rate": 0.0, | |
| "loss": 2.4935, | |
| "step": 55 | |
| }, | |
| { | |
| "epoch": 5.0, | |
| "eval_loss": 2.4025585651397705, | |
| "eval_runtime": 0.1869, | |
| "eval_samples_per_second": 80.273, | |
| "eval_steps_per_second": 10.703, | |
| "step": 55 | |
| } | |
| ], | |
| "max_steps": 55, | |
| "num_train_epochs": 5, | |
| "total_flos": 57222955008000.0, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |