Instructions to use bigjoedata/rockbot355M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bigjoedata/rockbot355M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="bigjoedata/rockbot355M")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("bigjoedata/rockbot355M") model = AutoModelForCausalLM.from_pretrained("bigjoedata/rockbot355M") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use bigjoedata/rockbot355M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bigjoedata/rockbot355M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bigjoedata/rockbot355M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/bigjoedata/rockbot355M
- SGLang
How to use bigjoedata/rockbot355M 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 "bigjoedata/rockbot355M" \ --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": "bigjoedata/rockbot355M", "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 "bigjoedata/rockbot355M" \ --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": "bigjoedata/rockbot355M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use bigjoedata/rockbot355M with Docker Model Runner:
docker model run hf.co/bigjoedata/rockbot355M
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("bigjoedata/rockbot355M")
model = AutoModelForCausalLM.from_pretrained("bigjoedata/rockbot355M")YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
πΈ π₯ Rockbot π€ π§
A GPT-2 based lyrics generator fine-tuned on the writing styles of 16000 songs by 270 artists across MANY genres (not just rock).
Instructions: Type in a fake song title, pick an artist, click "Generate".
Most language models are imprecise and Rockbot is no exception. You may see NSFW lyrics unexpectedly. I have made no attempts to censor. Generated lyrics may be repetitive and/or incoherent at times, but hopefully you'll encounter something interesting or memorable.
Oh, and generation is resource intense and can be slow. I set governors on song length to keep generation time somewhat reasonable. You may adjust song length and other parameters on the left or check out Github to spin up your own Rockbot.
Just have fun.
Demo Adjust settings to increase speed
GPT-2 124M version Model page on Hugging Face
DistilGPT2 version Model page on Hugging Face This is leaner with the tradeoff being that the lyrics are more simplistic.
πΉ πͺ π· πΊ πͺ πͺ π»
Background
With the shutdown of Google Play Music I used Google's takeout function to gather the metadata from artists I've listened to over the past several years. I wanted to take advantage of this bounty to build something fun. I scraped the top 50 lyrics for artists I'd listened to at least once from Genius, then fine tuned GPT-2's 124M token model using the AITextGen framework after considerable post-processing. For more on generation, see here.
Full Tech Stack
Google Play Music (R.I.P.). Python. Streamlit. GPT-2. AITextGen. Pandas. LyricsGenius. Google Colab (GPU based Training). Knime (data cleaning).
How to Use The Model
Please refer to AITextGen for much better documentation.
Training Parameters Used
ai.train("lyrics.txt",
line_by_line=False,
from_cache=False,
num_steps=10000,
generate_every=2000,
save_every=2000,
save_gdrive=False,
learning_rate=1e-3,
batch_size=3,
eos_token="<|endoftext|>",
#fp16=True
)
To Use
Generate With Prompt (Use Title Case):
Song Name
BY
Artist Name
- Downloads last month
- 3
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="bigjoedata/rockbot355M")