Turns one line into style tags, the vocal, tempo, key, a section-by-section plan and original lyrics for an AI music generator.
| Model size | 8B parameters · 5.3 GB (Q4_K_M) |
| Time per song | about 15 seconds per lyric |
kera serve -m kera-songwriter-e4b-Q4_K_M.gguf --alias songwriter -c 16384 -ngl 99
| File | Size | Use |
|---|---|---|
kera-songwriter-e4b-Q4_K_M.gguf |
5.3 GB | Start here |
kera-songwriter-e4b-Q8_0.gguf |
8.0 GB | Higher quality |
kera-songwriter-e4b-BF16.gguf |
15 GB | Full precision |
model-*.safetensors |
16 GB | transformers |
lora/ |
77 MB | Just the fine-tune |
Download and run it straight from Hugging Face:
llama-server -hf KeraAI/kera-songwriter-e4b:Q4_K_M -c 16384 -ngl 99 --jinja
Or with a file you've downloaded:
llama-server -m kera-songwriter-e4b-Q4_K_M.gguf -c 16384 -ngl 99 --jinja
Then ask it on http://localhost:8080:
curl http://localhost:8080/v1/chat/completions -H "Content-Type: application/json" -d '{
"temperature": 0.8, "top_p": 0.95, "max_tokens": 2400,
"chat_template_kwargs": {"enable_thinking": false},
"messages": [
{"role": "system", "content": "You are Generators'\'' songwriter. From what the person asks for, plan the song for the music generator (style tags, vocal, tempo, key, time, length, section-by-section build with energy 1-10) and write original lyrics that fit it. Never use real songs'\'' lyrics or artists'\'' names."},
{"role": "user", "content": "dreamy synth-pop about driving home at 3am, female vocal, slow build\nLength: 3:30"}
]}'
Use this system prompt and turn thinking off. Temperature 0.8, top-p 0.95.
You are Generators' songwriter. From what the person asks for, plan the song for the music generator (style tags, vocal, tempo, key, time, length, section-by-section build with energy 1-10) and write original lyrics that fit it. Never use real songs' lyrics or artists' names.
dreamy synth-pop about driving home at 3am, female vocal, slow build
Length: 3:30
It answers with TAGS, VOCAL, BPM · KEY · TIME · LENGTH, PLAN, BRIEF and LYRICS. Give your music model the tags as the style and the lyrics as the lyrics.
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "KeraAI/kera-songwriter-e4b"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, dtype="bfloat16", device_map="auto")
SYSTEM = ("You are Generators' songwriter. From what the person asks for, plan the song for the music generator "
"(style tags, vocal, tempo, key, time, length, section-by-section build with energy 1-10) and write "
"original lyrics that fit it. Never use real songs' lyrics or artists' names.")
msgs = [{"role": "system", "content": SYSTEM},
{"role": "user", "content": "warm acoustic folk love song, male vocal, fingerpicked guitar\nLength: 3:00"}]
ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt", return_dict=True,
enable_thinking=False).to(model.device)
out = model.generate(**ids, max_new_tokens=2400, do_sample=True, temperature=0.8, top_p=0.95)
print(tok.decode(out[0][ids["input_ids"].shape[1]:], skip_special_tokens=True))
How it was madeLicence: Apache 2.0. Gemma 4 is a model by Google DeepMind.
google/gemma-4-E4B-it