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))