MuseCraft-Music / README.md
alvanalrakib's picture
Update README.md
977b405 verified
---
license: mit
language:
- en
pretty_name: a
---
# 🎡 MuseCraft-Music: Million Lyrics Chat Dataset
<div align="center">
![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)
</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! 🎡**
[![πŸ€— 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*
</div>