--- license: mit language: - en pretty_name: a --- # 🎵 MuseCraft-Music: Million Lyrics Chat Dataset
![MuseCraft Logo](https://img.shields.io/badge/🎵_MuseCraft-Music_AI-purple?style=for-the-badge) [![🤗 Hugging Face](https://img.shields.io/badge/🤗_Hugging_Face-Dataset-orange?style=flat-square)](https://huggingface.co/datasets/alvanalrakib/MuseCraft-Music) [![📊 Size](https://img.shields.io/badge/Size-1.5GB-blue?style=flat-square)](https://huggingface.co/datasets/alvanalrakib/MuseCraft-Music) [![💬 Conversations](https://img.shields.io/badge/Conversations-992K+-green?style=flat-square)](https://huggingface.co/datasets/alvanalrakib/MuseCraft-Music) [![⚖️ License](https://img.shields.io/badge/License-MIT-yellow?style=flat-square)](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)
--- ## 🎯 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 ```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
🐍 Basic Data Loading ```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 ```
🤖 Transformers Training ```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) ```
🦙 Unsloth Fine-tuning (Recommended) ```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" } ```
🎯 Filter by Genre/Emotion ```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' ) ```
--- ## 🎯 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} } ``` ---
**🎵 Ready to create amazing lyrics AI? Let's build something musical! 🎵** [![🤗 View on Hugging Face](https://img.shields.io/badge/🤗_View_on-Hugging_Face-orange?style=for-the-badge)](https://huggingface.co/datasets/alvanalrakib/MuseCraft-Music) *Built with ❤️ for the AI Music Community*