license: mit
language:
- en
pretty_name: a
π΅ MuseCraft-Music: Million Lyrics Chat Dataset
Train AI models to generate emotionally-rich, contextually-aware lyrics with 992K+ conversation pairs
π Quick Start β’ π Dataset Info β’ π» Usage β’ π·οΈ Citation
π― What is MuseCraft-Music?
MuseCraft-Music is a comprehensive dataset containing 992,246 conversation pairs designed specifically for training AI models to generate high-quality, emotionally-aware lyrics. Perfect for fine-tuning language models like LLaMA, GPT, and other text generation systems.
π Key Highlights
- π 6 different prompt styles for diverse training scenarios
- π 8 emotion categories for emotion-aware generation
- πΈ 20+ music genres including Metal, Pop, Rock, Hip-Hop
- π¬ Chat-optimized format ready for modern AI training
- π English lyrics from 50,000+ diverse artists
π Dataset Overview
| Metric | Value |
|---|---|
| Total Conversations | 992,246 |
| File Size | 1.5 GB |
| Format | JSONL |
| Language | English |
| Unique Artists | 50,000+ |
π Source Distribution
πΌ Large Music Lyrics ββββββββββββββββββββββββββββ 498,280 (50.2%)
π΅ Genius Lyrics βββββββββββββββββββββββββββ 477,844 (48.2%)
π Emotional Lyrics ββ 16,122 (1.6%)
π Prompt Styles
π Instruction-Based (204,242 conversations)
Theme and topic-based prompts
"Compose lyrics that capture the essence of self-discovery."
πΈ Genre-Specific (204,302 conversations)
Genre-targeted prompts
"Write Metal lyrics that would fit perfectly in the genre."
π Mood-Based (204,461 conversations)
Atmosphere and mood prompts
"Write lyrics that convey a powerful atmosphere."
β¨ General Creative (203,954 conversations)
Open-ended creative prompts
"Create original song lyrics with emotional depth."
π Emotion-Focused (95,673 conversations)
8 Emotion Categories:
- π’ Sadness β’ π Joy β’ π Anger β’ β€οΈ Love
- π¨ Fear β’ π² Surprise β’ π Thankfulness β’ π Neutral
π€ Artist-Style (79,614 conversations)
Artist-inspired style prompts
"Write lyrics in the style of [Artist] with emotional depth."
π Quick Start
Installation
pip install datasets transformers
Load Dataset
from datasets import load_dataset
# Load from Hugging Face Hub
dataset = load_dataset("alvanalrakib/MuseCraft-Music")
# Preview first conversation
print(dataset['train'][0])
Dataset Structure
{
"messages": [
{
"role": "user",
"content": "Write Metal lyrics that would fit perfectly in the genre."
},
{
"role": "assistant",
"content": "On the edge of time / We rise when worlds collide..."
}
],
"metadata": {
"source": "large_lyrics",
"genre": "Metal",
"style": "genre_specific"
}
}
π» Usage Examples
π Basic Data Loading
import json
from datasets import load_dataset
# Load dataset
dataset = load_dataset("alvanalrakib/MuseCraft-Music")
# Access conversations
for example in dataset['train']:
user_prompt = example['messages'][0]['content']
lyrics = example['messages'][1]['content']
genre = example['metadata'].get('genre', 'Unknown')
print(f"Genre: {genre}")
print(f"Prompt: {user_prompt}")
print(f"Lyrics: {lyrics[:100]}...")
break
π€ Transformers Training
from transformers import AutoTokenizer, AutoModelForCausalLM, TrainingArguments
from datasets import load_dataset
# Load model and tokenizer
model_name = "microsoft/DialoGPT-medium"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)
# Load and format dataset
dataset = load_dataset("alvanalrakib/MuseCraft-Music")
def format_conversation(example):
messages = example['messages']
text = f"User: {messages[0]['content']}\nAssistant: {messages[1]['content']}"
return {"text": text}
# Format dataset
formatted_dataset = dataset.map(format_conversation)
π¦ Unsloth Fine-tuning (Recommended)
from unsloth import FastLanguageModel
from datasets import load_dataset
# Load model with Unsloth
model, tokenizer = FastLanguageModel.from_pretrained(
model_name="unsloth/llama-3.1-8b-bnb-4bit",
max_seq_length=2048,
dtype=None,
load_in_4bit=True,
)
# Load dataset
dataset = load_dataset("alvanalrakib/MuseCraft-Music")
# Apply LoRA for efficient training
model = FastLanguageModel.get_peft_model(
model,
r=16,
target_modules=["q_proj", "k_proj", "v_proj", "o_proj"],
lora_alpha=16,
lora_dropout=0,
bias="none"
)
# Training configuration
training_args = {
"per_device_train_batch_size": 2,
"gradient_accumulation_steps": 4,
"learning_rate": 2e-4,
"max_steps": 1000,
"fp16": True,
"optim": "adamw_8bit"
}
π― Filter by Genre/Emotion
# Filter by genre
metal_lyrics = dataset['train'].filter(
lambda x: x['metadata'].get('genre') == 'Metal'
)
# Filter by emotion
sad_lyrics = dataset['train'].filter(
lambda x: x['metadata'].get('emotion') == 'sadness'
)
# Filter by style
instruction_based = dataset['train'].filter(
lambda x: x['metadata'].get('style') == 'instruction_based'
)
π― Training Recommendations
β Optimal Use Cases
- π¦ LLaMA 3.1 Fine-tuning with Unsloth for efficient training
- π¬ Conversational AI for creative lyrics generation
- π Emotion-aware models for targeted expression
- π Multi-genre systems for diverse musical styles
βοΈ Recommended Parameters
training_config = {
"batch_size": 2,
"gradient_accumulation": 4,
"learning_rate": 2e-4,
"max_steps": 1000,
"sequence_length": 2048,
"optimizer": "adamw_8bit"
}
π¨ Expected Capabilities
After training, your model will be able to:
- β Generate lyrics in specific emotional tones
- β Adapt to different music genres (Metal, Pop, Rock, etc.)
- β Create artist-inspired content
- β Respond to creative prompts contextually
- β Maintain quality across diverse prompt styles
π Credits & Acknowledgments
This dataset combines three excellent sources:
| Source | Contribution | Creator |
|---|---|---|
| πΌ Music Lyrics 500K | 498,280 (50.2%) | D3STRON |
| π΅ Genius Lyrics | 477,844 (48.2%) | Bruno Kreiner |
| π Lyrics Emotion | 16,122 (1.6%) | Ernest Chu |
Special thanks to:
- The original dataset creators for their excellent work
- Hugging Face for hosting and infrastructure
- The AI community for fostering open-source development
π License
Released under MIT License. Please respect the terms of the original source datasets.
π·οΈ Citation
@dataset{musecraft_music_2025,
title={MuseCraft-Music: Million Lyrics Chat Dataset},
author={Alvan Alrakib},
year={2025},
publisher={Hugging Face},
url={https://huggingface.co/datasets/alvanalrakib/MuseCraft-Music}
}