MuseCraft-Music / README.md
alvanalrakib's picture
Update README.md
977b405 verified
metadata
license: mit
language:
  - en
pretty_name: a

🎡 MuseCraft-Music: Million Lyrics Chat Dataset

MuseCraft Logo

πŸ€— Hugging Face πŸ“Š Size πŸ’¬ Conversations βš–οΈ License

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

🎡 Ready to create amazing lyrics AI? Let's build something musical! 🎡

πŸ€— View on Hugging Face

Built with ❀️ for the AI Music Community