Text Generation
Transformers
PyTorch
JAX
English
gpt2
huggingartists
lyrics
lm-head
causal-lm
text-generation-inference
Run this model with HF Jobs
Run huggingartists/rocket on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/huggingartists/rocket. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/huggingartists/rocket on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/huggingartists/rocket. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/huggingartists/rocket. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use huggingartists/rocket with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use huggingartists/rocket with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="huggingartists/rocket")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("huggingartists/rocket") model = AutoModelForCausalLM.from_pretrained("huggingartists/rocket", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use huggingartists/rocket with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "huggingartists/rocket" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "huggingartists/rocket", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/huggingartists/rocket
- SGLang
How to use huggingartists/rocket 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/rocket" \ --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/rocket", "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/rocket" \ --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/rocket", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use huggingartists/rocket with Docker Model Runner:
docker model run hf.co/huggingartists/rocket
Commit ·
c0842c1
1
Parent(s): 3e695df
huggingartists
Browse filesFiles changed (15)
- README.mdAdded+97
- config.jsonAdded+41
- evaluation.txtAdded+1
- flax_model.msgpackAdded+3
- merges.txtAdded
- optimizer.ptAdded+3
- pytorch_model.binAdded+3
- rng_state.pthAdded+3
- scheduler.ptAdded+3
- special_tokens_map.jsonAdded+1
- tokenizer.jsonAdded
- tokenizer_config.jsonAdded+1
- trainer_state.jsonAdded+138
- training_args.binAdded+3
- vocab.jsonAdded
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697---language: endatasets:- huggingartists/rockettags:- huggingartists- lyrics- lm-head- causal-lmwidget:- text: "I am"---
<div class="inline-flex flex-col" style="line-height: 1.5;"> <div class="flex"> <div style="display:DISPLAY_1; margin-left: auto; margin-right: auto; width: 92px; height:92px; border-radius: 50%; background-size: cover; background-image: url('https://images.genius.com/0fb709925134799103886db5e722ef73.1000x1000x1.jpg')"> </div> </div> <div style="text-align: center; margin-top: 3px; font-size: 16px; font-weight: 800">🤖 HuggingArtists Model 🤖</div> <div style="text-align: center; font-size: 16px; font-weight: 800">ROCKET</div> <a href="https://genius.com/artists/rocket"> <div style="text-align: center; font-size: 14px;">@rocket</div> </a></div>
I was made with [huggingartists](https://github.com/AlekseyKorshuk/huggingartists).
Create your own bot based on your favorite artist with [the demo](https://colab.research.google.com/github/AlekseyKorshuk/huggingartists/blob/master/huggingartists-demo.ipynb)!
## How does it work?
To understand how the model was developed, check the [W&B report](https://wandb.ai/huggingartists/huggingartists/reportlist).
## Training data
The model was trained on lyrics from ROCKET.
Dataset is available [here](https://huggingface.co/datasets/huggingartists/rocket).And can be used with:
```pythonfrom datasets import load_dataset
dataset = load_dataset("huggingartists/rocket")```
[Explore the data](https://wandb.ai/huggingartists/huggingartists/runs/3ceqmb05/artifacts), which is tracked with [W&B artifacts](https://docs.wandb.com/artifacts) at every step of the pipeline.
## Training procedure
The model is based on a pre-trained [GPT-2](https://huggingface.co/gpt2) which is fine-tuned on ROCKET's lyrics.
Hyperparameters and metrics are recorded in the [W&B training run](https://wandb.ai/huggingartists/huggingartists/runs/37kckftd) for full transparency and reproducibility.
At the end of training, [the final model](https://wandb.ai/huggingartists/huggingartists/runs/37kckftd/artifacts) is logged and versioned.
## How to use
You can use this model directly with a pipeline for text generation:
```pythonfrom transformers import pipelinegenerator = pipeline('text-generation', model='huggingartists/rocket')generator("I am", num_return_sequences=5)```
Or with Transformers library:
```pythonfrom transformers import AutoTokenizer, AutoModelWithLMHead tokenizer = AutoTokenizer.from_pretrained("huggingartists/rocket")
model = AutoModelWithLMHead.from_pretrained("huggingartists/rocket")```
## Limitations and bias
The model suffers from [the same limitations and bias as GPT-2](https://huggingface.co/gpt2#limitations-and-bias).
In addition, the data present in the user's tweets further affects the text generated by the model.
## About
*Built by Aleksey Korshuk*
[](https://github.com/AlekseyKorshuk)
[](https://twitter.com/intent/follow?screen_name=alekseykorshuk)
[](https://t.me/joinchat/_CQ04KjcJ-4yZTky)
For more details, visit the project repository.
[](https://github.com/AlekseyKorshuk/huggingartists)1234567891011121314151617181920212223242526272829303132333435363738394041{ "_name_or_path": "gpt2", "activation_function": "gelu_new", "architectures": [ "GPT2LMHeadModel" ], "attn_pdrop": 0.1, "bos_token_id": 50256, "embd_pdrop": 0.1, "eos_token_id": 50256, "gradient_checkpointing": false, "initializer_range": 0.02, "layer_norm_epsilon": 1e-05, "model_type": "gpt2", "n_ctx": 1024, "n_embd": 768, "n_head": 12, "n_inner": null, "n_layer": 12, "n_positions": 1024, "resid_pdrop": 0.1, "scale_attn_weights": true, "summary_activation": null, "summary_first_dropout": 0.1, "summary_proj_to_labels": true, "summary_type": "cls_index", "summary_use_proj": true, "task_specific_params": { "text-generation": { "do_sample": true, "max_length": 200, "min_length": 100, "temperature": 1.0, "top_p": 0.95 } }, "torch_dtype": "float32", "transformers_version": "4.10.2", "use_cache": true, "vocab_size": 50257}1{"eval_loss": 1.7980366945266724, "eval_runtime": 6.9201, "eval_samples_per_second": 22.398, "eval_steps_per_second": 2.89, "epoch": 1.0}123version https://git-lfs.github.com/spec/v1oid sha256:739ab18172349b45b369997ebe2dd5960cd6cc8aba834f395b660e3226afb853size 497764120123version https://git-lfs.github.com/spec/v1oid sha256:69a20087199581dbbef6fbf3706d1ff092ee0b38eb831c4f13823e259a2ca204size 995603825123version https://git-lfs.github.com/spec/v1oid sha256:40d42b91bf49fe66e4091ca01876598db27e7fec256c25fedb52f188b92ead73size 510403817123version https://git-lfs.github.com/spec/v1oid sha256:7672de6658eb7fdb89c784f19245a026af917d82fe45045d38e1811d87d48e35size 14503123version https://git-lfs.github.com/spec/v1oid sha256:d823323cb31527ecfaa369b864ea0ac6db169047ee9ca95396205d74cf6f7417size 6231{"bos_token": "<|endoftext|>", "eos_token": "<|endoftext|>", "unk_token": "<|endoftext|>"}1{"unk_token": "<|endoftext|>", "bos_token": "<|endoftext|>", "eos_token": "<|endoftext|>", "add_prefix_space": false, "model_max_length": 1024, "special_tokens_map_file": null, "name_or_path": "gpt2", "tokenizer_class": "GPT2Tokenizer"}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138{ "best_metric": 1.7980366945266724, "best_model_checkpoint": "output/rocket/checkpoint-96", "epoch": 1.0, "global_step": 96, "is_hyper_param_search": false, "is_local_process_zero": true, "is_world_process_zero": true, "log_history": [ { "epoch": 0.05, "learning_rate": 0.0001362837325810227, "loss": 2.7976, "step": 5 }, { "epoch": 0.1, "learning_rate": 0.00013355940688336427, "loss": 2.4045, "step": 10 }, { "epoch": 0.16, "learning_rate": 0.00012909979873429716, "loss": 2.2914, "step": 15 }, { "epoch": 0.21, "learning_rate": 0.00012302403914397873, "loss": 2.3337, "step": 20 }, { "epoch": 0.26, "learning_rate": 0.00011549443191876896, "loss": 2.0441, "step": 25 }, { "epoch": 0.31, "learning_rate": 0.00010671211798514472, "loss": 2.0852, "step": 30 }, { "epoch": 0.36, "learning_rate": 9.691170224458148e-05, "loss": 2.106, "step": 35 }, { "epoch": 0.42, "learning_rate": 8.635498649403293e-05, "loss": 2.0148, "step": 40 }, { "epoch": 0.47, "learning_rate": 7.532397582660788e-05, "loss": 1.9367, "step": 45 }, { "epoch": 0.52, "learning_rate": 6.411334533481218e-05, "loss": 1.983, "step": 50 }, { "epoch": 0.57, "learning_rate": 5.3022568355842006e-05, "loss": 1.9455, "step": 55 }, { "epoch": 0.62, "learning_rate": 4.2347916539754844e-05, "loss": 1.9272, "step": 60 }, { "epoch": 0.68, "learning_rate": 3.237454544538475e-05, "loss": 1.9634, "step": 65 }, { "epoch": 0.73, "learning_rate": 2.3368877084135277e-05, "loss": 1.913, "step": 70 }, { "epoch": 0.78, "learning_rate": 1.557148289931624e-05, "loss": 2.0178, "step": 75 }, { "epoch": 0.83, "learning_rate": 9.190657300387505e-06, "loss": 1.9141, "step": 80 }, { "epoch": 0.89, "learning_rate": 4.396853424447469e-06, "loss": 1.8275, "step": 85 }, { "epoch": 0.94, "learning_rate": 1.3181297643383925e-06, "loss": 1.8049, "step": 90 }, { "epoch": 0.99, "learning_rate": 3.672929912131404e-08, "loss": 1.8839, "step": 95 }, { "epoch": 1.0, "eval_loss": 1.7980366945266724, "eval_runtime": 6.7761, "eval_samples_per_second": 22.875, "eval_steps_per_second": 2.952, "step": 96 } ], "max_steps": 96, "num_train_epochs": 1, "total_flos": 99944202240000.0, "trial_name": null, "trial_params": null}123version https://git-lfs.github.com/spec/v1oid sha256:36b687b772104d9dfba7af9da136f468d4550aaa80a3185a22ba3dc401499603size 2671README.mdAdded+97
config.jsonAdded+41
evaluation.txtAdded+1
flax_model.msgpackAdded+3
merges.txtAdded
optimizer.ptAdded+3
pytorch_model.binAdded+3
rng_state.pthAdded+3
scheduler.ptAdded+3
special_tokens_map.jsonAdded+1
tokenizer.jsonAdded
tokenizer_config.jsonAdded+1
trainer_state.jsonAdded+138
training_args.binAdded+3
vocab.jsonAdded