Text Generation
Transformers
PyTorch
JAX
English
gpt2
huggingartists
lyrics
lm-head
causal-lm
text-generation-inference
Instructions to use huggingartists/macan with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use huggingartists/macan with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="huggingartists/macan")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("huggingartists/macan") model = AutoModelForCausalLM.from_pretrained("huggingartists/macan", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use huggingartists/macan with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "huggingartists/macan" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "huggingartists/macan", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/huggingartists/macan
- SGLang
How to use huggingartists/macan 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/macan" \ --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/macan", "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/macan" \ --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/macan", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use huggingartists/macan with Docker Model Runner:
docker model run hf.co/huggingartists/macan
Download trainer_state.json from huggingartists/macan: direct link, hf CLI and curl.
- Browser
- Download file 1.61 kB
-
https://huggingface.co/huggingartists/macan/resolve/main/trainer_state.json
- Command line
-
hf download hf://huggingartists/macan/trainer_state.json
-
curl -L -o trainer_state.json https://huggingface.co/huggingartists/macan/resolve/main/trainer_state.json
1.61 kB
| { | |
| "best_metric": 1.8112770318984985, | |
| "best_model_checkpoint": "output/macan/checkpoint-36", | |
| "epoch": 2.0, | |
| "global_step": 36, | |
| "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": 2.5021, | |
| "step": 5 | |
| }, | |
| { | |
| "epoch": 0.53, | |
| "learning_rate": 6.293505690059801e-05, | |
| "loss": 2.2306, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 0.79, | |
| "learning_rate": 1.4464961055407408e-05, | |
| "loss": 2.1128, | |
| "step": 15 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "eval_loss": 2.0351359844207764, | |
| "eval_runtime": 0.9179, | |
| "eval_samples_per_second": 22.88, | |
| "eval_steps_per_second": 3.269, | |
| "step": 19 | |
| }, | |
| { | |
| "epoch": 1.11, | |
| "learning_rate": 4.137086214086682e-06, | |
| "loss": 2.0597, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 1.39, | |
| "learning_rate": 4.513741816785908e-05, | |
| "loss": 2.0438, | |
| "step": 25 | |
| }, | |
| { | |
| "epoch": 1.67, | |
| "learning_rate": 0.00010290000000000001, | |
| "loss": 2.1141, | |
| "step": 30 | |
| }, | |
| { | |
| "epoch": 1.94, | |
| "learning_rate": 0.00013615781185663748, | |
| "loss": 2.0135, | |
| "step": 35 | |
| }, | |
| { | |
| "epoch": 2.0, | |
| "eval_loss": 1.8112770318984985, | |
| "eval_runtime": 0.5407, | |
| "eval_samples_per_second": 46.236, | |
| "eval_steps_per_second": 7.398, | |
| "step": 36 | |
| } | |
| ], | |
| "max_steps": 36, | |
| "num_train_epochs": 2, | |
| "total_flos": 36319592448000.0, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |