| --- |
| license: mit |
| language: |
| - en |
| pretty_name: a |
| --- |
| # π΅ MuseCraft-Music: Million Lyrics Chat Dataset |
|
|
| <div align="center"> |
|
|
|  |
|
|
| [](https://huggingface.co/datasets/alvanalrakib/MuseCraft-Music) |
| [](https://huggingface.co/datasets/alvanalrakib/MuseCraft-Music) |
| [](https://huggingface.co/datasets/alvanalrakib/MuseCraft-Music) |
| [](LICENSE) |
|
|
| *Train AI models to generate emotionally-rich, contextually-aware lyrics with 992K+ conversation pairs* |
|
|
| [π Quick Start](#-quick-start) β’ [π Dataset Info](#-dataset-overview) β’ [π» Usage](#-usage-examples) β’ [π·οΈ Citation](#-citation) |
|
|
| </div> |
|
|
| --- |
|
|
| ## π― 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. |
|
|
| <details> |
| <summary>π <strong>Key Highlights</strong></summary> |
|
|
| - π **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 |
|
|
| </details> |
|
|
| --- |
|
|
| ## π 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 |
|
|
| <details> |
| <summary>π <strong>Instruction-Based</strong> (204,242 conversations)</summary> |
|
|
| Theme and topic-based prompts |
| ``` |
| "Compose lyrics that capture the essence of self-discovery." |
| ``` |
| </details> |
|
|
| <details> |
| <summary>πΈ <strong>Genre-Specific</strong> (204,302 conversations)</summary> |
|
|
| Genre-targeted prompts |
| ``` |
| "Write Metal lyrics that would fit perfectly in the genre." |
| ``` |
| </details> |
|
|
| <details> |
| <summary>π <strong>Mood-Based</strong> (204,461 conversations)</summary> |
|
|
| Atmosphere and mood prompts |
| ``` |
| "Write lyrics that convey a powerful atmosphere." |
| ``` |
| </details> |
|
|
| <details> |
| <summary>β¨ <strong>General Creative</strong> (203,954 conversations)</summary> |
|
|
| Open-ended creative prompts |
| ``` |
| "Create original song lyrics with emotional depth." |
| ``` |
| </details> |
|
|
| <details> |
| <summary>π <strong>Emotion-Focused</strong> (95,673 conversations)</summary> |
|
|
| **8 Emotion Categories:** |
| - π’ Sadness β’ π Joy β’ π Anger β’ β€οΈ Love |
| - π¨ Fear β’ π² Surprise β’ π Thankfulness β’ π Neutral |
| </details> |
|
|
| <details> |
| <summary>π€ <strong>Artist-Style</strong> (79,614 conversations)</summary> |
|
|
| Artist-inspired style prompts |
| ``` |
| "Write lyrics in the style of [Artist] with emotional depth." |
| ``` |
| </details> |
|
|
| --- |
|
|
| ## π Quick Start |
|
|
| ### Installation |
|
|
| ```bash |
| pip install datasets transformers |
| ``` |
|
|
| ### Load Dataset |
|
|
| ```python |
| 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 |
|
|
| ```json |
| { |
| "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 |
|
|
| <details> |
| <summary>π <strong>Basic Data Loading</strong></summary> |
|
|
| ```python |
| 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 |
| ``` |
| </details> |
|
|
| <details> |
| <summary>π€ <strong>Transformers Training</strong></summary> |
|
|
| ```python |
| 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) |
| ``` |
| </details> |
|
|
| <details> |
| <summary>π¦ <strong>Unsloth Fine-tuning (Recommended)</strong></summary> |
|
|
| ```python |
| 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" |
| } |
| ``` |
| </details> |
|
|
| <details> |
| <summary>π― <strong>Filter by Genre/Emotion</strong></summary> |
|
|
| ```python |
| # 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' |
| ) |
| ``` |
| </details> |
|
|
| --- |
|
|
| ## π― 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 |
|
|
| ```python |
| 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](https://huggingface.co/datasets/D3STRON/music_lyrics_500k) | 498,280 (50.2%) | D3STRON | |
| | [π΅ Genius Lyrics](https://huggingface.co/datasets/brunokreiner/genius-lyrics) | 477,844 (48.2%) | Bruno Kreiner | |
| | [π Lyrics Emotion](https://huggingface.co/datasets/ernestchu/lyrics-emotion-classification) | 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 |
|
|
| ```bibtex |
| @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} |
| } |
| ``` |
|
|
| --- |
|
|
| <div align="center"> |
|
|
| **π΅ Ready to create amazing lyrics AI? Let's build something musical! π΅** |
|
|
| [](https://huggingface.co/datasets/alvanalrakib/MuseCraft-Music) |
|
|
| *Built with β€οΈ for the AI Music Community* |
|
|
| </div> |