Run this model with HF Jobs

Run Vortexal2/kera-songwriter-e4b 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/Vortexal2/kera-songwriter-e4b. 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/Vortexal2/kera-songwriter-e4b 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/Vortexal2/kera-songwriter-e4b. 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/Vortexal2/kera-songwriter-e4b. 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.
kera-songwriter-e4b / README.md
Vortexal2's picture
Model card: run it with llama.cpp
2fc5d33 verified
|
Raw History Blame Contribute Delete
4.62 kB
metadata
license: apache-2.0
base_model: google/gemma-4-E4B-it
base_model_relation: finetune
library_name: transformers
pipeline_tag: text-generation
language:
  - en
tags:
  - gguf
  - lora
  - music
  - lyrics
  - songwriting
  - text-to-music
  - gemma4
  - kera

Kera

Kera Songwriter

Turns one line into style tags, the vocal, tempo, key, a section-by-section plan and original lyrics for an AI music generator.

Stats

Model size 8B parameters · 5.3 GB (Q4_K_M)
Time per song about 15 seconds per lyric

Run it

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

llama.cpp

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"}
  ]}'

Ask it

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.

transformers
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 made
  • Training method: a LoRA fine-tune of Gemma 4 E4B it (rank 16, alpha 32), 7,000 steps on one DGX Spark, merged into the weights here.
  • Data: song facts from Wikipedia (CC BY-SA 4.0) and MusicBrainz/AcousticBrainz (CC0). Claude Sonnet 5.5 turned the facts into 7,134 lessons, each planning a new song in that style. No real lyrics were used.
  • Limits: it writes in English only. Read the lyrics before you release a song.

Licence: Apache 2.0. Gemma 4 is a model by Google DeepMind.